conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
var AotPlugin = require('@ngtools/webpack').AotPlugin;
=======
var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
>>>>>>>
var AotPlugin = require('@ngtools/webpack').AotPlugin;
var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
<<<<<<<
var isAot = ENV === 'build:aot';
var isProd = ENV === 'build' || isAot;
=======
var isProd = ENV === 'build';
var isDev = !isTest && !isProd;
var BACKEND_API_URL = process.env.BACKEND_API_URL;
if (!BACKEND_API_URL && isDev) {
throw new Error('Environment variable BACKEND_API_URL is required');
}
//Proxy config
var redirectTo;
if (isDev) {
var leadingSlash = BACKEND_API_URL[BACKEND_API_URL.length - 1] === '/';
redirectTo = leadingSlash ? BACKEND_API_URL.substr(0, BACKEND_API_URL.length - 1) : BACKEND_API_URL;
}
var apiUrl = '/client/api';
var consoleUrl = '/client/console';
>>>>>>>
var isAot = ENV === 'build:aot';
var isProd = ENV === 'build' || isAot;
var isDev = !isTest && !isProd;
var BACKEND_API_URL = process.env.BACKEND_API_URL;
if (!BACKEND_API_URL && isDev) {
throw new Error('Environment variable BACKEND_API_URL is required');
}
//Proxy config
var redirectTo;
if (isDev) {
var leadingSlash = BACKEND_API_URL[BACKEND_API_URL.length - 1] === '/';
redirectTo = leadingSlash ? BACKEND_API_URL.substr(0, BACKEND_API_URL.length - 1) : BACKEND_API_URL;
}
var apiUrl = '/client/api';
var consoleUrl = '/client/console'; |
<<<<<<<
var SerialPort = serialport;
var app = require('http').createServer(handler);
var io = require('socket.io').listen(app);
var fs = require('fs');
var static = require('node-static');
=======
var SerialPort = serialport;
var app = require('http').createServer(handler);
var io = require('socket.io').listen(app);
var fs = require('fs');
var nstatic = require('node-static');
>>>>>>>
var SerialPort = serialport;
var app = require('http').createServer(handler);
var io = require('socket.io').listen(app);
var fs = require('fs');
var static = require('node-static');
<<<<<<<
var isConnected, connectedTo, port, isBlocked, lastsent = "", paused = false, blocked = false, queryLoop, queueCounter, connections = [];
=======
var isConnected, connectedTo, port, isBlocked, lastSent = "", paused = false, blocked = false, queryLoop, queueCounter, connections = [];
>>>>>>>
var isConnected, connectedTo, port, isBlocked, lastSent = "", paused = false, blocked = false, queryLoop, queueCounter, connections = [];
<<<<<<<
var feedOverride = 100;
var spindleOverride = 100;
=======
var controllerVersion = 'smoothie';
var fOverride = 100;
var sOverride = 100;
>>>>>>>
var controllerVersion = 'smoothie';
var feedOverride = 100;
var spindleOverride = 100;
<<<<<<<
});
=======
});
>>>>>>>
});
<<<<<<<
data = data.split('\n');
for (var i=0; i<data.length; i++) {
addQ(data[i]);
}
});
socket.on('feedOverride', function(data) {
if (data === 0) {
feedOverride = 100;
} else {
if ((feedOverride + data <= 200) && (feedOverride + data >= 10)) {
// valid range is 10..200, else ignore!
feedOverride += data;
}
}
jumpQ('M220S' + feedOverride);
for (var i in connections) { // iterate over the array of connections
connections[i].emit('feedOverride', feedOverride);
=======
data = data.split('\n');
for (var i=0; i<data.length; i++) {
addQ(data[i]);
}
});
socket.on('override', function(data) {
console.log('OVERRIDE: ' + data);
switch (data) {
case 'Fr1':
case 'Fr10':
fOverride = 100;
break;
case 'F+10':
fOverride += 10;
break;
case 'F-10':
fOverride -= 10;
break;
case 'F+1':
fOverride += 1;
break;
case 'F-1':
fOverride -= 1;
break;
case 'Sr1':
case 'Sr10':
sOverride = 100;
break;
case 'S+10':
sOverride += 10;
break;
case 'S-10':
sOverride -= 10;
break;
case 'S+1':
sOverride += 1;
break;
case 'S-1':
sOverride -= 1;
break;
}
switch (data.substr(0,1)) {
case 'F': //Feed
jumpQ('M220S' + fOverride);
break;
case 'R': // Rapid
//jumpQ('M220 R' + rOverride);
break;
case 'S': // Spindle/Laser PWM
jumpQ('M221S' + sOverride);
break;
>>>>>>>
data = data.split('\n');
for (var i=0; i<data.length; i++) {
addQ(data[i]);
}
});
socket.on('feedOverride', function(data) {
if (data === 0) {
feedOverride = 100;
} else {
if ((feedOverride + data <= 200) && (feedOverride + data >= 10)) {
// valid range is 10..200, else ignore!
feedOverride += data;
}
}
jumpQ('M220S' + feedOverride);
for (var i in connections) { // iterate over the array of connections
connections[i].emit('feedOverride', feedOverride);
<<<<<<<
for (var i in connections) { // iterate over the array of connections
connections[i].emit('qCount', gcodeQueue.length);
}
},500);
for (var i in connections) { // iterate over the array of connections
connections[i].emit("activePorts", port.path + ',' + port.options.baudRate);
}
=======
for (var i in connections) { // iterate over the array of connections
connections[i].emit('qCount', gcodeQueue.length);
}
},500);
for (var i in connections) { // iterate over the array of connections
connections[i].emit("activePorts", port.path + ',' + port.options.baudRate);
}
>>>>>>>
for (var i in connections) { // iterate over the array of connections
connections[i].emit('qCount', gcodeQueue.length);
}
}, 500);
for (var i in connections) { // iterate over the array of connections
connections[i].emit("activePorts", port.path + ',' + port.options.baudRate);
}
<<<<<<<
});
=======
});
>>>>>>>
});
<<<<<<<
console.log('Recv: ' + data);
=======
console.log('Recv: ' + data);
var i;
>>>>>>>
console.log('Recv: ' + data);
<<<<<<<
if(paused !== true){
send1Q();
} else {
for (i in connections) { // iterate over the array of connections
connections[i].emit("data", 'paused...');
}
}
=======
if(paused !== true){
send1Q();
} else {
for (i in connections) { // iterate over the array of connections
connections[i].emit("data", 'paused...');
}
}
>>>>>>>
if(paused !== true){
send1Q();
} else {
for (i in connections) { // iterate over the array of connections
connections[i].emit("data", 'paused...');
}
}
<<<<<<<
for (var i in connections) { // iterate over the array of connections
=======
for (i in connections) { // iterate over the array of connections
>>>>>>>
for (var i in connections) { // iterate over the array of connections |
<<<<<<<
=======
};
org.xml3d.data.Adapter.prototype.notifyChanged = function(e) {
// Notification from the data structure. e is of type org.xml3d.Notification.
};
org.xml3d.data.Adapter.prototype.isAdapterFor = function(aType) {
return false; // Needs to be overwritten
};
>>>>>>>
<<<<<<<
//this.parentFactory = parent;
// This function has to be overwritten
//this.createAdapter = function(node) {
// return null;
//};
=======
>>>>>>> |
<<<<<<<
getter: this.getter,
state: this.state,
=======
state: ObjectAssign({}, this.state),
>>>>>>>
getter: this.getter,
state: ObjectAssign({}, this.state), |
<<<<<<<
window.onload = function() {
if (ieBusterUserAgentCheck()) {
var ieBusterTarget = document.getElementsByTagName("body")[0]
var ieBusterApp = document.createElement("div")
ieBusterApp.innerHTML =
'<div style="position: fixed; top: 0px; left: 0; width: 100%; padding: 16px; box-sizing: border-box; z-index: 999999;">' +
'<div style="width: 100%; max-width:866px; margin: 0 auto; padding: 16px 20px; background-color: #fff; box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 5px 0px; box-sizing: border-box; font-family: SegoeUI, Meiryo, sans-serif;">' +
'<p style="display: block; float: left; width: 100%; max-width: 664px; margin: 0; color: #000; font-size: 14px; font-weight: 400; line-height: 1.5;">' +
"ご利用のインターネットブラウザは推奨環境ではありません。セキュリティリスクが高い状態ですので、最新の Google Chrome をご利用ください。" +
"</p>" +
'<a style="display: block; float: right; height: 36px; width: 154px; padding: 0 16px; background-color: rgb(0, 120, 212); box-sizing: border-box; color: #fff; font-size: 12px; font-weight: 400; line-height: 36px; text-align: center; text-decoration: none; white-space: nowrap;" href="https://www.google.com/chrome/" target="_blank" rel="noopener noreferrer">ダウンロードページへ</a>' +
'<div style="clear: both;"></div>' +
"</div>" +
"</div>"
ieBusterTarget.appendChild(ieBusterApp)
}
=======
if (ieBusterUserAgentCheck()) {
var ieBusterTarget = document.getElementsByTagName('body')[0]
var ieBusterApp = document.createElement('div')
ieBusterApp.innerHTML =
'<div style="position: fixed; top: 0px; left: 0; width: 100%; padding: 16px; box-sizing: border-box; z-index: 999999;">' +
'<div style="width: 100%; max-width:866px; margin: 0 auto; padding: 16px 20px; background-color: #fff; box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 5px 0px; box-sizing: border-box; font-family: SegoeUI, Meiryo, sans-serif;">' +
'<p style="display: block; float: left; width: 100%; max-width: 664px; margin: 0; color: #000; font-size: 14px; font-weight: 400; line-height: 1.5;">' +
'ご利用のインターネットブラウザは推奨環境ではありません。セキュリティリスクが高い状態ですので、最新の Google Chrome をご利用ください。' +
'</p>' +
'<a style="display: block; float: right; height: 36px; width: 154px; padding: 0 16px; background-color: rgb(0, 120, 212); box-sizing: border-box; color: #fff; font-size: 12px; font-weight: 400; line-height: 36px; text-align: center; text-decoration: none; white-space: nowrap;" href="https://www.google.com/chrome/" target="_blank" rel="noopener noreferrer">ダウンロードページへ</a>' +
'<div style="clear: both;"></div>' +
'</div>' +
'</div>'
ieBusterTarget.appendChild(ieBusterApp)
>>>>>>>
window.onload = function() {
if (ieBusterUserAgentCheck()) {
var ieBusterTarget = document.getElementsByTagName('body')[0]
var ieBusterApp = document.createElement('div')
ieBusterApp.innerHTML =
'<div style="position: fixed; top: 0px; left: 0; width: 100%; padding: 16px; box-sizing: border-box; z-index: 999999;">' +
'<div style="width: 100%; max-width:866px; margin: 0 auto; padding: 16px 20px; background-color: #fff; box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 5px 0px; box-sizing: border-box; font-family: SegoeUI, Meiryo, sans-serif;">' +
'<p style="display: block; float: left; width: 100%; max-width: 664px; margin: 0; color: #000; font-size: 14px; font-weight: 400; line-height: 1.5;">' +
'ご利用のインターネットブラウザは推奨環境ではありません。セキュリティリスクが高い状態ですので、最新の Google Chrome をご利用ください。' +
'</p>' +
'<a style="display: block; float: right; height: 36px; width: 154px; padding: 0 16px; background-color: rgb(0, 120, 212); box-sizing: border-box; color: #fff; font-size: 12px; font-weight: 400; line-height: 36px; text-align: center; text-decoration: none; white-space: nowrap;" href="https://www.google.com/chrome/" target="_blank" rel="noopener noreferrer">ダウンロードページへ</a>' +
'<div style="clear: both;"></div>' +
'</div>' +
'</div>'
ieBusterTarget.appendChild(ieBusterApp)
} |
<<<<<<<
flashMode: PropTypes.oneOf(CAMERA_FLASH_MODES),
=======
cameraProps: PropTypes.object,
>>>>>>>
flashMode: PropTypes.oneOf(CAMERA_FLASH_MODES),
cameraProps: PropTypes.object,
<<<<<<<
flashMode: CAMERA_FLASH_MODE.auto,
=======
cameraProps: {},
>>>>>>>
flashMode: CAMERA_FLASH_MODE.auto,
cameraProps: {},
<<<<<<<
flashMode={this.state.flashMode}
=======
flashMode={this.props.flashMode}
captureAudio={false}
{...this.props.cameraProps}
>>>>>>>
flashMode={this.state.flashMode}
captureAudio={false}
{...this.props.cameraProps}
<<<<<<<
flashMode={this.state.flashMode}
=======
captureAudio={false}
{...this.props.cameraProps}
>>>>>>>
flashMode={this.state.flashMode}
captureAudio={false}
{...this.props.cameraProps} |
<<<<<<<
import modal from './modal';
=======
import toast from './toast';
>>>>>>>
import toast from './toast';
import modal from './modal';
<<<<<<<
[constants.ACTION_MODAL_SHOW]: modal.show,
[constants.ACTION_MODAL_HIDE]: modal.hide
=======
[constants.ACTION_TOAST_SHOW]: toast.show,
[constants.ACTION_TOAST_HIDE]: toast.hide
>>>>>>>
[constants.ACTION_TOAST_SHOW]: toast.show,
[constants.ACTION_TOAST_HIDE]: toast.hide,
[constants.ACTION_MODAL_SHOW]: modal.show,
[constants.ACTION_MODAL_HIDE]: modal.hide |
<<<<<<<
}
=======
}
>>>>>>>
}
<<<<<<<
function gRPCPermutations(call, callback) {
=======
function gRPCPermutations(call, callback) {
>>>>>>>
function gRPCPermutations(call, callback) {
<<<<<<<
=======
>>>>>>>
<<<<<<<
function innerGRPC(arr) {
const g = arr.map(letter => `g${letter}`);
const r = arr.map(letter => `R${letter}`);
const p = arr.map(letter => `P${letter}`);
const c = arr.map(letter => `C${letter}`);
return [...g, ...r, ...p, ...c];
}
}
// server streaming example
function greetManyTimes(call, callback) {
console.log(call)
let first_name = call.request.greeting.first_name
// console.log(call.request)
let count = 0,
intervalID = setInterval(function () {
// var greetManyTimesResponse = new demo_proto.GreetManyTimesResponse();
let greetManyTimesResponse = {};
greetManyTimesResponse.result = first_name;
console.log(greetManyTimesResponse.result)
// setup streaming
call.write(greetManyTimesResponse);
if (++count > 9) {
clearInterval(intervalID);
call.end(); // we have sent all messages!
}
}, 1000);
}
=======
function innerGRPC(arr) {
const g = arr.map(letter => `g${letter}`);
const r = arr.map(letter => `R${letter}`);
const p = arr.map(letter => `P${letter}`);
const c = arr.map(letter => `C${letter}`);
return [...g, ...r, ...p, ...c];
}
}
// server streaming example
function greetManyTimes(call, callback) {
console.log(call)
let first_name = call.request.greeting.first_name
// console.log(call.request)
let count = 0,
intervalID = setInterval(function () {
// var greetManyTimesResponse = new demo_proto.GreetManyTimesResponse();
let greetManyTimesResponse = {};
greetManyTimesResponse.result = first_name;
console.log(greetManyTimesResponse.result)
// setup streaming
call.write(greetManyTimesResponse);
if (++count > 9) {
clearInterval(intervalID);
call.end(); // we have sent all messages!
}
}, 1000);
}
// bidi streaming
// async function sleep(interval) {
// return new Promise(resolve => {
// setTimeout(() => resolve(), interval);
// });
// }
// async function greetEveryone(call, callback) {
// call.on("data", response => {
// // let firstName = call.request.greeting.first_name
// // let lastName = call.request.greeting.last_name
// // let fullName = firstName + ' ' + lastName
// console.log('here is the data stupid ', response)
// // console.log("Hello " + fullName);
// });
// call.on("error", error => {
// console.error(error);
// });
// call.on("end", () => {
// console.log("Server The End...");
// });
// for (let i = 0; i < 10; i++) {
// call.write({ result: 'Tammy Tan' });
// await sleep(1000);
// }
// call.end();
// }
>>>>>>>
function innerGRPC(arr) {
const g = arr.map(letter => `g${letter}`);
const r = arr.map(letter => `R${letter}`);
const p = arr.map(letter => `P${letter}`);
const c = arr.map(letter => `C${letter}`);
return [...g, ...r, ...p, ...c];
}
}
// server streaming example
function greetManyTimes(call, callback) {
console.log(call);
let first_name = call.request.greeting.first_name;
// console.log(call.request)
let count = 0,
intervalID = setInterval(function() {
// var greetManyTimesResponse = new demo_proto.GreetManyTimesResponse();
let greetManyTimesResponse = {};
greetManyTimesResponse.result = first_name;
console.log(greetManyTimesResponse.result);
// setup streaming
call.write(greetManyTimesResponse);
if (++count > 9) {
clearInterval(intervalID);
call.end(); // we have sent all messages!
}
}, 1000);
}
// bidi streaming
// async function sleep(interval) {
// return new Promise(resolve => {
// setTimeout(() => resolve(), interval);
// });
// }
// async function greetEveryone(call, callback) {
// call.on("data", response => {
// // let firstName = call.request.greeting.first_name
// // let lastName = call.request.greeting.last_name
// // let fullName = firstName + ' ' + lastName
// console.log('here is the data stupid ', response)
// // console.log("Hello " + fullName);
// });
// call.on("error", error => {
// console.error(error);
// });
// call.on("end", () => {
// console.log("Server The End...");
// });
// for (let i = 0; i < 10; i++) {
// call.write({ result: 'Tammy Tan' });
// await sleep(1000);
// }
// call.end();
// } |
<<<<<<<
try {
ws.on("message", function (msg) {
let parsedReqBody;
try {
parsedReqBody = JSON.parse(msg);
} catch {
ws.send("message", 'error parsing JSON in ws.on message')
}
if (parsedReqBody.wsCommand === 'sendInit') {
console.log('sendInit')
grpcRequestClass.sendInit(parsedReqBody);
} else if (parsedReqBody.wsCommand === 'push') {
console.log('push')
let messageInput;
try {
messageInput = JSON.parse(parsedReqBody.messageInput);
} catch {
console.log('error parsing messageInput in ws-router - "push"')
}
console.log('
=======
ws.on("message", function (msg) {
const parsedReqBody = JSON.parse(msg);
if(parsedReqBody.wsCommand === 'sendInit'){
grpcRequestClass.sendInit(parsedReqBody);
} else if ( parsedReqBody.wsCommand === 'push') {
let messageInput = JSON.parse(parsedReqBody.messageInput);
grpcRequestClass._call.write(messageInput);
} else if (parsedReqBody.wsCommand === 'end') {
if(parsedReqBody.requestInput.streamType === 'serverStreaming') {
grpcRequestClass._call.cancel();
} else {
grpcRequestClass._call.end();
>>>>>>>
try {
ws.on("message", function (msg) {
let parsedReqBody;
try {
parsedReqBody = JSON.parse(msg);
} catch {
ws.send("message", 'error parsing JSON in ws.on message')
}
if (parsedReqBody.wsCommand === 'sendInit') {
console.log('sendInit')
grpcRequestClass.sendInit(parsedReqBody);
} else if (parsedReqBody.wsCommand === 'push') {
console.log('push')
let messageInput;
try {
messageInput = JSON.parse(parsedReqBody.messageInput);
} catch {
console.log('error parsing messageInput in ws-router - "push"')
}
console.log('||||||||||||||||PUSH', messageInput)
grpcRequestClass._call.write(messageInput);
} else if (parsedReqBody.wsCommand === 'end') {
if(parsedReqBody.requestInput.streamType === 'serverStreaming') {
grpcRequestClass._call.cancel();
console.log('Cancel')
} else {
grpcRequestClass._call.end();
console.log('end')
} |
<<<<<<<
import Radio from '../../../components/Radio/Radio';
import Label from '../../labels/Label';
=======
import Radio from '../../inputs/Radio/Radio';
import Label from '../../../components/Label/Label';
>>>>>>>
import Radio from '../../../components/Radio/Radio';
import Label from '../../../components/Label/Label'; |
<<<<<<<
},
{
name: 'cb',
label: 'Circuit breaker',
enabled: false,
config: {
timeout: 0,
max_concurrent_requests: 0,
error_percent_threshold: 0,
request_volume_threshold: 0,
sleep_window: 0,
predicate: 'statusCode == 0 || statusCode >= 500'
}
=======
},
{
name: 'retry',
label: 'Retry',
enabled: false,
config: {
attempts: 0,
backoff: '1s',
predicate: 'statusCode == 0 || statusCode >= 500'
}
>>>>>>>
},
{
name: 'retry',
label: 'Retry',
enabled: false,
config: {
attempts: 0,
backoff: '1s',
predicate: 'statusCode == 0 || statusCode >= 500'
}
},
{
name: 'cb',
label: 'Circuit breaker',
enabled: false,
config: {
timeout: 0,
max_concurrent_requests: 0,
error_percent_threshold: 0,
request_volume_threshold: 0,
sleep_window: 0,
predicate: 'statusCode == 0 || statusCode >= 500'
} |
<<<<<<<
import { readFile, isStringJson, getNodeEnv, didPassInMeteorSettings } from './utils';
=======
import { readFile, isStringJson, getNodeEnv, didPassInMeteorSettings, didPassInMongoUrl } from './utils';
>>>>>>>
import { readFile, isStringJson, getNodeEnv, didPassInMeteorSettings, didPassInMongoUrl } from './utils';
<<<<<<<
const message = 'building meteor app';
spinner.start(`${message} (this may take several minutes)`);
=======
spinner.start('building meteor app');
>>>>>>>
const message = 'building meteor app';
spinner.start(`${message} (this may take several minutes)`);
<<<<<<<
spinner.succeed(message);
=======
spinner.succeed();
>>>>>>>
spinner.succeed(message);
<<<<<<<
const dockerfileContents = dockerfile.getContents();
=======
const dockerfileContents = dockerfile.getContents(!didPassInMongoUrl);
spinner.start('creating Dockerfile');
>>>>>>>
const dockerfileContents = dockerfile.getContents(!didPassInMongoUrl);
<<<<<<<
=======
spinner.succeed();
>>>>>>>
<<<<<<<
=======
spinner.succeed();
>>>>>>>
<<<<<<<
if (!didPassInMeteorSettings()) {
const env = getNodeEnv();
const settingsFile = `${env}.settings.json`;
logger(`looking for meteor settings file ${settingsFile} in root of project`);
const settingsString = await readFile(settingsFile);
if (settingsString) {
// settings file found
if (!isStringJson(settingsString)) {
throw new Error(`ERROR: ${settingsFile} file is not valid JSON`);
} else {
meteorSettingsVar = settingsString.replace(/[\n ]/g, '');
logger('found settings file');
}
=======
spinner.start('checking for meteor settings file');
if (!didPassInMeteorSettings()) {
const env = getNodeEnv();
const settingsFile = `${env}.settings.json`;
logger(`looking for meteor settings file ${settingsFile} in root of project`);
const settingsString = await readFile(settingsFile);
if (settingsString) {
// settings file found
if (!isStringJson(settingsString)) {
throw new Error(`ERROR: ${settingsFile} file is not valid JSON`);
} else {
meteorSettingsVar = settingsString.replace(/[\n ]/g, '');
logger('found settings file');
}
>>>>>>>
if (!didPassInMeteorSettings()) {
const env = getNodeEnv();
const settingsFile = `${env}.settings.json`;
logger(`looking for meteor settings file ${settingsFile} in root of project`);
const settingsString = await readFile(settingsFile);
if (settingsString) {
// settings file found
if (!isStringJson(settingsString)) {
throw new Error(`ERROR: ${settingsFile} file is not valid JSON`);
} else {
meteorSettingsVar = settingsString.replace(/[\n ]/g, '');
logger('found settings file');
}
<<<<<<<
const message = 'deploying app using now service';
spinner.start(`${message} (this may take several minutes)`);
=======
spinner.start('deploying using now service (this may take several minutes)');
>>>>>>>
const message = 'deploying app using now service';
spinner.start(`${message} (this may take several minutes)`);
<<<<<<<
const stdOut = await deployCommand.run();
const deployedAppUrl = stdOut.out.toString();
spinner.succeed(message);
return deployedAppUrl;
=======
await deployCommand.run();
spinner.setMessage(`meteor app deployed :)`);
spinner.succeed();
>>>>>>>
const stdOut = await deployCommand.run();
const deployedAppUrl = stdOut.out.toString();
spinner.succeed(message);
return deployedAppUrl;
<<<<<<<
logger('cleaning up');
=======
spinner.start('cleaning up .meteor/local dir');
>>>>>>>
logger('cleaning up');
<<<<<<<
};
const prepareForUpload = async () => {
spinner.start('preparing build for upload');
await createDockerfile();
await splitBuild();
await handleMeteorSettings();
spinner.succeed();
=======
spinner.succeed();
>>>>>>>
};
const prepareForUpload = async () => {
spinner.start('preparing build for upload');
await createDockerfile();
await splitBuild();
await handleMeteorSettings();
spinner.succeed(); |
<<<<<<<
decryptContent(event.data.content).then((data) => {
postMessage({decryptedContent: data, decrypted: true, callerId: event.data.callerId});
})
=======
if (!event.data.content) {
postMessage({decryptedContent: event.data.content, decrypted: true,});
} else {
decryptContent(event.data.content).then((data) => {
postMessage({decryptedContent: data, decrypted: true,});
})
}
>>>>>>>
if (!event.data.content) {
postMessage({decryptedContent: event.data.content, decrypted: true, callerId: event.data.callerId});
} else {
decryptContent(event.data.content).then((data) => {
postMessage({decryptedContent: data, decrypted: true, callerId: event.data.callerId});
})
} |
<<<<<<<
async function loadPromises() {
const termDumpPromise = getFrontendData('data/getTermDump/neu.edu/201810.json');
=======
async function getSearch() {
const termDumpPromise = getFrontendData('getTermDump/neu.edu/201810.json');
>>>>>>>
async function loadPromises() {
const termDumpPromise = getFrontendData('getTermDump/neu.edu/201810.json'); |
<<<<<<<
import Panel from './Panel';
=======
import Modal from './Modal';
>>>>>>>
import Modal from './Modal';
import Panel from './Panel';
<<<<<<<
Panel,
=======
Modal,
>>>>>>>
Modal,
Panel, |
<<<<<<<
}
export function getCharacterName(externalCharacterId) {
const character = getCharacterInfo(externalCharacterId) || {};
return character.name;
=======
}
// Return a human-readable color from a characterCode.
export function getCharacterColorName(externalCharacterId, characterColor) {
const character = getCharacterInfo(externalCharacterId) || {};
const colors = character.colors || [];
return colors[characterColor] || null;
>>>>>>>
}
export function getCharacterName(externalCharacterId) {
const character = getCharacterInfo(externalCharacterId) || {};
return character.name;
}
// Return a human-readable color from a characterCode.
export function getCharacterColorName(externalCharacterId, characterColor) {
const character = getCharacterInfo(externalCharacterId) || {};
const colors = character.colors || [];
return colors[characterColor] || null; |
<<<<<<<
const currentIndex = this.props.rtl === true ? this.state.slideCount - this.state.currentSlide : this.state.currentSlide;
const slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;
=======
if (!swipedSlide) {
return 0;
}
const slidesTraversed = Math.abs(swipedSlide.dataset.index - this.state.currentSlide) || 1;
>>>>>>>
if (!swipedSlide) {
return 0;
}
const currentIndex = this.props.rtl === true ? this.state.slideCount - this.state.currentSlide : this.state.currentSlide;
const slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1; |
<<<<<<<
if (geom.get('visible')) {
const type = geom.get('type');
const records = geom.getSnapRecords(point);
Util.each(records, record => {
if (record.x && record.y) {
const { x, y, _origin, color } = record;
const tooltipItem = {
x,
y: Util.isArray(y) ? y[1] : y,
color: color || Global.defaultColor,
origin: _origin,
name: getTooltipName(geom, _origin),
value: getTooltipValue(geom, _origin),
title: getTooltipTitle(geom, _origin)
};
if (marker) {
tooltipItem.marker = Util.mix({
fill: color || Global.defaultColor
}, marker);
}
items.push(tooltipItem);
if ([ 'line', 'area', 'path' ].indexOf(type) !== -1) {
tooltipMarkerType = 'circle';
tooltipMarkerItems.push(tooltipItem);
} else if (type === 'interval' && coord.type === 'cartesian') {
tooltipMarkerType = 'rect';
tooltipItem.width = geom.getSize(record._origin);
tooltipMarkerItems.push(tooltipItem);
}
=======
const type = geom.get('type');
const records = geom.getSnapRecords(point);
Util.each(records, record => {
if (record.x && record.y) {
const { x, y, _origin, color } = record;
const tooltipItem = {
x,
y: Util.isArray(y) ? y[1] : y,
color: color || Global.defaultColor,
origin: _origin,
name: getTooltipName(geom, _origin),
value: getTooltipValue(geom, _origin),
title: getTooltipTitle(geom, _origin)
};
if (marker) {
tooltipItem.marker = Util.mix({
fill: color || Global.defaultColor
}, marker);
}
items.push(tooltipItem);
if ([ 'line', 'area', 'path' ].indexOf(type) !== -1) {
tooltipMarkerType = 'circle';
tooltipMarkerItems.push(tooltipItem);
} else if (type === 'interval' && (coord.type === 'cartesian' || coord.type === 'rect')) {
tooltipMarkerType = 'rect';
tooltipItem.width = geom.getSize(record._origin);
tooltipMarkerItems.push(tooltipItem);
>>>>>>>
if (geom.get('visible')) {
const type = geom.get('type');
const records = geom.getSnapRecords(point);
Util.each(records, record => {
if (record.x && record.y) {
const { x, y, _origin, color } = record;
const tooltipItem = {
x,
y: Util.isArray(y) ? y[1] : y,
color: color || Global.defaultColor,
origin: _origin,
name: getTooltipName(geom, _origin),
value: getTooltipValue(geom, _origin),
title: getTooltipTitle(geom, _origin)
};
if (marker) {
tooltipItem.marker = Util.mix({
fill: color || Global.defaultColor
}, marker);
}
items.push(tooltipItem);
if ([ 'line', 'area', 'path' ].indexOf(type) !== -1) {
tooltipMarkerType = 'circle';
tooltipMarkerItems.push(tooltipItem);
} else if (type === 'interval' && (coord.type === 'cartesian' || coord.type === 'rect')) {
tooltipMarkerType = 'rect';
tooltipItem.width = geom.getSize(record._origin);
tooltipMarkerItems.push(tooltipItem);
} |
<<<<<<<
if (Util.isObject(animateCfg)) {
=======
if (type.indexOf('guide-tag') > -1) {
type = 'guide-tag'; // 因为 guide.tag 包含多个 shape,但是对外它们是一体的
}
if (animateCfg) {
>>>>>>>
if (type.indexOf('guide-tag') > -1) {
type = 'guide-tag'; // 因为 guide.tag 包含多个 shape,但是对外它们是一体的
}
if (Util.isObject(animateCfg)) { |
<<<<<<<
startOnZero: true,
visible: true
=======
startOnZero: true,
/**
* 是否连接空数据,对 area、line、path 生效
*/
connectNulls: false
>>>>>>>
startOnZero: true,
visible: true,
/**
* 是否连接空数据,对 area、line、path 生效
*/
connectNulls: false |
<<<<<<<
var url2 = 'https://mbasic.facebook.com' + $t.find('a[href$="about?refid=17"]').attr('href');
url2 = url2.replace(/about\?refid=17/, 'socialcontext');
=======
// MARK
var url2 = 'https://mbasic.facebook.com' + $t.find('a[href$="socialcontext?refid=17"]').attr('href');
>>>>>>>
// MARK
var url2 = 'https://mbasic.facebook.com' + $t.find('a[href$="about?refid=17"]').attr('href');
url2 = url2.replace(/about\?refid=17/, 'socialcontext'); |
<<<<<<<
this.registerBidAdapter(Sovrn(),'sovrn');
this.registerBidAdapter(PulsePointAdapter(),'pulsepoint');
=======
this.registerBidAdapter(Sovrn(),'sovrn');
this.registerBidAdapter(AolAdapter(), 'aol');
>>>>>>>
this.registerBidAdapter(Sovrn(),'sovrn');
this.registerBidAdapter(AolAdapter(), 'aol');
this.registerBidAdapter(PulsePointAdapter(),'pulsepoint'); |
<<<<<<<
res.locals.json = {"message" : "successful signup", "permissions" : permission_names };
dispatchEvent("user_registered", req.user);
=======
res.locals.json = {"message": "successful signup", "permissions": permission_names};
>>>>>>>
res.locals.json = {"message" : "successful signup", "permissions" : permission_names };
dispatchEvent("user_registered", req.user);
<<<<<<<
else{
newUser.createWithStripe(function(err, resultUser){
if(!err) {
let invite = new Invitation({"user_id" : resultUser.get("id")});
invite.create(function(err, result){
if(!err) {
let apiUrl = req.protocol + '://' + req.get('host') + "/api/v1/users/register?token=" + result.get("token");
let frontEndUrl = req.protocol + '://' + req.get('host') + "/invitation/" + result.get("token");
EventLogs.logEvent(req.user.get('id'), `users ${req.body.email} was invited by user ${req.user.get('email')}`);
res.locals.json = {token: result.get("token"), url: frontEndUrl, api:apiUrl};
result.set('url', frontEndUrl);
result.set('api', apiUrl);
res.locals.valid_object = result;
next();
dispatchEvent("user_invited", newUser);
=======
else {
//todo: no hardcoded role
let newUser = new User({"email": req.body.email, "role_id": 3, "status": "invited"});
User.findAll("email", req.body.email, function (foundUsers) {
if (foundUsers.length != 0) {
res.status(400).json({error: 'This email already exists in the system'});
}
else {
newUser.createWithStripe(function (err, resultUser) {
if (!err) {
let invite = new Invitation({"user_id": resultUser.get("id")});
invite.create(function (err, result) {
if (!err) {
let apiUrl = req.protocol + '://' + req.get('host') + "/api/v1/users/register?token=" + result.get("token");
let frontEndUrl = req.protocol + '://' + req.get('host') + "/invitation/" + result.get("token");
EventLogs.logEvent(req.user.get('id'), `users ${req.body.email} was invited by user ${req.user.get('email')}`);
res.locals.json = {token: result.get("token"), url: frontEndUrl, api: apiUrl};
result.set('url', frontEndUrl);
result.set('api', apiUrl);
res.locals.valid_object = result;
next();
} else {
res.status(403).json({error: err});
}
});
>>>>>>>
else {
//todo: no hardcoded role
let newUser = new User({"email": req.body.email, "role_id": 3, "status": "invited"});
User.findAll("email", req.body.email, function (foundUsers) {
if (foundUsers.length != 0) {
res.status(400).json({error: 'This email already exists in the system'});
}
else {
newUser.createWithStripe(function (err, resultUser) {
if (!err) {
let invite = new Invitation({"user_id": resultUser.get("id")});
invite.create(function (err, result) {
if (!err) {
let apiUrl = req.protocol + '://' + req.get('host') + "/api/v1/users/register?token=" + result.get("token");
let frontEndUrl = req.protocol + '://' + req.get('host') + "/invitation/" + result.get("token");
EventLogs.logEvent(req.user.get('id'), `users ${req.body.email} was invited by user ${req.user.get('email')}`);
res.locals.json = {token: result.get("token"), url: frontEndUrl, api: apiUrl};
result.set('url', frontEndUrl);
result.set('api', apiUrl);
res.locals.valid_object = result;
next();
dispatchEvent("user_invited", newUser);
} else {
res.status(403).json({error: err});
}
});
<<<<<<<
})
});
=======
}
else {
res.status(400).json({error: 'Must have property: email'});
}
}, mailer('invitation', 'user_id'));
>>>>>>>
}
else {
res.status(400).json({error: 'Must have property: email'});
}
});
<<<<<<<
if(!err) {
dispatchEvent("user_suspended", updated_user);
=======
if (!err) {
>>>>>>>
if (!err) {
if(!err) {
dispatchEvent("user_suspended", updated_user); |
<<<<<<<
let RenderWidget = (props) => {
const {member, widgetType, configValue, defaultWidgetValue} = props;
const widget = props.services && props.services.widget && props.services.widget.find(widgetToCheck => widgetToCheck.type === widgetType);
if (!widget) {
console.error("widget does not exist ", widgetType);
}
=======
const RenderWidget = (props) => {
const {showPrice, member, widgetType, configValue, defaultWidgetValue} = props;
const widget = widgets[widgetType];
>>>>>>>
let RenderWidget = (props) => {
const {showPrice, member, widgetType, configValue, defaultWidgetValue} = props;
const widget = props.services && props.services.widget && props.services.widget.find(widgetToCheck => widgetToCheck.type === widgetType);
if (!widget) {
console.error("widget does not exist ", widgetType);
} |
<<<<<<<
["ember","./among","./encode-uri-component","./encode-uri","./first-present","./fmt","./html-escape","./if-null","./not-among","./not-equal","./not-match","./promise","./safe-string","./join","./sum-by","./sum","./concat","./conditional","./product","./quotient","./difference","./utils","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __dependency19__, __dependency20__, __dependency21__, __dependency22__, __exports__) {
=======
["ember","./macros/among","./macros/encode-uri-component","./macros/encode-uri","./macros/first-present","./macros/fmt","./macros/html-escape","./macros/if-null","./macros/not-among","./macros/not-equal","./macros/not-match","./macros/promise","./macros/safe-string","./macros/join","./macros/sum-by","./macros/sum","./macros/concat","./macros/conditional","./macros/product","./macros/difference","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __dependency19__, __dependency20__, __exports__) {
>>>>>>>
["ember","./macros/among","./macros/encode-uri-component","./macros/encode-uri","./macros/first-present","./macros/fmt","./macros/html-escape","./macros/if-null","./macros/not-among","./macros/not-equal","./macros/not-match","./macros/promise","./macros/safe-string","./macros/join","./macros/sum-by","./macros/sum","./macros/concat","./macros/conditional","./macros/product","./macros/quotient","./macros/difference","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __dependency19__, __dependency20__, __dependency21__, __exports__) {
<<<<<<<
var quotient = __dependency20__["default"] || __dependency20__;
var difference = __dependency21__["default"] || __dependency21__;
var _utils = __dependency22__["default"] || __dependency22__;
=======
var difference = __dependency20__["default"] || __dependency20__;
>>>>>>>
var quotient = __dependency20__["default"] || __dependency20__;
var difference = __dependency21__["default"] || __dependency21__; |
<<<<<<<
exports.createTopic = function(req, res, next) {
var user = req.session.user;
var category = req.route.params.category;
=======
exports.createTopic = function (req, res, next) {
var authedUser = req.session.user;
if (!authedUser)
return res.redirect('/login');
var categorySlug = req.route.params.category;
>>>>>>>
exports.createTopic = function(req, res, next) {
var authedUser = req.session.user;
if (!authedUser)
return res.redirect('/login');
var categorySlug = req.route.params.category; |
<<<<<<<
// Empty list
options.scriptListIsEmptyMessage = 'No scripts.';
if (options.isFlagged) {
if (options.librariesOnly) {
options.scriptListIsEmptyMessage = 'No flagged libraries.';
} else {
options.scriptListIsEmptyMessage = 'No flagged scripts.';
}
} else if (options.searchBarValue) {
if (options.librariesOnly) {
options.scriptListIsEmptyMessage = 'We couldn\'t find any libraries with this search value.';
} else {
options.scriptListIsEmptyMessage = 'We couldn\'t find any scripts with this search value.';
}
} else if (options.isUserScriptListPage) {
options.scriptListIsEmptyMessage = 'This user hasn\'t added any scripts yet.';
}
=======
// Heading
if (options.librariesOnly) {
options.pageHeading = options.isFlagged ? 'Flagged Libraries' : 'Libraries';
} else {
options.pageHeading = options.isFlagged ? 'Flagged Scripts' : 'Scripts';
}
>>>>>>>
// Empty list
options.scriptListIsEmptyMessage = 'No scripts.';
if (options.isFlagged) {
if (options.librariesOnly) {
options.scriptListIsEmptyMessage = 'No flagged libraries.';
} else {
options.scriptListIsEmptyMessage = 'No flagged scripts.';
}
} else if (options.searchBarValue) {
if (options.librariesOnly) {
options.scriptListIsEmptyMessage = 'We couldn\'t find any libraries with this search value.';
} else {
options.scriptListIsEmptyMessage = 'We couldn\'t find any scripts with this search value.';
}
} else if (options.isUserScriptListPage) {
options.scriptListIsEmptyMessage = 'This user hasn\'t added any scripts yet.';
}
// Heading
if (options.librariesOnly) {
options.pageHeading = options.isFlagged ? 'Flagged Libraries' : 'Libraries';
} else {
options.pageHeading = options.isFlagged ? 'Flagged Scripts' : 'Scripts';
} |
<<<<<<<
=======
// Build the route regex for model lists
function listRegex(aRoot, aType) {
var slash = '\/';
if (aRoot === slash) { slash = ''; }
return new RegExp('^' + aRoot +
'(?:' + slash + '(?:' + aType + ')list' +
'(?:\/size\/(\d+))?' +
'(?:\/sort\/([^\/]+))?' +
'(?:\/dir\/(asc|desc))?' +
'(?:\/page\/([1-9][0-9]*))?' +
')?$');
}
>>>>>>>
<<<<<<<
app_route('/scripts/:username/:namespace?/:scriptname/source').get(user.editScript);
app_route('/scripts/:username').get(function(req, res) {
res.redirect('/users/' + req.route.params.username + '/scripts');
=======
app_route('/scripts/:username/:namespace?/:scriptname/source').get(user.editScript); // Legacy TODO Remove
app_route('/scripts/:username').get(function(aReq, aRes) {
aRes.redirect('/users/' + aReq.route.params.username + '/scripts');
>>>>>>>
app_route('/scripts/:username/:namespace?/:scriptname/source').get(user.editScript);
app_route('/scripts/:username').get(function(aReq, aRes) {
aRes.redirect('/users/' + aReq.route.params.username + '/scripts');
<<<<<<<
app.get('/libs/src/:username/:scriptname', scriptStorage.sendScript);
=======
app.get('/vote/libs/:username/:scriptname/:vote', script.lib(script.vote));
//app.get(listRegex('\/use\/lib\/([^\/]+?)\/([^\/]+?)', 'script'), script.useLib);
>>>>>>>
app.get('/libs/src/:username/:scriptname', scriptStorage.sendScript);
<<<<<<<
app_route('/:p(forum)?/:category(announcements|corner|garage|discuss)').get(discussion.list);
app_route('/:p(forum)?/:category(announcements|corner|garage|discuss)/:topic').get(discussion.show).post(discussion.createComment);
app_route('/:p(forum)?/:category(announcements|corner|garage|discuss)/new').get(discussion.newTopic).post(discussion.createTopic);
// dupe
app_route('/post/:category(announcements|corner|garage|discuss)').get(discussion.newTopic).post(discussion.createTopic);
// Home route
app_route('/').get(main.home);
=======
app_route('/forum/:category(announcements|corner|garage|discuss)').get(discussion.list);
app_route('/forum/:category(announcements|corner|garage|discuss)/new').get(discussion.newTopic).post(discussion.createTopic);
app_route('/forum/:category(announcements|corner|garage|discuss)/:topic').get(discussion.show).post(discussion.createComment);
// Discussion routes: Legacy
// app_route('/:category(announcements|corner|garage|discuss)').get(function (aReq, aRes, aNext) { aRes.redirect(util.format('/forum/%s', aReq.route.params.category)); });
// app_route('/:category(announcements|corner|garage|discuss)/:topic').get(function (aReq, aRes, aNext) { aRes.redirect(util.format('/forum/%s/%s', aReq.route.params.category, aReq.route.params.topic)) });
app.get(listRegex('\/(announcements|corner|garage|discuss)', ''), discussion.list);
app.get(listRegex('\/(announcements|corner|garage|discuss)\/([^\/]+?)', ''), discussion.show);
app.get('/post/:category(announcements|corner|garage|discuss)', discussion.newTopic);
app.post('/post/:category(announcements|corner|garage|discuss)', discussion.createTopic);
app.post('/:category(announcements|corner|garage|discuss)/:topic', discussion.createComment);
// Search routes: Legacy
app.post('/search', function (aReq, aRes) {
var search = encodeURIComponent(aReq.body.search.replace(/^\s+|\s+$/g, ''));
aRes.redirect('/search/' + search + '/' + aReq.body.type + 'list');
});
app.get(listRegex('\/search\/([^\/]+?)', 'script'), main.search);
app.get(listRegex('\/', 'script'), main.home);
>>>>>>>
app_route('/:p(forum)?/:category(announcements|corner|garage|discuss)').get(discussion.list);
app_route('/:p(forum)?/:category(announcements|corner|garage|discuss)/:topic').get(discussion.show).post(discussion.createComment);
app_route('/:p(forum)?/:category(announcements|corner|garage|discuss)/new').get(discussion.newTopic).post(discussion.createTopic);
// dupe
app_route('/post/:category(announcements|corner|garage|discuss)').get(discussion.newTopic).post(discussion.createTopic);
// Home route
app_route('/').get(main.home); |
<<<<<<<
element.innerHTML = emoji.replace_colons(':smile:');
var parent = findParent(element, 'wdt-emoji-picker-parent');
if (wdtEmojiBundle.searchInput) {
wdtEmojiBundle.searchInput.value = "";
wdtEmojiBundle.search("");
}
=======
element.innerHTML = this.emoji.replace_colons(':smile:');
>>>>>>>
element.innerHTML = this.emoji.replace_colons(':smile:');
var parent = findParent(element, 'wdt-emoji-picker-parent');
if (wdtEmojiBundle.searchInput) {
wdtEmojiBundle.searchInput.value = "";
wdtEmojiBundle.search("");
} |
<<<<<<<
// Component API
// ----------------------------------------------------------------------------
function changeViewType(newType) {
if (this.layoutManager) {
this.$emit('layout-update', {
count: this.layoutCount,
index: this.layoutIndex,
view: this.view,
newType,
});
} else {
this.view = viewHelper.bindView(
this.proxyManager,
newType,
this.$el.querySelector('.js-view')
);
}
}
// ----------------------------------------------------------------------------
function getAvailableActions() {
return {
single: this.layoutCount > 1,
split: this.layoutCount < 4,
};
}
// ----------------------------------------------------------------------------
function resetCamera() {
if (this.view) {
this.view.resetCamera();
}
}
// ----------------------------------------------------------------------------
function updateOrientation(mode) {
if (this.view && !this.inAnimation) {
this.inAnimation = true;
const { axis, orientation, viewUp } = VIEW_ORIENTATIONS[mode];
this.view.updateOrientation(axis, orientation, viewUp, 100).then(() => {
this.inAnimation = false;
});
}
}
// ----------------------------------------------------------------------------
function rollLeft() {
if (this.view) {
this.view.setAnimation(true, this);
let count = 0;
let intervalId = null;
const rotate = () => {
if (count < 90) {
count += ROTATION_STEP;
this.view.rotate(+ROTATION_STEP);
} else {
clearInterval(intervalId);
this.view.setAnimation(false, this);
}
};
intervalId = setInterval(rotate, 1);
}
}
// ----------------------------------------------------------------------------
function rollRight() {
if (this.view) {
this.view.setAnimation(true, this);
let count = 0;
let intervalId = null;
const rotate = () => {
if (count < 90) {
count += ROTATION_STEP;
this.view.rotate(-ROTATION_STEP);
} else {
clearInterval(intervalId);
this.view.setAnimation(false, this);
}
};
intervalId = setInterval(rotate, 1);
}
}
// ----------------------------------------------------------------------------
function screenCapture() {
this.$store.dispatch(Actions.TAKE_SCREENSHOT, this.view);
}
// ----------------------------------------------------------------------------
function changeCameraViewPoint(viewPointKey) {
this.$store.dispatch(Actions.CHANGE_CAMERA_VIEW_POINT, viewPointKey);
}
// ----------------------------------------------------------------------------
function splitView() {
this.$emit('layout-update', {
index: this.layoutIndex,
count: 2,
view: this.view,
});
}
// ----------------------------------------------------------------------------
function quadView() {
this.$emit('layout-update', {
index: this.layoutIndex,
count: 4,
view: this.view,
});
}
// ----------------------------------------------------------------------------
function singleView() {
this.$emit('layout-update', {
index: this.layoutIndex,
count: 1,
view: this.view,
});
}
// ----------------------------------------------------------------------------
function orientationLabels() {
return this.view.getPresetToOrientationAxes() === 'lps'
? ['L', 'P', 'S']
: ['X', 'Y', 'Z'];
}
// ----------------------------------------------------------------------------
function viewTypes() {
return this.view.getPresetToOrientationAxes() === 'lps'
? VIEW_TYPES_LPS
: VIEW_TYPES;
}
// ----------------------------------------------------------------------------
// Vue LifeCycle
// ----------------------------------------------------------------------------
function onMounted() {
if (this.view) {
this.view.setContainer(this.$el.querySelector('.js-view'));
const widgetManager = this.view.getReferenceByName('widgetManager');
if (widgetManager) {
const enabled = widgetManager.getPickingEnabled();
widgetManager.setRenderer(this.view.getRenderer());
// workaround to disable picking if previously disabled
if (!enabled) {
widgetManager.disablePicking();
}
}
}
// Closure creation for callback
this.resizeCurrentView = () => {
if (this.view) {
this.view.resize();
}
};
// Event handling
window.addEventListener('resize', this.resizeCurrentView);
// Capture event handler to release then at exit
this.subscriptions = [
() => window.removeEventListener('resize', this.resizeCurrentView),
this.proxyManager.onProxyRegistrationChange(() => {
// When proxy change, just re-render widget
viewHelper.updateViewsAnnotation(this.proxyManager);
this.$forceUpdate();
}).unsubscribe,
this.view.onModified(() => {
this.$forceUpdate();
}).unsubscribe,
this.proxyManager.onActiveViewChange(() => {
this.$forceUpdate();
}).unsubscribe,
this.proxyManager.onActiveSourceChange(() => {
if (this.view.bindRepresentationToManipulator) {
const activeSource = this.proxyManager.getActiveSource();
const representation = this.proxyManager.getRepresentation(
activeSource,
this.view
);
this.view.bindRepresentationToManipulator(representation);
this.view.updateWidthHeightAnnotation();
}
}).unsubscribe,
];
this.initialSubscriptionLength = this.subscriptions.length;
// Initial setup
this.resizeCurrentView();
}
// ----------------------------------------------------------------------------
function onBeforeDestroy() {
if (this.view) {
this.view.setContainer(null);
}
while (this.subscriptions.length) {
this.subscriptions.pop()();
}
}
// ----------------------------------------------------------------------------
=======
>>>>>>>
<<<<<<<
cameraViewPoints() {
return Object.keys(this.$store.state.cameraViewPoints);
},
proxyManager() {
return this.$store.state.proxyManager;
=======
...mapState('views', {
view(state) {
return this.$proxyManager.getProxyById(
state.viewTypeToId[this.viewType]
);
},
axisVisible(state) {
return state.axisVisible;
},
axisType(state) {
return state.axisType;
},
axisPreset(state) {
return state.axisPreset;
},
}),
type() {
return this.viewType.split(':')[0];
>>>>>>>
...mapState('views', {
view(state) {
return this.$proxyManager.getProxyById(
state.viewTypeToId[this.viewType]
);
},
axisVisible(state) {
return state.axisVisible;
},
axisType(state) {
return state.axisType;
},
axisPreset(state) {
return state.axisPreset;
},
}),
...mapGetters(['cameraViewPoints']),
type() {
return this.viewType.split(':')[0];
<<<<<<<
methods: {
changeCameraViewPoint,
changeViewType,
getAvailableActions,
onBeforeDestroy,
onMounted,
orientationLabels,
quadView,
resetCamera,
rollLeft,
rollRight,
screenCapture,
singleView,
splitView,
updateOrientation,
viewTypes,
...mapMutations({
takeScreenshot: Mutations.TAKE_SCREENSHOT,
}),
=======
proxyManagerHooks: {
onActiveViewChange(view) {
this.internalIsActive = view === this.view;
},
onActiveSourceChange(source) {
if (this.view.bindRepresentationToManipulator) {
const representation = this.$proxyManager.getRepresentation(
source,
this.view
);
this.view.bindRepresentationToManipulator(representation);
this.view.updateWidthHeightAnnotation();
}
},
onProxyRegistrationChange() {
// update views annotation
const hasImageData = this.$proxyManager
.getSources()
.find((s) => s.getDataset().isA && s.getDataset().isA('vtkImageData'));
const views = this.$proxyManager.getViews();
for (let i = 0; i < views.length; i++) {
const view = views[i];
view.setCornerAnnotation('se', '');
if (view.getProxyName().indexOf('2D') !== -1 && hasImageData) {
view.setCornerAnnotations(ANNOTATIONS, true);
} else {
view.setCornerAnnotation('nw', '');
}
}
},
>>>>>>>
proxyManagerHooks: {
onActiveViewChange(view) {
this.internalIsActive = view === this.view;
},
onActiveSourceChange(source) {
if (this.view.bindRepresentationToManipulator) {
const representation = this.$proxyManager.getRepresentation(
source,
this.view
);
this.view.bindRepresentationToManipulator(representation);
this.view.updateWidthHeightAnnotation();
}
},
onProxyRegistrationChange() {
// update views annotation
const hasImageData = this.$proxyManager
.getSources()
.find((s) => s.getDataset().isA && s.getDataset().isA('vtkImageData'));
const views = this.$proxyManager.getViews();
for (let i = 0; i < views.length; i++) {
const view = views[i];
view.setCornerAnnotation('se', '');
if (view.getProxyName().indexOf('2D') !== -1 && hasImageData) {
view.setCornerAnnotations(ANNOTATIONS, true);
} else {
view.setCornerAnnotation('nw', '');
}
}
}, |
<<<<<<<
=======
/**
* Cache for templates, express 3.x doesn't do this for us
*/
var cache = {};
/**
* Blocks for layouts. Is this safe? What happens if the same block is used on multiple connections?
* Isn't there a chance block and content are not in sync. The template and layout are processed
* asynchronously.
*/
var blocks = {};
/**
* Absolute path to partials directory.
*/
var partialsDir;
/**
* Absolute path to the layouts directory
*/
var layoutsDir;
/**
* Keep copy of options configuration.
*/
var _options;
/**
* Holds the default compiled layout if specified in options configuration.
*/
var defaultLayoutTemplates;
>>>>>>>
<<<<<<<
ExpressHbs.prototype.cacheLayout = function(layoutFile, useCache, cb) {
var self = this;
=======
function cacheLayout(layoutFile, useCache, cb) {
>>>>>>>
ExpressHbs.prototype.cacheLayout = function(layoutFile, useCache, cb) {
var self = this;
<<<<<<<
var layoutTemplate = this.cache[layoutFile] ? this.cache[layoutFile].layoutTemplate : null;
if (layoutTemplate) return cb(null, layoutTemplate);
=======
var layoutTemplates = cache[layoutFile] ? cache[layoutFile].layoutTemplates : null;
if (layoutTemplates) return cb(null, layoutTemplates);
>>>>>>>
var layoutTemplates = this.cache[layoutFile] ? this.cache[layoutFile].layoutTemplates : null;
if (layoutTemplates) return cb(null, layoutTemplates);
<<<<<<<
layoutTemplate = self.handlebars.compile(str);
if (useCache) {
self.cache[layoutFile] = {
layoutTemplate: layoutTemplate
};
}
=======
// File path of eventual declared parent layout
var parentLayoutFile = declaredLayoutFile(str, layoutFile);
// This function returns the current layout stack to the caller
var _returnLayouts = function(layouts) {
layouts.push(exports.handlebars.compile(str));
>>>>>>>
// File path of eventual declared parent layout
var parentLayoutFile = self.declaredLayoutFile(str, layoutFile);
// This function returns the current layout stack to the caller
var _returnLayouts = function(layouts) {
layouts = layouts.slice(0);
layouts.push(self.handlebars.compile(str));
<<<<<<<
var matches = str.match(layoutPattern);
if (matches) {
var layout = matches[1];
// cacheLayout expects absolute path
layout = layoutPath(filename, layout);
self.cacheLayout(layout, options.cache, cb);
} else {
=======
var layoutFile = declaredLayoutFile(str, filename);
if (layoutFile) {
cacheLayout(layoutFile, options.cache, cb);
}
else {
>>>>>>>
var layoutFile = self.declaredLayoutFile(str, filename);
if (layoutFile) {
self.cacheLayout(layoutFile, options.cache, cb);
}
else {
<<<<<<<
function render(template, locals, layoutTemplate, cb) {
var res = template(locals, self._options.templateOptions);
async.done(function(values) {
Object.keys(values).forEach(function(id) {
=======
function renderTemplate(template, locals, cb) {
var res = template(locals, _options.templateOptions);
// Wait for async helpers
async.done(function (values) {
Object.keys(values).forEach(function (id) {
>>>>>>>
function renderTemplate(template, locals, cb) {
var res = template(locals, self._options.templateOptions);
// Wait for async helpers
async.done(function (values) {
Object.keys(values).forEach(function (id) {
<<<<<<<
var layoutResult = layoutTemplate(locals, self._options.templateOptions);
async.done(function(values) {
Object.keys(values).forEach(function(id) {
layoutResult = layoutResult.replace(id, values[id]);
});
=======
/**
* Renders `template` with an optional set of nested `layoutTemplates` using
* data in `locals`.
*/
function render(template, locals, layoutTemplates, cb) {
if(layoutTemplates == undefined) layoutTemplates = [];
>>>>>>>
/**
* Renders `template` with an optional set of nested `layoutTemplates` using
* data in `locals`.
*/
function render(template, locals, layoutTemplates, cb) {
if(layoutTemplates == undefined) layoutTemplates = [];
<<<<<<<
parseLayout(str, filename, function(err, layoutTemplate) {
=======
parseLayout(str, filename, function (err, layoutTemplates) {
>>>>>>>
parseLayout(str, filename, function (err, layoutTemplates) {
<<<<<<<
function renderIt(layoutTemplate) {
if (layoutTemplate && options.cache) {
self.cache[filename].layoutTemplate = layoutTemplate;
=======
function renderIt(layoutTemplates) {
if (layoutTemplates && options.cache) {
cache[filename].layoutTemplates = layoutTemplates;
>>>>>>>
function renderIt(layoutTemplates) {
if (layoutTemplates && options.cache) {
self.cache[filename].layoutTemplates = layoutTemplates;
<<<<<<<
self.cacheLayout(layoutFile, options.cache, function(err, layoutTemplate) {
=======
cacheLayout(layoutFile, options.cache, function (err, layoutTemplates) {
>>>>>>>
self.cacheLayout(layoutFile, options.cache, function (err, layoutTemplates) {
<<<<<<<
else if (self.defaultLayoutTemplate) {
renderIt(self.defaultLayoutTemplate);
=======
else if (defaultLayoutTemplates) {
renderIt(defaultLayoutTemplates);
>>>>>>>
else if (self.defaultLayoutTemplates) {
renderIt(self.defaultLayoutTemplates); |
<<<<<<<
var sizeof = require("sizeof");
var unique = require("lodash/uniq");
=======
var catchChartMistakes = require("./catch-chart-mistakes");
>>>>>>>
var unique = require("lodash/uniq");
var catchChartMistakes = require("./catch-chart-mistakes");
<<<<<<<
var hasDate = chartProps.scale.hasDate;
var isNumeric = chartProps.scale.isNumeric;
var type = chartProps.input.type;
=======
var scale = chartProps.scale;
>>>>>>>
var hasDate = chartProps.scale.hasDate;
var isNumeric = chartProps.scale.isNumeric;
var type = chartProps.input.type;
var scale = chartProps.scale;
<<<<<<<
// Whether the number of bytes in chartProps exceeds our defined maximum
if (sizeof.sizeof(chartProps) > MAX_BYTES) {
inputErrors.push("TOO_MUCH_DATA");
}
if (series.length && !series[0].values[0].entry) {
// Check that we have at least 1 value col (i.e. minimum header + 1 data col)
=======
if (series.length && !series[0].values) {
// Check that we have at least 1 value row (i.e. minimum header + 1 data row)
>>>>>>>
if (series.length && !series[0].values[0].entry) {
// Check that we have at least 1 value col (i.e. minimum header + 1 data col)
<<<<<<<
// Are there multiple types of axis entries
var entryTypes = unique(series[0].values.map(function(d){return typeof d.entry;}));
if(entryTypes.length > 1 && !chartProps.input.type) {
inputErrors.push("CANT_AUTO_TYPE");
}
//Whether an entry column that is supposed to be a Number is not in fact a number
if(isNumeric || chartProps.input.type == "numeric") {
var badNumSeries = dataPointTest(
series,
function(val) { return isNaN(val.entry); },
function(bn,vals) { return bn.length > 0;}
);
if (badNumSeries) {
inputErrors.push("NAN_VALUES");
}
}
// Whether an entry column that is supposed to be a date is not in fact a date
if(hasDate || chartProps.input.type == "date") {
=======
// Whether a column that is supposed to be a date is not in fact a date
if(scale.hasDate) {
>>>>>>>
// Are there multiple types of axis entries
var entryTypes = unique(series[0].values.map(function(d){return typeof d.entry;}));
if(entryTypes.length > 1 && !chartProps.input.type) {
inputErrors.push("CANT_AUTO_TYPE");
}
//Whether an entry column that is supposed to be a Number is not in fact a number
if(isNumeric || chartProps.input.type == "numeric") {
var badNumSeries = dataPointTest(
series,
function(val) { return isNaN(val.entry); },
function(bn,vals) { return bn.length > 0;}
);
if (badNumSeries) {
inputErrors.push("NAN_VALUES");
}
}
// Whether an entry column that is supposed to be a date is not in fact a date
if(hasDate || chartProps.input.type == "date") { |
<<<<<<<
// Split the csv information be lines
var csv_array = csv.split("\n");
// Split the first element of the array by the designated separator
// tab in this case
var csv_matrix = [];
var delim = String.fromCharCode(9);
csv_matrix.push(csv_array[0].split(delim));
// Get the number of columns
var cols_num = csv_matrix[0].length;
// If there aren't at least two columns, return null
if(cols_num < 2)
return null;
// Knowing the number of columns that every line should have, split
// those lines by the designated separator. While doing this, count
// the number of rows
var rows_num = 0;
for(var i=1; i<csv_array.length; i++)
{
// If the row is empty, that is, if it is just an \n symbol, continue
if(csv_array[i] == "")
continue;
// Split the row. If the row doesn't have the right amount of cols
// then the csv is not well formated, therefore, return null
var row = csv_array[i].split(tab);
if(row.length != cols_num)
return null;
// Push row to matrix, increment row count, loop
csv_matrix.push(row);
rows_num++;
}
// If there aren't at least two non empty rows, return null
if(rows_num < 2)
return null;
return csv_matrix;
},
// Given the matrix containing the well formated csv, create the object that
// is going to be used later
makeDataObj: function(csv_matrix) {
// Make the data array
var data = [];
for(var i=0; i<csv_matrix[0].length; i++)
{
// Object for a single column
var obj = {}
obj.name = csv_matrix[0][i];
obj.data = [];
// Make the obj
for(var j=1; j<csv_matrix.length; j++)
{
// If this is a date column
if((/date/gi).test(obj.name))
{
var value = Date.create(csv_matrix[j][i]);
if(value == "Invalid Date")
return null;
console.log(value);
obj.data.push(value);
}
// If it is the first column, containing the names
else if(i == 0)
obj.data.push(csv_matrix[j][i]);
// If the value is actually a number for the graph
else
{
var value = parseFloat(csv_matrix[j][i]);
if(isNaN(value))
return null;
obj.data.push(value);
}
}
data.push(obj);
}
=======
// Split the csv information by lines
var csv_array = csv.split("\n");
// Split the first element of the array by the designated separator
// tab in this case
var csv_matrix = [];
var tab = String.fromCharCode(9);
csv_matrix.push(csv_array[0].split(tab));
// Get the number of columns
var cols_num = csv_matrix[0].length;
// If there aren't at least two columns, return null
if(cols_num < 2) {
return null;
}
// Knowing the number of columns that every line should have, split
// those lines by the designated separator. While doing this, count
// the number of rows
var rows_num = 0;
for(var i=1; i<csv_array.length; i++) {
// If the row is empty, that is, if it is just an \n symbol, continue
if(csv_array[i] == "") {
continue;
}
// Split the row. If the row doesn't have the right amount of cols
// then the csv is not well formated, therefore, return null
var row = csv_array[i].split(tab);
if(row.length != cols_num) {
return null;
}
// Push row to matrix, increment row count, loop
csv_matrix.push(row);
rows_num++;
}
// If there aren't at least two non empty rows, return null
if(rows_num < 2) {
return null;
}
return csv_matrix;
},
// Given the matrix containing the well formated csv, create the object that
// is going to be used later
makeDataObj: function(csv_matrix) {
// Make the data array
var data = [];
for(var i=0; i<csv_matrix[0].length; i++) {
// Object for a single column
var obj = {name: csv_matrix[0][i], obj.data: []};
// Make the obj
for(var j=1; j<csv_matrix.length; j++) {
// If this is a date column
if((/date/gi).test(obj.name)) {
var value = Date.create(csv_matrix[j][i]);
if(value == "Invalid Date") {
return null;
}
obj.data.push(value);
}
// If it is the first column, containing the names
else if(i == 0) {
obj.data.push(csv_matrix[j][i]);
}
// If the value is actually a number for the graph
else {
var value = parseFloat(csv_matrix[j][i]);
if(isNaN(value))
return null;
obj.data.push(value);
}
}
data.push(obj);
}
>>>>>>>
// Split the csv information by lines
var csv_array = csv.split("\n");
// Split the first element of the array by the designated separator
// tab in this case
var csv_matrix = [];
var delim = String.fromCharCode(9);
csv_matrix.push(csv_array[0].split(delim));
// Get the number of columns
var cols_num = csv_matrix[0].length;
// If there aren't at least two columns, return null
if(cols_num < 2) {
return null;
}
// Knowing the number of columns that every line should have, split
// those lines by the designated separator. While doing this, count
// the number of rows
var rows_num = 0;
for(var i=1; i<csv_array.length; i++) {
// If the row is empty, that is, if it is just an \n symbol, continue
if(csv_array[i] == "") {
continue;
}
// Split the row. If the row doesn't have the right amount of cols
// then the csv is not well formated, therefore, return null
var row = csv_array[i].split(tab);
if(row.length != cols_num) {
return null;
}
// Push row to matrix, increment row count, loop
csv_matrix.push(row);
rows_num++;
}
// If there aren't at least two non empty rows, return null
if(rows_num < 2) {
return null;
}
return csv_matrix;
},
// Given the matrix containing the well formated csv, create the object that
// is going to be used later
makeDataObj: function(csv_matrix) {
// Make the data array
var data = [];
for(var i=0; i<csv_matrix[0].length; i++) {
// Object for a single column
var obj = {name: csv_matrix[0][i], obj.data: []};
// Make the obj
for(var j=1; j<csv_matrix.length; j++) {
// If this is a date column
if((/date/gi).test(obj.name)) {
var value = Date.create(csv_matrix[j][i]);
if(value == "Invalid Date") {
return null;
}
obj.data.push(value);
}
// If it is the first column, containing the names
else if(i == 0) {
obj.data.push(csv_matrix[j][i]);
}
// If the value is actually a number for the graph
else {
var value = parseFloat(csv_matrix[j][i]);
if(isNaN(value))
return null;
obj.data.push(value);
}
}
data.push(obj);
} |
<<<<<<<
editable: true, // reserved for enabling or dissabling on chart editing
lineDotsThreshold: 15, //line charts will have dots on points until a series has this number of points
bargridLabelMargin: 4, //the horizontal space between a bargrid bar and it's label
xAxisMargin: 8, //the vertical space between the plot area and the x axis
metaInfoMargin: 4, //the vertical space between the bottom of the bounding box and the meta information
primaryAxisPosition: "right",
=======
>>>>>>>
editable: true, // reserved for enabling or dissabling on chart editing
lineDotsThreshold: 15, //line charts will have dots on points until a series has this number of points
bargridLabelMargin: 4, //the horizontal space between a bargrid bar and it's label
xAxisMargin: 8, //the vertical space between the plot area and the x axis
metaInfoMargin: 4, //the vertical space between the bottom of the bounding box and the meta information
primaryAxisPosition: "right",
<<<<<<<
g.metaInfo = g.chart.append("g")
.attr("id","metaInfo")
.attr("transform","translate(0," + (g.height() - g.metaInfoMargin) + ")");
=======
g.footerElement(g.chartElement().append("g")
.attr("id", "metaInfo")
.attr("transform", "translate(0," + (g.height() - 4) + ")"));
>>>>>>>
g.metaInfo = g.chart.append("g")
.attr("id","metaInfo")
.attr("transform","translate(0," + (g.height() - g.metaInfoMargin) + ")");
<<<<<<<
g.metaInfo.attr("transform","translate(0," + (g.height() - g.metaInfoMargin) + ")");
=======
g.footerElement().attr("transform", "translate(0," + (g.height() - 4) + ")");
>>>>>>>
g.metaInfo.attr("transform","translate(0," + (g.height() - g.metaInfoMargin) + ")");
<<<<<<<
g.titleLine.attr("y",g.padding.top - 36) //CHANGE - MAGIC NUMBER
=======
g.titleElement().attr("y",g.padding().top - 36)
>>>>>>>
g.titleElement().attr("y",g.padding().top - 36) //CHANGE - MAGIC NUMBER
<<<<<<<
g.titleLine.attr("y",g.padding.top - 36) //CHANGE - MAGIC NUMBER
=======
g.titleElement().attr("y",g.padding().top - 36)
>>>>>>>
g.titleElement().attr("y",g.padding().top - 36) //CHANGE - MAGIC NUMBER
<<<<<<<
.attr("transform",g.isBargrid() ? "translate(" + g.padding.left + ",0)" : "translate(0," + (g.height() - g.padding.bottom + g.xAxisMargin) + ")")
.call(g.xAxis.axis);
=======
.attr("transform",g.isBargrid() ? "translate(" + g.padding().left + ",0)" : "translate(0," + (g.height() - g.padding().bottom + 8) + ")")
.call(g.xAxis().axis);
>>>>>>>
.attr("transform",g.isBargrid() ? "translate(" + g.padding().left + ",0)" : "translate(0," + (g.height() - g.padding().bottom + g.xAxisMargin) + ")")
.call(g.xAxis().axis);
<<<<<<<
g.chart.select("#xAxis")
.attr("transform",g.isBargrid() ? "translate(" + g.padding.left + ",0)" : "translate(0," + (g.height() - g.padding.bottom + g.xAxisMargin) + ")")
.call(g.xAxis.axis)
=======
g.chartElement().selectAll("#xAxis")
.attr("transform",g.isBargrid() ? "translate(" + g.padding().left + ",0)" : "translate(0," + (g.height() - g.padding().bottom + 8) + ")")
.call(g.xAxis().axis)
>>>>>>>
g.chartElement().selectAll("#xAxis")
.attr("transform",g.isBargrid() ? "translate(" + g.padding().left + ",0)" : "translate(0," + (g.height() - g.padding().bottom + g.xAxisMargin) + ")")
.call(g.xAxis().axis)
<<<<<<<
.attr("stroke",function(d,i){return d.color? d.color : g.colors[i]})
=======
.attr("stroke",function(d,i){return d.color? d.color : colors[i]})
.attr("stroke-width",3)
.attr("stroke-linejoin","round")
.attr("stroke-linecap","round")
.attr("fill","none")
>>>>>>>
.attr("stroke",function(d,i){return d.color? d.color : colors[i]})
<<<<<<<
.attr("width", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0))})
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return g.yAxis[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis[yAxisIndex].scale(d)):0)})
.attr("y",function(d,i) {return g.xAxis.scale(i) - 10}) //CHANGE - MAGIC NUMBER
=======
.attr("width", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0))})
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return g.yAxis()[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis()[yAxisIndex].scale(d)):0)})
.attr("y",function(d,i) {return g.xAxis().scale(i) - 10})
>>>>>>>
.attr("width", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0))})
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return g.yAxis()[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis()[yAxisIndex].scale(d)):0)})
.attr("y",function(d,i) {return g.xAxis().scale(i) - 10}) //CHANGE - MAGIC NUMBER
<<<<<<<
.attr("width", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0))})
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return g.yAxis[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0)):0)})
.attr("y",function(d,i) {return g.xAxis.scale(i) - 10}) //CHANGE - MAGIC NUMBER
=======
.attr("width", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0))})
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return g.yAxis()[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0)):0)})
.attr("y",function(d,i) {return g.xAxis().scale(i) - 10})
>>>>>>>
.attr("width", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0))})
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return g.yAxis()[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0)):0)})
.attr("y",function(d,i) {return g.xAxis().scale(i) - 10}) //CHANGE - MAGIC NUMBER
<<<<<<<
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0))})
.attr("y",function(d,i) {return g.xAxis.scale(i) + 5}) //CHANGE - MAGIC NUMBER
//reset the padding to the default before mucking with it in the label postitioning
g.padding.right = g.defaultPadding().right
=======
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0))})
.attr("y",function(d,i) {return g.xAxis().scale(i) + 5})
>>>>>>>
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0))})
.attr("y",function(d,i) {return g.xAxis.scale(i) + 5}) //CHANGE - MAGIC NUMBER
//reset the padding to the default before mucking with it in the label postitioning
g.padding.right = g.defaultPadding().right
<<<<<<<
.text(function(d,i){var yAxisIndex = d3.select(this.parentNode).data()[0].axis; return (i==0?g.yAxis[yAxisIndex].prefix.value:"") + g.numberFormat(d) + (i==0?g.yAxis[yAxisIndex].suffix.value:"")})
.attr("x", function(d,i) {
var yAxisIndex = d3.select(this.parentNode).data()[0].axis,
x = g.bargridLabelMargin + g.yAxis[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0)):0) + Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0)),
bbox = this.getBBox()
parentCoords = Gneiss.helper.transformCoordOf(d3.select(this.parentNode))
console.log()
if (x + bbox.width + parentCoords.x > g.width()) {
//the label will fall off the edge and thus the chart needs more padding
if(bbox.width + g.defaultPadding().right < (g.width()-g.padding.left)/g.series.length) {
//add more padding if there is room for it
g.padding.right = bbox.width + g.defaultPadding().right
g.redraw()
}
}
return x
})
.attr("y",function(d,i) {return g.xAxis.scale(i) + 5}) //CHANGE - MAGIC NUMBER
=======
.text(function(d,i){var yAxisIndex = d3.select(this.parentNode).data()[0].axis; return (i==0?g.yAxis()[yAxisIndex].prefix.value:"") + g.numberFormat(d) + (i==0?g.yAxis()[yAxisIndex].suffix.value:"")})
.attr("x", function(d,i) {yAxisIndex = d3.select(this.parentNode).data()[0].axis; return 3 + g.yAxis()[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0)):0) + Math.abs(g.yAxis()[yAxisIndex].scale(d) - g.yAxis()[yAxisIndex].scale(0))})
.attr("y",function(d,i) {return g.xAxis().scale(i) + 5})
>>>>>>>
.text(function(d,i){var yAxisIndex = d3.select(this.parentNode).data()[0].axis; return (i==0?g.yAxis[yAxisIndex].prefix.value:"") + g.numberFormat(d) + (i==0?g.yAxis[yAxisIndex].suffix.value:"")})
.attr("x", function(d,i) {
var yAxisIndex = d3.select(this.parentNode).data()[0].axis,
x = g.bargridLabelMargin + g.yAxis[yAxisIndex].scale(0) - (d<0?Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0)):0) + Math.abs(g.yAxis[yAxisIndex].scale(d) - g.yAxis[yAxisIndex].scale(0)),
bbox = this.getBBox()
parentCoords = Gneiss.helper.transformCoordOf(d3.select(this.parentNode))
console.log()
if (x + bbox.width + parentCoords.x > g.width()) {
//the label will fall off the edge and thus the chart needs more padding
if(bbox.width + g.defaultPadding().right < (g.width()-g.padding.left)/g.series.length) {
//add more padding if there is room for it
g.padding.right = bbox.width + g.defaultPadding().right
g.redraw()
}
}
return x
})
.attr("y",function(d,i) {return g.xAxis.scale(i) + 5}) //CHANGE - MAGIC NUMBER
<<<<<<<
.attr("stroke",function(d,i){return d.color? d.color : g.colors[i]})
=======
.attr("stroke",function(d,i){return d.color? d.color : colors[i]})
.attr("stroke-width",3)
.attr("stroke-linejoin","round")
.attr("stroke-linecap","round")
.attr("fill","none");
>>>>>>>
.attr("stroke",function(d,i){return d.color? d.color : colors[i]})
<<<<<<<
legendGroups.filter(function(d){return d != g.series[0]})
=======
legendGroups.filter(function(d){return d != g.series()[0]})
.transition()
.duration(50)
.delay(function(d,i){return i * 50 + 50})
>>>>>>>
legendGroups.filter(function(d){return d != g.series[0]})
<<<<<<<
x = g.padding.left;
legendItemY += 15; //CHANGE - MAGIC NUMBER
=======
x = g.padding().left;
legendItemY += 15;
>>>>>>>
x = g.padding().left;
legendItemY += 15; //CHANGE - MAGIC NUMBER
<<<<<<<
})
=======
})
//.filter(function(d,i){console.log(i,g.series().slice(0).pop()==d);return d == g.series().slice(0).pop()})
//.each("end", function(d,i) {
// //the filter above makes sure this only hapens on the last one
// if (legendItemY > 0 && g.defaults.padding().top != legendItemY + 25) { //CHANGE
// g.defaults.padding().top = legendItemY + 25;
// g.all.redraw();
//
// };
//})
//test if the chart needs more top margin because of a large number of legend items
>>>>>>>
})
<<<<<<<
g.metaInfo.attr("transform","translate(0," + (g.height() - g.metaInfoMargin) + ")");
=======
g.footerElement().attr("transform", "translate(0," + ( g.height() - 4) + ")");
>>>>>>>
g.metaInfo.attr("transform","translate(0," + (g.height() - g.metaInfoMargin) + ")"); |
<<<<<<<
loggerRegex = /^.*?(?:logger|Y.log).*?(?:;|\).*;|(?:\r?\n.*?)*?\).*;).*;?.*?\r?\n/mg;
=======
buildDir = path.join(shifter.cwd(), '../../build'),
globalRegex = /^.*?(?:logger|Y.log).*?(?:;|\).*;|(?:\r?\n.*?)*?\).*;).*;?.*?\r?\n/mg;
>>>>>>>
globalRegex = /^.*?(?:logger|Y.log).*?(?:;|\).*;|(?:\r?\n.*?)*?\).*;).*;?.*?\r?\n/mg;
<<<<<<<
exports.loggerRegex = loggerRegex;
=======
exports.globalRegex = globalRegex;
exports.buildDir = buildDir;
>>>>>>>
exports.globalRegex = globalRegex;
<<<<<<<
mod.stamp = mod.shifter && typeof mod.shifter.jsstamp === 'boolean' ? mod.shifter.jsstamp : options.jsstamp;
=======
mod.stamp = options.jsstamp;
globalRegex = (typeof options.regex !== 'undefined') ? options.regex : globalRegex;
>>>>>>>
mod.stamp = mod.shifter && typeof mod.shifter.jsstamp === 'boolean' ? mod.shifter.jsstamp : options.jsstamp;
globalRegex = (typeof options.regex !== 'undefined') ? options.regex : globalRegex; |
<<<<<<<
title: 'Type, Fieldname, Description',
content: '{String|String[]} name The users name.',
expected: {
group: 'Parameter',
type: 'String|String[]',
size: undefined,
allowedValues: undefined,
optional: false,
field: 'name',
defaultValue: undefined,
description: 'The users name.'
}
},
{
=======
title: '$Simple fieldname only',
content: '$simple',
expected: {
group: 'Parameter',
type: undefined,
size: undefined,
allowedValues: undefined,
optional: false,
field: '$simple',
defaultValue: undefined,
description: ''
}
},
{
>>>>>>>
title: 'Type, Fieldname, Description',
content: '{String|String[]} name The users name.',
expected: {
group: 'Parameter',
type: 'String|String[]',
size: undefined,
allowedValues: undefined,
optional: false,
field: 'name',
defaultValue: undefined,
description: 'The users name.'
}
},
{
title: '$Simple fieldname only',
content: '$simple',
expected: {
group: 'Parameter',
type: undefined,
size: undefined,
allowedValues: undefined,
optional: false,
field: '$simple',
defaultValue: undefined,
description: ''
}
},
{ |
<<<<<<<
YUI.add("t-main-tmpl-icons", function(Y) { Y.namespace("DEMO.MAIN.TMPL.ICONS").template = function (Y, $e, data) {
var $b='', $v=function (v){return v || v === 0 ? v : $b;}, $t=' ';
=======
YUI.add("t-main-tmpl-icons", function(Y) { Y.namespace("iot.main.tmpl.icons").compiled = function (Y, $e, data) {
var $b='', $v=function (v){return v || v === 0 ? v : $b;}, $t='<div class="icon-list">\n ';
>>>>>>>
YUI.add("t-main-tmpl-icons", function(Y) { Y.namespace("iot.main.tmpl.icons").compiled = function (Y, $e, data) {
var $b='', $v=function (v){return v || v === 0 ? v : $b;}, $t=' '; |
<<<<<<<
import { watchFormatting, watchWordCount } from './texteditor';
import inputSetup from './input';
=======
import { watchFormatting, watchWordCount, toggleAbout, initAutoscroll } from './texteditor';
import { inputSetup, getQueryParams, hide as inputHide } from './input';
>>>>>>>
import { watchFormatting, watchWordCount, initAutoscroll } from './texteditor';
import { inputSetup, getQueryParams, hide as inputHide } from './input'; |
<<<<<<<
},
storage: {
result: "",
testSDCard: function(){
Device.storage.result = window.DroidGap.testSaveLocationExists();
return Device.storage.result;
},
testExistence: function(file){
Device.storage.result = window.DroidGap.testDirOrFileExists(file);
return Device.storage.result;
},
delFile: function(file){
Device.storage.result = window.DroidGap.deleteFile(file);
return Device.storage.result;
},
delDir: function(file){
Device.storage.result = window.DroidGap.deleteDirectory(file);
return Device.storage.result;
},
createDir: function(file){
Device.storage.result = window.DroidGap.createDirectory(file);
return Device.storage.result;
}
}
=======
},
audio: {
startRecording: function(file) {
window.DroidGap.startRecordingAudio(file);
},
stopRecording: function() {
window.DroidGap.stopRecordingAudio();
},
startPlaying: function(file) {
window.DroidGap.startPlayingAudio(file);
},
stopPlaying: function() {
window.DroidGap.stopPlayingAudio();
},
getCurrentPosition: function() {
return window.DroidGap.getCurrentPositionAudio();
},
getDuration: function(file) {
return window.DroidGap.getDurationAudio(file);
}
}
>>>>>>>
},
storage: {
result: "",
testSDCard: function(){
Device.storage.result = window.DroidGap.testSaveLocationExists();
return Device.storage.result;
},
testExistence: function(file){
Device.storage.result = window.DroidGap.testDirOrFileExists(file);
return Device.storage.result;
},
delFile: function(file){
Device.storage.result = window.DroidGap.deleteFile(file);
return Device.storage.result;
},
delDir: function(file){
Device.storage.result = window.DroidGap.deleteDirectory(file);
return Device.storage.result;
},
createDir: function(file){
Device.storage.result = window.DroidGap.createDirectory(file);
return Device.storage.result;
}
}
audio: {
startRecording: function(file) {
window.DroidGap.startRecordingAudio(file);
},
stopRecording: function() {
window.DroidGap.stopRecordingAudio();
},
startPlaying: function(file) {
window.DroidGap.startPlayingAudio(file);
},
stopPlaying: function() {
window.DroidGap.stopPlayingAudio();
},
getCurrentPosition: function() {
return window.DroidGap.getCurrentPositionAudio();
},
getDuration: function(file) {
return window.DroidGap.getDurationAudio(file);
}
} |
<<<<<<<
refreshTable();
datepicker = statement.addDateToHeader({
=======
var loading = false;
var options = { offset : 0, limit: 50 };
var is_specific_date_shown = false; /* is data for a specific date is shown */
var refreshTable = function (yyy_mm_dd) {
var processing_msg = $('#' + table.attr('id') + '_processing').css('top','200px').show();
loading = true;
var request = {
statement: 1,
description: 1
};
/* if a date is specified get the transactions for that date */
if (typeof yyy_mm_dd === 'string') {
request.date_from = yyyy_mm_dd_to_epoch(yyy_mm_dd, { utc: true });
var one_day_utc = Date.UTC(1970, 0, 1, 23, 59, 59) / 1000;
request.date_to = request.date_from + one_day_utc;
table.api().rows().remove();
is_specific_date_shown = true;
}
else { /* request the next 50 items for live scroll */
request.limit = 50;
if(is_specific_date_shown) {
table.api().rows().remove();
is_specific_date_shown = false;
}
request.offset = table.api().column(0).data().length;
}
/* refresh the table with result of { profit_table:1 } from WS */
var refresh = function (data) {
var transactions = (data.statement && data.statement.transactions) || [];
var rows = transactions.map(function (trans) {
var amount = trans.amount * 1;
var svg = amount > 0 ? 'up' : amount < 0 ? 'down' : 'equal';
var img = '<img class="arrow" src="images/' + svg + '-arrow.svg"/>';
return [
epoch_to_string(trans.transaction_time, { utc: true }),
trans.transaction_id,
capitalizeFirstLetter(trans.action_type),
img + trans.longcode ,
(trans.amount * 1).toFixed(2),
'<b>' + formatPrice(trans.balance_after) + '</b>'
];
});
table.api().rows.add(rows);
table.api().draw();
loading = false;
processing_msg.hide();
};
liveapi.send(request)
.then(refresh)
.catch(function (err) {
refresh({});
$.growl.error({ message: err.message });
console.error(err);
});
}
statement.addDateToHeader({
>>>>>>>
datepicker = statement.addDateToHeader({ |
<<<<<<<
var key = chartingRequestMap.keyFor(state.proposal.symbol, 0);
if(!chartingRequestMap[key]){ /* don't register if already someone else has registered for this symbol */
chartingRequestMap.register({
symbol: state.proposal.symbol,
subscribe: 1,
granularity: 0,
count: 1,
style: 'ticks'
}).catch(function (err) {
$.growl.error({ message: err.message });
var has_digits = _(available).map('min_contract_duration')
.any(function(duration){ return /^\d+$/.test(duration) || (_.last(duration) === 't'); });
/* if this contract does not offer tick trades, then its fine let the user trade! */
if(!has_digits) {
state.ticks.loading = false;
} else {
_.delay(function(){ dialog.dialog('close'); },2000);
}
console.error(err);
});
}
=======
>>>>>>>
var key = chartingRequestMap.keyFor(state.proposal.symbol, 0);
if(!chartingRequestMap[key]){ /* don't register if already someone else has registered for this symbol */
chartingRequestMap.register({
symbol: state.proposal.symbol,
subscribe: 1,
granularity: 0,
count: 1,
style: 'ticks'
}).catch(function (err) {
$.growl.error({ message: err.message });
var has_digits = _(available).map('min_contract_duration')
.any(function(duration){ return /^\d+$/.test(duration) || (_.last(duration) === 't'); });
/* if this contract does not offer tick trades, then its fine let the user trade! */
if(!has_digits) {
state.ticks.loading = false;
} else {
_.delay(function(){ dialog.dialog('close'); },2000);
}
console.error(err);
});
} |
<<<<<<<
}
function calculateStringWidth() {
var longTp1 = timeperiod_arr.reduce(function(a,b){return a.value.i18n().length > b.value.i18n().length? a :b}),
longTp2 = timeperiod_arr.reduce(function(a,b){return a.name.i18n().length > b.name.i18n().length? a :b}),
longCt = chartType_arr.reduce(function(a,b){return a.name.i18n().length > b.name.i18n().length? a : b});
var getWidth = function(string) {
var font = '0.8em roboto,sans-serif',
obj = $('<div>' + string.i18n() + '</div>')
.css({'position': 'absolute', 'float': 'left', 'white-space': 'nowrap', 'visibility': 'hidden', 'font': font})
.appendTo($('body')),
width = obj.width();
obj.remove();
return width;
}
stringWidth.tp = {};
stringWidth.tp.min = getWidth(longTp1.value);
stringWidth.tp.max = getWidth(longTp2.name);
stringWidth.ct = getWidth(longCt.name);
=======
>>>>>>>
}
function calculateStringWidth() {
var longTp1 = timeperiod_arr.reduce(function(a,b){return a.value.i18n().length > b.value.i18n().length? a :b}),
longTp2 = timeperiod_arr.reduce(function(a,b){return a.name.i18n().length > b.name.i18n().length? a :b}),
longCt = chartType_arr.reduce(function(a,b){return a.name.i18n().length > b.name.i18n().length? a : b});
var getWidth = function(string) {
var font = '0.8em roboto,sans-serif',
obj = $('<div>' + string.i18n() + '</div>')
.css({'position': 'absolute', 'float': 'left', 'white-space': 'nowrap', 'visibility': 'hidden', 'font': font})
.appendTo($('body')),
width = obj.width();
obj.remove();
return width;
}
stringWidth.tp = {};
stringWidth.tp.min = getWidth(longTp1.value);
stringWidth.tp.max = getWidth(longTp2.name);
stringWidth.ct = getWidth(longCt.name); |
<<<<<<<
// Cookies.remove('webtrader_token');
localStorage.removeItem('token1');
localStorage.removeItem('acct1');
socket.close();
=======
Cookies.remove('webtrader_token');
api.send({logout: 1}) /* try to logout and if it fails close the socket */
.catch(function(err){
$.growl.error({ message: err.message });
socket.close();
});
>>>>>>>
// Cookies.remove('webtrader_token');
localStorage.removeItem('token1');
localStorage.removeItem('acct1');
api.send({logout: 1}) /* try to logout and if it fails close the socket */
.catch(function(err){
$.growl.error({ message: err.message });
socket.close();
}); |
<<<<<<<
//Register async loading of portfolio window
load_ondemand($navMenu.find("a.portfolio"), 'click', 'loading portfolio ...', 'portfolio/portfolio',
function (portfolio) {
var elem = $navMenu.find("a.portfolio");
portfolio.init(elem);
elem.click();
});
=======
//Register async loading of window profit-table
load_ondemand($navMenu.find("a.profitTable"), 'click', 'loading Profit Table ...', 'profittable/profitTable',
function (profitTable) {
var elem = $navMenu.find("a.profitTable");
profitTable.init(elem);
elem.click();
});
>>>>>>>
//Register async loading of portfolio window
load_ondemand($navMenu.find("a.portfolio"), 'click', 'loading portfolio ...', 'portfolio/portfolio',
function (portfolio) {
var elem = $navMenu.find("a.portfolio");
portfolio.init(elem);
elem.click();
});
//Register async loading of window profit-table
load_ondemand($navMenu.find("a.profitTable"), 'click', 'loading Profit Table ...', 'profittable/profitTable',
function (profitTable) {
var elem = $navMenu.find("a.profitTable");
profitTable.init(elem);
elem.click();
}); |
<<<<<<<
=======
* Get Mixpanel tolen/assisstance.
* NOTE: This must be called before initSession
*
* @param (String) token. Default = false
*
* @return (Promise)
*/
Branch.prototype.setMixpanelToken = function (token) {
return execute('setMixpanelToken', [token]);
};
/**
* Set debug mode.
* NOTE: This must be called before initSession
*
* @param (Boolean) isEnabled. Default = false
*
* @return (Promise)
*/
Branch.prototype.setDebug = function (isEnabled) {
isEnabled = (typeof isEnabled !== 'boolean') ? false : isEnabled;
this.debugMode = isEnabled;
return execute('setDebug', [isEnabled]);
};
/**
>>>>>>>
* Get Mixpanel tolen/assisstance.
* NOTE: This must be called before initSession
*
* @param (String) token. Default = false
*
* @return (Promise)
*/
Branch.prototype.setMixpanelToken = function (token) {
return execute('setMixpanelToken', [token]);
};
/** |
<<<<<<<
var game_offer = null;
var next_log_line_num = 1; // number for generating log line ID's
=======
// Number for generating log line IDs.
var next_log_line_num = 0;
>>>>>>>
var game_offer = null;
// Number for generating log line IDs.
var next_log_line_num = 0;
<<<<<<<
if (nodeText == null || !isGameStart(nodeText))
=======
if (nodeText == null || nodeText.indexOf("Turn order") != 0) {
>>>>>>>
if (nodeText == null || !isGameStart(nodeText)) {
<<<<<<<
// The first line of actual text is either the game starting value or something in the middle of the game
if (isGameStart(nodeText)) {
// The game is starting, so put in the initial blank entries and clear out any local storage
console.log("--- starting game ---" + "\n");
started = true;
next_log_line_num = 1;
=======
// The first line of actual text is either "Turn order" or something in
// the middle of the game.
if (nodeText.indexOf("Turn order") == 0) {
// The game is starting, so put in the initial blank entries and clear
// out any local storage.
console.log("--- starting game ---");
next_log_line_num = 0;
>>>>>>>
// The first line of actual text is either "Turn order" or something in
// the middle of the game.
if (isGameStart(nodeText)) {
// The game is starting, so put in the initial blank entries and clear
// out any local storage.
console.log("--- starting game ---" + "\n");
started = true;
next_log_line_num = 1; |
<<<<<<<
if (player.achievements.includes("Many Deaths") && player.thisInfinityTime < 1800) multiplier = multiplier.times(3600/(player.thisInfinityTime+1800));
if (player.achievements.includes("Blink of an eye") && player.thisInfinityTime < 3) multiplier = multiplier.times(3.3/(player.thisInfinityTime+0.3));
if (player.achievements.includes("This achievement doesn't exist")) multiplier = multiplier.times(1+Decimal.pow(player.antimatter,0.00002));
=======
if (player.currentChallenge == "postc4") {
if (player.postC4Tier == tier) return multiplier;
else return Decimal.pow(multiplier, 0.25);
}
multiplier = multiplier.times(player.postC3Reward)
if (player.currentChallenge == "postc6") multiplier = multiplier.dividedBy(Decimal.max(player.matter, 1))
if (player.currentChallenge == "postc8") multiplier = multiplier.times(postc8Mult)
if (player.challenges.includes("postc8") && tier < 8 && tier > 1) multiplier = multiplier.times( Decimal.pow(getDimensionFinalMultiplier(1).times(getDimensionFinalMultiplier(8)), 0.02) )
if (player.challenges.includes("postc4")) return Decimal.pow(multiplier, 1.1);
>>>>>>>
if (player.achievements.includes("Many Deaths") && player.thisInfinityTime < 1800) multiplier = multiplier.times(3600/(player.thisInfinityTime+1800));
if (player.achievements.includes("Blink of an eye") && player.thisInfinityTime < 3) multiplier = multiplier.times(3.3/(player.thisInfinityTime+0.3));
if (player.achievements.includes("This achievement doesn't exist")) multiplier = multiplier.times(1+Decimal.pow(player.antimatter,0.00002));
if (player.currentChallenge == "postc4") {
if (player.postC4Tier == tier) return multiplier;
else return Decimal.pow(multiplier, 0.25);
}
multiplier = multiplier.times(player.postC3Reward)
if (player.currentChallenge == "postc6") multiplier = multiplier.dividedBy(Decimal.max(player.matter, 1))
if (player.currentChallenge == "postc8") multiplier = multiplier.times(postc8Mult)
if (player.challenges.includes("postc8") && tier < 8 && tier > 1) multiplier = multiplier.times( Decimal.pow(getDimensionFinalMultiplier(1).times(getDimensionFinalMultiplier(8)), 0.02) )
if (player.challenges.includes("postc4")) return Decimal.pow(multiplier, 1.1); |
<<<<<<<
this.tier = 1;
this.buyOne = true;
=======
this.bulk = 1;
this.tier = 10
>>>>>>>
this.tier = 1;
this.bulk = 1; |
<<<<<<<
matter: 0,
=======
chall11Pow: 1,
>>>>>>>
matter: 0,
chall11Pow: 1,
<<<<<<<
matter: 0,
=======
chall11Pow: 1,
>>>>>>>
matter: 0,
chall11Pow: 1,
<<<<<<<
matter: 0,
=======
chall11Pow: 1,
>>>>>>>
matter: 0,
chall11Pow: 1,
<<<<<<<
matter: 0,
=======
chall11Pow: 1,
>>>>>>>
matter: 0,
chall11Pow: 1,
<<<<<<<
matter: 0,
=======
chall11Pow: 1,
>>>>>>>
matter: 0,
chall11Pow: 1,
<<<<<<<
document.getElementById("challenge12").onclick = function () {
startChallenge("challenge12");
}
=======
document.getElementById("challenge11").onclick = function () {
startChallenge("challenge11");
}
>>>>>>>
document.getElementById("challenge11").onclick = function () {
startChallenge("challenge11");
}
document.getElementById("challenge12").onclick = function () {
startChallenge("challenge12");
} |
<<<<<<<
var bell = ngAudio.load("assets/sounds/bell.mp3");
var noShow = {};
=======
var bell = ngAudio.load("assets/sounds/bell.ogg");
>>>>>>>
var bell = ngAudio.load("assets/sounds/bell.ogg");
var noShow = {}; |
<<<<<<<
var data, msgOpts, msgText, r, reason, resp, xhr, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
=======
var data, msgOpts, msgText, r, reason, resp, xhr, _ref3, _ref4, _ref5, _ref6, _ref7;
>>>>>>>
var data, msgOpts, msgText, r, reason, resp, xhr, _ref2, _ref3, _ref4, _ref5, _ref6;
<<<<<<<
if ((_ref3 = msg.errorCount) == null) {
msg.errorCount = 0;
=======
if ((_ref4 = m_opts.errorCount) == null) {
m_opts.errorCount = 0;
>>>>>>>
if ((_ref3 = m_opts.errorCount) == null) {
m_opts.errorCount = 0;
<<<<<<<
if ((_ref5 = msgOpts.retry) != null ? _ref5.allow : void 0) {
=======
if ((_ref6 = msgOpts.retry) != null ? _ref6.allow : void 0) {
if (msgOpts.retry.delay == null) {
if (msgOpts.errorCount < 4) {
msgOpts.retry.delay = 10;
} else {
msgOpts.retry.delay = 5 * 60;
}
}
>>>>>>>
if ((_ref5 = msgOpts.retry) != null ? _ref5.allow : void 0) {
if (msgOpts.retry.delay == null) {
if (msgOpts.errorCount < 4) {
msgOpts.retry.delay = 10;
} else {
msgOpts.retry.delay = 5 * 60;
}
}
<<<<<<<
msgOpts.hideAfter += (_ref6 = msgOpts.retry.delay) != null ? _ref6 : 10;
=======
if ((_ref7 = msgOpts._hideAfter) == null) {
msgOpts._hideAfter = msgOpts.hideAfter;
}
msgOpts.hideAfter = msgOpts._hideAfter + msgOpts.retry.delay;
>>>>>>>
if ((_ref6 = msgOpts._hideAfter) == null) {
msgOpts._hideAfter = msgOpts.hideAfter;
}
msgOpts.hideAfter = msgOpts._hideAfter + msgOpts.retry.delay;
<<<<<<<
msgOpts.retry.delay = ((_ref8 = msgOpts.retry.delay) != null ? _ref8 : 10) * 2;
=======
>>>>>>> |
<<<<<<<
/*! messenger 1.2.0 2013-03-05 */
=======
/*! messenger 1.1.5 2013-03-12 */
>>>>>>>
/*! messenger 1.2.0 2013-03-12 */
<<<<<<<
_Message.prototype.actionsToEvents = function() {
var act, name, _ref, _results;
=======
Message.prototype.actionsToEvents = function() {
var act, name, _ref, _results,
_this = this;
>>>>>>>
_Message.prototype.actionsToEvents = function() {
var act, name, _ref, _results,
_this = this;
<<<<<<<
var old, _ref1;
old = (_ref1 = opts[type]) != null ? _ref1 : function() {};
opts[type] = function() {
var data, msgOpts, msgText, r, reason, resp, xhr, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
=======
var old, _ref1, _ref2;
if ((_ref1 = opts[type]) != null ? _ref1._originalHandler : void 0) {
opts[type] = opts[type]._originalHandler;
}
old = (_ref2 = opts[type]) != null ? _ref2 : function() {};
opts[type] = function() {
var data, msgOpts, msgText, r, reason, resp, xhr, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
>>>>>>>
var old, _ref1, _ref2;
if ((_ref1 = opts[type]) != null ? _ref1._originalHandler : void 0) {
opts[type] = opts[type]._originalHandler;
}
old = (_ref2 = opts[type]) != null ? _ref2 : function() {};
opts[type] = function() {
var data, msgOpts, msgText, r, reason, resp, xhr, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
<<<<<<<
return {
"do": _this.run
};
=======
return opts[type]._originalHandler = old;
>>>>>>>
return opts[type]._originalHandler = old; |
<<<<<<<
roles,
migrations
=======
guardianPhoneFactorMessageTypes,
guardianPhoneFactorSelectedProvider,
guardianPolicies,
roles
>>>>>>>
migrations
guardianPhoneFactorMessageTypes,
guardianPhoneFactorSelectedProvider,
guardianPolicies,
roles |
<<<<<<<
import { consumeTokens } from '../contexts/TokensContext.js';
import { consumeAccount } from '../contexts/AccountContext.js';
import light from 'light-hoc';
import { withRouter } from 'react-router-dom';
=======
import { inject, observer } from 'mobx-react';
import light from '@parity/light.js-react';
>>>>>>>
import { consumeTokens } from '../contexts/TokensContext.js';
import { consumeAccount } from '../contexts/AccountContext.js';
import light from '@parity/light.js-react';
import { withRouter } from 'react-router-dom'; |
<<<<<<<
Client.prototype.chanData = function( name, create ) { // {{{
var key = name.toLowerCase();
if ( create ) {
this.chans[key] = this.chans[key] || {
key: key,
serverName: name,
users: {}
};
}
return this.chans[key];
} // }}}
Client.prototype.connect = function ( retryCount ) { // {{{
retryCount = retryCount || 0;
=======
Client.prototype.connect = function ( retryCount, callback ) { // {{{
if (!retryCount || typeof(retryCount) === 'function') {
callback = retryCount;
retryCount = 0;
}
if (typeof(callback) === 'function') {
this.once('registered', callback);
}
>>>>>>>
Client.prototype.chanData = function( name, create ) { // {{{
var key = name.toLowerCase();
if ( create ) {
this.chans[key] = this.chans[key] || {
key: key,
serverName: name,
users: {}
};
}
return this.chans[key];
} // }}}
Client.prototype.connect = function ( retryCount, callback ) { // {{{
if (!retryCount || typeof(retryCount) === 'function') {
callback = retryCount;
retryCount = 0;
}
if (typeof(callback) === 'function') {
this.once('registered', callback);
} |
<<<<<<<
/*
first user: alice:alice
alice create second user: bob:bob (admin)
alice create third user: charlie:charlie (non-privileged)
bob: create fourth user: david:david (non-priviledged)
*/
const userUUID = '9f93db43-02e6-4b26-8fae-7d6f51da12af'
=======
const aliceUUID = '9f93db43-02e6-4b26-8fae-7d6f51da12af'
>>>>>>>
/*
first user: alice:alice
alice create second user: bob:bob (admin)
alice create third user: charlie:charlie (non-privileged)
bob: create fourth user: david:david (non-priviledged)
*/
const aliceUUID = '9f93db43-02e6-4b26-8fae-7d6f51da12af'
<<<<<<<
it('GET /token should succeed', done =>
=======
it('GET /token should succeed with', done => {
>>>>>>>
it('GET /token should succeed with', done => {
<<<<<<<
=======
>>>>>>> |
<<<<<<<
break
case 'station':
return paths.length === 1 ? (method === 'GET' ? (paths[0] === 'info' ? 'GetStationInfo'
: (paths[0] === 'tickets' ? 'GetTickets' : undefined)) : (method === 'PATCH' ? 'UpdateStationInfo' : (method === 'POST' ? 'CreateTicket' : undefined)))
: paths.length === 2 ? (method === 'GET' ? 'GetTicket' : undefined)
: paths.length === 3 ? 'ConfirmTicket'
: undefined
break
=======
case 'download':
return paths.length === 0 && method === 'GET' ? 'getSummary'
: paths.length === 1 ? (method === 'PATCH' ? 'patchTorrent' : (paths[0] === 'magnet' ? 'addMagnet' : 'addTorrent'))
: undefined
>>>>>>>
break
case 'station':
return paths.length === 1 ? (method === 'GET' ? (paths[0] === 'info' ? 'GetStationInfo'
: (paths[0] === 'tickets' ? 'GetTickets' : undefined)) : (method === 'PATCH' ? 'UpdateStationInfo' : (method === 'POST' ? 'CreateTicket' : undefined)))
: paths.length === 2 ? (method === 'GET' ? 'GetTicket' : undefined)
: paths.length === 3 ? 'ConfirmTicket'
: undefined
break
case 'download':
return paths.length === 0 && method === 'GET' ? 'getSummary'
: paths.length === 1 ? (method === 'PATCH' ? 'patchTorrent' : (paths[0] === 'magnet' ? 'addMagnet' : 'addTorrent'))
: undefined
<<<<<<<
//tickets
this.handlers.set('GetStationInfo', this.getStationInfoAsync.bind(this))
this.handlers.set('GetTickets', this.getTicketsAsync.bind(this))
this.handlers.set('UpdateStationInfo', this.updateStationInfoAsync.bind(this))
this.handlers.set('CreateTicket', this.createTicketAsync.bind(this))
this.handlers.set('GetTicket', this.getTicketAsync.bind(this))
this.handlers.set('ConfirmTicket', this.confirmTicketAsync.bind(this))
=======
//download
this.handlers.set('getSummary', this.getSummaryAsync.bind(this))
this.handlers.set('patchTorrent', this.patchTorrentAsync.bind(this))
this.handlers.set('addMagnet', this.addMagnetAsync.bind(this))
this.handlers.set('addTorrent', this.addTorrentAsync.bind(this))
>>>>>>>
//tickets
this.handlers.set('GetStationInfo', this.getStationInfoAsync.bind(this))
this.handlers.set('GetTickets', this.getTicketsAsync.bind(this))
this.handlers.set('UpdateStationInfo', this.updateStationInfoAsync.bind(this))
this.handlers.set('CreateTicket', this.createTicketAsync.bind(this))
this.handlers.set('GetTicket', this.getTicketAsync.bind(this))
this.handlers.set('ConfirmTicket', this.confirmTicketAsync.bind(this))
//download
this.handlers.set('getSummary', this.getSummaryAsync.bind(this))
this.handlers.set('patchTorrent', this.patchTorrentAsync.bind(this))
this.handlers.set('addMagnet', this.addMagnetAsync.bind(this))
this.handlers.set('addTorrent', this.addTorrentAsync.bind(this)) |
<<<<<<<
=======
// app.use('/samba', require('./routes/samba'))
// app.use('/download', require('./webtorrent'))
>>>>>>> |
<<<<<<<
break
case 'station':
return paths.length === 1 ? (method === 'GET' ? (paths[0] === 'info' ? 'GetStationInfo'
: (paths[0] === 'tickets' ? 'GetTickets' : undefined)) : (method === 'PATCH' ? 'UpdateStationInfo' : (method === 'POST' ? 'CreateTicket' : undefined)))
: paths.length === 2 ? (method === 'GET' ? 'GetTicket' : undefined)
: paths.length === 3 ? 'ConfirmTicket'
: undefined
break
=======
case 'download':
return paths.length === 0 && method === 'GET' ? 'getSummary'
: paths.length === 1 ? (method === 'PATCH' ? 'patchTorrent' : (paths[0] === 'magnet' ? 'addMagnet' : 'addTorrent'))
: undefined
>>>>>>>
break
case 'station':
return paths.length === 1 ? (method === 'GET' ? (paths[0] === 'info' ? 'GetStationInfo'
: (paths[0] === 'tickets' ? 'GetTickets' : undefined)) : (method === 'PATCH' ? 'UpdateStationInfo' : (method === 'POST' ? 'CreateTicket' : undefined)))
: paths.length === 2 ? (method === 'GET' ? 'GetTicket' : undefined)
: paths.length === 3 ? 'ConfirmTicket'
: undefined
break
case 'download':
return paths.length === 0 && method === 'GET' ? 'getSummary'
: paths.length === 1 ? (method === 'PATCH' ? 'patchTorrent' : (paths[0] === 'magnet' ? 'addMagnet' : 'addTorrent'))
: undefined |
<<<<<<<
export { sankeyCircular, addCircularPathData, center as sankeyCenter, left as sankeyLeft, right as sankeyRight, justify as sankeyJustify };
=======
function resolveNodesOverlap(graph, y0, py) {
var columns = nest().key(function (d) {
return d.column;
}).sortKeys(ascending).entries(graph.nodes).map(function (d) {
return d.values;
});
columns.forEach(function (nodes) {
var node,
dy,
y = y0,
n = nodes.length,
i;
// Push any overlapping nodes down.
nodes.sort(ascendingBreadth);
for (i = 0; i < n; ++i) {
node = nodes[i];
dy = y - node.y0;
if (dy > 0) {
node.y0 += dy;
node.y1 += dy;
node.targetLinks.forEach(function (l) {
l.y1 = l.y1 + dy;
});
node.sourceLinks.forEach(function (l) {
l.y0 = l.y0 + dy;
});
}
y = node.y1 + py;
}
});
}
export { sankeyCircular, center as sankeyCenter, left as sankeyLeft, right as sankeyRight, justify as sankeyJustify };
>>>>>>>
function resolveNodesOverlap(graph, y0, py) {
var columns = nest().key(function (d) {
return d.column;
}).sortKeys(ascending).entries(graph.nodes).map(function (d) {
return d.values;
});
columns.forEach(function (nodes) {
var node,
dy,
y = y0,
n = nodes.length,
i;
// Push any overlapping nodes down.
nodes.sort(ascendingBreadth);
for (i = 0; i < n; ++i) {
node = nodes[i];
dy = y - node.y0;
if (dy > 0) {
node.y0 += dy;
node.y1 += dy;
node.targetLinks.forEach(function (l) {
l.y1 = l.y1 + dy;
});
node.sourceLinks.forEach(function (l) {
l.y0 = l.y0 + dy;
});
}
y = node.y1 + py;
}
});
}
export { sankeyCircular, addCircularPathData, center as sankeyCenter, left as sankeyLeft, right as sankeyRight, justify as sankeyJustify }; |
<<<<<<<
npm.checkDependencies(source, opts)
=======
checkDependencies(source, opts)
// console.log("final source", source)
>>>>>>>
npm.checkDependencies(source, opts)
// console.log("final source", source) |
<<<<<<<
DropboxLink = require('./comp/dropbox-link'),
Updater = require('./comp/updater');
=======
DropboxLink = require('./comp/dropbox-link'),
LastOpenFiles = require('./comp/last-open-files'),
ThemeChanger = require('./util/theme-changer');
>>>>>>>
DropboxLink = require('./comp/dropbox-link'),
Updater = require('./comp/updater'),
LastOpenFiles = require('./comp/last-open-files'),
ThemeChanger = require('./util/theme-changer');
<<<<<<<
var appModel = new AppModel();
new AppView({ model: appModel }).render().showOpenFile(appModel.settings.get('lastOpenFile'));
Updater.init();
=======
var appView = new AppView({ model: appModel }).render();
var lastOpenFiles = LastOpenFiles.all();
var lastOpenFile = lastOpenFiles[0];
if (lastOpenFile && lastOpenFile.storage === 'file' && lastOpenFile.path) {
appView.showOpenFile(lastOpenFile.path);
} else {
appView.showOpenFile();
}
>>>>>>>
var appView = new AppView({ model: appModel }).render();
var lastOpenFiles = LastOpenFiles.all();
var lastOpenFile = lastOpenFiles[0];
if (lastOpenFile && lastOpenFile.storage === 'file' && lastOpenFile.path) {
appView.showOpenFile(lastOpenFile.path);
} else {
appView.showOpenFile();
}
Updater.init(); |
<<<<<<<
lockOnCopy: false,
helpTipCopyShown: false
=======
helpTipCopyShown: false,
skipOpenLocalWarn: false
>>>>>>>
lockOnCopy: false,
helpTipCopyShown: false,
skipOpenLocalWarn: false |
<<<<<<<
this.setState({ docValues: undefined, viewBy: 'docs' });
if (newProps.field && newProps.field != this.props.field) {
this.loadAndDisplayDataByDocs(newProps.segment, newProps.field, this.state.docs);
=======
if (newProps.field) {
this.loadAndDisplayData(newProps.segment, newProps.field, this.state.docs);
>>>>>>>
this.setState({ docValues: undefined, viewBy: 'docs' });
if (newProps.field) {
this.loadAndDisplayData(newProps.segment, newProps.field, this.state.docs); |
<<<<<<<
angular.module('<%= scriptAppName %>', [<%= angularModules %>])
.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
=======
angular.module('<%= scriptAppName %>', [<%= angularModules %>])<% if (ngRoute) { %>
.config(['$routeProvider', function ($routeProvider) {
>>>>>>>
angular.module('<%= scriptAppName %>', [<%= angularModules %>])<% if (ngRoute) { %>
.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
<<<<<<<
$locationProvider.html5Mode(true);
}]);
=======
}])<% } %>;
>>>>>>>
$locationProvider.html5Mode(true);
}]);
<% } %>; |
<<<<<<<
injector: 'grunt-asset-injector',
buildcontrol: 'grunt-build-control',
istanbul_check_coverage: 'grunt-mocha-istanbul'
=======
buildcontrol: 'grunt-build-control'
>>>>>>>
buildcontrol: 'grunt-build-control',
istanbul_check_coverage: 'grunt-mocha-istanbul' |
<<<<<<<
angular.module('<%= _.camelize(appname) %>App')
.controller('<%= _.classify(name) %>Ctrl', function ($scope, $http) {
$http.get('/api/awesomeThings').success(function(awesomeThings) {
$scope.awesomeThings = awesomeThings;
});
=======
angular.module('<%= scriptAppName %>')
.controller('<%= classedName %>Ctrl', function ($scope) {
$scope.awesomeThings = [
'HTML5 Boilerplate',
'AngularJS',
'Karma'
];
>>>>>>>
angular.module('<%= scriptAppName %>')
.controller('<%= classedName %>Ctrl', function ($scope, $http) {
$http.get('/api/awesomeThings').success(function(awesomeThings) {
$scope.awesomeThings = awesomeThings;
}); |
<<<<<<<
this.jade = this.env.options.jade;
if(this.jade) {
this.indexFile = this.engine(this.read('../../templates/views/jade/index.jade'), this);
} else {
this.indexFile = this.engine(this.read('../../templates/views/html/index.html'), this);
}
=======
this.ngRoute = this.env.options.ngRoute;
this.indexFile = this.engine(this.read('../../templates/common/index.html'), this);
>>>>>>>
this.ngRoute = this.env.options.ngRoute;
this.jade = this.env.options.jade;
if(this.jade) {
this.indexFile = this.engine(this.read('../../templates/views/jade/index.jade'), this);
} else {
this.indexFile = this.engine(this.read('../../templates/views/html/index.html'), this);
}
<<<<<<<
files.push('main.' + (sass ? 's' : '') + 'css');
files.forEach(function (file) {
this.copy(source + file, 'app/styles/' + file);
}.bind(this));
var appendOptions = {
html: this.indexFile,
fileType: 'css',
optimizedPath: 'styles/main.css',
sourceFileList: files.map(function (file) {
return 'styles/' + file.replace('.scss', '.css');
}),
searchPath: ['.tmp', 'app']
};
if (this.jade) {
this.indexFile = appendFilesToJade(appendOptions);
} else {
this.indexFile = this.appendFiles(appendOptions);
}
};
Generator.prototype.bootstrapJS = function bootstrapJS() {
if (!this.bootstrap) {
return; // Skip if disabled.
}
// Wire Twitter Bootstrap plugins
var appendOptions = {
html: this.indexFile,
fileType: 'js',
optimizedPath: 'scripts/plugins.js',
sourceFileList: [
'bower_components/sass-bootstrap/js/affix.js',
'bower_components/sass-bootstrap/js/alert.js',
'bower_components/sass-bootstrap/js/button.js',
'bower_components/sass-bootstrap/js/carousel.js',
'bower_components/sass-bootstrap/js/transition.js',
'bower_components/sass-bootstrap/js/collapse.js',
'bower_components/sass-bootstrap/js/dropdown.js',
'bower_components/sass-bootstrap/js/modal.js',
'bower_components/sass-bootstrap/js/scrollspy.js',
'bower_components/sass-bootstrap/js/tab.js',
'bower_components/sass-bootstrap/js/tooltip.js',
'bower_components/sass-bootstrap/js/popover.js'
],
searchPath: 'app'
};
if (this.jade) {
this.indexFile = appendFilesToJade(appendOptions);
} else {
this.indexFile = this.appendFiles(appendOptions);
}
};
Generator.prototype.extraModules = function extraModules() {
var modules = [];
if (this.resourceModule) {
modules.push('bower_components/angular-resource/angular-resource.js');
}
if (this.cookiesModule) {
modules.push('bower_components/angular-cookies/angular-cookies.js');
}
if (this.sanitizeModule) {
modules.push('bower_components/angular-sanitize/angular-sanitize.js');
}
if (this.routeModule) {
modules.push('bower_components/angular-route/angular-route.js');
}
if (modules.length) {
var appendOptions = {
html: this.indexFile,
fileType: 'js',
optimizedPath: 'scripts/modules.js',
sourceFileList: modules,
searchPath: 'app'
};
if (this.jade) {
this.indexFile = appendFilesToJade(appendOptions);
} else {
this.indexFile = this.appendFiles(appendOptions);
}
}
=======
this.copy('styles/' + mainFile, 'app/styles/' + mainFile);
>>>>>>>
this.copy('styles/' + mainFile, 'app/styles/' + mainFile);
var appendOptions = {
html: this.indexFile,
fileType: 'css',
optimizedPath: 'styles/main.css',
sourceFileList: files.map(function (file) {
return 'styles/' + file.replace('.scss', '.css');
}),
searchPath: ['.tmp', 'app']
};
if (this.jade) {
this.indexFile = appendFilesToJade(appendOptions);
} else {
this.indexFile = this.appendFiles(appendOptions);
}
<<<<<<<
Generator.prototype.addJadeViews = function addHtmlJade() {
if(this.jade) {
this.copy('../../templates/views/jade/partials/main.jade', 'app/views/partials/main.jade');
this.copy('../../templates/views/jade/partials/navbar.jade', 'app/views/partials/navbar.jade');
this.copy('../../templates/views/jade/404.jade', 'app/views/404.jade');
}
};
Generator.prototype.addHtmlViews = function addHtmlViews() {
if(!this.jade) {
this.copy('../../templates/views/html/partials/main.html', 'app/views/partials/main.html');
this.copy('../../templates/views/html/partials/navbar.html', 'app/views/partials/navbar.html');
this.copy('../../templates/views/html/404.html', 'app/views/404.html');
}
=======
Generator.prototype.createIndexHtml = function createIndexHtml() {
this.indexFile = this.indexFile.replace(/'/g, "'");
this.write(path.join(this.appPath, 'index.html'), this.indexFile);
>>>>>>>
Generator.prototype.addJadeViews = function addHtmlJade() {
if(this.jade) {
this.copy('../../templates/views/jade/partials/main.jade', 'app/views/partials/main.jade');
this.copy('../../templates/views/jade/partials/navbar.jade', 'app/views/partials/navbar.jade');
this.copy('../../templates/views/jade/404.jade', 'app/views/404.jade');
}
};
Generator.prototype.addHtmlViews = function addHtmlViews() {
if(!this.jade) {
this.copy('../../templates/views/html/partials/main.html', 'app/views/partials/main.html');
this.copy('../../templates/views/html/partials/navbar.html', 'app/views/partials/navbar.html');
this.copy('../../templates/views/html/404.html', 'app/views/404.html');
}
<<<<<<<
};
Generator.prototype.serverFiles = function () {
this.template('../../templates/express/server.js', 'server.js');
this.template('../../templates/express/api.js', 'lib/controllers/api.js');
this.template('../../templates/express/index.js', 'lib/controllers/index.js');
};
Generator.prototype.mongoFiles = function () {
if (!this.mongo) {
return; // Skip if disabled.
}
this.template('../../templates/express/mongo/mongo.js', 'lib/db/mongo.js');
this.template('../../templates/express/mongo/dummydata.js', 'lib/db/dummydata.js');
this.template('../../templates/express/mongo/thing.js', 'lib/models/thing.js');
};
=======
};
Generator.prototype._injectDependencies = function _injectDependencies() {
var howToInstall =
'\nAfter running `npm install & bower install`, inject your front end dependencies into' +
'\nyour HTML by running:' +
'\n' +
chalk.yellow.bold('\n grunt bower-install');
if (this.options['skip-install']) {
console.log(howToInstall);
} else {
wiredep({
directory: 'app/bower_components',
bowerJson: JSON.parse(fs.readFileSync('./bower.json')),
ignorePath: 'app/',
htmlFile: 'app/index.html',
cssPattern: '<link rel="stylesheet" href="{{filePath}}">'
});
}
};
>>>>>>>
};
Generator.prototype._injectDependencies = function _injectDependencies() {
var howToInstall =
'\nAfter running `npm install & bower install`, inject your front end dependencies into' +
'\nyour HTML by running:' +
'\n' +
chalk.yellow.bold('\n grunt bower-install');
if (this.options['skip-install']) {
console.log(howToInstall);
} else {
wiredep({
directory: 'app/bower_components',
bowerJson: JSON.parse(fs.readFileSync('./bower.json')),
ignorePath: 'app/',
htmlFile: 'app/index.html',
cssPattern: '<link rel="stylesheet" href="{{filePath}}">'
});
}
};
};
Generator.prototype.serverFiles = function () {
this.template('../../templates/express/server.js', 'server.js');
this.template('../../templates/express/api.js', 'lib/controllers/api.js');
this.template('../../templates/express/index.js', 'lib/controllers/index.js');
};
Generator.prototype.mongoFiles = function () {
if (!this.mongo) {
return; // Skip if disabled.
}
this.template('../../templates/express/mongo/mongo.js', 'lib/db/mongo.js');
this.template('../../templates/express/mongo/dummydata.js', 'lib/db/dummydata.js');
this.template('../../templates/express/mongo/thing.js', 'lib/models/thing.js');
}; |
<<<<<<<
it('should return a valid content-range with no results for a query', function(done) {
request.get({ url: test.baseUrl + '/users?q=zzzz' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([]);
expect(response.headers['content-range']).to.equal('items 0-0/0');
done();
});
});
=======
it('should sort by a single field ascending', function(done) {
request.get({ url: test.baseUrl + '/users?sort=username' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([
{ username: "arthur", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" },
{ username: "edward", email: "[email protected]" },
{ username: "henry", email: "[email protected]" },
{ username: "james", email: "[email protected]" },
{ username: "william", email: "[email protected]" }
]);
done();
});
});
it('should sort by a single field descending', function(done) {
request.get({ url: test.baseUrl + '/users?sort=-username' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([
{ username: "william", email: "[email protected]" },
{ username: "james", email: "[email protected]" },
{ username: "henry", email: "[email protected]" },
{ username: "edward", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" }
]);
done();
});
});
it('should sort by multiple fields', function(done) {
request.get({ url: test.baseUrl + '/users?sort=username,email' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([
{ username: "arthur", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" },
{ username: "edward", email: "[email protected]" },
{ username: "henry", email: "[email protected]" },
{ username: "james", email: "[email protected]" },
{ username: "william", email: "[email protected]" }
]);
done();
});
});
it('should sort by multiple fields ascending/descending', function(done) {
request.get({ url: test.baseUrl + '/users?sort=username,-email' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([
{ username: "arthur", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" },
{ username: "edward", email: "[email protected]" },
{ username: "henry", email: "[email protected]" },
{ username: "james", email: "[email protected]" },
{ username: "william", email: "[email protected]" }
]);
done();
});
});
it('should fail with invalid sort criteria', function(done) {
request.get({ url: test.baseUrl + '/users?sort=dogs' }, function(err, response, body) {
expect(response.statusCode).to.equal(500);
done();
});
});
>>>>>>>
it('should return a valid content-range with no results for a query', function(done) {
request.get({ url: test.baseUrl + '/users?q=zzzz' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([]);
expect(response.headers['content-range']).to.equal('items 0-0/0');
done();
});
});
it('should sort by a single field ascending', function(done) {
request.get({ url: test.baseUrl + '/users?sort=username' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([
{ username: "arthur", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" },
{ username: "edward", email: "[email protected]" },
{ username: "henry", email: "[email protected]" },
{ username: "james", email: "[email protected]" },
{ username: "william", email: "[email protected]" }
]);
done();
});
});
it('should sort by a single field descending', function(done) {
request.get({ url: test.baseUrl + '/users?sort=-username' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([
{ username: "william", email: "[email protected]" },
{ username: "james", email: "[email protected]" },
{ username: "henry", email: "[email protected]" },
{ username: "edward", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" }
]);
done();
});
});
it('should sort by multiple fields', function(done) {
request.get({ url: test.baseUrl + '/users?sort=username,email' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([
{ username: "arthur", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" },
{ username: "edward", email: "[email protected]" },
{ username: "henry", email: "[email protected]" },
{ username: "james", email: "[email protected]" },
{ username: "william", email: "[email protected]" }
]);
done();
});
});
it('should sort by multiple fields ascending/descending', function(done) {
request.get({ url: test.baseUrl + '/users?sort=username,-email' }, function(err, response, body) {
expect(response.statusCode).to.equal(200);
var records = JSON.parse(body).map(function(r) { delete r.id; return r; });
expect(records).to.eql([
{ username: "arthur", email: "[email protected]" },
{ username: "arthur", email: "[email protected]" },
{ username: "edward", email: "[email protected]" },
{ username: "henry", email: "[email protected]" },
{ username: "james", email: "[email protected]" },
{ username: "william", email: "[email protected]" }
]);
done();
});
});
it('should fail with invalid sort criteria', function(done) {
request.get({ url: test.baseUrl + '/users?sort=dogs' }, function(err, response, body) {
expect(response.statusCode).to.equal(500);
done();
});
}); |
<<<<<<<
return marked(el);
=======
var cnt = el.content || el;
cnt += el.asideContent ? ('<aside class="notes" data-markdown>' + el.asideContent + '</aside>') : '';
return '<script type="text/template">' + cnt + '</script>';
>>>>>>>
var content = el.content || el;
content += el.asideContent ? ('<aside class="notes" data-markdown>' + el.asideContent + '</aside>') : '';
return '<script type="text/template">' + content + '</script>';
<<<<<<<
// horizontal
if( typeof sectionStack[k] === 'string' ) {
markdownSections += '<section '+ attributes +'>' + twrap( sectionStack[k] ) + '</section>';
}
=======
>>>>>>> |
<<<<<<<
* Retrieves the height of the given element by looking
* at the position and height of its immediate children.
*/
function getAbsoluteHeight( element ) {
var height = 0;
if( element ) {
var absoluteChildren = 0;
toArray( element.childNodes ).forEach( function( child ) {
if( typeof child.offsetTop === 'number' && child.style ) {
// Count # of abs children
if( child.style.position === 'absolute' ) {
absoluteChildren += 1;
}
height = Math.max( height, child.offsetTop + child.offsetHeight );
}
} );
// If there are no absolute children, use offsetHeight
if( absoluteChildren === 0 ) {
height = element.offsetHeight;
}
}
return height;
}
/**
=======
* Checks if this instance is being used to print a PDF.
*/
function isPrintingPDF() {
return ( /print-pdf/gi ).test( window.location.search );
}
/**
>>>>>>>
* Retrieves the height of the given element by looking
* at the position and height of its immediate children.
*/
function getAbsoluteHeight( element ) {
var height = 0;
if( element ) {
var absoluteChildren = 0;
toArray( element.childNodes ).forEach( function( child ) {
if( typeof child.offsetTop === 'number' && child.style ) {
// Count # of abs children
if( child.style.position === 'absolute' ) {
absoluteChildren += 1;
}
height = Math.max( height, child.offsetTop + child.offsetHeight );
}
} );
// If there are no absolute children, use offsetHeight
if( absoluteChildren === 0 ) {
height = element.offsetHeight;
}
}
return height;
}
/**
* Checks if this instance is being used to print a PDF.
*/
function isPrintingPDF() {
return ( /print-pdf/gi ).test( window.location.search );
}
/** |
<<<<<<<
onRegionClassAdded: () => {},
=======
onChangeVideoPlaying?: Function,
>>>>>>>
onRegionClassAdded: () => {},
onChangeVideoPlaying?: Function, |
<<<<<<<
import "./components/billboard";
=======
>>>>>>>
<<<<<<<
import "./components/bone-visibility";
=======
>>>>>>> |
<<<<<<<
this.onContainerClicked = this.onContainerClicked.bind(this);
=======
>>>>>>>
this.onContainerClicked = this.onContainerClicked.bind(this);
<<<<<<<
=======
onAddMediaClicked = () => {
this.props.onAddMedia(this.state.addMediaUrl);
this.props.onCloseDialog();
};
onCustomSceneClicked = () => {
this.props.onCustomScene(this.state.customSceneUrl);
this.props.onCloseDialog();
};
>>>>>>>
onCustomSceneClicked = () => {
this.props.onCustomScene(this.state.customSceneUrl);
this.props.onCloseDialog();
};
<<<<<<<
copyLinkButtonText: "Copy"
=======
copyLinkButtonText: "Copy",
addMediaUrl: "",
customSceneUrl: ""
>>>>>>>
copyLinkButtonText: "Copy",
addMediaUrl: "",
customSceneUrl: ""
<<<<<<<
dialogBody = <MediaToolsDialog onAddMedia={this.props.onAddMedia} onCloseDialog={this.props.onCloseDialog} />;
=======
dialogBody = (
<div>
<div>Tip: You can paste media URLs directly into Hubs with ctrl+v</div>
<form onSubmit={this.onAddMediaClicked}>
<div className="add-media-form">
<input
type="url"
placeholder="Image, Video, or GLTF URL"
className="add-media-form__link_field"
value={this.state.addMediaUrl}
onChange={e => this.setState({ addMediaUrl: e.target.value })}
required
/>
<div className="add-media-form__buttons">
<button className="add-media-form__action-button">
<span>Add</span>
</button>
</div>
</div>
</form>
</div>
);
>>>>>>>
dialogBody = <MediaToolsDialog onAddMedia={this.props.onAddMedia} onCloseDialog={this.props.onCloseDialog} />; |
<<<<<<<
this.props.pushHistoryState("modal", "room_settings");
this.props.hideSettings();
=======
this.props.pushHistoryState("modal", "rename_room");
this.setState({ expanded: false });
>>>>>>>
this.props.pushHistoryState("modal", "room_settings");
this.setState({ expanded: false }); |
<<<<<<<
import HubsTextureLoader from "../loaders/HubsTextureLoader";
=======
import { validMaterials } from "../components/hoverable-visuals";
>>>>>>>
import HubsTextureLoader from "../loaders/HubsTextureLoader";
import { validMaterials } from "../components/hoverable-visuals"; |
<<<<<<<
default: {
common: {
// @TODO these dpad events are emmited by an axis-dpad component. This should probalby move into either tracked-controller or input-mapping
dpadleftdown: "action_snap_rotate_left",
dpadrightdown: "action_snap_rotate_right",
dpadcenterdown: "action_teleport_down", // @TODO once once #30 lands in aframe-teleport controls this just maps to "action_teleport_aim"
dpadcenterup: "action_teleport_up", // @TODO once once #30 lands in aframe-teleport controls this just maps to "action_teleport_teleport"
touchpadpressedaxismovex: "translateX",
touchpadpressedaxismovey: "translateZ",
touchpadbuttonup: "stop_moving"
},
"vive-controls": {
menudown: "action_mute"
},
"oculus-touch-controls": {
xbuttondown: "action_mute"
},
daydream: {
menudown: "action_mute"
},
keyboard: {
m_press: "action_mute",
q_press: "action_snap_rotate_left",
e_press: "action_snap_rotate_right",
v_press: "action_share_screen",
w_down: "action_move_forward",
w_up: "action_dont_move_forward",
a_down: "action_move_left",
a_up: "action_dont_move_left",
s_down: "action_move_backward",
s_up: "action_dont_move_backward",
d_down: "action_move_right",
d_up: "action_dont_move_right"
=======
mappings: {
default: {
common: {
// @TODO these dpad events are emmited by an axis-dpad component. This should probalby move into either tracked-controller or input-mapping
dpadleftdown: "action_snap_rotate_left",
dpadrightdown: "action_snap_rotate_right",
dpadcenterdown: "action_teleport_down", // @TODO once once #30 lands in aframe-teleport controls this just maps to "action_teleport_aim"
dpadcenterup: "action_teleport_up", // @TODO once once #30 lands in aframe-teleport controls this just maps to "action_teleport_teleport"
touchpadpressedaxismovex: "translateX",
touchpadpressedaxismovey: "translateZ",
touchpadbuttonup: "stop_moving"
},
"vive-controls": {
menudown: "action_mute"
},
"oculus-touch-controls": {
xbuttondown: "action_mute",
gripdown: "middle_ring_pinky_down",
gripup: "middle_ring_pinky_up",
thumbsticktouchstart: "thumb_down",
thumbsticktouchend: "thumb_up",
triggerdown: "index_down",
triggerup: "index_up"
},
daydream: {
menudown: "action_mute"
},
keyboard: {
m_press: "action_mute",
q_press: "action_snap_rotate_left",
e_press: "action_snap_rotate_right",
w_down: "action_move_forward",
w_up: "action_dont_move_forward",
a_down: "action_move_left",
a_up: "action_dont_move_left",
s_down: "action_move_backward",
s_up: "action_dont_move_backward",
d_down: "action_move_right",
d_up: "action_dont_move_right"
}
>>>>>>>
mappings: {
default: {
common: {
// @TODO these dpad events are emmited by an axis-dpad component. This should probalby move into either tracked-controller or input-mapping
dpadleftdown: "action_snap_rotate_left",
dpadrightdown: "action_snap_rotate_right",
dpadcenterdown: "action_teleport_down", // @TODO once once #30 lands in aframe-teleport controls this just maps to "action_teleport_aim"
dpadcenterup: "action_teleport_up", // @TODO once once #30 lands in aframe-teleport controls this just maps to "action_teleport_teleport"
touchpadpressedaxismovex: "translateX",
touchpadpressedaxismovey: "translateZ",
touchpadbuttonup: "stop_moving"
},
"vive-controls": {
menudown: "action_mute"
},
"oculus-touch-controls": {
xbuttondown: "action_mute",
gripdown: "middle_ring_pinky_down",
gripup: "middle_ring_pinky_up",
thumbsticktouchstart: "thumb_down",
thumbsticktouchend: "thumb_up",
triggerdown: "index_down",
triggerup: "index_up"
},
daydream: {
menudown: "action_mute"
},
keyboard: {
m_press: "action_mute",
q_press: "action_snap_rotate_left",
e_press: "action_snap_rotate_right",
v_press: "action_share_screen",
w_down: "action_move_forward",
w_up: "action_dont_move_forward",
a_down: "action_move_left",
a_up: "action_dont_move_left",
s_down: "action_move_backward",
s_up: "action_dont_move_backward",
d_down: "action_move_right",
d_up: "action_dont_move_right"
} |
<<<<<<<
import "./components/animated-robot-hands";
=======
>>>>>>>
import "./components/animated-robot-hands"; |
<<<<<<<
<svg
width={micButtonDiameter}
height={micButtonDiameter}
viewBox={`0 0 ${micButtonDiameter} ${micButtonDiameter}`}
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx={micButtonDiameter / 2}
cy={micButtonDiameter / 2}
r={micButtonDiameter / 2}
fill="currentColor"
fillOpacity="0.8"
/>
</svg>
</div>
</ToolbarButton>
<ToolbarButton
icon={soundPlaying ? <VolumeHighIcon width={48} height={48} /> : <VolumeOffIcon width={48} height={48} />}
label="Click to Test Audio"
preset={soundPlaying ? "blue" : "basic"}
className={styles.largeToolbarButton}
onClick={onPlaySound}
large
/>
</div>
{microphoneEnabled && (
<>
<SelectInputField value={selectedMicrophone} options={microphoneOptions} onChange={onChangeMicrophone} />
<ToggleInput label="Mute My Microphone" value={microphoneMuted} onChange={onChangeMicrophoneMuted} />
</>
)}
<Button preset="green" onClick={onEnterRoom}>
Enter Room
</Button>
</Column>
=======
<circle
cx={micButtonDiameter / 2}
cy={micButtonDiameter / 2}
r={micButtonDiameter / 2}
fill="currentColor"
fillOpacity="0.8"
/>
</svg>
</div>
</ToolbarButton>
<ToolbarButton
icon={soundPlaying ? <VolumeHighIcon width={48} height={48} /> : <VolumeOffIcon width={48} height={48} />}
label="Click to Test Audio"
preset={soundPlaying ? "blue" : "basic"}
className={styles.largeToolbarButton}
onClick={onPlaySound}
large
/>
</div>
{microphoneEnabled && (
<>
<SelectInputField value={selectedMicrophone} options={microphoneOptions} onChange={onChangeMicrophone} />
<ToggleInput label="Mute My Microphone" checked={microphoneMuted} onChange={onChangeMicrophoneMuted} />
</>
)}
<Button preset="green" onClick={onEnterRoom}>
Enter Room
</Button>
>>>>>>>
<svg
width={micButtonDiameter}
height={micButtonDiameter}
viewBox={`0 0 ${micButtonDiameter} ${micButtonDiameter}`}
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx={micButtonDiameter / 2}
cy={micButtonDiameter / 2}
r={micButtonDiameter / 2}
fill="currentColor"
fillOpacity="0.8"
/>
</svg>
</div>
</ToolbarButton>
<ToolbarButton
icon={soundPlaying ? <VolumeHighIcon width={48} height={48} /> : <VolumeOffIcon width={48} height={48} />}
label="Click to Test Audio"
preset={soundPlaying ? "blue" : "basic"}
className={styles.largeToolbarButton}
onClick={onPlaySound}
large
/>
</div>
{microphoneEnabled && (
<>
<SelectInputField value={selectedMicrophone} options={microphoneOptions} onChange={onChangeMicrophone} />
<ToggleInput label="Mute My Microphone" checked={microphoneMuted} onChange={onChangeMicrophoneMuted} />
</>
)}
<Button preset="green" onClick={onEnterRoom}>
Enter Room
</Button>
</Column> |
<<<<<<<
const textureLoader = new HubsTextureLoader();
textureLoader.setCrossOrigin("anonymous");
async function createImageTexture(url, contentType) {
const texture = new THREE.Texture();
await textureLoader.loadTextureAsync(texture, url, contentType);
// try {
// } catch (e) {
// throw new Error(`'${url}' could not be fetched (Error code: ${e.status}; Response: ${e.statusText})`);
// }
texture.encoding = THREE.sRGBEncoding;
texture.minFilter = THREE.LinearFilter;
return texture;
}
=======
>>>>>>> |
<<<<<<<
import { CursorTogglingSystem } from "./cursor-toggling-system";
=======
import { PhysicsSystem } from "./physics-system";
>>>>>>>
import { CursorTogglingSystem } from "./cursor-toggling-system";
import { PhysicsSystem } from "./physics-system"; |
<<<<<<<
mountUI({});
remountUI({ hubChannel, linkChannel, enterScene: entryManager.enterScene, exitScene: entryManager.exitScene });
=======
remountUI({ hubChannel, enterScene: entryManager.enterScene, exitScene: entryManager.exitScene });
>>>>>>>
remountUI({ hubChannel, linkChannel, enterScene: entryManager.enterScene, exitScene: entryManager.exitScene }); |
<<<<<<<
class ProfileEntryPanel extends Component {
static propTypes = {
store: PropTypes.object
};
state = {
name: "",
}
nameChanged = (ev) => {
this.setState({ name: ev.target.value });
}
render() {
return (
<div>
<input type="text" value={this.state.name} onChange={this.nameChanged}/>
</div>
);
}
}
=======
const AutoExitWarning = (props) => (
<div>
<p>
Exit in <span>{props.secondsRemaining}</span>
</p>
<button onClick={props.onCancel}>
Cancel
</button>
</div>
);
>>>>>>>
class ProfileEntryPanel extends Component {
static propTypes = {
store: PropTypes.object
};
state = {
name: "",
}
nameChanged = (ev) => {
this.setState({ name: ev.target.value });
}
render() {
return (
<div>
<input type="text" value={this.state.name} onChange={this.nameChanged}/>
</div>
);
}
}
const AutoExitWarning = (props) => (
<div>
<p>
Exit in <span>{props.secondsRemaining}</span>
</p>
<button onClick={props.onCancel}>
Cancel
</button>
</div>
);
<<<<<<<
availableVREntryTypes: PropTypes.object,
store: PropTypes.object
=======
availableVREntryTypes: PropTypes.object,
concurrentLoadDetector: PropTypes.object,
disableAutoExitOnConcurrentLoad: PropTypes.bool
>>>>>>>
availableVREntryTypes: PropTypes.object,
store: PropTypes.object
concurrentLoadDetector: PropTypes.object,
disableAutoExitOnConcurrentLoad: PropTypes.bool
<<<<<<<
profileNamePending: "Hello"
=======
autoExitTimerStartedAt: null,
autoExitTimerInterval: null,
secondsRemainingBeforeAutoExit: Infinity,
exited: false
>>>>>>>
profileNamePending: "Hello",
autoExitTimerStartedAt: null,
autoExitTimerInterval: null,
secondsRemainingBeforeAutoExit: Infinity,
exited: false |
<<<<<<<
const ROTATE_COLOR_1 = [150, 80, 150];
const ROTATE_COLOR_2 = [23, 64, 118];
=======
const TRANSFORM_COLOR_1 = [150, 80, 150];
const TRANSFORM_COLOR_2 = [23, 64, 118];
/**
* Manages targeting and physical cursor location. Has the following responsibilities:
*
* - Tracking which entities in the scene can be targeted by the cursor (`objects`).
* - Performing a raycast per-frame or on-demand to identify which entity is being currently targeted.
* - Updating the visual presentation and position of the `cursor` entity and `line` component per frame.
* - Sending an event when an entity is targeted or un-targeted.
*/
>>>>>>>
const TRANSFORM_COLOR_1 = [150, 80, 150];
const TRANSFORM_COLOR_2 = [23, 64, 118];
<<<<<<<
this.rotateColor = [0, 0, 0];
=======
this.transformColor = [0, 0, 0];
const lineMaterial = new THREE.LineBasicMaterial({
color: "white",
opacity: 0.2,
transparent: true,
visible: false
});
>>>>>>>
this.transformColor = [0, 0, 0]; |
<<<<<<<
import { handleReEntryToVRFrom2DInterstitial } from "../utils/vr-interstitial";
=======
import { exit2DInterstitialAndEnterVR, isIn2DInterstitial } from "../utils/vr-interstitial";
import { handleTipClose } from "../systems/tips.js";
>>>>>>>
import { exit2DInterstitialAndEnterVR, isIn2DInterstitial } from "../utils/vr-interstitial";
<<<<<<<
<StateRoute
stateKey="modal"
stateValue="feedback"
history={this.props.history}
render={() => this.renderDialog(FeedbackDialog)}
/>
=======
<StateRoute
stateKey="modal"
stateValue="tweet"
history={this.props.history}
render={() => this.renderDialog(TweetDialog, { history: this.props.history, onClose: this.closeDialog })}
/>
>>>>>>>
<StateRoute
stateKey="modal"
stateValue="feedback"
history={this.props.history}
render={() => this.renderDialog(FeedbackDialog)}
/>
<StateRoute
stateKey="modal"
stateValue="tweet"
history={this.props.history}
render={() => this.renderDialog(TweetDialog, { history: this.props.history, onClose: this.closeDialog })}
/> |
<<<<<<<
import "./systems/world-update";
=======
import "./systems/components-queue";
>>>>>>>
import "./systems/world-update";
import "./systems/components-queue"; |
<<<<<<<
import "./elements/a-gltf-entity";
import "./elements/a-proxy-entity";
import { promptForName, getCookie, parseJwt } from "./utils";
=======
import { promptForName, getCookie, parseJwt } from "./utils/identity";
>>>>>>>
import "./elements/a-gltf-entity";
import "./elements/a-proxy-entity";
import { promptForName, getCookie, parseJwt } from "./utils/identity"; |
<<<<<<<
renderer.readRenderTargetPixels(this.renderTarget, 0, 0, width, height, this.snapPixels);
pixelsToPNG(this.snapPixels, width, height).then(file => {
const { orientation } = spawnMediaAround(this.el, file, "camera-photo", this.localSnapCount, true);
=======
renderer.readRenderTargetPixels(this.renderTarget, 0, 0, RENDER_WIDTH, RENDER_HEIGHT, this.snapPixels);
pixelsToPNG(this.snapPixels, RENDER_WIDTH, RENDER_HEIGHT).then(file => {
const { orientation } = spawnMediaAround(this.el, file, this.localSnapCount, "photo", true);
>>>>>>>
renderer.readRenderTargetPixels(this.renderTarget, 0, 0, RENDER_WIDTH, RENDER_HEIGHT, this.snapPixels);
pixelsToPNG(this.snapPixels, RENDER_WIDTH, RENDER_HEIGHT).then(file => {
const { orientation } = spawnMediaAround(this.el, file, "camera-photo", this.localSnapCount, true); |
<<<<<<<
const tdList = [];
each(columnMap, (key, col) => {
=======
const tdList = trObject.tdList;
jEach(columnMap, (key, col) => {
>>>>>>>
const tdList = trObject.tdList;
each(columnMap, (key, col) => {
<<<<<<<
each(list, (index, row) => {
const trNode = document.createElement('tr');
=======
jEach(list, (index, row) => {
const trOjbect = {
className: [],
attribute: [],
tdList: []
};
>>>>>>>
each(list, (index, row) => {
const trOjbect = {
className: [],
attribute: [],
tdList: []
}; |
<<<<<<<
"pt-br": "Portugês (Brasil)",
jp: "日本語",
es: "Español",
ru: "Pусский"
=======
pt: "Portugês (Brasil)",
ja: "日本語",
es: "Español"
>>>>>>>
pt: "Portugês (Brasil)",
ja: "日本語",
es: "Español",
ru: "Pусский" |
<<<<<<<
import { Presence } from "phoenix";
import Cookies from "js-cookie";
=======
>>>>>>>
import Cookies from "js-cookie";
<<<<<<<
const permsToken = oauthFlowPermsToken || data.perms_token;
hubChannel.setPermissionsFromToken(permsToken);
=======
const hubPhxPresence = hubChannel.presence;
let isInitialSync = true;
const vrHudPresenceCount = document.querySelector("#hud-presence-count");
hubPhxPresence.onSync(() => {
remountUI({ presences: hubPhxPresence.state });
const occupantCount = Object.entries(hubPhxPresence.state).length;
vrHudPresenceCount.setAttribute("text", "value", occupantCount.toString());
if (occupantCount > 1) {
scene.addState("copresent");
} else {
scene.removeState("copresent");
}
if (!isInitialSync) return;
// Wire up join/leave event handlers after initial sync.
isInitialSync = false;
hubPhxPresence.onJoin((sessionId, current, info) => {
const meta = info.metas[info.metas.length - 1];
if (current) {
// Change to existing presence
const isSelf = sessionId === socket.params().session_id;
const currentMeta = current.metas[0];
if (!isSelf && currentMeta.presence !== meta.presence && meta.profile.displayName) {
addToPresenceLog({
type: "entered",
presence: meta.presence,
name: meta.profile.displayName
});
}
if (currentMeta.profile && meta.profile && currentMeta.profile.displayName !== meta.profile.displayName) {
addToPresenceLog({
type: "display_name_changed",
oldName: currentMeta.profile.displayName,
newName: meta.profile.displayName
});
}
} else {
// New presence
const meta = info.metas[0];
if (meta.presence && meta.profile.displayName) {
addToPresenceLog({
type: "join",
presence: meta.presence,
name: meta.profile.displayName
});
}
}
});
hubPhxPresence.onLeave((sessionId, current, info) => {
if (current && current.metas.length > 0) return;
const meta = info.metas[0];
if (meta.profile.displayName) {
addToPresenceLog({
type: "leave",
name: meta.profile.displayName
});
}
});
});
hubChannel.setPermissionsFromToken(data.perms_token);
>>>>>>>
const hubPhxPresence = hubChannel.presence;
let isInitialSync = true;
const vrHudPresenceCount = document.querySelector("#hud-presence-count");
hubPhxPresence.onSync(() => {
remountUI({ presences: hubPhxPresence.state });
const occupantCount = Object.entries(hubPhxPresence.state).length;
vrHudPresenceCount.setAttribute("text", "value", occupantCount.toString());
if (occupantCount > 1) {
scene.addState("copresent");
} else {
scene.removeState("copresent");
}
if (!isInitialSync) return;
// Wire up join/leave event handlers after initial sync.
isInitialSync = false;
hubPhxPresence.onJoin((sessionId, current, info) => {
const meta = info.metas[info.metas.length - 1];
if (current) {
// Change to existing presence
const isSelf = sessionId === socket.params().session_id;
const currentMeta = current.metas[0];
if (!isSelf && currentMeta.presence !== meta.presence && meta.profile.displayName) {
addToPresenceLog({
type: "entered",
presence: meta.presence,
name: meta.profile.displayName
});
}
if (currentMeta.profile && meta.profile && currentMeta.profile.displayName !== meta.profile.displayName) {
addToPresenceLog({
type: "display_name_changed",
oldName: currentMeta.profile.displayName,
newName: meta.profile.displayName
});
}
} else {
// New presence
const meta = info.metas[0];
if (meta.presence && meta.profile.displayName) {
addToPresenceLog({
type: "join",
presence: meta.presence,
name: meta.profile.displayName
});
}
}
});
hubPhxPresence.onLeave((sessionId, current, info) => {
if (current && current.metas.length > 0) return;
const meta = info.metas[0];
if (meta.profile.displayName) {
addToPresenceLog({
type: "leave",
name: meta.profile.displayName
});
}
});
});
const permsToken = oauthFlowPermsToken || data.perms_token;
hubChannel.setPermissionsFromToken(permsToken);
<<<<<<<
adapter.setJoinToken(permsToken);
=======
adapter.setJoinToken(data.perms_token);
hubChannel.addEventListener("permissions-refreshed", e => adapter.setJoinToken(e.detail.permsToken));
>>>>>>>
adapter.setJoinToken(data.perms_token);
hubChannel.addEventListener("permissions-refreshed", e => adapter.setJoinToken(e.detail.permsToken)); |
<<<<<<<
import "./components/tools/pen";
import "./components/tools/networked-drawing";
import "./components/tools/drawing-manager";
function qsTruthy(param) {
const val = qs.get(param);
// if the param exists but is not set (e.g. "?foo&bar"), its value is the empty string.
return val === "" || /1|on|true/i.test(val);
}
=======
import qsTruthy from "./utils/qs_truthy";
>>>>>>>
import "./components/tools/pen";
import "./components/tools/networked-drawing";
import "./components/tools/drawing-manager";
import qsTruthy from "./utils/qs_truthy"; |
<<<<<<<
const driver = AFRAME.scenes[0].systems.physics.driver;
const numManifolds = driver.dispatcher.getNumManifolds();
const handPtr = Ammo.getPointer(body);
for (let i = 0; i < numManifolds; i++) {
const persistentManifold = driver.dispatcher.getManifoldByIndexInternal(i);
const body0ptr = Ammo.getPointer(persistentManifold.getBody0());
const body1ptr = Ammo.getPointer(persistentManifold.getBody1());
if (handPtr !== body0ptr && handPtr !== body1ptr) {
continue;
}
const numContacts = persistentManifold.getNumContacts();
for (let j = 0; j < numContacts; j++) {
const manifoldPoint = persistentManifold.getContactPoint(j);
if (manifoldPoint.getDistance() <= 10e-6) {
const object3D = driver.els.get(handPtr === body0ptr ? body1ptr : body0ptr).object3D;
if (isTagged(object3D.el, "isHandCollisionTarget")) {
return object3D.el;
}
return null;
}
=======
const world = this.el.sceneEl.systems["hubs-systems"].physicsSystem.world;
const handPtr = Ammo.getPointer(body.physicsBody);
if (world.collisions.has(handPtr) && world.collisions.get(handPtr).length > 0) {
const object3D = world.object3Ds.get(world.collisions.get(handPtr)[0]);
if (object3D.el && object3D.el.components.tags && object3D.el.components.tags.data.isHandCollisionTarget) {
return object3D.el;
>>>>>>>
const world = this.el.sceneEl.systems["hubs-systems"].physicsSystem.world;
const handPtr = Ammo.getPointer(body.physicsBody);
if (world.collisions.has(handPtr) && world.collisions.get(handPtr).length > 0) {
const object3D = world.object3Ds.get(world.collisions.get(handPtr)[0]);
if (isTagged(object3D.el, "isHandCollisionTarget")) {
return object3D.el; |
<<<<<<<
=======
store: PropTypes.object,
>>>>>>> |
<<<<<<<
const HUB_CREATOR_PERMISSIONS = ["update_hub", "update_roles", "close_hub", "mute_users", "kick_users"];
=======
const HUB_CREATOR_PERMISSIONS = ["update_hub", "close_hub", "mute_users", "kick_users"];
const VALID_PERMISSIONS =
HUB_CREATOR_PERMISSIONS + ["tweet", "spawn_camera", "spawn_drawing", "spawn_and_move_media", "pin_objects"];
>>>>>>>
const HUB_CREATOR_PERMISSIONS = ["update_hub", "update_roles", "close_hub", "mute_users", "kick_users"];
const VALID_PERMISSIONS =
HUB_CREATOR_PERMISSIONS + ["tweet", "spawn_camera", "spawn_drawing", "spawn_and_move_media", "pin_objects"]; |
<<<<<<<
if (linkedVideoTexture) {
texture = linkedVideoTexture;
audioSource = linkedAudioSource;
} else {
({ texture, audioSource } = await this.createVideoTextureAndAudioSource());
}
=======
({ texture, audioSourceEl } = await this.createVideoTextureAudioSourceEl());
>>>>>>>
if (linkedVideoTexture) {
texture = linkedVideoTexture;
audioSource = linkedAudioSource;
} else {
({ texture, audioSourceEl } = await this.createVideoTextureAudioSourceEl());
}
<<<<<<<
const mediaElementAudioSource =
linkedMediaElementAudioSource ||
this.el.sceneEl.audioListener.context.createMediaElementSource(audioSource);
=======
const mediaAudioSource = this.el.sceneEl.audioListener.context.createMediaElementSource(audioSourceEl);
>>>>>>>
const mediaElementAudioSource =
linkedMediaElementAudioSource ||
this.el.sceneEl.audioListener.context.createMediaElementSource(audioSourceEl); |
<<<<<<<
if (interaction.state.rightRemote.hovered === el && !interaction.state.rightRemote.held) {
interactorTwo = interaction.options.rightRemote.entity.object3D;
highlightInteractorTwo = true;
} else if (interaction.state.rightHand.hovered === el && !interaction.state.rightHand.held) {
interactorTwo = interaction.options.rightHand.entity.object3D;
highlightInteractorTwo = true;
}
tempVec4[0] = worldY - scaledRadius;
tempVec4[1] = worldY + scaledRadius;
tempVec4[2] = !!highlightInteractorOne && !hideDueToPinning && !this.isTouchscreen;
tempVec4[3] = !!highlightInteractorTwo && !hideDueToPinning && !this.isTouchscreen;
this.hubs_sweepParams.set(tempVec4, instanceId * 4);
=======
>>>>>>> |
<<<<<<<
=======
<PresenceList
history={this.props.history}
presences={this.props.presences}
sessionId={this.props.sessionId}
signedIn={this.state.signedIn}
email={this.props.store.state.credentials.email}
onSignIn={this.showSignInDialog}
onSignOut={this.signOut}
/>
>>>>>>>
<PresenceList
history={this.props.history}
presences={this.props.presences}
sessionId={this.props.sessionId}
signedIn={this.state.signedIn}
email={this.props.store.state.credentials.email}
onSignIn={this.showSignInDialog}
onSignOut={this.signOut}
/>
<<<<<<<
<div
onClick={() => this.setState({ showPresenceList: !this.state.showPresenceList })}
className={classNames({
[styles.presenceInfo]: true,
[styles.presenceInfoSelected]: this.state.showPresenceList
})}
>
<FontAwesomeIcon icon={faUsers} />
<span className={styles.occupantCount}>{this.occupantCount()}</span>
</div>
{this.state.showPresenceList && (
<PresenceList
history={this.props.history}
presences={this.props.presences}
sessionId={this.props.sessionId}
signedIn={this.state.signedIn}
email={this.props.store.state.credentials.email}
onSignIn={this.showSignInDialog}
onSignOut={this.signOut}
/>
)}
{this.state.showSettingsMenu && (
<SettingsMenu
history={this.props.history}
mediaSearchStore={this.props.mediaSearchStore}
hideSettings={() => this.setState({ showSettingsMenu: false })}
isStreaming={streaming}
toggleStreamerMode={this.toggleStreamerMode}
hubChannel={this.props.hubChannel}
hubScene={this.props.hubScene}
scene={this.props.scene}
performConditionalSignIn={this.props.performConditionalSignIn}
showNonHistoriedDialog={this.showNonHistoriedDialog}
pushHistoryState={this.pushHistoryState}
/>
)}
=======
>>>>>>> |
<<<<<<<
if (qsTruthy("mediaTools")) {
document.addEventListener("paste", e => {
if (e.target.nodeName === "INPUT") return;
const url = e.clipboardData.getData("text");
const files = e.clipboardData.files && e.clipboardData.files;
if (url) {
spawnMediaInfrontOfPlayer(url, ObjectContentOrigins.URL);
} else {
for (const file of files) {
spawnMediaInfrontOfPlayer(file, ObjectContentOrigins.CLIPBOARD);
}
=======
document.addEventListener("paste", e => {
if (e.target.nodeName === "INPUT") return;
const url = e.clipboardData.getData("text");
const files = e.clipboardData.files && e.clipboardData.files;
if (url) {
spawnMediaInfrontOfPlayer(url);
} else {
for (const file of files) {
spawnMediaInfrontOfPlayer(file);
>>>>>>>
document.addEventListener("paste", e => {
if (e.target.nodeName === "INPUT") return;
const url = e.clipboardData.getData("text");
const files = e.clipboardData.files && e.clipboardData.files;
if (url) {
spawnMediaInfrontOfPlayer(url, ObjectContentOrigins.URL);
} else {
for (const file of files) {
spawnMediaInfrontOfPlayer(file, ObjectContentOrigins.CLIPBOARD);
<<<<<<<
document.addEventListener("drop", e => {
e.preventDefault();
const url = e.dataTransfer.getData("url");
const files = e.dataTransfer.files;
if (url) {
spawnMediaInfrontOfPlayer(url, ObjectContentOrigins.URL);
} else {
for (const file of files) {
spawnMediaInfrontOfPlayer(file, ObjectContentOrigins.FILE);
}
=======
document.addEventListener("drop", e => {
e.preventDefault();
const url = e.dataTransfer.getData("url");
const files = e.dataTransfer.files;
if (url) {
spawnMediaInfrontOfPlayer(url);
} else {
for (const file of files) {
spawnMediaInfrontOfPlayer(file);
>>>>>>>
document.addEventListener("drop", e => {
e.preventDefault();
const url = e.dataTransfer.getData("url");
const files = e.dataTransfer.files;
if (url) {
spawnMediaInfrontOfPlayer(url, ObjectContentOrigins.URL);
} else {
for (const file of files) {
spawnMediaInfrontOfPlayer(file, ObjectContentOrigins.FILE); |
<<<<<<<
{ key: "animateWaypointTransitions", prefType: PREFERENCE_LIST_ITEM_TYPE.CHECK_BOX, defaultBool: true },
{ key: "showFPSCounter", prefType: PREFERENCE_LIST_ITEM_TYPE.CHECK_BOX, defaultBool: false }
=======
{ key: "animateWaypointTransitions", prefType: PREFERENCE_LIST_ITEM_TYPE.CHECK_BOX, defaultBool: true },
{ key: "showRtcDebugPanel", prefType: PREFERENCE_LIST_ITEM_TYPE.CHECK_BOX, defaultBool: false }
>>>>>>>
{ key: "animateWaypointTransitions", prefType: PREFERENCE_LIST_ITEM_TYPE.CHECK_BOX, defaultBool: true },
{ key: "showFPSCounter", prefType: PREFERENCE_LIST_ITEM_TYPE.CHECK_BOX, defaultBool: false },
{ key: "showRtcDebugPanel", prefType: PREFERENCE_LIST_ITEM_TYPE.CHECK_BOX, defaultBool: false } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.