conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
"sAjaxSource": 'image',
"aoColumnDefs": [
=======
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": 'images',
"aoColumns": [
>>>>>>>
"sAjaxSource": 'images',
"aoColumnDefs": [
<<<<<<<
// Display the id of the image in eucatable
"aTargets":[2],
"mRender": function(data) {
return getTagForResource(data);
},
"mData": "id",
},
=======
// Display the id of the image in eucatable
"mDataProp": "display_id"
},
>>>>>>>
// Display the id of the image in eucatable
"aTargets":[2],
"mRender": function(data) {
return getTagForResource(data);
},
"mData": "display_id",
}, |
<<<<<<<
"sAjaxSource": 'sgroup',
"aoColumnDefs": [
=======
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": 'sgroups',
"aoColumns": [
>>>>>>>
"sAjaxSource": 'sgroups',
"aoColumnDefs": [ |
<<<<<<<
test("concat text", () => {
const results = runSlsCommand("concat-text");
expect(results).not.toContain(errorString);
expect(
fs.existsSync("tests/concat-text/.webpack/service/static/test-concat.txt")
).toBe(true);
});
=======
test("fixpackages [email protected]", () => {
const results = runSlsCommand("fixpackages-formidable");
expect(results).not.toContain(errorString);
});
>>>>>>>
test("concat text", () => {
const results = runSlsCommand("concat-text");
expect(results).not.toContain(errorString);
expect(
fs.existsSync("tests/concat-text/.webpack/service/static/test-concat.txt")
).toBe(true);
});
test("fixpackages [email protected]", () => {
const results = runSlsCommand("fixpackages-formidable");
expect(results).not.toContain(errorString);
}); |
<<<<<<<
"openattic.userinfo",
"openattic.tabView",
"openattic.required"
=======
"openattic.todowidget",
"openattic.userinfo"
>>>>>>>
"openattic.tabView",
"openattic.todowidget",
"openattic.userinfo" |
<<<<<<<
BandRejectFilter.prototype.toString = function() {
return 'Band Reject Filter';
};
=======
/**
* toString
*
* @return {String}
*/
toString: function() {
return 'Band Reject Filter';
}
});
>>>>>>>
/**
* toString
*
* @return {String}
*/
BandRejectFilter.prototype.toString = function() {
return 'Band Reject Filter';
}; |
<<<<<<<
var Square = function(audiolet, frequency) {
TableLookupOscillator.call(this, audiolet, Square.TABLE, frequency);
};
extend(Square, TableLookupOscillator);
Square.prototype.toString = function() {
return 'Square';
};
=======
/**
* Square wave oscillator using a lookup table
*
* **Inputs**
*
* - Frequency
*
* **Outputs**
*
* - Square wave
*
* **Parameters**
*
* - frequency The frequency of the oscillator. Linked to input 0.
*
* @extends TableLookupOscillator
*/
var Square = new Class({
Extends: TableLookupOscillator,
/**
* Constructor
*
* @param {Audiolet} audiolet The audiolet object
* @param {Number} [frequency=440] Initial frequency
*/
initialize: function(audiolet, frequency) {
TableLookupOscillator.prototype.initialize.apply(this, [audiolet,
Square.TABLE,
frequency]);
},
/**
* toString
*
* @return {String}
*/
toString: function() {
return 'Square';
}
});
>>>>>>>
/**
* Square wave oscillator using a lookup table
*
* **Inputs**
*
* - Frequency
*
* **Outputs**
*
* - Square wave
*
* **Parameters**
*
* - frequency The frequency of the oscillator. Linked to input 0.
*
* @extends TableLookupOscillator
*/
/**
* Constructor
*
* @param {Audiolet} audiolet The audiolet object
* @param {Number} [frequency=440] Initial frequency
*/
var Square = function(audiolet, frequency) {
TableLookupOscillator.call(this, audiolet, Square.TABLE, frequency);
};
extend(Square, TableLookupOscillator);
/**
* toString
*
* @return {String}
*/
Square.prototype.toString = function() {
return 'Square';
}; |
<<<<<<<
var common = require("./common"),
assert = require("chai").assert,
util = common.requireSrc("./lib/util"),
graph = common.requireSrc("./lib/graph");
=======
var util = require("../lib/util"),
graph = require("../lib/graph");
require("./common");
>>>>>>>
var common = require("./common"),
assert = require("chai").assert,
util = require("../lib/util"),
graph = require("../lib/graph");
<<<<<<<
=======
});
describe("util.components", function() {
it("returns all nodes in a connected graph", function() {
var g = graph();
[1, 2, 3].forEach(function(u) { g.addNode(u); });
g.addEdge("A", 1, 2);
g.addEdge("B", 2, 3);
var cmpts = util.components(g);
assert.deepEqual(cmpts.map(function(cmpt) { return cmpt.sort(); }),
[[1, 2, 3]]);
});
it("returns maximal subsets of connected nodes", function() {
var g = graph();
[1, 2, 3, 4, 5, 6].forEach(function(u) { g.addNode(u); });
g.addEdge("A", 1, 2);
g.addEdge("B", 2, 3);
g.addEdge("C", 4, 5);
var cmpts = util.components(g).sort(function(x, y) { return y.length - x.length; });
assert.deepEqual(cmpts.map(function(cmpt) { return cmpt.sort(); }),
[[1, 2, 3], [4, 5], [6]]);
});
});
describe("util.prim", function() {
it("returns a deterministic minimal spanning tree", function() {
var g = graph();
[1, 2, 3, 4].forEach(function(u) { g.addNode(u); });
g.addEdge("12", 1, 2);
g.addEdge("13", 1, 3);
g.addEdge("24", 2, 4);
g.addEdge("34", 3, 4);
var weights = { 12: 1, 13: 2, 24: 3, 34: 4 };
var st = util.prim(g, function(u, v) { return weights[[u,v].sort().join("")]; });
Object.keys(st).forEach(function(x) { st[x].sort(); });
assert.deepEqual({1: [2, 3], 2: [1, 4], 3: [1], 4: [2]}, st);
});
it("returns a single field for a single node graph", function() {
var g = graph();
g.addNode(1);
assert.deepEqual({1: []}, util.prim(g));
});
>>>>>>> |
<<<<<<<
"openattic.taskQueue",
"openattic.userinfo"
=======
"openattic.userinfo",
"openattic.users"
>>>>>>>
"openattic.taskQueue",
"openattic.userinfo"
"openattic.users" |
<<<<<<<
var server = app.listen(port, function() {
console.log('Splendid listening on *:%s', port);
=======
app.listen(8080, function() {
console.log('Splendid listening on *:8080');
>>>>>>>
app.listen(port, function() {
console.log('Splendid listening on *:%s', port); |
<<<<<<<
<EntryContainer style={higlight} className={state.edit && "zoom"}>
{state.edit && isSelected == entry.id ? (
=======
<EntryContainer
style={higlight}
className={state.edit && "zoom"}
ref={focusedEntry}
>
{state.edit && isSelected == entry.id ? (
>>>>>>>
<EntryContainer
style={higlight}
className={state.edit && "zoom"}
ref={focusedEntry}
>
{state.edit && isSelected == entry.id ? (
<<<<<<<
// defaultValue={entry.note || ""}
=======
defaultValue={
state.log.find(entry2 => entry2.id == isSelected).note || ""
}
>>>>>>>
// defaultValue={entry.note || ""}
<<<<<<<
value={state.log.find(x => x.id == entry.id).note || ""}
onChange={e =>
dispatch({
type: "EDIT_LOG",
entry: {
...entry,
note: e.target.value, //data.note,
tags: e.target.value //data.note
.split(" ")
.filter(word => word.startsWith("#"))
.map(word => {
return word.toLowerCase();
})
}
})
}
=======
onChange={e =>
dispatch({
type: "EDIT_LOG",
entry: {
...entry,
note: e.target.value,
tags: e.target.value
.split(" ")
.filter(word => word.startsWith("#"))
.map(word => {
return word.toLowerCase();
})
}
})
}
>>>>>>>
value={state.log.find(x => x.id == entry.id).note || ""}
onChange={e =>
dispatch({
type: "EDIT_LOG",
entry: {
...entry,
note: e.target.value,
tags: e.target.value
.split(" ")
.filter(word => word.startsWith("#"))
.map(word => {
return word.toLowerCase();
})
}
})
}
<<<<<<<
<EntryRemove
type="button"
onClick={() => dispatch({ type: "TOGGLE_EDITION", edit: false })}
>
=======
<EntryRemove
type="button"
onClick={() => dispatch({ type: "LOG_EDIT_TOGLE", edit: false })}
>
>>>>>>>
<EntryRemove
type="button"
onClick={() => dispatch({ type: "TOGGLE_EDITION", edit: false })}
>
<<<<<<<
dispatch({ type: "TOGGLE_EDITION", edit: true });
=======
dispatch({ type: "LOG_EDIT_TOGLE", edit: true });
>>>>>>>
dispatch({ type: "TOGGLE_EDITION", edit: true }); |
<<<<<<<
=======
var util = require('util');
var nodePath = require('path');
var q = require('q');
>>>>>>>
var util = require('util');
var util = require('util');
var util = require('util');
var nodePath = require('path');
var q = require('q'); |
<<<<<<<
//区块详情
app.get("/block_detail", function(req, res) {
res.render('block_detail.ejs', {
name: 'tinyphp',item_index_peers:'1'
});
=======
//交易详情
app.get("/channels/:channelName/:txHash", function(req, res) {
var channelName=req.params.channelName
var txHash=req.params.txHash
bcservice.getTans4Chain(channelName,txHash).then(tx=>{
res.send(tx)
}).catch(err=>{
res.send(err)
})
>>>>>>>
//区块详情
app.get("/block_detail", function(req, res) {
res.render('block_detail.ejs', {
name: 'tinyphp',item_index_peers:'1'
});
//交易详情
app.get("/channels/:channelName/:txHash", function(req, res) {
var channelName=req.params.channelName
var txHash=req.params.txHash
bcservice.getTans4Chain(channelName,txHash).then(tx=>{
res.send(tx)
}).catch(err=>{
res.send(err)
}) |
<<<<<<<
var itemId = getNestedProperty(item, conf.id);
var parentId = getNestedProperty(item, conf.parentId);
=======
var itemId = item[conf.id];
var parentId = item[conf.parentId];
if (conf.rootParentIds[itemId]) {
throw new Error("The item array contains a node whose parentId both exists in another node and is in " +
("`rootParentIds` (`itemId`: \"" + itemId + "\", `rootParentIds`: " + Object.keys(conf.rootParentIds).map(function (r) { return "\"" + r + "\""; }).join(', ') + ")."));
}
>>>>>>>
var itemId = getNestedProperty(item, conf.id);
var parentId = getNestedProperty(item, conf.parentId);
if (conf.rootParentIds[itemId]) {
throw new Error("The item array contains a node whose parentId both exists in another node and is in " +
("`rootParentIds` (`itemId`: \"" + itemId + "\", `rootParentIds`: " + Object.keys(conf.rootParentIds).map(function (r) { return "\"" + r + "\""; }).join(', ') + ")."));
} |
<<<<<<<
const Alert = require('../components/alert');
=======
const CommentModel = require('../models/comment');
>>>>>>>
const Alert = require('../components/alert');
const CommentModel = require('../models/comment');
<<<<<<<
m('h1', stream.title()),
m('div.col s12 m6 l4',
m('video#video', {
config: () => initPlayer(),
width: '100%',
height: 'auto',
controls: true,
autoplay: false,
preload: 'metadata'
})),
m('div.col s12 m6 l4', [
m('div.row', [
m('div.col s6', 'Viewers: ' + stream.viewers()),
m('div.col s6', 'Stickers: ' + stream.stickers())
]),
m('div.row', [
m('div.col s3', 'user-image-here'),
m('div.row col s9', [
m('div.col s12', stream.user().alias()),
m('div.col s12', 'Start: ' + datetime.toShortDateTime(stream.startDateTime())),
m('div.col s12', 'End: ' + datetime.toShortDateTime(stream.endDateTime()))
=======
m('div.row', [
m('h1', stream.title()),
m('div.col s12 m6 l4',
m('video#video', {
config: () => initPlayer(),
width: '100%',
height: 'auto',
controls: true,
preload: 'none'})),
m('div.col s12 m6 l4', [
m('div.row', [
m('div.col s6', 'Viewers: ' + stream.viewers()),
m('div.col s6', 'Stickers: ' + stream.stickers())
]),
m('div.row', [
m('div.col s3', 'user-image-here'),
m('div.row col s9', [
m('div.col s12', stream.user().alias()),
m('div.col s12', 'Start: ' + datetime.toShortDateTime(stream.startDateTime())),
stream.endDateTime() ?
m('div.col s12', 'End: ' + datetime.toShortDateTime(stream.endDateTime())) :
null
])
]),
m('div.row', [
m('div.col s12', stream.description()),
m('button.btn col s12', {onclick: stopStream}, 'Stop Stream'),
m('div#comments.col s12',
Stream.comments().map((c) => m('div.comment-row', [
'[' + datetime.toShortTime(c.time()) + '] ',
m('a[href="/users/view/' + c.userId() + '"]', {config: m.route}, c.user() + ':'),
' ' + c.msg()
])))
>>>>>>>
m('h1', stream.title()),
m('div.col s12 m6 l4',
m('video#video', {
config: () => initPlayer(),
width: '100%',
height: 'auto',
controls: true,
autoplay: false,
preload: 'metadata'
})),
m('div.col s12 m6 l4', [
m('div.row', [
m('div.col s6', 'Viewers: ' + stream.viewers()),
m('div.col s6', 'Stickers: ' + stream.stickers())
]),
m('div.row', [
m('div.col s3', 'user-image-here'),
m('div.row col s9', [
m('div.col s12', stream.user().alias()),
m('div.col s12', 'Start: ' + datetime.toShortDateTime(stream.startDateTime())),
stream.endDateTime() ?
m('div.col s12', 'End: ' + datetime.toShortDateTime(stream.endDateTime())) :
null |
<<<<<<<
import { withTranslation } from 'react-i18next';
import './Header.css';
=======
>>>>>>>
import { withTranslation } from 'react-i18next';
import './Header.css';
<<<<<<<
{
title: t('Preferences'),
icon: { name: 'user' },
onClick: this.props.openUserPreferencesModal,
},
=======
// {
// title: 'Preferences ',
// icon: {
// name: 'user',
// },
// onClick: onClick,
// },
>>>>>>>
// {
// title: t('Preferences'),
// icon: { name: 'user' },
// onClick: onClick,
// },
<<<<<<<
<span className="research-use">{t('INVESTIGATIONAL USE ONLY')}</span>
<Dropdown title={t('Options')} list={this.options} align="right" />
<ConnectedUserPreferencesModal />
=======
<span className="research-use">INVESTIGATIONAL USE ONLY</span>
<Dropdown title="Options" list={this.options} align="right" />
{/* <UserPreferencesModal
isOpen={this.state.isUserPreferencesOpen}
onCancel={this.toggleUserPreferences.bind(this)}
onSave={this.toggleUserPreferences.bind(this)}
onResetToDefaults={this.toggleUserPreferences.bind(this)}
windowLevelData={{}}
hotKeysData={this.hotKeysData}
/> */}
>>>>>>>
<span className="research-use">{t('INVESTIGATIONAL USE ONLY')}</span>
<Dropdown title={t('Options')} list={this.options} align="right" />
{/* <ConnectedUserPreferencesModal /> */} |
<<<<<<<
api.addFiles('lib/validators.js', 'client');
api.addFiles('lib/instanceClassSpecificViewport.js', 'client');
api.addFiles('lib/setMammogramViewportAlignment.js', 'client');
=======
api.addFiles('lib/isImage.js', 'client');
api.addFiles('lib/sopClassDictionary.js', 'client');
api.addFiles('lib/encodeQueryData.js', 'server');
>>>>>>>
api.addFiles('lib/validators.js', 'client');
api.addFiles('lib/instanceClassSpecificViewport.js', 'client');
api.addFiles('lib/setMammogramViewportAlignment.js', 'client');
api.addFiles('lib/isImage.js', 'client');
api.addFiles('lib/sopClassDictionary.js', 'client');
<<<<<<<
api.export('getInstanceClassDefaultViewport', 'client');
api.export('showConfirmDialog', 'client');
api.export('applyWLPreset', 'client');
// Export the ValidateJS Library with our added validators
//api.export('validate', 'client');
=======
api.export('isImage', 'client');
api.export('sopClassDictionary', 'client');
api.export('encodeQueryData', 'server');
>>>>>>>
api.export('getInstanceClassDefaultViewport', 'client');
api.export('showConfirmDialog', 'client');
api.export('applyWLPreset', 'client');
api.export('isImage', 'client');
api.export('sopClassDictionary', 'client');
// Export the ValidateJS Library with our added validators
//api.export('validate', 'client'); |
<<<<<<<
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.html', 'client');
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.styl', 'client');
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.js', 'client');
api.addFiles('client/components/lesionTrackerWorklistContextMenu/lesionTrackerWorklistContextMenu.html', 'client');
api.addFiles('client/components/lesionTrackerWorklistContextMenu/lesionTrackerWorklistContextMenu.js', 'client');
api.addFiles('client/components/lesionTrackerViewportOverlay/lesionTrackerViewportOverlay.html', 'client');
api.addFiles('client/components/lesionTrackerViewportOverlay/lesionTrackerViewportOverlay.styl', 'client');
api.addFiles('client/components/lesionTrackerViewportOverlay/lesionTrackerViewportOverlay.js', 'client');
=======
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.html', 'client');
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.styl', 'client');
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.js', 'client');
api.addFiles('client/components/timepointTextDialog/timepointTextDialog.html', 'client');
api.addFiles('client/components/timepointTextDialog/timepointTextDialog.styl', 'client');
>>>>>>>
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.html', 'client');
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.styl', 'client');
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.js', 'client');
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.html', 'client');
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.styl', 'client');
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.js', 'client');
api.addFiles('client/components/lesionTrackerWorklistContextMenu/lesionTrackerWorklistContextMenu.html', 'client');
api.addFiles('client/components/lesionTrackerWorklistContextMenu/lesionTrackerWorklistContextMenu.js', 'client');
api.addFiles('client/components/lesionTrackerViewportOverlay/lesionTrackerViewportOverlay.html', 'client');
api.addFiles('client/components/lesionTrackerViewportOverlay/lesionTrackerViewportOverlay.styl', 'client');
api.addFiles('client/components/lesionTrackerViewportOverlay/lesionTrackerViewportOverlay.js', 'client'); |
<<<<<<<
CM.VersionMajor = '1.0466';
CM.VersionMinor = '2';
=======
CM.VersionMajor = '1.909';
CM.VersionMinor = '1';
>>>>>>>
CM.VersionMajor = '2';
CM.VersionMinor = '1'; |
<<<<<<<
"expect": true,
"Tone": true,
"Interface": true,
=======
"expect": true,
"Tone" : true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
>>>>>>>
"expect": true,
"Tone": true,
"Interface": true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module" |
<<<<<<<
display: inline-block;
padding: ${spacing.small} 0;
margin-right: ${spacing.large};
color: ${props => (props.selected ? colors.base : colors.blue)};
=======
padding: ${spacing.large};
color: ${props => (props.selected ? colors.link.default : colors.link.focus)};
>>>>>>>
display: inline-block;
padding: ${spacing.small} 0;
margin-right: ${spacing.large};
color: ${props => (props.selected ? colors.link.default : colors.link.focus)}; |
<<<<<<<
export { Tabs }
import Well from './atoms/well'
export { Well }
=======
export { Tabs }
import Stack from './molecules/stack'
export { Stack }
import List from './molecules/list'
export { List }
>>>>>>>
export { Tabs }
import Well from './atoms/well'
export { Well }
import Stack from './molecules/stack'
export { Stack }
import List from './molecules/list'
export { List } |
<<<<<<<
scrollView.options.bouncing = true;
if (ionic.Platform.isAndroid()) {
// No bouncing by default on Android
scrollView.options.bouncing = false;
// Faster scroll decel
scrollView.options.deceleration = 0.95;
=======
if (scrollView.options) {
scrollView.options.bouncing = true;
if(ionic.Platform.isAndroid()) {
// No bouncing by default on Android
scrollView.options.bouncing = false;
// Faster scroll decel
scrollView.options.deceleration = 0.95;
} else {
}
>>>>>>>
if (scrollView.options) {
scrollView.options.bouncing = true;
if (ionic.Platform.isAndroid()) {
// No bouncing by default on Android
scrollView.options.bouncing = false;
// Faster scroll decel
scrollView.options.deceleration = 0.95;
} |
<<<<<<<
* Ionic, v0.9.18
=======
* Ionic, v0.9.19
>>>>>>>
* Ionic, v0.9.19
<<<<<<<
// Check if this supports infinite scrolling and listen for scroll events
// to trigger the infinite scrolling
var infiniteScroll = $element.find('infinite-scroll');
var infiniteStarted = false;
if(infiniteScroll) {
// Parse infinite scroll distance
var distance = attr.infiniteScrollDistance || '1%';
var maxScroll;
if(distance.indexOf('%')) {
// It's a multiplier
maxScroll = function() {
return sv.getScrollMax().top * ( 1 - parseInt(distance, 10) / 100 );
};
} else {
// It's a pixel value
maxScroll = function() {
return sv.getScrollMax().top - parseInt(distance, 10);
};
}
$element.bind('scroll', function(e) {
if( sv && !infiniteStarted && (sv.getValues().top > maxScroll() ) ) {
infiniteStarted = true;
infiniteScroll.addClass('active');
var cb = function() {
sv.resize();
infiniteStarted = false;
infiniteScroll.removeClass('active');
};
$scope.$apply(angular.bind($scope, $scope.onInfiniteScroll, cb));
}
});
}
=======
>>>>>>>
// Check if this supports infinite scrolling and listen for scroll events
// to trigger the infinite scrolling
var infiniteScroll = $element.find('infinite-scroll');
var infiniteStarted = false;
if(infiniteScroll) {
// Parse infinite scroll distance
var distance = attr.infiniteScrollDistance || '1%';
var maxScroll;
if(distance.indexOf('%')) {
// It's a multiplier
maxScroll = function() {
return sv.getScrollMax().top * ( 1 - parseInt(distance, 10) / 100 );
};
} else {
// It's a pixel value
maxScroll = function() {
return sv.getScrollMax().top - parseInt(distance, 10);
};
}
$element.bind('scroll', function(e) {
if( sv && !infiniteStarted && (sv.getValues().top > maxScroll() ) ) {
infiniteStarted = true;
infiniteScroll.addClass('active');
var cb = function() {
sv.resize();
infiniteStarted = false;
infiniteScroll.removeClass('active');
};
$scope.$apply(angular.bind($scope, $scope.onInfiniteScroll, cb));
}
});
}
<<<<<<<
restrict: 'AC',
// So you can require being under this
controller: ['$scope', '$element', function($scope, $element) {
this.navBar = {
isVisible: false
};
$scope.navController = this;
this.goBack = function() {
$scope.direction = 'back';
};
}],
link: function($scope, $element, $attr, ctrl) {
if(!$element.length) return;
$scope.animation = $attr.animation;
$element[0].classList.add('noop-animation');
var isFirst = true;
// Store whether we did an animation yet, to know if
// we should let the first state animate
var didAnimate = false;
var initTransition = function() {
//$element.addClass($scope.animation);
};
=======
restrict: 'E',
replace: true,
require: '?ngModel',
scope: {
value: '@'
},
transclude: true,
template: '<label class="item item-radio">\
<input type="radio" name="radio-group">\
<div class="item-content" ng-transclude>\
</div>\
<i class="radio-icon icon ion-checkmark"></i>\
</label>',
>>>>>>>
restrict: 'E',
replace: true,
require: '?ngModel',
scope: {
value: '@'
},
transclude: true,
template: '<label class="item item-radio">\
<input type="radio" name="radio-group">\
<div class="item-content" ng-transclude>\
</div>\
<i class="radio-icon icon ion-checkmark"></i>\
</label>', |
<<<<<<<
$('[data-toggle="tooltip"]').tooltip();
// Flyouts
// Provide data-theme attribute to set flyout's color theme.
$('[data-toggle="popover"]').each(function () {
var $element = $(this);
$element.popover({
// Override Bootsrap's default template with one that does not have arrow and title
template: '<div class="popover" role="tooltip"><div class="popover-content"></div></div>'
}).data('bs.popover').tip().addClass($element.data("theme"));
});
$('#btn-close').popover({
placement: 'right',
html: 'true',
content: 'This is a flyout with a button. <button type="button" class="btn btn-primary ' + $('#btn-close').data("theme") + '"onclick="$("#btn-close").popover("hide");">Button</button>',
template: '<div class="popover" role="tooltip"><div class="popover-content"></div></div>'
}).data('bs.popover').tip().addClass($('#btn-close').data("theme"));
=======
$('[data-toggle="tooltip"]').tooltip({
// Override Bootsrap's default template with one that does not have arrow
template: '<div class="tooltip" role="tooltip"><div class="tooltip-inner"></div></div>'
});
>>>>>>>
$('[data-toggle="tooltip"]').tooltip({
// Override Bootsrap's default template with one that does not have arrow
template: '<div class="tooltip" role="tooltip"><div class="tooltip-inner"></div></div>'
});
// Flyouts
// Provide data-theme attribute to set flyout's color theme.
$('[data-toggle="popover"]').each(function () {
var $element = $(this);
$element.popover({
// Override Bootsrap's default template with one that does not have arrow and title
template: '<div class="popover" role="tooltip"><div class="popover-content"></div></div>'
}).data('bs.popover').tip().addClass($element.data("theme"));
});
$('#btn-close').popover({
placement: 'right',
html: 'true',
content: 'This is a flyout with a button. <button type="button" class="btn btn-primary ' + $('#btn-close').data("theme") + '"onclick="$("#btn-close").popover("hide");">Button</button>',
template: '<div class="popover" role="tooltip"><div class="popover-content"></div></div>'
}).data('bs.popover').tip().addClass($('#btn-close').data("theme")); |
<<<<<<<
require('./ColorPicker');
require('./Toast');
=======
require('./ColorPicker');
require('./SharePrompt');
require('./Notification');
>>>>>>>
require('./ColorPicker');
require('./Toast');
require('./SharePrompt');
require('./Notification'); |
<<<<<<<
const MetaRowPlaceholder = require('./MetaRowPlaceholder');
const ModalDialog = require('./ModalDialog');
=======
const Multiselect = require('./Multiselect');
>>>>>>>
const ModalDialog = require('./ModalDialog');
const Multiselect = require('./Multiselect');
<<<<<<<
MetaRowPlaceholder,
ModalDialog,
=======
Multiselect,
>>>>>>>
ModalDialog,
Multiselect, |
<<<<<<<
<Provider>
<Library>
<Example name="Heading">
<Heading>Hello</Heading>
</Example>
<Example name="Button">
<Button>Hello</Button>
</Example>
<Example name="Donut">
<Donut
value={2/3}
color='tomato'
/>
</Example>
<Example name="XRay">
<XRay>
<Heading>XRay</Heading>
</XRay>
</Example>
<Example name="font">
<Font fontFamily=""Ubuntu", sans-serif">Font</Font>
</Example>
<Example name="LiveEditor">
<LiveEditor
scope={Rebass}
code="<Button>hello</Button>"
/>
</Example>
<Example name="TypeScale">
<TypeScale value={[14, 16, 20, 24, 32, 48, 64, 80]} />
</Example>
<Example name="Responsive">
<Responsive zoom={0.75}>
<div
style={{
padding: 16,
fontSize: 32,
fontWeight: 'bold',
color: 'white',
backgroundColor: 'tomato'
}}>
Hello
</div>
</Responsive>
</Example>
<Example name="Knobs">
<Knobs>
<Button bg="tomato">Hello</Button>
<Knobs.Input name="children" />
<Knobs.Select name="bg">
<option />
<option>tomato</option>
<option>magenta</option>
<option>cyan</option>
</Knobs.Select>
</Knobs>
</Example>
</Library>
</Provider>
=======
<Library>
<Example name="h1">
<XRay>
<h1>hello</h1>
</XRay>
</Example>
<Example name="font">
<Font fontFamily=""Ubuntu", sans-serif">Font</Font>
</Example>
<Example name="button">
<LiveEditor code="<button>hello</button>" />
</Example>
<Example name="TypeScale">
<TypeScale value={[14, 16, 20, 24, 32, 48, 64, 80]} />
</Example>
<Example name="Responsive">
<Responsive zoom={0.75}>
<div
style={{
fontSize: 32,
fontWeight: 'bold',
padding: 16,
color: 'white',
backgroundColor: 'tomato'
}}
>
Hello
</div>
</Responsive>
</Example>
<Example name="PropsForm">
<PropsForm>
<button color="tomato">Hello</button>
<PropsForm.Input name="children" />
<PropsForm.Select name="color">
<option />
<option>tomato</option>
<option>magenta</option>
<option>cyan</option>
</PropsForm.Select>
</PropsForm>
</Example>
<Example name="PropsFormAlt">
<PropsForm>
<button color="tomato">Hello</button>
<PropsForm.Input name="children" />
<PropsForm.Select name="color">
<option />
<option>tomato</option>
<option>magenta</option>
<option>cyan</option>
</PropsForm.Select>
</PropsForm>
</Example>
</Library>
>>>>>>>
<Provider>
<Library>
<Example name="Heading">
<Heading>Hello</Heading>
</Example>
<Example name="Button">
<Button>Hello</Button>
</Example>
<Example name="Donut">
<Donut
value={2/3}
color='tomato'
/>
</Example>
<Example name="XRay">
<XRay>
<Heading>XRay</Heading>
</XRay>
</Example>
<Example name="font">
<Font fontFamily=""Ubuntu", sans-serif">Font</Font>
</Example>
<Example name="LiveEditor">
<LiveEditor
scope={Rebass}
code="<Button>hello</Button>"
/>
</Example>
<Example name="TypeScale">
<TypeScale value={[14, 16, 20, 24, 32, 48, 64, 80]} />
</Example>
<Example name="Responsive">
<Responsive zoom={0.75}>
<div
style={{
padding: 16,
fontSize: 32,
fontWeight: 'bold',
color: 'white',
backgroundColor: 'tomato'
}}>
Hello
</div>
</Responsive>
</Example>
<Example name="PropsForm">
<PropsForm>
<Button bg="tomato">Hello</Button>
<PropsForm.Input name="children" />
<PropsForm.Select name="bg">
<option />
<option>tomato</option>
<option>magenta</option>
<option>cyan</option>
</PropsForm.Select>
</PropsForm>
</Example>
</Library>
</Provider> |
<<<<<<<
if (this.readyState !== this.OPENED) {
throw "INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN";
=======
if (this.readyState != this.OPENED) {
throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");
>>>>>>>
if (this.readyState !== this.OPENED) {
throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");
<<<<<<<
if (this.readyState !== this.OPENED) {
throw "INVALID_STATE_ERR: connection must be opened before send() is called";
=======
if (this.readyState != this.OPENED) {
throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");
>>>>>>>
if (this.readyState !== this.OPENED) {
throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called"); |
<<<<<<<
CM.VersionMajor = '1.0466';
CM.VersionMinor = '2';
=======
CM.VersionMajor = '1.909';
CM.VersionMinor = '1';
>>>>>>>
CM.VersionMajor = '2';
CM.VersionMinor = '1'; |
<<<<<<<
capLevelOnFPSDrop: false,
=======
capLevelToPlayerSize: false,
>>>>>>>
capLevelOnFPSDrop: false,
capLevelToPlayerSize: false,
<<<<<<<
fpsController: FPSController,
=======
capLevelController : CapLevelController,
>>>>>>>
capLevelController : CapLevelController,
fpsController: FPSController,
<<<<<<<
this.fpsController = new config.fpsController(this);
=======
this.capLevelController = new config.capLevelController(this);
>>>>>>>
this.capLevelController = new config.capLevelController(this);
this.fpsController = new config.fpsController(this);
<<<<<<<
this.fpsController.destroy();
=======
this.capLevelController.destroy();
>>>>>>>
this.capLevelController.destroy();
this.fpsController.destroy(); |
<<<<<<<
this.observer.trigger(Event.INIT_PTS_FOUND, {initPTS});
=======
this.observer.trigger(Event.INIT_PTS_FOUND, { id: this.id, initPTS: initPTS, cc: cc});
>>>>>>>
this.observer.trigger(Event.INIT_PTS_FOUND, {initPTS});
this.observer.trigger(Event.INIT_PTS_FOUND, { id: this.id, initPTS: initPTS, cc: cc}); |
<<<<<<<
pesFrameDuration = expectedSampleDuration * pes2mp4ScaleFactor,
rawMPEG = !track.isAAC && this.typeSupported.mpeg;
=======
pesFrameDuration = expectedSampleDuration * pes2mp4ScaleFactor,
ptsNormalize = this._PTSNormalize,
initDTS = this._initDTS;
>>>>>>>
pesFrameDuration = expectedSampleDuration * pes2mp4ScaleFactor,
ptsNormalize = this._PTSNormalize,
initDTS = this._initDTS,
rawMPEG = !track.isAAC && this.typeSupported.mpeg;
<<<<<<<
nextAudioPts = this.nextAudioPts;
contiguous |= (samples0.length && nextAudioPts &&
(Math.abs(timeOffset-nextAudioPts/pesTimeScale) < 0.1 ||
Math.abs((samples0[0].pts-nextAudioPts-this._initDTS)) < 20*pesFrameDuration)
=======
nextAacPts = this.nextAacPts;
contiguous |= (samples0.length && nextAacPts &&
(Math.abs(timeOffset-nextAacPts/pesTimeScale) < 0.1 ||
Math.abs((samples0[0].pts-nextAacPts-initDTS)) < 20*pesFrameDuration)
>>>>>>>
nextAudioPts = this.nextAudioPts;
contiguous |= (samples0.length && nextAudioPts &&
(Math.abs(timeOffset-nextAudioPts/pesTimeScale) < 0.1 ||
Math.abs((samples0[0].pts-nextAudioPts-this._initDTS)) < 20*pesFrameDuration)
<<<<<<<
ptsNorm = this._PTSNormalize(sample.pts - this._initDTS, nextAudioPts),
=======
ptsNorm = ptsNormalize(sample.pts - initDTS, nextAacPts),
>>>>>>>
ptsNorm = ptsNormalize(sample.pts - initDTS, nextAudioPts),
<<<<<<<
sample.pts = sample.dts = this._initDTS + nextAudioPts;
=======
sample.pts = sample.dts = initDTS + nextAacPts;
>>>>>>>
sample.pts = sample.dts = initDTS + nextAudioPts;
<<<<<<<
audioSample = samples0.shift();
unit = audioSample.unit;
pts = audioSample.pts - this._initDTS;
dts = audioSample.dts - this._initDTS;
=======
aacSample = samples0.shift();
unit = aacSample.unit;
pts = aacSample.pts - initDTS;
dts = aacSample.dts - initDTS;
>>>>>>>
audioSample = samples0.shift();
unit = audioSample.unit;
pts = audioSample.pts - initDTS;
dts = audioSample.dts - initDTS;
<<<<<<<
ptsnorm = this._PTSNormalize(pts, nextAudioPts);
dtsnorm = this._PTSNormalize(dts, nextAudioPts);
let delta = Math.round(1000 * (ptsnorm - nextAudioPts) / pesTimeScale),
=======
ptsnorm = ptsNormalize(pts, nextAacPts);
dtsnorm = ptsNormalize(dts, nextAacPts);
let delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale),
>>>>>>>
ptsnorm = ptsNormalize(pts, nextAudioPts);
dtsnorm = ptsNormalize(dts, nextAudioPts);
let delta = Math.round(1000 * (ptsnorm - nextAudioPts) / pesTimeScale),
<<<<<<<
//console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${audioSample.pts}/${audioSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(audioSample.pts/4294967296).toFixed(3)}');
=======
//console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${aacSample.pts}/${aacSample.dts}/${initDTS}/${ptsnorm}/${dtsnorm}/${(aacSample.pts/4294967296).toFixed(3)}');
>>>>>>>
//console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${audioSample.pts}/${audioSample.dts}/${initDTS}/${ptsnorm}/${dtsnorm}/${(audioSample.pts/4294967296).toFixed(3)}'); |
<<<<<<<
const headerLength = getHeaderLength(data, offset);
=======
let headerLength = getHeaderLength(data, offset);
if (offset + headerLength >= data.length) {
return false;
}
>>>>>>>
const headerLength = getHeaderLength(data, offset);
if (offset + headerLength >= data.length) {
return false;
} |
<<<<<<<
var captionsLabels = this.manifestCaptionsLabels;
captionsLabels.captionsTextTrack1Label = 'English';
captionsLabels.captionsTextTrack1LanguageCode = 'en';
captionsLabels.captionsTextTrack2Label = 'Español';
captionsLabels.captionsTextTrack2LanguageCode = 'es';
=======
var captionsLabels = this.manifestCaptionsLabels;
captionsLabels.captionsTextTrack1Label = 'Unknown CC';
captionsLabels.captionsTextTrack1LanguageCode = 'en';
captionsLabels.captionsTextTrack2Label = 'Unknown CC';
captionsLabels.captionsTextTrack2LanguageCode = 'es';
>>>>>>>
var captionsLabels = this.manifestCaptionsLabels;
captionsLabels.captionsTextTrack1Label = 'Unknown CC';
captionsLabels.captionsTextTrack1LanguageCode = 'en';
captionsLabels.captionsTextTrack2Label = 'Unknown CC';
captionsLabels.captionsTextTrack2LanguageCode = 'es';
<<<<<<<
if (index < inUseTracks.length) {const inUseTrack = inUseTracks[index];
// Reuse tracks with the same label, but do not reuse 608/708 tracks
if (reuseVttTextTrack(inUseTrack, track)) {
textTrack = inUseTrack;
} }
if (!textTrack) {
textTrack = this.createTextTrack('subtitles', track.name, track.lang);
=======
const inUseTrack = inUseTracks[index];
// Reuse tracks with the same label, but do not reuse 608/708 tracks
if (reuseVttTextTrack(inUseTrack, track)) {
textTrack = inUseTrack;
} else {
textTrack = this.createTextTrack('subtitles', track.name, track.lang);
}
textTrack.mode = track.default ? 'showing' : 'hidden';
this.textTracks.push(textTrack);
});
}
if (this.config.enableCEA708Captions && data.captions) {
let index;
let instreamIdMatch;
data.captions.forEach(function (captionsTrack) {
instreamIdMatch = /(?:CC|SERVICE)([1-2])/.exec(captionsTrack.instreamId);
if (!instreamIdMatch) {
return;
}
index = instreamIdMatch[1];
captionsLabels['captionsTextTrack' + index + 'Label'] = captionsTrack.name;
if (captionsTrack.lang) { // optional attribute
captionsLabels['captionsTextTrack' + index + 'LanguageCode'] = captionsTrack.lang;
>>>>>>>
if (index < inUseTracks.length) {const inUseTrack = inUseTracks[index];
// Reuse tracks with the same label, but do not reuse 608/708 tracks
if (reuseVttTextTrack(inUseTrack, track)) {
textTrack = inUseTrack;
} }
if (!textTrack) {
textTrack = this.createTextTrack('subtitles', track.name, track.lang);
}
textTrack.mode = track.default ? 'showing' : 'hidden';
this.textTracks.push(textTrack);
});
}
if (this.config.enableCEA708Captions && data.captions) {
let index;
let instreamIdMatch;
data.captions.forEach(function (captionsTrack) {
instreamIdMatch = /(?:CC|SERVICE)([1-2])/.exec(captionsTrack.instreamId);
if (!instreamIdMatch) {
return;
}
index = instreamIdMatch[1];
captionsLabels['captionsTextTrack' + index + 'Label'] = captionsTrack.name;
if (captionsTrack.lang) { // optional attribute
captionsLabels['captionsTextTrack' + index + 'LanguageCode'] = captionsTrack.lang; |
<<<<<<<
this.remuxer = new this.remuxerClass(observer, config);
this.ZERO_AUDIO_FRAME = new Uint8Array([
0x21, 0x10, 0x05, 0x20, 0xa4, 0x1b, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x37, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x70
]);
=======
this.remuxer = new this.remuxerClass(observer);
>>>>>>>
this.remuxer = new this.remuxerClass(observer, config); |
<<<<<<<
describe('PlaylistLoader', function () {
it('parses empty manifest returns empty array', function () {
expect(M3U8Parser.parseMasterPlaylist('', 'http://www.dailymotion.com')).to.deep.equal([]);
=======
const assert = require('assert');
const bufferIsEqual = require('arraybuffer-equal');
describe('PlaylistLoader', () => {
it('parses empty manifest returns empty array', () => {
assert.deepEqual(M3U8Parser.parseMasterPlaylist('', 'http://www.dailymotion.com'), []);
>>>>>>>
const assert = require('assert');
describe('PlaylistLoader', function () {
it('parses empty manifest returns empty array', function () {
expect(M3U8Parser.parseMasterPlaylist('', 'http://www.dailymotion.com')).to.deep.equal([]); |
<<<<<<<
case ErrorDetails.REMUX_ALLOC_ERROR:
levelId = data.level;
break;
=======
case ErrorDetails.MANIFEST_EMPTY_ERROR:
levelId = data.context.level;
levelError = true;
removeLevel = true;
break;
>>>>>>>
case ErrorDetails.REMUX_ALLOC_ERROR:
levelId = data.level;
break;
case ErrorDetails.MANIFEST_EMPTY_ERROR:
levelId = data.context.level;
levelError = true;
removeLevel = true;
break;
<<<<<<<
logger.warn(`level controller,${details}: switch-down for next fragment`);
abrController.nextAutoLevel = Math.max(minAutoLevel,levelId-1);
} else if(level && level.details && level.details.live) {
=======
logger.warn(`level controller,${details}: emergency switch-down for next fragment`);
abrController.nextAutoLevel = minAutoLevel;
} else if(level && level.details && level.details.live) {
>>>>>>>
logger.warn(`level controller,${details}: switch-down for next fragment`);
abrController.nextAutoLevel = Math.max(minAutoLevel,levelId-1);
} else if(level && level.details && level.details.live) { |
<<<<<<<
const callback = arguments[arguments.length - 1];
self.startStream(url, config, callback);
const video = self.video;
video.onloadeddata = function () {
self.setTimeout(function () {
video.currentTime = video.duration - 5;
// Fail test early if more than 2 buffered ranges are found
video.onprogress = function () {
if (video.buffered.length > 2) {
callback({
code: 'buffer-gaps',
bufferedRanges: video.buffered.length,
logs: self.logString
});
}
};
}, 5000);
};
video.onended = function () {
callback({ code: 'ended', logs: self.logString });
};
}, url, config);
=======
const callback = arguments[arguments.length - 1];
window.startStream(url, config, callback);
const video = window.video;
video.onloadeddata = function () {
window.setTimeout(function () {
video.currentTime = video.duration - 5;
// Fail test early if more than 2 buffered ranges are found (with configured exceptions)
const allowedBufferedRanges = config.allowedBufferedRangesInSeekTest || 2;
video.onprogress = function () {
if (video.buffered.length > allowedBufferedRanges) {
callback({ code: 'buffer-gaps', bufferedRanges: video.buffered.length, logs: window.logString });
}
};
}, 5000);
};
video.onended = function () {
callback({ code: 'ended', logs: window.logString });
};
},
url,
config
);
>>>>>>>
const callback = arguments[arguments.length - 1];
self.startStream(url, config, callback);
const video = self.video;
video.onloadeddata = function () {
self.setTimeout(function () {
video.currentTime = video.duration - 5;
// Fail test early if more than 2 buffered ranges are found (with configured exceptions)
const allowedBufferedRanges = config.allowedBufferedRangesInSeekTest || 2;
video.onprogress = function () {
if (video.buffered.length > allowedBufferedRanges) {
callback({
code: 'buffer-gaps',
bufferedRanges: video.buffered.length,
logs: self.logString
});
}
};
}, 5000);
};
video.onended = function () {
callback({ code: 'ended', logs: self.logString });
};
}, url, config); |
<<<<<<<
let pos = 0;
if (this.loadedmetadata)
=======
let pos;
if (this.loadedmetadata) {
>>>>>>>
let pos = 0;
if (this.loadedmetadata) {
<<<<<<<
else if (this.nextLoadPosition)
=======
} else {
>>>>>>>
} else if (this.nextLoadPosition) {
<<<<<<<
if (levelDetails.hasProgramDateTime) {
// Relies on PDT in order to switch bitrates (Support EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE)
logger.log(`live playlist, switching playlist, load frag with same PDT: ${fragPrevious.pdt}`);
frag = findFragmentByPDT(fragments, fragPrevious.endPdt, config.maxFragLookUpTolerance);
} else {
// Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)
=======
if (levelDetails.hasProgramDateTime) {
// Relies on PDT in order to switch bitrates (Support EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE)
logger.log(`live playlist, switching playlist, load frag with same PDT: ${fragPrevious.programDateTime}`);
frag = findFragmentByPDT(fragments, fragPrevious.endProgramDateTime, config.maxFragLookUpTolerance);
} else {
// Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)
>>>>>>>
if (levelDetails.hasProgramDateTime) {
// Relies on PDT in order to switch bitrates (Support EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE)
logger.log(`live playlist, switching playlist, load frag with same PDT: ${fragPrevious.programDateTime}`);
frag = findFragmentByPDT(fragments, fragPrevious.endProgramDateTime, config.maxFragLookUpTolerance);
} else {
// Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)
<<<<<<<
_loadFragmentOrKey (frag, level, levelDetails, pos, bufferEnd) {
// logger.log('loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));
if ((frag.decryptdata && frag.decryptdata.uri != null) && (frag.decryptdata.key == null)) {
logger.log(`Loading key for ${frag.sn} of [${levelDetails.startSN} ,${levelDetails.endSN}],level ${level}`);
this.state = State.KEY_LOADING;
this.hls.trigger(Event.KEY_LOADING, { frag });
} else {
logger.log(`Loading ${frag.sn} of [${levelDetails.startSN} ,${levelDetails.endSN}],level ${level}, currentTime:${pos.toFixed(3)},bufferEnd:${bufferEnd.toFixed(3)}`);
// Check if fragment is not loaded
let fragState = this.fragmentTracker.getState(frag);
this.fragCurrent = frag;
this.startFragRequested = true;
// Don't update nextLoadPosition for fragments which are not buffered
if (Number.isFinite(frag.sn) && !frag.bitrateTest)
this.nextLoadPosition = frag.start + frag.duration;
// Allow backtracked fragments to load
if (frag.backtracked || fragState === FragmentState.NOT_LOADED || fragState === FragmentState.PARTIAL) {
frag.autoLevel = this.hls.autoLevelEnabled;
frag.bitrateTest = this.bitrateTest;
this.hls.trigger(Event.FRAG_LOADING, { frag });
// lazy demuxer init, as this could take some time ... do it during frag loading
if (!this.demuxer)
this.demuxer = new Demuxer(this.hls, 'main');
this.state = State.FRAG_LOADING;
} else if (fragState === FragmentState.APPENDING) {
// Lower the buffer size and try again
if (this._reduceMaxBufferLength(frag.duration))
this.fragmentTracker.removeFragment(frag);
=======
_loadKey (frag) {
this.state = State.KEY_LOADING;
this.hls.trigger(Event.KEY_LOADING, { frag });
}
_loadFragment (frag) {
// Check if fragment is not loaded
let fragState = this.fragmentTracker.getState(frag);
this.fragCurrent = frag;
this.startFragRequested = true;
// Don't update nextLoadPosition for fragments which are not buffered
if (Number.isFinite(frag.sn) && !frag.bitrateTest) {
this.nextLoadPosition = frag.start + frag.duration;
}
// Allow backtracked fragments to load
if (frag.backtracked || fragState === FragmentState.NOT_LOADED || fragState === FragmentState.PARTIAL) {
frag.autoLevel = this.hls.autoLevelEnabled;
frag.bitrateTest = this.bitrateTest;
this.hls.trigger(Event.FRAG_LOADING, { frag });
// lazy demuxer init, as this could take some time ... do it during frag loading
if (!this.demuxer) {
this.demuxer = new Demuxer(this.hls, 'main');
}
this.state = State.FRAG_LOADING;
} else if (fragState === FragmentState.APPENDING) {
// Lower the buffer size and try again
if (this._reduceMaxBufferLength(frag.duration)) {
this.fragmentTracker.removeFragment(frag);
>>>>>>>
_loadKey (frag) {
this.state = State.KEY_LOADING;
this.hls.trigger(Event.KEY_LOADING, { frag });
}
_loadFragment (frag) {
// Check if fragment is not loaded
let fragState = this.fragmentTracker.getState(frag);
this.fragCurrent = frag;
this.startFragRequested = true;
// Don't update nextLoadPosition for fragments which are not buffered
if (Number.isFinite(frag.sn) && !frag.bitrateTest) {
this.nextLoadPosition = frag.start + frag.duration;
}
// Allow backtracked fragments to load
if (frag.backtracked || fragState === FragmentState.NOT_LOADED || fragState === FragmentState.PARTIAL) {
frag.autoLevel = this.hls.autoLevelEnabled;
frag.bitrateTest = this.bitrateTest;
this.hls.trigger(Event.FRAG_LOADING, { frag });
// lazy demuxer init, as this could take some time ... do it during frag loading
if (!this.demuxer) {
this.demuxer = new Demuxer(this.hls, 'main');
}
this.state = State.FRAG_LOADING;
} else if (fragState === FragmentState.APPENDING) {
// Lower the buffer size and try again
if (this._reduceMaxBufferLength(frag.duration)) {
this.fragmentTracker.removeFragment(frag);
<<<<<<<
if (currentTime > this.lastCurrentTime)
=======
if (currentTime > this.lastCurrentTime) {
>>>>>>>
if (currentTime > this.lastCurrentTime) {
<<<<<<<
if (Number.isFinite(currentTime))
=======
if (Number.isFinite(currentTime)) {
>>>>>>>
if (Number.isFinite(currentTime)) {
<<<<<<<
if (Number.isFinite(currentTime))
=======
if (Number.isFinite(currentTime)) {
>>>>>>>
if (Number.isFinite(currentTime)) {
<<<<<<<
const { media } = this;
if (!media || !media.readyState) {
// Exit early if we don't have media or if the media hasn't bufferd anything yet (readyState 0)
return;
}
const mediaBuffer = this.mediaBuffer ? this.mediaBuffer : media;
const buffered = mediaBuffer.buffered;
if (!this.loadedmetadata && buffered.length) {
this.loadedmetadata = true;
this._seekToStartPos();
} else if (this.immediateSwitch) {
this.immediateLevelSwitchEnd();
} else {
this.gapController.poll(this.lastCurrentTime, buffered);
=======
const { media } = this;
if (!media || media.readyState === 0) {
// Exit early if we don't have media or if the media hasn't bufferd anything yet (readyState 0)
return;
}
const mediaBuffer = this.mediaBuffer ? this.mediaBuffer : media;
const buffered = mediaBuffer.buffered;
if (!this.loadedmetadata && buffered.length) {
this.loadedmetadata = true;
this._seekToStartPos();
} else if (this.immediateSwitch) {
this.immediateLevelSwitchEnd();
} else {
this.gapController.poll(this.lastCurrentTime, buffered);
>>>>>>>
const { media } = this;
if (!media || media.readyState === 0) {
// Exit early if we don't have media or if the media hasn't bufferd anything yet (readyState 0)
return;
}
const mediaBuffer = this.mediaBuffer ? this.mediaBuffer : media;
const buffered = mediaBuffer.buffered;
if (!this.loadedmetadata && buffered.length) {
this.loadedmetadata = true;
this._seekToStartPos();
} else if (this.immediateSwitch) {
this.immediateLevelSwitchEnd();
} else {
this.gapController.poll(this.lastCurrentTime, buffered); |
<<<<<<<
this.remuxer = new this.remuxerClass(observer,id, config);
// id === 'main' when the demuxer is used to play an audio only stream and requires AAC files placed back-to-back in the order they are received.
// id === 'audio' when the demuxer is used for multitrack audio and requires the use of timestamps to sync audio with video.
this.useTimeStamp = id === 'audio';
=======
this.remuxer = new this.remuxerClass(observer,id, config, typeSupported);
>>>>>>>
this.remuxer = new this.remuxerClass(observer,id, config, typeSupported);
// id === 'main' when the demuxer is used to play an audio only stream and requires AAC files placed back-to-back in the order they are received.
// id === 'audio' when the demuxer is used for multitrack audio and requires the use of timestamps to sync audio with video.
this.useTimeStamp = id === 'audio'; |
<<<<<<<
let minLevel = this.verboseFilter[severity];
if (this.verboseLevel >= minLevel) {
// console.log(this.time + ' [' + severity + '] ' + msg);
}
=======
const minLevel = this.verboseFilter[severity];
if (this.verboseLevel >= minLevel)
console.log(this.time + ' [' + severity + '] ' + msg);
>>>>>>>
const minLevel = this.verboseFilter[severity];
if (this.verboseLevel >= minLevel) {
console.log(this.time + ' [' + severity + '] ' + msg);
}
<<<<<<<
let numArrayToHexArray = function (numArray) {
let hexArray = [];
for (let j = 0; j < numArray.length; j++) {
=======
const numArrayToHexArray = function (numArray) {
const hexArray = [];
for (let j = 0; j < numArray.length; j++)
>>>>>>>
const numArrayToHexArray = function (numArray) {
const hexArray = [];
for (let j = 0; j < numArray.length; j++) {
<<<<<<<
let style = attribs[i];
if (styles.hasOwnProperty(style)) {
=======
const style = attribs[i];
if (styles.hasOwnProperty(style))
>>>>>>>
const style = attribs[i];
if (styles.hasOwnProperty(style)) {
<<<<<<<
let t = logger.time;
if (t === null) {
=======
const t = logger.time;
if (t === null)
>>>>>>>
const t = logger.time;
if (t === null) {
<<<<<<<
let cond1 = (a === 0x14 || a === 0x1C) && (b >= 0x20 && b <= 0x2F);
let cond2 = (a === 0x17 || a === 0x1F) && (b >= 0x21 && b <= 0x23);
if (!(cond1 || cond2)) {
=======
if (!(cond1 || cond2))
>>>>>>>
if (!(cond1 || cond2)) {
<<<<<<<
if (a === 0x14 || a === 0x17) {
chNr = 1;
} else {
chNr = 2;
} // (a === 0x1C || a=== 0x1f)
let channel = this.channels[chNr - 1];
if (a === 0x14 || a === 0x1C) {
if (b === 0x20) {
=======
let channel;
if (chNr) {
channel = this.channels[chNr];
if (b === 0x20)
>>>>>>>
let channel;
if (chNr) {
channel = this.channels[chNr];
if (b === 0x20) {
<<<<<<<
if (a === 0x11) {
chNr = 1;
} else {
chNr = 2;
}
=======
if (a === 0x11)
chNr = field;
else
chNr = field + 1;
>>>>>>>
if (a === 0x11) {
chNr = field;
} else {
chNr = field + 1;
} |
<<<<<<<
=======
<p>
<FormattedMessage
id='recommendedOpsSection.subtitle.volunteer'
defaultMessage='Some people you could help right now.'
decription='Subtitle on volunteer home page for recommended opportunities'
/>
</p>
>>>>>>>
<<<<<<<
<ProfileSection id='basicRecommendations'>
<ProfileSectionTitle>
<FormattedMessage
id='recommendedOpsSection.title'
defaultMessage='People offering help'
decription='Title on volunteer home page for recommended opportunities'
/>
<small>
<FormattedMessage
id='recommendedOpsSection.subtitle'
defaultMessage='Here are some opportunities volunteers are offering'
decription='Subtitle on volunteer home page for recommended opportunities'
/>
</small>
</ProfileSectionTitle>
<OpRecommendations recommendedOps={ops} type={OFFER} />
</ProfileSection>
=======
{bp &&
<ProfileSection id='basicRecommendations'>
<ProfileSectionTitle>
<FormattedMessage
id='recommendedOpsSection.title'
defaultMessage='People offering help'
decription='Title on volunteer home page for recommended opportunities'
/>
</ProfileSectionTitle>
<p>
<FormattedMessage
id='recommendedOpsSection.subtitle'
defaultMessage='Some opportunities volunteers are offering'
decription='Subtitle on volunteer home page for recommended opportunities'
/>
</p>
<OpRecommendations recommendedOps={ops} type={OFFER} />
</ProfileSection>}
>>>>>>>
{bp &&
<ProfileSection id='basicRecommendations'>
<ProfileSectionTitle>
<FormattedMessage
id='recommendedOpsSection.title'
defaultMessage='People offering help'
decription='Title on volunteer home page for recommended opportunities'
/>
<small>
<FormattedMessage
id='recommendedOpsSection.subtitle'
defaultMessage='Here are some opportunities volunteers are offering'
decription='Subtitle on volunteer home page for recommended opportunities'
/>
</small>
</ProfileSectionTitle>
<OpRecommendations recommendedOps={ops} type={OFFER} />
</ProfileSection>} |
<<<<<<<
// fired to notify that subtitle track lists has been updated data: { subtitleTracks : subtitleTracks}
SUBTITLE_TRACKS_UPDATED: 'hlsSubtitleTracksUpdated',
// fired when an subtitle track switch occurs - data: { id : subtitle track id}
SUBTITLE_TRACK_SWITCH: 'hlsSubtitleTrackSwitch',
// fired when an subtitle track loading starts - data: { url : subtitle track URL id : subtitle track id}
SUBTITLE_TRACK_LOADING: 'hlsSubtitleTrackLoading',
// fired when an subtitle track loading finishes - data: { details : levelDetails object, id : subtitle track id, stats : { trequest, tfirst, tload, mtime} }
SUBTITLE_TRACK_LOADED: 'hlsSubtitleTrackLoaded',
// fired when a subtitle fragment has been processed - data: { success : boolean, frag : the processed frag}
SUBTITLE_FRAG_PROCESSED: 'hlsSubtitleFragProcessed',
// fired when the first timestamp is found. Used for synchronising WebVTT subtitles.
=======
// fired to notify that subtitle track lists has been updated data: { subtitleTracks : subtitleTracks}
SUBTITLE_TRACKS_UPDATED: 'hlsSubtitleTracksUpdated',
// fired when an subtitle track switch occurs - data: { id : subtitle track id}
SUBTITLE_TRACK_SWITCH: 'hlsSubtitleTrackSwitch',
// fired when an subtitle track loading starts - data: { url : subtitle track URL id : subtitle track id}
SUBTITLE_TRACK_LOADING: 'hlsSubtitleTrackLoading',
// fired when an subtitle track loading finishes - data: { details : levelDetails object, id : subtitle track id, stats : { trequest, tfirst, tload, mtime} }
SUBTITLE_TRACK_LOADED: 'hlsSubtitleTrackLoaded',
// fired when a subtitle fragment has been processed - data: { success : boolean, frag : the processed frag}
SUBTITLE_FRAG_PROCESSED: 'hlsSubtitleFragProcessed',
// fired when the first timestamp is found. - data: { id : demuxer id, initPTS: initPTS , frag : fragment object}
>>>>>>>
// fired to notify that subtitle track lists has been updated data: { subtitleTracks : subtitleTracks}
SUBTITLE_TRACKS_UPDATED: 'hlsSubtitleTracksUpdated',
// fired when an subtitle track switch occurs - data: { id : subtitle track id}
SUBTITLE_TRACK_SWITCH: 'hlsSubtitleTrackSwitch',
// fired when an subtitle track loading starts - data: { url : subtitle track URL id : subtitle track id}
SUBTITLE_TRACK_LOADING: 'hlsSubtitleTrackLoading',
// fired when an subtitle track loading finishes - data: { details : levelDetails object, id : subtitle track id, stats : { trequest, tfirst, tload, mtime} }
SUBTITLE_TRACK_LOADED: 'hlsSubtitleTrackLoaded',
// fired when a subtitle fragment has been processed - data: { success : boolean, frag : the processed frag}
SUBTITLE_FRAG_PROCESSED: 'hlsSubtitleFragProcessed',
// fired when the first timestamp is found. - data: { id : demuxer id, initPTS: initPTS , frag : fragment object}
<<<<<<<
// fired when a fragment has started decrypting - data: { level : levelId, sn : sequence number }
FRAG_DECRYPT_STARTED: 'hlsFragDecryptStarted',
// fired when a fragment has finished decrypting - data: { level : levelId, sn : sequence number }
=======
// fired when a fragment has finished decrypting - data: { id : demuxer id, frag: fragment object, stats : {tstart,tdecrypt} }
>>>>>>>
// fired when a fragment has started decrypting - data: { level : levelId, sn : sequence number }
FRAG_DECRYPT_STARTED: 'hlsFragDecryptStarted',
// fired when a fragment has finished decrypting - data: { id : demuxer id, frag: fragment object, stats : {tstart,tdecrypt} } |
<<<<<<<
const levelId = Number.isFinite(level) ? level : Number.isFinite(id) ? id : 0; // level -> id -> 0
=======
const levelUrlId = Number.isFinite(id) ? id : 0;
const levelId = Number.isFinite(level) ? level : levelUrlId;
>>>>>>>
const levelUrlId = Number.isFinite(id) ? id : 0;
const levelId = Number.isFinite(level) ? level : levelUrlId;
<<<<<<<
const levelDetails = M3U8Parser.parseLevelPlaylist(response.data, url, levelId, levelType);
=======
const levelDetails = M3U8Parser.parseLevelPlaylist(response.data, url, levelId, levelType, levelUrlId);
>>>>>>>
const levelDetails = M3U8Parser.parseLevelPlaylist(response.data, url, levelId, levelType, levelUrlId);
<<<<<<<
_handleNetworkError (response, context, networkDetails, timeout = false) {
=======
_handleNetworkError (context, networkDetails, timeout = false) {
logger.info(`A network error occured while loading a ${context.type}-type playlist`);
>>>>>>>
_handleNetworkError (response, context, networkDetails, timeout = false) {
logger.info(`A network error occured while loading a ${context.type}-type playlist`); |
<<<<<<<
describe('TimelineController', function () {
=======
const assert = require('assert');
describe('TimelineController', () => {
>>>>>>>
const assert = require('assert');
describe('TimelineController', function () { |
<<<<<<<
person.placeOfWork = values.placeOfWork
=======
person.job = values.job
>>>>>>>
person.placeOfWork = values.placeOfWork
person.job = values.job
<<<<<<<
const personplaceOfWork = (
<FormattedMessage
id='placeOfWork'
defaultMessage='Where is your place of Work'
description='persons location of work if they do not come from a organisation'
/>
)
=======
const personJob = (
<FormattedMessage
id='job'
defaultMessage='What is your Job Title?'
description='person Job label in personDetails Form'
/>
)
>>>>>>>
const personplaceOfWork = (
<FormattedMessage
id='placeOfWork'
defaultMessage='Where is your place of Work'
description='persons location of work if they do not come from a organisation'
/>
)
const personJob = (
<FormattedMessage
id='job'
defaultMessage='What is your Job Title?'
description='person Job label in personDetails Form'
/>
)
<<<<<<<
<Form.Item label={personplaceOfWork}>
{getFieldDecorator('placeOfWork')(
<Input placeholder='Enter your place of work here' />
)}
</Form.Item>
=======
<ShortInputContainer>
<Form.Item label={personJob}>
{getFieldDecorator('job')(
<Input placeholder='Enter your job title here' />
)}
</Form.Item>
</ShortInputContainer>
>>>>>>>
<Form.Item label={personplaceOfWork}>
{getFieldDecorator('placeOfWork')(
<Input placeholder='Enter your place of work here' />
)}
</Form.Item>
<ShortInputContainer>
<Form.Item label={personJob}>
{getFieldDecorator('job')(
<Input placeholder='Enter your job title here' />
)}
</Form.Item>
</ShortInputContainer>
<<<<<<<
placeOfWork: Form.createFormField({
...props.person.placeOfWork,
value: props.person.placeOfWork
}),
=======
job: Form.createFormField({
...props.person.job,
value: props.person.job
}),
>>>>>>>
placeOfWork: Form.createFormField({
...props.person.placeOfWork,
value: props.person.placeOfWork
}),
job: Form.createFormField({
...props.person.job,
value: props.person.job
}), |
<<<<<<<
let parsedPIDs = parsePMT(data, offset, this.typeSupported.mpeg === true || this.typeSupported.mp3 === true);
avcId = avcTrack.id = parsedPIDs.avc;
aacId = aacTrack.id = parsedPIDs.aac;
id3Id = id3Track.id = parsedPIDs.id3;
aacTrack.isAAC = parsedPIDs.isAAC;
=======
let parsedPIDs = parsePMT(data, offset);
// only update track id if track PID found while parsing PMT
// this is to avoid resetting the PID to -1 in case
// track PID transiently disappears from the stream
// this could happen in case of transient missing audio samples for example
avcId = parsedPIDs.avc;
if (avcId > 0) {
avcTrack.id = avcId;
}
aacId = parsedPIDs.aac;
if (aacId > 0) {
aacTrack.id = aacId;
}
id3Id = parsedPIDs.id3;
if (id3Id > 0) {
id3Track.id = id3Id;
}
>>>>>>>
let parsedPIDs = parsePMT(data, offset, this.typeSupported.mpeg === true || this.typeSupported.mp3 === true);
// only update track id if track PID found while parsing PMT
// this is to avoid resetting the PID to -1 in case
// track PID transiently disappears from the stream
// this could happen in case of transient missing audio samples for example
avcId = parsedPIDs.avc;
if (avcId > 0) {
avcTrack.id = avcId;
}
aacId = parsedPIDs.aac;
if (aacId > 0) {
aacTrack.id = aacId;
aacTrack.isAAC = parsedPIDs.isAAC;
}
id3Id = parsedPIDs.id3;
if (id3Id > 0) {
id3Track.id = id3Id;
} |
<<<<<<<
this.remuxer = new this.remuxerClass(observer,id, config, typeSupported);
// id === 'main' when the demuxer is used to play an audio only stream and requires AAC files placed back-to-back in the order they are received.
// id === 'audio' when the demuxer is used for multitrack audio and requires the use of timestamps to sync audio with video.
this.useTimeStamp = id === 'audio';
this.insertDiscontinuity();
=======
this.remuxer = remuxer;
>>>>>>>
this.remuxer = remuxer;
this.useTimeStamp = id === 'audio';
this.insertDiscontinuity();
<<<<<<<
const id3Track = (id3.payload) ? { samples : [ { pts: pts, dts : pts, unit : id3.payload} ] } : { samples: [] };
this.remuxer.remux(level, sn , cc, track,{samples : []}, id3Track, { samples: [] }, timeOffset, contiguous,accurateTimeOffset, defaultInitPTS);
=======
this.remuxer.remux(track,
{samples : []},
{samples : [ { pts: pts, dts : pts, unit : id3.payload} ]},
{samples : []},
timeOffset,
contiguous,
accurateTimeOffset);
>>>>>>>
const id3Track = (id3.payload) ? { samples : [ { pts: pts, dts : pts, unit : id3.payload} ] } : { samples: [] };
this.remuxer.remux(track,
{samples : []},
id3Track,
{samples : []},
timeOffset,
contiguous,
accurateTimeOffset); |
<<<<<<<
// Abort on invalid sub-generators rather than running default
namespace = options.namespace.split(':');
if (namespace.length > 1) {
options.namespace = namespace[0];
console.log('Error: Invalid sub-generator', namespace[1]);
console.log(this.help());
process.exit(1);
}
=======
//If used, take the first argument as the application name.
this.argument('appName', {
type: String,
required: false,
optional: true,
desc: 'Name for your application',
banner: 'This optional parameter gives a name to your application. It will be created under a directory by the same name'
}
);
//If a name was received, shift it out of the args array, so that it doesn't pollute downstream generators
if (this.appName) {
args.shift();
}
>>>>>>>
// Abort on invalid sub-generators rather than running default
namespace = options.namespace.split(':');
if (namespace.length > 1) {
options.namespace = namespace[0];
console.log('Error: Invalid sub-generator', namespace[1]);
console.log(this.help());
process.exit(1);
}
//If used, take the first argument as the application name.
this.argument('appName', {
type: String,
required: false,
optional: true,
desc: 'Name for your application',
banner: 'This optional parameter gives a name to your application. It will be created under a directory by the same name'
}
);
//If a name was received, shift it out of the args array, so that it doesn't pollute downstream generators
if (this.appName) {
args.shift();
} |
<<<<<<<
krakenutil.update();
=======
update.check();
this.hookFor('kraken:locale', {
args: args,
options: {
options: options
}
});
>>>>>>>
krakenutil.update();
this.hookFor('kraken:locale', {
args: args,
options: {
options: options
}
}); |
<<<<<<<
try{
if(!fs.existsSync(anyproxyHome)){
fs.mkdirSync(anyproxyHome);
}
if(fs.existsSync(path.join(anyproxyHome,"rule_default.js"))){
default_rule = require(path.join(anyproxyHome,"rule_default"));
}
if(fs.existsSync(path.join(process.cwd(),'rule.js'))){
default_rule = require(path.join(process.cwd(),'rule'));
}
}catch(e){
}
=======
try{
if(!fs.existsSync(anyproxyHome)){
fs.mkdirSync(anyproxyHome);
}
if(fs.existsSync(path.join(anyproxyHome,"rule_default.js"))){
default_rule = require(path.join(anyproxyHome,"rule_default"));
}
if(fs.existsSync(path.join(process.cwd(),'rule.js'))){
default_rule = require(path.join(process.cwd(),'rule'));
}
}catch(e){}
>>>>>>>
if(!fs.existsSync(anyproxyHome)){
fs.mkdirSync(anyproxyHome);
}
if(fs.existsSync(path.join(anyproxyHome,"rule_default.js"))){
default_rule = require(path.join(anyproxyHome,"rule_default"));
}
if(fs.existsSync(path.join(process.cwd(),'rule.js'))){
default_rule = require(path.join(process.cwd(),'rule'));
}
}catch(e){} |
<<<<<<<
key: 'imgUrl',
=======
key: 'avatar',
sorter: (a, b) => a.person.nickname.length - b.person.nickname.length,
>>>>>>>
key: 'imgUrl',
sorter: (a, b) => a.person.nickname.length - b.person.nickname.length, |
<<<<<<<
export const withMembers = PageComponent => withReduxEndpoints(PageComponent, ['members'])
export const withArchivedOpportunities = PageComponent => withReduxEndpoints(PageComponent, ['archivedOpportunities'])
=======
export const withArchivedOpportunities = PageComponent => withReduxEndpoints(PageComponent, ['archivedOpportunities', 'tags', 'locations'])
>>>>>>>
export const withMembers = PageComponent => withReduxEndpoints(PageComponent, ['members'])
export const withArchivedOpportunities = PageComponent => withReduxEndpoints(PageComponent, ['archivedOpportunities', 'tags', 'locations']) |
<<<<<<<
username,
password,
region: 'US',
pin
=======
username,
password,
region: 'US',
pin,
// autoLogin: false
>>>>>>>
username,
password,
region: 'US',
pin
<<<<<<<
=======
const onReadyHandler = async(vehicles) => {
const vehicle = client.getVehicle();
const response = await vehicle.status();
console.log(response);
}
>>>>>>>
const onReadyHandler = async(vehicles) => {
const vehicle = client.getVehicle();
const response = await vehicle.status();
console.log(response);
}
<<<<<<<
// const vehicle = client.getVehicle(vin);
// return vehicle.status();
=======
// const vehicle = client.getVehicle();
// return vehicle.status();
>>>>>>>
// const vehicle = client.getVehicle(vin);
// return vehicle.status(); |
<<<<<<<
=======
import getPort from 'get-port';
try {
const wincmd = require('node-windows');
} catch (ex) {
const wincmd = null;
}
>>>>>>>
import getPort from 'get-port'; |
<<<<<<<
import builtinModules from 'builtin-modules'
=======
import json from '@rollup/plugin-json'
>>>>>>>
import json from '@rollup/plugin-json'
import builtinModules from 'builtin-modules' |
<<<<<<<
ramlDef.mediaType = this.mapMediaType(env.Consumes, env.Produces);
ramlDef.documentation = [{
title: this.project.Name,
content: this.project.Description
}];
=======
this.description(ramlDef, this.project);
>>>>>>>
ramlDef.mediaType = this.mapMediaType(env.Consumes, env.Produces);
this.description(ramlDef, this.project); |
<<<<<<<
try {
this.project = new Project(this.data.title());
this.project.Environment.Version = this.data.version();
// TODO set project description from documentation
// How to know which documentation describes the project briefly?
var documentation = this.data.documentation();
if (documentation && documentation.length > 0) {
this.project.Description = documentation[0].content().value();
this.project.Environment.summary = documentation[0].content().value();
}
this._mapHost();
=======
this.project = new Project(this.data.title());
//TODO set project description from documentation
//How to know which documentation describes the project briefly?
this.description(this.project, this.data);
this._mapHost();
>>>>>>>
try {
this.project = new Project(this.data.title());
this.project.Environment.Version = this.data.version();
//TODO set project description from documentation
//How to know which documentation describes the project briefly?
this.description(this.project, this.data);
this._mapHost(); |
<<<<<<<
var _ = require('lodash'),
RAML = require('./baseraml'),
jsonHelper = require('../utils/json'),
ramlHelper = require('../helpers/raml');
=======
var RAML = require('./baseraml'),
jsonHelper = require('../utils/json');
>>>>>>>
var _ = require('lodash'),
RAML = require('./baseraml'),
jsonHelper = require('../utils/json'); |
<<<<<<<
var name = null;
var content = {};
=======
var externalName = null;
var content = null;
>>>>>>>
var name = null;
var content = {};
<<<<<<<
// add header auth
if (!_.isEmpty(slSecuritySchemes.apiKey.headers)) {
name = slSecuritySchemes.apiKey.headers[0].externalName;
=======
if (slSecuritySchemes.apiKey.headers && !_.isEmpty(slSecuritySchemes.apiKey.headers)) {
externalName = slSecuritySchemes.apiKey.headers[0].externalName;
var keyName = slSecuritySchemes.apiKey.headers[0].name;
>>>>>>>
// add header auth
if (!_.isEmpty(slSecuritySchemes.apiKey.headers)) {
name = slSecuritySchemes.apiKey.headers[0].externalName;
<<<<<<<
// add query auth
if (!_.isEmpty(slSecuritySchemes.apiKey.queryString)) {
name = slSecuritySchemes.apiKey.queryString[0].externalName;
description = slSecuritySchemes.apiKey.queryString[0].description;
content.queryParameters = {};
for (var i in slSecuritySchemes.apiKey.queryString) {
var q = slSecuritySchemes.apiKey.queryString[i];
var keyName = q.name;
content.queryParameters[keyName] = {
type: 'string'
};
}
}
if (!_.isEmpty(content)) {
ramlSecuritySchemes[name || 'apiKey'] = {
type: version === '0.8' ? 'x-api-key' : 'Pass Through',
describedBy: content,
description: description
};
}
=======
ramlSecuritySchemes[externalName] = {
type: 'Pass Through',
describedBy: content,
description: description
};
>>>>>>>
// add query auth
if (!_.isEmpty(slSecuritySchemes.apiKey.queryString)) {
name = slSecuritySchemes.apiKey.queryString[0].externalName;
description = slSecuritySchemes.apiKey.queryString[0].description;
content.queryParameters = {};
for (var i in slSecuritySchemes.apiKey.queryString) {
var q = slSecuritySchemes.apiKey.queryString[i];
var keyName = q.name;
content.queryParameters[keyName] = {
type: 'string'
};
}
}
if (!_.isEmpty(content)) {
ramlSecuritySchemes[name || 'apiKey'] = {
type: version === '0.8' ? 'x-api-key' : 'Pass Through',
describedBy: content,
description: description
};
}
<<<<<<<
if (params && params.properties) {
for(var key in params.properties) {
newParams[key] = ramlHelper.setParameterFields(params.properties[key], {});
if(params.required && params.required.indexOf(key) > -1){
newParams[key].required = true;
}
newParams[key] = jsonHelper.orderByKeys(newParams[key], ['type', 'description']);
=======
for(var key in params.properties) {
if (!params.properties.hasOwnProperty(key)) continue;
newParams[key] = ramlHelper.setParameterFields(params.properties[key], {});
if(params.required && params.required.indexOf(key) > -1){
newParams[key].required = true;
>>>>>>>
if (params && params.properties) {
for(var key in params.properties) {
if (!params.properties.hasOwnProperty(key)) continue;
newParams[key] = ramlHelper.setParameterFields(params.properties[key], {});
if(params.required && params.required.indexOf(key) > -1){
newParams[key].required = true;
}
newParams[key] = jsonHelper.orderByKeys(newParams[key], ['type', 'description']);
<<<<<<<
var resBody = responseData[i];
if (!_.isEmpty(resBody.codes)) {
=======
if (!responseData.hasOwnProperty(i)) continue;
var resBody = responseData[i];
if (!_.isEmpty(resBody.codes)) {
>>>>>>>
if (!responseData.hasOwnProperty(i)) continue;
var resBody = responseData[i];
if (!_.isEmpty(resBody.codes)) {
<<<<<<<
if ((protocols[i].toLowerCase() != 'http') && (protocols[i].toLowerCase() != 'https')) {
// RAML incompatible formats( 'ws' etc)
=======
if (!protocols.hasOwnProperty(i) || ((protocols[i].toLowerCase() != 'http') && (protocols[i].toLowerCase() != 'https'))) {
//RAML incompatible formats( 'ws' etc)
>>>>>>>
if (!protocols.hasOwnProperty(i) || ((protocols[i].toLowerCase() != 'http') && (protocols[i].toLowerCase() != 'https'))) {
//RAML incompatible formats( 'ws' etc)
<<<<<<<
=======
for (var i in slTexts) {
if (!slTexts.hasOwnProperty(i)) continue;
var text = slTexts[i];
>>>>>>>
<<<<<<<
} else if ((typeof val) === 'object') {
if (val.type == 'string') {
if (val.format == 'byte' || val.format == 'binary' || val.format == 'password') {
object[id] = {
type: 'string'
};
}
if (val.format == 'date') {
object[id] = {
type: 'date-only'
};
} else if (val.format == 'date-time') {
object[id] = {
type: 'datetime',
format: 'rfc3339'
};
}
} else {
object[id] = this.convertRefFromModel(val);
}
} else if (id === '$ref') {
object.type = val.replace('#/definitions/', '');
delete object[id];
=======
}
else if (id == 'include') {
object.type = '!include ' + val;
delete object[id];
}
else if ((typeof val) === 'object') {
if (val.type == 'string') {
if (val.format == 'byte' || val.format == 'binary' || val.format == 'password') {
object[id] = {
type: 'string'
};
}
if (val.format == 'date') {
object[id] = {
type: 'date-only'
};
} else if (val.format == 'date-time') {
object[id] = {
type: 'datetime',
format: 'rfc3339'
};
}
} else {
object[id] = this.convertRefFromModel(val);
}
>>>>>>>
} else if (id == 'include') {
object.type = '!include ' + val;
delete object[id];
} else if ((typeof val) === 'object') {
if (val.type == 'string') {
if (val.format == 'byte' || val.format == 'binary' || val.format == 'password') {
object[id] = {
type: 'string'
};
}
if (val.format == 'date') {
object[id] = {
type: 'date-only'
};
} else if (val.format == 'date-time') {
object[id] = {
type: 'datetime',
format: 'rfc3339'
};
}
} else {
object[id] = this.convertRefFromModel(val);
}
} else if (id === '$ref') {
object.type = val.replace('#/definitions/', '');
delete object[id];
<<<<<<<
this.addSchema(ramlDef, this.mapSchema(this.project.Schemas));
ramlDef.traits = this._mapTraits(this.project.Traits, mimeType);
=======
if (this.project.Schemas && this.project.Schemas.length > 0)
this.addSchema(ramlDef, this.mapSchema(this.project.Schemas));
if (this.project.Traits && this.project.Traits.length > 0)
ramlDef.traits = this._mapTraits(this.project.Traits);
>>>>>>>
if (this.project.Schemas && this.project.Schemas.length > 0){
this.addSchema(ramlDef, this.mapSchema(this.project.Schemas));
}
if (this.project.Traits && this.project.Traits.length > 0){
ramlDef.traits = this._mapTraits(this.project.Traits);
} |
<<<<<<<
if (state.data !== newData) {
state.data = newData;
state.listeners.forEach(observer => observer(newData));
}
},
=======
state.data = newData;
state.listeners.forEach(x => x(newData));
}
>>>>>>>
state.data = newData;
state.listeners.forEach(x => x(newData));
},
<<<<<<<
return () => {
state.listeners = state.listeners.filter(
observer => observer !== listener,
);
};
},
=======
return () =>
(state.listeners = state.listeners.filter(x => x !== listener));
}
>>>>>>>
return () => {
state.listeners = state.listeners.filter(x => x !== listener);
};
},
<<<<<<<
getState: (name = null) => {
if (name === null) return { ...globalStore };
=======
getState: name => {
// Error handling
if (typeof name !== "string")
throw new Error("State name must be *type: 'String'*");
>>>>>>>
getState: name => {
// Error handling
if (typeof name !== 'string')
throw new Error("State name must be *type: 'String'*"); |
<<<<<<<
const { Action } = require('../../services/abilities/ability.constants')
const convertSelectObjectToArray = select => {
let propsToSelect = []
Object.keys(select).map(key => {
if (select[key]) {
propsToSelect.push(key)
}
})
return propsToSelect
}
=======
const Tag = require('./../tag/tag')
>>>>>>>
const { Action } = require('../../services/abilities/ability.constants')
const Tag = require('./../tag/tag')
const convertSelectObjectToArray = select => {
let propsToSelect = []
Object.keys(select).map(key => {
if (select[key]) {
propsToSelect.push(key)
}
})
return propsToSelect
} |
<<<<<<<
this.postJSON(this.viewModels[viewModelName].url, "POST", ko.toJSON(data), function (result) {
dotvvm.events.postbackResponseReceived.trigger({});
resolve(function () { return new Promise(function (resolve, reject) {
dotvvm.events.postbackCommitInvoked.trigger({});
var locationHeader = result.getResponseHeader("Location");
var resultObject = locationHeader != null && locationHeader.length > 0 ?
{ action: "redirect", url: locationHeader } :
JSON.parse(result.responseText);
if (!resultObject.viewModel && resultObject.viewModelDiff) {
// TODO: patch (~deserialize) it to ko.observable viewModel
resultObject.viewModel = _this.patch(data.viewModel, resultObject.viewModelDiff);
}
_this.loadResourceList(resultObject.resources, function () {
var isSuccess = false;
if (resultObject.action === "successfulCommand") {
try {
_this.isViewModelUpdating = true;
// remove updated controls
var updatedControls = _this.cleanUpdatedControls(resultObject);
// update the viewmodel
if (resultObject.viewModel) {
ko.delaySync.pause();
_this.serialization.deserialize(resultObject.viewModel, _this.viewModels[viewModelName].viewModel);
ko.delaySync.resume();
}
isSuccess = true;
// remove updated controls which were previously hidden
_this.cleanUpdatedControls(resultObject, updatedControls);
// add updated controls
_this.restoreUpdatedControls(resultObject, updatedControls, true);
}
finally {
_this.isViewModelUpdating = false;
}
dotvvm.events.postbackViewModelUpdated.trigger({});
}
else if (resultObject.action === "redirect") {
// redirect
var promise = _this.handleRedirect(resultObject, viewModelName);
var redirectAfterPostBackArgs = new DotvvmAfterPostBackWithRedirectEventArgs(options, resultObject, resultObject.commandResult, result, promise);
resolve(redirectAfterPostBackArgs);
return;
}
var idFragment = resultObject.resultIdFragment;
if (idFragment) {
if (_this.getSpaPlaceHolder() || location.hash == "#" + idFragment) {
var element = document.getElementById(idFragment);
if (element && "function" == typeof element.scrollIntoView)
element.scrollIntoView(true);
}
else
location.hash = idFragment;
}
// trigger afterPostback event
if (!isSuccess) {
reject(new DotvvmErrorEventArgs(options.sender, viewModel, viewModelName, result, options.postbackId, resultObject));
}
else {
var afterPostBackArgs = new DotvvmAfterPostBackEventArgs(options, resultObject, resultObject.commandResult, result);
resolve(afterPostBackArgs);
}
});
}); });
}, function (xhr) {
=======
completeViewModel = this.serialization.serialize(viewModel, { pathMatcher: function (val) { return context && val == context.$data; } });
// if the viewmodel is cached on the server, send only the diff
if (this.viewModels[viewModelName].viewModelCache) {
data.viewModelDiff = this.diff(this.viewModels[viewModelName].viewModelCache, completeViewModel);
data.viewModelCacheId = this.viewModels[viewModelName].viewModelCacheId;
}
else {
data.viewModel = completeViewModel;
}
errorAction = function (xhr) {
>>>>>>>
completeViewModel = this.serialization.serialize(viewModel, { pathMatcher: function (val) { return context && val == context.$data; } });
// if the viewmodel is cached on the server, send only the diff
if (this.viewModels[viewModelName].viewModelCache) {
data.viewModelDiff = this.diff(this.viewModels[viewModelName].viewModelCache, completeViewModel);
data.viewModelCacheId = this.viewModels[viewModelName].viewModelCacheId;
}
else {
data.viewModel = completeViewModel;
}
errorAction = function (xhr) {
<<<<<<<
=======
// store server-side cached viewmodel
if (resultObject.viewModelCacheId) {
_this.viewModels[viewModelName].viewModelCache = resultObject.viewModel;
}
else {
delete _this.viewModels[viewModelName].viewModelCache;
}
ko.delaySync.pause();
_this.serialization.deserialize(resultObject.viewModel, _this.viewModels[viewModelName].viewModel);
ko.delaySync.resume();
isSuccess = true;
// add updated controls
_this.viewModelObservables[viewModelName](_this.viewModels[viewModelName].viewModel);
_this.restoreUpdatedControls(resultObject, updatedControls, true);
_this.isSpaReady(true);
>>>>>>> |
<<<<<<<
var deepEqual = require('fast-deep-equal');
=======
var componentHelper = require('../ComponentHelper');
var Compressor = require('../Compressor');
var InterpolationBuffer = require('buffered-interpolation');
>>>>>>>
var deepEqual = require('fast-deep-equal');
var InterpolationBuffer = require('buffered-interpolation'); |
<<<<<<<
__webpack_require__(60);
__webpack_require__(67);
=======
__webpack_require__(65);
>>>>>>>
__webpack_require__(65);
<<<<<<<
var physics = __webpack_require__(50);
var NafLogger = __webpack_require__(51);
var Schemas = __webpack_require__(52);
var NetworkEntities = __webpack_require__(53);
var NetworkConnection = __webpack_require__(55);
var AdapterFactory = __webpack_require__(56);
=======
var NafLogger = __webpack_require__(50);
var Schemas = __webpack_require__(51);
var NetworkEntities = __webpack_require__(52);
var NetworkConnection = __webpack_require__(54);
var AdapterFactory = __webpack_require__(55);
>>>>>>>
var NafLogger = __webpack_require__(50);
var Schemas = __webpack_require__(51);
var NetworkEntities = __webpack_require__(52);
var NetworkConnection = __webpack_require__(54);
var AdapterFactory = __webpack_require__(55);
<<<<<<<
naf.version = "0.4.0";
=======
naf.version = "0.4.0";
>>>>>>>
naf.version = "0.4.0";
<<<<<<<
=======
}, {
key: "disconnect",
value: function disconnect() {
this.easyrtc.disconnect();
}
>>>>>>>
}, {
key: "disconnect",
value: function disconnect() {
this.easyrtc.disconnect();
}
<<<<<<<
var _this2 = this;
=======
var _this2 = this;
>>>>>>>
var _this = this;
<<<<<<<
this.waitForTemplate(function () {
_this2.networkUpdate(entityData);
});
},
waitForTemplate: function waitForTemplate(callback) {
=======
this.waitForTemplate(function () {
_this2.networkUpdate(entityData);
});
},
waitForTemplate: function waitForTemplate(callback) {
>>>>>>>
this.waitForTemplate(function () {
_this.networkUpdate(entityData);
});
},
waitForTemplate: function waitForTemplate(callback) {
<<<<<<<
var deepEqual = __webpack_require__(62);
=======
var deepEqual = __webpack_require__(61);
>>>>>>>
var deepEqual = __webpack_require__(61);
<<<<<<<
var objectKeys = __webpack_require__(63);
var isArguments = __webpack_require__(64);
=======
var objectKeys = __webpack_require__(62);
var isArguments = __webpack_require__(63);
>>>>>>>
var objectKeys = __webpack_require__(62);
var isArguments = __webpack_require__(63); |
<<<<<<<
this.loggedIn = false;
this.onLoggedInEvent = new Event('loggedIn');
this.onPeerConnectedEvent = new Event('clientConnected');
this.onPeerDisconnectedEvent = new Event('clientDisconnected');
this.onDCOpenEvent = new Event('dataChannelOpened');
this.onDCCloseEvent = new Event('dataChannelClosed');
=======
this.connected = false;
this.onConnectedEvent = new Event('connected');
>>>>>>>
this.connected = false;
this.onConnectedEvent = new Event('connected');
this.onPeerConnectedEvent = new Event('clientConnected');
this.onPeerDisconnectedEvent = new Event('clientDisconnected');
this.onDCOpenEvent = new Event('dataChannelOpened');
this.onDCCloseEvent = new Event('dataChannelClosed');
<<<<<<<
this.network.closeStreamConnection(id);
document.body.dispatchEvent(this.onPeerDisconnectedEvent);
=======
this.adapter.closeStreamConnection(id);
>>>>>>>
this.adapter.closeStreamConnection(id);
document.body.dispatchEvent(this.onPeerDisconnectedEvent);
<<<<<<<
this.network.startStreamConnection(id);
document.body.dispatchEvent(this.onPeerConnectedEvent);
=======
this.adapter.startStreamConnection(id);
>>>>>>>
this.adapter.startStreamConnection(id);
document.body.dispatchEvent(this.onPeerConnectedEvent);
<<<<<<<
dcCloseListener(id) {
NAF.log.write('Closed data channel from ' + id);
this.dcIsActive[id] = false;
this.entities.removeEntitiesFromUser(id);
document.body.dispatchEvent(this.onDCCloseEvent);
=======
messageChannelClosed(client) {
NAF.log.write('Closed message channel from ' + client);
this.activeMessageChannels[client] = false;
this.entities.removeEntitiesFromUser(client);
>>>>>>>
messageChannelClosed(client) {
NAF.log.write('Closed message channel from ' + client);
this.activeMessageChannels[client] = false;
this.entities.removeEntitiesFromUser(client);
document.body.dispatchEvent(this.onDCCloseEvent); |
<<<<<<<
import { editParcel } from 'modules/parcels/actions'
=======
import { editParcel } from 'actions'
import { getWallet, isLoading, isError } from 'modules/wallet/reducer'
>>>>>>>
import { editParcel } from 'modules/parcels/actions'
import { getWallet, isLoading, isError } from 'modules/wallet/reducer' |
<<<<<<<
import D3ChoroplethExample from './components/example-d3Choropleth';
=======
import ChoroplethExample from './components/example-choropleth';
import IntroManagerExample from './components/example-introManager.jsx';
import ItemSelectorExample from './components/example-itemSelector.jsx';
import LeafletChoropleth from './components/example-leafletChoropleth.jsx';
>>>>>>>
import D3ChoroplethExample from './components/example-d3Choropleth';
import IntroManagerExample from './components/example-introManager.jsx';
import ItemSelectorExample from './components/example-itemSelector.jsx';
import LeafletChoropleth from './components/example-leafletChoropleth.jsx';
<<<<<<<
<D3ChoroplethExample />
=======
<ChoroplethExample />
<h2>IntroManager</h2>
<IntroManagerExample />
<h2>ItemSelector</h2>
<ItemSelectorExample { ...this.state.itemSelector } />
>>>>>>>
<D3ChoroplethExample />
<h2>IntroManager</h2>
<IntroManagerExample />
<h2>ItemSelector</h2>
<ItemSelectorExample { ...this.state.itemSelector } /> |
<<<<<<<
if (!scriptWindow) {
const mainWindowPos = mainWindow.getPosition();
scriptWindow = new BrowserWindow({
frame: false,
// titleBarStyle: 'hidden',
width: 400,
height: 600,
// minHeight: 680,
backgroundColor: '#b5beda',
// show: false,
x: mainWindowPos[0] + 960,
y: mainWindowPos[1],
});
// ge tried to fix white flash but failed
// mainWindow.on('ready-to-show', function() {
// mainWindow.show();
// mainWindow.focus();
// });
scriptWindow.loadURL(
// isDev ? 'http://localhost:3000' :
`file://${path.join(__dirname, './../public/script.html')}`,
);
// ge commented it out just to test
scriptWindow.on('closed', () => scriptWindow = null);
// mainWindow.focus();
=======
scriptWindow = new BrowserWindow({
frame: false,
// titleBarStyle: 'hidden',
width: 380,
height: 480,
// minHeight: 680,
backgroundColor: '#b5beda',
alwaysOnTop: true,
// show: false,
});
// ge tried to fix white flash but failed
// mainWindow.on('ready-to-show', function() {
// mainWindow.show();
// mainWindow.focus();
// });
scriptWindow.loadURL(
// isDev ? 'http://localhost:3000' :
`file://${path.join(__dirname, './../public/script.html')}`,
);
// ge commented it out just to test
scriptWindow.on('closed', () => mainWindow = null);
>>>>>>>
if (!scriptWindow) {
const mainWindowPos = mainWindow.getPosition();
scriptWindow = new BrowserWindow({
frame: false,
// titleBarStyle: 'hidden',
width: 400,
height: 600,
// minHeight: 680,
backgroundColor: '#b5beda',
// show: false,
x: mainWindowPos[0] + 960,
y: mainWindowPos[1],
alwaysOnTop: true,
});
// ge tried to fix white flash but failed
// mainWindow.on('ready-to-show', function() {
// mainWindow.show();
// mainWindow.focus();
// });
scriptWindow.loadURL(
// isDev ? 'http://localhost:3000' :
`file://${path.join(__dirname, './../public/script.html')}`,
);
// ge commented it out just to test
scriptWindow.on('closed', () => scriptWindow = null);
// mainWindow.focus(); |
<<<<<<<
path: ["302"]
=======
pieces: ["302"]
},
getJSON: {
method: "GET",
pieces: ["JSON"]
>>>>>>>
path: ["302"]
},
getJSON: {
method: "GET",
path: ["JSON"] |
<<<<<<<
dbot.db.imgur.totalImages += 1;
callback(testUrl, testSlug);
=======
this.db.totalImages += 1;
var hash = crypto.createHash('md5').update(body).digest("hex");
callback(testUrl, testSlug,hash);
>>>>>>>
dbot.db.imgur.totalImages += 1;
var hash = crypto.createHash('md5').update(body).digest("hex");
callback(testUrl, testSlug,hash); |
<<<<<<<
_.each(moduleNames, function(name) {
=======
moduleNames.each(function(name) {
this.status[name] = true;
>>>>>>>
_.each(moduleNames, function(name) {
this.status[name] = true; |
<<<<<<<
var http = require('http');
var https = require("https");
var express = require('express');
var request = require('request');
var fs = require('fs');
var unzip = require('unzip');
=======
/* eslint "no-warning-comments": [1, { "terms": ["todo","fixme"] }] */
const http = require('http');
const fs = require('fs');
const os = require('os');
const unzip = require('unzip');
const express = require('express');
const request = require('request');
const diskspace = require('diskspace');
let config;
>>>>>>>
/* eslint "no-warning-comments": [1, { "terms": ["todo","fixme"] }] */
const http = require('http');
const https = require('https');
const fs = require('fs');
const os = require('os');
const unzip = require('unzip');
const express = require('express');
const request = require('request');
const diskspace = require('diskspace');
let config;
<<<<<<<
var agent_port = config.agent_port;
var app = express();
var bodyParser = require('body-parser');
=======
const port = config.agent_port;
const app = express();
const bodyParser = require('body-parser');
>>>>>>>
const agent_port = config.agent_port;
const app = express();
const bodyParser = require('body-parser');
<<<<<<<
if ( config.ssl && config.ssl_cert && config.ssl_key ) {
var ssl_options = {
cert: fs.readFileSync(config.ssl_cert),
key: fs.readFileSync(config.ssl_key)
}
var server = https.createServer(ssl_options, app);
console.log("SSL Agent API enabled");
} else {
var server = http.createServer(app);
console.log("Non-SSL Agent API enabled");
}
var os = require('os');
=======
const server = http.createServer(app);
>>>>>>>
if ( config.ssl && config.ssl_cert && config.ssl_key ) {
const ssl_options = {
cert: fs.readFileSync(config.ssl_cert),
key: fs.readFileSync(config.ssl_key)
}
const server = https.createServer(ssl_options, app);
console.log("SSL Agent API enabled");
} else {
const server = http.createServer(app);
console.log("Non-SSL Agent API enabled");
}
var os = require('os');
<<<<<<<
var options = {
if ( config.ssl ){
host: "https://" + config.web_connect
} else {
host: "http://" + config.web_connect
},
=======
const options = {
host: config.web_connect,
>>>>>>>
const options = {
host: config.web_connect,
<<<<<<<
var options = {
if ( config.ssl ){
url: "https://" + vip_slave + ':' + agent_port + '/pong'
} else {
url: "http://" + vip_slave + ':' + agent_port + '/pong'
},
=======
const options = {
url: 'http://' + vip_slave + ':' + port + '/pong',
>>>>>>>
var options = {
if ( config.ssl ){
url: "https://" + vip_slave + ':' + agent_port + '/pong'
} else {
url: "http://" + vip_slave + ':' + agent_port + '/pong'
},
<<<<<<<
server.listen(agent_port, function() {
console.log('Listening on port %d', agent_port);
=======
server.listen(port, () => {
console.log('Listening on port %d', port);
>>>>>>>
server.listen(agent_port, () => {
console.log('Listening on port %d', agent_port); |
<<<<<<<
os_type: (os_type === '') ? os.platform() : os_type,
disk_percentage
=======
os_type: os.platform,
disk_percentage,
running_containers: running_containers
>>>>>>>
os_type: (os_type === '') ? os.platform() : os_type,
disk_percentage
disk_percentage,
running_containers: running_containers |
<<<<<<<
=======
function containerDetails() {
setTimeout(() => {
total_containers = 0;
Object.keys(config.layout).forEach((get_node, i) => {
Object.keys(config.layout[i]).forEach(key => {
if ((!config.layout[i].hasOwnProperty(key) || key.indexOf('node') > -1)) {
return;
}
total_containers++;
});
});
containerDetails();
}, 15000);
}
app.get('/status', (req, res) => {
const check_token = req.query.token;
if ((check_token !== token) || (!check_token)) {
res.end('\nError: Invalid Credentials');
} else {
const command = JSON.stringify({
command: 'hostname;docker container ps;node -e \'const getos = require("picluster-getos");getos(function(e,os){var dist = (e) ? "" : os.dist || os.os;console.log("Dist: " + dist);})\'',
token
});
for (let i = 0; i < config.layout.length; i++) {
const node = config.layout[i].node;
//Runs a command on each node
const options = {
if ( config.ssl ){
url: "https://" + node + ':' + agent_port + '/run'
} else {
url: "http://" + node + ':' + agent_port + '/run'
},
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': command.length
},
body: command
};
request(options, (error, response) => {
if (error) {
res.end('An error has occurred.');
} else {
const results = JSON.parse(response.body);
addLog('\nNode: ' + results.output);
}
});
}
res.end('');
}
});
>>>>>>>
<<<<<<<
=======
app.get('/images', (req, res) => {
const check_token = req.query.token;
if ((check_token !== token) || (!check_token)) {
res.end('\nError: Invalid Credentials');
} else {
const command = JSON.stringify({
command: 'hostname;docker image list;node -e \'const getos = require("picluster-getos");getos(function(e,os){var dist = (e) ? "" : os.dist || os.os;console.log("Dist: " + dist);})\';',
token
});
for (let i = 0; i < config.layout.length; i++) {
const node = config.layout[i].node;
//Runs a command on each node
const options = {
if ( config.ssl ){
url: "https://" + node + ':' + agent_port + '/run'
} else {
url: "http://" + node + ':' + agent_port + '/run'
},
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': command.length
},
body: command
};
request(options, (error, response) => {
if (error) {
res.end('An error has occurred.');
} else {
const results = JSON.parse(response.body);
addLog('\nNode: ' + results.output);
}
});
}
res.end(log);
}
});
>>>>>>>
<<<<<<<
server.listen(port, () => {
console.log('Listening on port %d', port);
=======
containerDetails();
server.listen(server_port, () => {
console.log('Listening on port %d', server_port);
>>>>>>>
containerDetails();
server.listen(server_port, () => {
console.log('Listening on port %d', server_port); |
<<<<<<<
// Configuration of RequireJS:
//
require.config({
baseUrl: './',
waitSeconds: 30, // default: 7 seconds
paths: {
'css': 'dependencies/css',
'jquery': 'dependencies/jquery',
'compatibility': 'lib/compatibility',
'jquery-ui': 'dependencies/jquery-ui',
'strftime': 'dependencies/strftime',
'jquery.ui.touch-punch': 'dependencies/jquery.ui.touch-punch',
'jquery.svg.min': 'dependencies/jquery.svg.min',
'cometvisu-client': 'lib/cometvisu-client',
'iconhandler': 'lib/iconhandler',
'pagehandler': 'lib/pagehandler',
'pagepartshandler': 'lib/pagepartshandler',
'trick-o-matic': 'lib/trick-o-matic',
'_common': 'structure/pure/_common',
'structure_custom': 'config/structure_custom',
'widget_break': 'structure/pure/break',
'widget_designtoggle': 'structure/pure/designtoggle',
'widget_group': 'structure/pure/group',
'widget_rgb': 'structure/pure/rgb',
'widget_web': 'structure/pure/web',
'widget_image': 'structure/pure/image',
'widget_imagetrigger': 'structure/pure/imagetrigger',
'widget_include': 'structure/pure/include',
'widget_info': 'structure/pure/info',
'widget_infoaction': 'structure/pure/infoaction',
'widget_infotrigger': 'structure/pure/infotrigger',
'widget_line': 'structure/pure/line',
'widget_multitrigger': 'structure/pure/multitrigger',
'widget_navbar': 'structure/pure/navbar',
'widget_page': 'structure/pure/page',
'widget_pagejump': 'structure/pure/pagejump',
'widget_refresh': 'structure/pure/refresh',
'widget_reload': 'structure/pure/reload',
'widget_slide': 'structure/pure/slide',
'widget_switch': 'structure/pure/switch',
'widget_text': 'structure/pure/text',
'widget_toggle': 'structure/pure/toggle',
'widget_trigger': 'structure/pure/trigger',
'widget_pushbutton': 'structure/pure/pushbutton',
'widget_urltrigger': 'structure/pure/urltrigger',
'widget_unknown': 'structure/pure/unknown',
'widget_audio': 'structure/pure/audio',
'widget_video': 'structure/pure/video',
'widget_wgplugin_info': 'structure/pure/wgplugin_info',
'transform_default': 'transforms/transform_default',
'transform_knx': 'transforms/transform_knx',
'transform_oh': 'transforms/transform_oh'
},
'shim': {
'jquery-ui': ['jquery'],
'jquery.ui.touch-punch': ['jquery', 'jquery-ui'],
'jquery.svg.min': ['jquery'],
/*
'': ['jquery'],
'jquery-i18n': ['jquery'],
'superfish': ['jquery']
*/
}
});
///////////////////////////////////////////////////////////////////////
//
=======
>>>>>>>
<<<<<<<
var templateEngine;
require([
'jquery', '_common', 'structure_custom', 'trick-o-matic', 'pagehandler', 'pagepartshandler',
'cometvisu-client',
'compatibility', 'jquery-ui', 'strftime',
=======
define([
'jquery', '_common', 'structure_custom', 'trick-o-matic', 'pagepartshandler',
'cometvisu-client', 'cometvisu-mockup',
'compatibility', 'jquery-ui', 'strftime', 'scrollable',
>>>>>>>
define([
'jquery', '_common', 'structure_custom', 'trick-o-matic', 'pagehandler', 'pagepartshandler',
'cometvisu-client', 'cometvisu-mockup',
'compatibility', 'jquery-ui', 'strftime',
<<<<<<<
], function( $, design, VisuDesign_Custom, Trick_O_Matic, PageHandler, PagePartsHandler, CometVisu ) {
=======
], function( $, design, VisuDesign_Custom, Trick_O_Matic, PagePartsHandler, CometVisu, ClientMockup ) {
>>>>>>>
], function( $, design, VisuDesign_Custom, Trick_O_Matic, PageHandler, PagePartsHandler, CometVisu, ClientMockup ) {
<<<<<<<
profileCV( 'templateEngine start' );
templateEngine = new TemplateEngine();
$(window).bind('resize', templateEngine.handleResize);
$(window).on( 'unload', function() {
if( templateEngine.visu ) templateEngine.visu.stop();
});
$(document).ready(function() {
function configError(textStatus, additionalErrorInfo) {
var configSuffix = (templateEngine.configSuffix ? templateEngine.configSuffix : '');
var message = 'Config-File Error!<br/>';
switch (textStatus) {
case 'parsererror':
message += 'Invalid config file!<br/><a href="check_config.php?config=' + configSuffix + '">Please check!</a>';
break;
case 'libraryerror':
var link = window.location.href;
if (link.indexOf('?') <= 0) {
link = link + '?';
}
link = link + '&libraryCheck=false';
message += 'Config file has wrong library version!<br/>' +
'This can cause problems with your configuration</br>' +
'<p>You can run the <a href="./upgrade/index.php?config=' + configSuffix + '">Configuration Upgrader</a>.</br>' +
'Or you can start without upgrading <a href="' + link + '">with possible configuration problems</a>.</p>';
break;
case 'filenotfound':
message += '404: Config file not found. Neither as normal config ('
+ additionalErrorInfo[0] + ') nor as demo config ('
+ additionalErrorInfo[1] + ').';
break;
default:
message += 'Unhandled error of type "' + textStatus + '"';
if( additionalErrorInfo )
message += ': ' + additionalErrorInfo;
else
message += '.';
}
message += '<br/><br/><a href="">Retry</a>';
$('#loading').html(message);
};
// get the data once the page was loaded
var ajaxRequest = {
noDemo: true,
url : 'config/visu_config'+ (templateEngine.configSuffix ? '_' + templateEngine.configSuffix : '') + '.xml',
cache : !templateEngine.forceReload,
success : function(xml, textStatus, jqXHR) {
if (!xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length) {
configError("parsererror");
}
else {
// check the library version
var xmlLibVersion = $('pages', xml).attr("lib_version");
if (xmlLibVersion == undefined) {
xmlLibVersion = -1;
}
if (templateEngine.libraryCheck && xmlLibVersion < templateEngine.libraryVersion) {
configError("libraryerror");
}
else {
var $loading = $('#loading');
$loading.html( $loading.text().trim() + '.' );
// load backend header
if (jqXHR.getResponseHeader("X-CometVisu-Backend-LoginUrl")) {
templateEngine.backendUrl = jqXHR.getResponseHeader("X-CometVisu-Backend-LoginUrl");
}
if (jqXHR.getResponseHeader("X-CometVisu-Backend-Name")) {
templateEngine.backend = jqXHR.getResponseHeader("X-CometVisu-Backend-Name");
}
templateEngine.parseXML(xml);
}
}
},
error : function(jqXHR, textStatus, errorThrown) {
if( 404 === jqXHR.status && ajaxRequest.noDemo )
{
var $loading = $('#loading');
$loading.html( $loading.text().trim() + '!' );
ajaxRequest.noDemo = false;
ajaxRequest.origUrl = ajaxRequest.url;
ajaxRequest.url = ajaxRequest.url.replace('config/','demo/');
$.ajax( ajaxRequest );
return;
}
else if( 404 === jqXHR.status )
configError( "filenotfound", [ajaxRequest.origUrl, ajaxRequest.url] );
else
configError( textStatus, errorThrown );
},
dataType : 'xml'
};
$.ajax( ajaxRequest );
});
=======
var instance;
>>>>>>>
var instance; |
<<<<<<<
// global var
=======
///////////////////////////////////////////////////////////////////////
//
// Configuration of RequireJS:
//
require.config({
baseUrl: './',
waitSeconds: 30, // default: 7 seconds
paths: {
'css': 'dependencies/css',
'jquery': 'dependencies/jquery',
'compatibility': 'lib/compatibility',
'jquery-ui': 'dependencies/jquery-ui',
'strftime': 'dependencies/strftime',
'scrollable': 'dependencies/scrollable',
'jquery.ui.touch-punch': 'dependencies/jquery.ui.touch-punch',
'jquery.svg.min': 'dependencies/jquery.svg.min',
'cometvisu-client': 'lib/cometvisu-client',
'iconhandler': 'lib/iconhandler',
'pagepartshandler': 'lib/pagepartshandler',
'trick-o-matic': 'lib/trick-o-matic',
'_common': 'structure/pure/_common',
'structure_custom': 'config/structure_custom',
'widget_break': 'structure/pure/break',
'widget_designtoggle': 'structure/pure/designtoggle',
'widget_group': 'structure/pure/group',
'widget_rgb': 'structure/pure/rgb',
'widget_web': 'structure/pure/web',
'widget_image': 'structure/pure/image',
'widget_imagetrigger': 'structure/pure/imagetrigger',
'widget_include': 'structure/pure/include',
'widget_info': 'structure/pure/info',
'widget_infoaction': 'structure/pure/infoaction',
'widget_infotrigger': 'structure/pure/infotrigger',
'widget_line': 'structure/pure/line',
'widget_multitrigger': 'structure/pure/multitrigger',
'widget_navbar': 'structure/pure/navbar',
'widget_page': 'structure/pure/page',
'widget_pagejump': 'structure/pure/pagejump',
'widget_refresh': 'structure/pure/refresh',
'widget_reload': 'structure/pure/reload',
'widget_slide': 'structure/pure/slide',
'widget_switch': 'structure/pure/switch',
'widget_text': 'structure/pure/text',
'widget_toggle': 'structure/pure/toggle',
'widget_trigger': 'structure/pure/trigger',
'widget_pushbutton': 'structure/pure/pushbutton',
'widget_urltrigger': 'structure/pure/urltrigger',
'widget_unknown': 'structure/pure/unknown',
'widget_audio': 'structure/pure/audio',
'widget_video': 'structure/pure/video',
'widget_wgplugin_info': 'structure/pure/wgplugin_info',
'transform_default': 'transforms/transform_default',
'transform_knx': 'transforms/transform_knx',
'transform_oh': 'transforms/transform_oh'
},
'shim': {
'scrollable': ['jquery'],
'jquery-ui': ['jquery'],
'jquery.ui.touch-punch': ['jquery', 'jquery-ui'],
'jquery.svg.min': ['jquery'],
/*
'': ['jquery'],
'jquery-i18n': ['jquery'],
'superfish': ['jquery']
*/
}
});
///////////////////////////////////////////////////////////////////////
//
// Main:
//
>>>>>>>
///////////////////////////////////////////////////////////////////////
//
// Main:
//
<<<<<<<
define( [
'jquery', '_common', 'structure_custom', 'trick-o-matic', 'pagepartshandler',
'cometvisu-client', 'cometvisu-mockup', 'cometvisu-client-openhab',
'compatibility', 'jquery-ui', 'strftime', 'scrollable',
'jquery.ui.touch-punch', 'jquery.svg.min', 'iconhandler',
=======
require([
'jquery', '_common', 'structure_custom', 'trick-o-matic', 'pagepartshandler',
'cometvisu-client',
'compatibility', 'jquery-ui', 'strftime', 'scrollable',
'jquery.ui.touch-punch', 'jquery.svg.min', 'iconhandler',
>>>>>>>
require([
'jquery', '_common', 'structure_custom', 'trick-o-matic', 'pagepartshandler',
'cometvisu-client',
'compatibility', 'jquery-ui', 'strftime', 'scrollable',
'jquery.ui.touch-punch', 'jquery.svg.min', 'iconhandler', |
<<<<<<<
var apiUrl = 'https://api.github.com/repos/' + user + '/' + repo + '/tags';
=======
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo + '/tags';
// Using our OAuth App secret grants us 5000 req/hour
// instead of the standard 60 req/hour.
if (serverSecrets) {
apiUrl += '?client_id=' + serverSecrets.gh_client_id
+ '&client_secret=' + serverSecrets.gh_client_secret;
}
>>>>>>>
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo + '/tags';
<<<<<<<
var apiUrl = 'https://api.github.com/repos/' + user + '/' + repo + '/releases/latest';
=======
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo + '/releases/latest';
// Using our OAuth App secret grants us 5000 req/hour
// instead of the standard 60 req/hour.
if (serverSecrets) {
apiUrl += '?client_id=' + serverSecrets.gh_client_id
+ '&client_secret=' + serverSecrets.gh_client_secret;
}
>>>>>>>
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo + '/releases/latest';
<<<<<<<
var apiUrl = 'https://api.github.com/repos/' + user + '/' + repo + '/compare/' + version + '...master';
=======
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo + '/compare/' + version + '...master';
// Using our OAuth App secret grants us 5000 req/hour
// instead of the standard 60 req/hour.
if (serverSecrets) {
apiUrl += '?client_id=' + serverSecrets.gh_client_id
+ '&client_secret=' + serverSecrets.gh_client_secret;
}
>>>>>>>
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo + '/compare/' + version + '...master';
<<<<<<<
var isPR = !!match[1];
var isClosed = !!match[2];
var isRaw = !!match[3];
var user = match[4]; // eg, badges
var repo = match[5]; // eg, shields
var ghLabel = match[6]; // eg, website
var format = match[7];
var apiUrl = 'https://api.github.com/';
=======
var isRaw = !!match[1];
var user = match[2]; // eg, badges
var repo = match[3]; // eg, shields
var ghLabel = match[4]; // eg, website
var format = match[5];
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo;
var issuesApi = false; // Are we using the issues API instead of the repo one?
>>>>>>>
var isPR = !!match[1];
var isClosed = !!match[2];
var isRaw = !!match[3];
var user = match[4]; // eg, badges
var repo = match[5]; // eg, shields
var ghLabel = match[6]; // eg, website
var format = match[7];
var apiUrl = githubApiUrl;
<<<<<<<
var apiUrl = 'https://api.github.com/repos/' + user + '/' + repo;
=======
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo;
// Using our OAuth App secret grants us 5000 req/hour
// instead of the standard 60 req/hour.
if (serverSecrets) {
apiUrl += '?client_id=' + serverSecrets.gh_client_id
+ '&client_secret=' + serverSecrets.gh_client_secret;
}
>>>>>>>
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo;
<<<<<<<
var apiUrl = 'https://api.github.com/repos/' + user + '/' + repo;
=======
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo;
// Using our OAuth App secret grants us 5000 req/hour
// instead of the standard 60 req/hour.
if (serverSecrets) {
apiUrl += '?client_id=' + serverSecrets.gh_client_id
+ '&client_secret=' + serverSecrets.gh_client_secret;
}
>>>>>>>
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo;
<<<<<<<
var apiUrl = 'https://api.github.com/repos/' + user + '/' + repo;
=======
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo;
// Using our OAuth App secret grants us 5000 req/hour
// instead of the standard 60 req/hour.
if (serverSecrets) {
apiUrl += '?client_id=' + serverSecrets.gh_client_id
+ '&client_secret=' + serverSecrets.gh_client_secret;
}
>>>>>>>
var apiUrl = githubApiUrl + '/repos/' + user + '/' + repo;
<<<<<<<
var apiUrl = 'https://api.github.com/users/' + user;
=======
var apiUrl = githubApiUrl + '/users/' + user;
// Using our OAuth App secret grants us 5000 req/hour
// instead of the standard 60 req/hour.
if (serverSecrets) {
apiUrl += '?client_id=' + serverSecrets.gh_client_id
+ '&client_secret=' + serverSecrets.gh_client_secret;
}
>>>>>>>
var apiUrl = githubApiUrl + '/users/' + user; |
<<<<<<<
import UserProfile from "./UserProfile";
=======
import Payment from "./Payment";
>>>>>>>
import UserProfile from "./UserProfile";
import Payment from "./Payment";
<<<<<<<
<Route exact path="/UserProfile">
<UserProfile />
</Route>
=======
<Route exact path="/payment">
<Payment />
</Route>
>>>>>>>
<Route exact path="/UserProfile">
<UserProfile />
</Route>
<Route exact path="/payment">
<Payment />
</Route> |
<<<<<<<
that.parent;
// Get my papa or set it
that.getPapa = function(conf){
if (ui.instances.forms.length > 0) {
for(var i = 0, j = ui.instances.forms.length; i < j; i ++){
if(ui.instances.forms[i].element === $(conf.element).parents("form")[0]){
that.parent = ui.instances.forms[i]; // Get my papa
that.parent.children.push(conf.publish); // Add me to my papa
}
};
} else {
$(conf.element).parents("form").forms();
var last = (ui.instances.forms.length - 1);
that.parent = ui.instances.forms[last]; // Set my papa
that.parent.children.push(conf.publish); // Add me to my papa
};
};
=======
// Check chaining validations
(function(){
});
// And() Concatenate the validations on this Watcher return trigger element
that.and = function(conf) {
return $(conf.element);
};
that.isEmpty = function(conf){
conf.tag = ($(conf.element).hasClass("options")) ? "OPTIONS" : conf.element.tagName;
switch(conf.tag){
case 'OPTIONS':
return $(conf.publish.element).find('input:checked').length == 0;
break;
case 'SELECT':
return $(conf.publish.element).val() == -1; // TODO: Revisar el estandar de <select>
break;
case 'INPUT':
case 'TEXTAREA':
return $.trim( $(conf.publish.element).val() ).length == 0;
break;
};
};
>>>>>>>
that.parent;
// Get my papa or set it
that.getPapa = function(conf){
if (ui.instances.forms.length > 0) {
for(var i = 0, j = ui.instances.forms.length; i < j; i ++){
if(ui.instances.forms[i].element === $(conf.element).parents("form")[0]){
that.parent = ui.instances.forms[i]; // Get my papa
that.parent.children.push(conf.publish); // Add me to my papa
}
};
} else {
$(conf.element).parents("form").forms();
var last = (ui.instances.forms.length - 1);
that.parent = ui.instances.forms[last]; // Set my papa
that.parent.children.push(conf.publish); // Add me to my papa
};
};
// Check chaining validations
(function(){
});
// And() Concatenate the validations on this Watcher return trigger element
that.and = function(conf) {
return $(conf.element);
};
that.isEmpty = function(conf){
conf.tag = ($(conf.element).hasClass("options")) ? "OPTIONS" : conf.element.tagName;
switch(conf.tag){
case 'OPTIONS':
return $(conf.publish.element).find('input:checked').length == 0;
break;
case 'SELECT':
return $(conf.publish.element).val() == -1; // TODO: Revisar el estandar de <select>
break;
case 'INPUT':
case 'TEXTAREA':
return $.trim( $(conf.publish.element).val() ).length == 0;
break;
};
}; |
<<<<<<<
"src/shared/js/onImagesLoads.js",
"src/shared/js/Component.js",
"src/shared/js/Form.js",
"src/shared/js/Condition.js",
"src/shared/js/Validation.js",
"src/ui/js/Validation.js",
"src/shared/js/Expandable.js",
"src/shared/js/Menu.js",
"src/shared/js/Popover.js",
"src/ui/js/Popover.js",
"src/shared/js/Layer.js",
"src/shared/js/Tooltip.js",
"src/shared/js/Bubble.js",
"src/shared/js/Modal.js",
"src/shared/js/Transition.js",
"src/ui/js/Zoom.js",
"src/shared/js/Calendar.js",
"src/shared/js/Dropdown.js",
"src/ui/js/Dropdown.js",
"src/ui/js/Tabs.js",
"src/shared/js/Carousel.js",
"src/shared/js/Countdown.js",
"src/ui/js/Datepicker.js",
"src/shared/js/Autocomplete.js",
"src/ui/js/Autocomplete.js"
=======
"src/shared/scripts/onImagesLoads.js",
"src/shared/scripts/Component.js",
"src/shared/scripts/Form.js",
"src/shared/scripts/Condition.js",
"src/shared/scripts/Validation.js",
"src/ui/scripts/Validation.js",
"src/shared/scripts/String.js",
"src/shared/scripts/MaxLength.js",
"src/shared/scripts/MinLength.js",
"src/shared/scripts/Email.js",
"src/shared/scripts/URL.js",
"src/shared/scripts/Number.js",
"src/shared/scripts/Min.js",
"src/shared/scripts/Max.js",
"src/shared/scripts/Custom.js",
"src/shared/scripts/Required.js",
"src/shared/scripts/Expandable.js",
"src/shared/scripts/Menu.js",
"src/shared/scripts/Popover.js",
"src/ui/scripts/Popover.js",
"src/shared/scripts/Layer.js",
"src/shared/scripts/Tooltip.js",
"src/shared/scripts/Bubble.js",
"src/shared/scripts/Modal.js",
"src/shared/scripts/Transition.js",
"src/ui/scripts/Zoom.js",
"src/shared/scripts/Calendar.js",
"src/shared/scripts/Dropdown.js",
"src/ui/scripts/Dropdown.js",
"src/ui/scripts/Tabs.js",
"src/shared/scripts/Carousel.js",
"src/shared/scripts/Countdown.js",
"src/ui/scripts/Datepicker.js",
"src/shared/scripts/Autocomplete.js",
"src/ui/scripts/Autocomplete.js"
>>>>>>>
"src/shared/scripts/onImagesLoads.js",
"src/shared/scripts/Component.js",
"src/shared/scripts/Form.js",
"src/shared/scripts/Condition.js",
"src/shared/scripts/Validation.js",
"src/ui/scripts/Validation.js",
"src/shared/scripts/Expandable.js",
"src/shared/scripts/Menu.js",
"src/shared/scripts/Popover.js",
"src/ui/scripts/Popover.js",
"src/shared/scripts/Layer.js",
"src/shared/scripts/Tooltip.js",
"src/shared/scripts/Bubble.js",
"src/shared/scripts/Modal.js",
"src/shared/scripts/Transition.js",
"src/ui/scripts/Zoom.js",
"src/shared/scripts/Calendar.js",
"src/shared/scripts/Dropdown.js",
"src/ui/scripts/Dropdown.js",
"src/ui/scripts/Tabs.js",
"src/shared/scripts/Carousel.js",
"src/shared/scripts/Countdown.js",
"src/ui/scripts/Datepicker.js",
"src/shared/scripts/Autocomplete.js",
"src/ui/scripts/Autocomplete.js" |
<<<<<<<
},
// Grab the vendor prefix of the current browser
// Based on: http://lea.verou.me/2009/02/find-the-vendor-prefix-of-the-current-browser/
"VENDOR_PREFIX": (function () {
var regex = /^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,
styleDeclaration = document.getElementsByTagName("script")[0].style;
for (var prop in styleDeclaration) {
if (regex.test(prop)) {
return prop.match(regex)[0].toLowerCase();
}
}
// Nothing found so far? Webkit does not enumerate over the CSS properties of the style object.
// However (prop in style) returns the correct value, so we'll have to test for
// the precence of a specific property
if ("WebkitOpacity" in styleDeclaration) { return "webkit"; }
if ("KhtmlOpacity" in styleDeclaration) { return "khtml"; }
return "";
}())
=======
}
}
};
/**
* Chico UI global events reference.
* @name Events
* @class Events
* @memberOf ch
* @static
*/
ch.events = {
/**
* Layout event collection.
* @name LAYOUT
* @public
* @static
* @constant
* @type object
* @memberOf ch.Events
*/
LAYOUT: {
/**
* Every time Chico-UI needs to inform al visual components that layout has been changed, he triggers this event.
* @name CHANGE
* @memberOf ch.Events.LAYOUT
* @public
* @type string
* @constant
* @see ch.Form
* @see ch.Layer
* @see ch.Tooltip
* @see ch.Helper
*/
CHANGE: "change"
>>>>>>>
},
// Grab the vendor prefix of the current browser
// Based on: http://lea.verou.me/2009/02/find-the-vendor-prefix-of-the-current-browser/
"VENDOR_PREFIX": (function () {
var regex = /^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,
styleDeclaration = document.getElementsByTagName("script")[0].style;
for (var prop in styleDeclaration) {
if (regex.test(prop)) {
return prop.match(regex)[0].toLowerCase();
}
}
// Nothing found so far? Webkit does not enumerate over the CSS properties of the style object.
// However (prop in style) returns the correct value, so we'll have to test for
// the precence of a specific property
if ("WebkitOpacity" in styleDeclaration) { return "webkit"; }
if ("KhtmlOpacity" in styleDeclaration) { return "khtml"; }
return "";
}())
}
};
/**
* Chico UI global events reference.
* @name Events
* @class Events
* @memberOf ch
* @static
*/
ch.events = {
/**
* Layout event collection.
* @name LAYOUT
* @public
* @static
* @constant
* @type object
* @memberOf ch.Events
*/
LAYOUT: {
/**
* Every time Chico-UI needs to inform al visual components that layout has been changed, he triggers this event.
* @name CHANGE
* @memberOf ch.Events.LAYOUT
* @public
* @type string
* @constant
* @see ch.Form
* @see ch.Layer
* @see ch.Tooltip
* @see ch.Helper
*/
CHANGE: "change" |
<<<<<<<
server.use(getAbility)
=======
server.use(setSession)
>>>>>>>
server.use(setSession)
server.use(getAbility) |
<<<<<<<
.on(ch.onpointertap + '.accordion', function () {
=======
.on(ch.events.pointer.TAP + '.accordion', function () {
var opened = that._children[that._selected - 1];
>>>>>>>
.on(ch.onpointertap + '.accordion', function () {
var opened = that._children[that._selected - 1]; |
<<<<<<<
* @name ch.Calendar#select
=======
>>>>>>> |
<<<<<<<
return ~~( (that.$element.outerWidth() - that.itemSize.width) / that.itemSize.width );
=======
var _widthDiff = that.$element.outerWidth() - that.itemSize.width;
return (_widthDiff > that.itemSize.width) ? ~~( _widthDiff / that.itemSize.width) : 1;
>>>>>>>
// Space to be distributed among all items
var _widthDiff = that.$element.outerWidth() - that.itemSize.width;
// If there are space to be distributed, calculate pages
return (_widthDiff > that.itemSize.width) ? ~~( _widthDiff / that.itemSize.width) : 1;
<<<<<<<
// Create pagination if there are more than one page on total amount of pages
=======
>>>>>>>
// Create pagination if there are more than one page on total amount of pages
<<<<<<<
=======
// Create a List object to carousel's items and append items to List
that.items = ch.List( that.$collection.children().toArray() );
>>>>>>>
<<<<<<<
// Manage arrows
if (!conf.rolling) { _toggleArrows(page); };
// Refresh selected page
=======
// Arrows behavior
if (!conf.rolling && conf.arrows) _toggleArrows(page);
>>>>>>>
// Manage arrows
if (!conf.rolling && conf.arrows) { _toggleArrows(page); };
// Refresh selected page |
<<<<<<<
var that = this;
conf.cone = true;
conf.position = {};
conf.position.context = that.$element;
conf.position.offset = "15 0";
conf.position.points = "lt rt";
conf.cache = false;
=======
var that = this,
conf = {};
conf.cone = true;
conf.cache = false;
conf.aria = {};
conf.aria.role = "alert";
conf.position = {};
conf.position.context = controller.reference;
conf.position.offset = "15 0";
conf.position.points = "lt rt";
conf.position.reposition = true;
>>>>>>>
var that = this,
conf = {};
conf.cone = true;
conf.cache = false;
conf.aria = {};
conf.aria.role = "alert";
conf.position = {};
conf.position.context = that.$element;
conf.position.offset = "15 0";
conf.position.points = "lt rt";
conf.position.reposition = true; |
<<<<<<<
// Closable button-only
if (closableType === 'button-only' || closableType === 'all' || closableType === true) {
=======
/**
* Closable button-only
*/
if (hiddenby === 'button-only' || hiddenby === 'all') {
>>>>>>>
// Closable button-only
if (hiddenby === 'button-only' || hiddenby === 'all') {
<<<<<<<
// Closable keys-only
if (closableType === 'pointers-only' || closableType === 'all' || closableType === true) {
=======
/**
* Closable keys-only
*/
if (hiddenby === 'pointers-only' || hiddenby === 'all') {
>>>>>>>
// Closable keys-only
if (hiddenby === 'pointers-only' || hiddenby === 'all') { |
<<<<<<<
// Inheritance
var parent = ch.util.inherits(Tabs, ch.Widget),
=======
/**
* Inheritance
*/
var parent = ch.util.inherits(Tabs, ch.Component),
>>>>>>>
// Inheritance
var parent = ch.util.inherits(Tabs, ch.Component),
<<<<<<<
* The name of the widget.
* @memberof! ch.Tabs.prototype
=======
* The name of the component.
>>>>>>>
* The name of the component.
* @memberof! ch.Tabs.prototype |
<<<<<<<
* @augments ch.Widget
=======
* @augments ch.Component
* @mixes ch.Collapsible
* @mixes ch.Content
>>>>>>>
* @augments ch.Component |
<<<<<<<
}, //prefilleTimeline:
registerWebkitNotifications: {
name: "registerWebkitNotifications",
func: function registerWebkitNotifications() {
var permission = window.webkitNotifications &&
window.webkitNotifications.checkPermission();
//- The user can only be asked for to allow webkitNotifications if she slicks
// something. If we requestPermission() without user interaction, it is ignored
// silently.
//- callback() is called when the user clicks on the settings dialog
var callback = function(value, namespace, key) {
var permission = window.webkitNotifications &&
window.webkitNotifications.checkPermission();
if (value) {
//user tried to enable notifications, let's see if we have the rights
//if we have the rights or the user disabled webkitNotifications, there's
//nothing to be done here
if (permission === 1) {
//rights "not set" -> request
window.webkitNotifications.requestPermission(function() {
//after the user allowed or disallowed webkitNotification rights, change the
//gui accordingly
settings.setGui(namespace, key, window.webkitNotifications.checkPermission() == 0);
});
} else if (permission == 2) {
//"blocked" -> tell the user how to unblock (it seems she wants to do that)
//todo: non-chrome users do what?
// -> let's wait for the second browser to implement webkitNotifications
alert('To enable notifications, go to ' +
'"Preferences > Under the Hood > Content Settings > Notifications > Exceptions"' +
' and remove blocking of "' + window.location.hostname + '"');
settings.setGui(namespace, key, false); //disable again
}
}
}
if (window.webkitNotifications) {
//only register settings if browser allows that
settings.registerKey('notifications', 'enableWebkitNotifications', 'Chrome notifications',
permission === 0, [true, false]);
settings.subscribe('notifications', 'enableWebkitNotifications', callback);
if (permission !== 0) {
//override stored value, as an enabled buttons sucks if the feature is disabled :(
//if the user tries to enable it but blocked the webkitNotification rights,
//a js alert will be shown (see callback() above)
settings.set('notifications', 'enableWebkitNotifications', false);
}
}
}
}
}
);
=======
}, //prefilleTimeline:
registerWebkitNotifications: {
name: "registerWebkitNotifications",
func: function registerWebkitNotifications() {
var permission = window.webkitNotifications &&
window.webkitNotifications.checkPermission();
//- The user can only be asked for to allow webkitNotifications if she slicks
// something. If we requestPermission() without user interaction, it is ignored
// silently.
//- callback() is called when the user clicks on the settings dialog
var callback = function(value, namespace, key) {
var permission = window.webkitNotifications &&
window.webkitNotifications.checkPermission();
if (value) {
//user tried to enable notifications, let's see if we have the rights
//if we have the rights or the user disabled webkitNotifications, there's
//nothing to be done here
if (permission === 1) {
//rights "not set" -> request
window.webkitNotifications.requestPermission(function() {
//after the user allowed or disallowed webkitNotification rights, change the
//gui accordingly
settings.set(namespace, key, window.webkitNotifications.checkPermission() == 0);
});
} else if (permission == 2) {
//"blocked" -> tell the user how to unblock (it seems she wants to do that)
//todo: non-chrome users do what?
// -> let's wait for the second browser to implement webkitNotifications
alert('To enable notifications, go to ' +
'"Preferences > Under the Hood > Content Settings > Notifications > Exceptions"' +
' and remove blocking of "' + window.location.hostname + '"');
settings.set(namespace, key, false); //disable again
}
}
}
if (window.webkitNotifications) {
//only register settings if browser allows that
settings.registerKey('notifications', 'enableWebkitNotifications', 'Chrome notifications',
permission === 0, [true, false]);
settings.subscribe('notifications', 'enableWebkitNotifications', callback);
if (permission !== 0) {
//override stored value, as an enabled buttons sucks if the feature is disabled :(
//if the user tries to enable it but blocked the webkitNotification rights,
//a js alert will be shown (see callback() above)
settings.set('notifications', 'enableWebkitNotifications', false);
}
}
}
}
}
});
>>>>>>>
}, //prefilleTimeline:
registerWebkitNotifications: {
name: "registerWebkitNotifications",
func: function registerWebkitNotifications() {
var permission = window.webkitNotifications &&
window.webkitNotifications.checkPermission();
//- The user can only be asked for to allow webkitNotifications if she slicks
// something. If we requestPermission() without user interaction, it is ignored
// silently.
//- callback() is called when the user clicks on the settings dialog
var callback = function(value, namespace, key) {
var permission = window.webkitNotifications &&
window.webkitNotifications.checkPermission();
if (value) {
//user tried to enable notifications, let's see if we have the rights
//if we have the rights or the user disabled webkitNotifications, there's
//nothing to be done here
if (permission === 1) {
//rights "not set" -> request
window.webkitNotifications.requestPermission(function() {
//after the user allowed or disallowed webkitNotification rights, change the
//gui accordingly
settings.set(namespace, key, window.webkitNotifications.checkPermission() == 0);
});
} else if (permission == 2) {
//"blocked" -> tell the user how to unblock (it seems she wants to do that)
//todo: non-chrome users do what?
// -> let's wait for the second browser to implement webkitNotifications
alert('To enable notifications, go to ' +
'"Preferences > Under the Hood > Content Settings > Notifications > Exceptions"' +
' and remove blocking of "' + window.location.hostname + '"');
settings.set(namespace, key, false); //disable again
}
}
}
if (window.webkitNotifications) {
//only register settings if browser allows that
settings.registerKey('notifications', 'enableWebkitNotifications', 'Chrome notifications',
permission === 0, [true, false]);
settings.subscribe('notifications', 'enableWebkitNotifications', callback);
if (permission !== 0) {
//override stored value, as an enabled buttons sucks if the feature is disabled :(
//if the user tries to enable it but blocked the webkitNotification rights,
//a js alert will be shown (see callback() above)
settings.set('notifications', 'enableWebkitNotifications', false);
}
}
}
}
}
); |
<<<<<<<
snapMinutes: 15,
groupRenderer: DefaultGroupRenderer,
itemRenderer: DefaultItemRenderer
=======
snapMinutes: 15,
timelineMode: Timeline.TIMELINE_MODES.SELECT | Timeline.TIMELINE_MODES.DRAG | Timeline.TIMELINE_MODES.RESIZE
>>>>>>>
snapMinutes: 15,
groupRenderer: DefaultGroupRenderer,
itemRenderer: DefaultItemRenderer,
timelineMode: Timeline.TIMELINE_MODES.SELECT | Timeline.TIMELINE_MODES.DRAG | Timeline.TIMELINE_MODES.RESIZE
<<<<<<<
this.props.itemRenderer,
this.props.selectedItems
=======
canSelect ? this.props.selectedItems : []
>>>>>>>
this.props.itemRenderer,
canSelect ? this.props.selectedItems : [] |
<<<<<<<
const ROWS = 100;
const ITEMS_PER_ROW = 100;
=======
import {Layout, Form, InputNumber, Button, DatePicker} from 'antd';
import 'antd/dist/antd.css';
>>>>>>>
import {Layout, Form, InputNumber, Button, DatePicker} from 'antd';
import 'antd/dist/antd.css';
import TimelineItem from 'antd/lib/timeline/TimelineItem';
<<<<<<<
groups.push({id: i, title: `Row ${i}`});
for (let j = 0; j < ITEMS_PER_ROW; j++) {
=======
this.groups.push({id: i, title: `Row ${i}`});
for (let j = 0; j < this.state.items_per_row; j++) {
>>>>>>>
groups.push({id: i, title: `Row ${i}`});
for (let j = 0; j < this.state.items_per_row; j++) {
key += 1;
<<<<<<<
this.state = {selectedItems: [11, 12], groups, items: list};
=======
this.forceUpdate();
>>>>>>>
// this.state = {selectedItems: [11, 12], groups, items: list};
this.forceUpdate();
this.setState({items: list, groups});
<<<<<<<
const {selectedItems, groups, items} = this.state;
const startDate = moment('2000-01-01');
const endDate = startDate.clone().add(1, 'days');
const snapMinutes = 15;
=======
const {selectedItems, rows, items_per_row, snap, startDate, endDate} = this.state;
const items = this.list;
const groups = this.groups;
const rangeValue = [startDate, endDate];
>>>>>>>
const {selectedItems, rows, items_per_row, snap, startDate, endDate, items, groups} = this.state;
// const items = this.ti;
// const groups = this.groups;
const rangeValue = [startDate, endDate];
<<<<<<<
<Timeline
items={items}
groups={groups}
startDate={startDate}
endDate={endDate}
selectedItems={selectedItems}
snapMinutes={snapMinutes}
onItemClick={this.handleItemClick}
onInteraction={this.handleInteraction}
onRowClick={this.handleRowClick}
/>
=======
<Layout className="layout">
<Layout.Content>
<div style={{margin: 24}}>
<Form layout="inline">
<Form.Item label="No rows">
<InputNumber value={rows} onChange={e => this.setState({rows: e})} />
</Form.Item>
<Form.Item label="No items per row">
<InputNumber value={items_per_row} onChange={e => this.setState({items_per_row: e})} />
</Form.Item>
<Form.Item label="Snap (mins)">
<InputNumber value={snap} onChange={e => this.setState({snap: e})} />
</Form.Item>
<Form.Item label="Snap (mins)">
<DatePicker.RangePicker
allowClear={false}
value={rangeValue}
onChange={e => {
this.setState({startDate: e[0], endDate: e[1]}, () => this.reRender);
}}
/>
</Form.Item>
<Form.Item>
<Button type="primary" onClick={() => this.reRender()}>
Set
</Button>
</Form.Item>
</Form>
</div>
<Timeline
items={items}
groups={groups}
startDate={startDate}
endDate={endDate}
selectedItems={selectedItems}
snapMinutes={snap}
onItemClick={this.handleItemClick}
onInteraction={this.handleInteraction}
/>
</Layout.Content>
</Layout>
>>>>>>>
<Layout className="layout">
<Layout.Content>
<div style={{margin: 24}}>
<Form layout="inline">
<Form.Item label="No rows">
<InputNumber value={rows} onChange={e => this.setState({rows: e})} />
</Form.Item>
<Form.Item label="No items per row">
<InputNumber value={items_per_row} onChange={e => this.setState({items_per_row: e})} />
</Form.Item>
<Form.Item label="Snap (mins)">
<InputNumber value={snap} onChange={e => this.setState({snap: e})} />
</Form.Item>
<Form.Item label="Snap (mins)">
<DatePicker.RangePicker
allowClear={false}
value={rangeValue}
onChange={e => {
this.setState({startDate: e[0], endDate: e[1]}, () => this.reRender);
}}
/>
</Form.Item>
<Form.Item>
<Button type="primary" onClick={() => this.reRender()}>
Set
</Button>
</Form.Item>
</Form>
</div>
<Timeline
items={items}
groups={groups}
startDate={startDate}
endDate={endDate}
selectedItems={selectedItems}
snapMinutes={snap}
onItemClick={this.handleItemClick}
onInteraction={this.handleInteraction}
onRowClick={this.handleRowClick}
/>
</Layout.Content>
</Layout> |
<<<<<<<
import {sumStyle, pixToInt} from 'utils/common';
import {getDurationFromPixels, rowItemsRenderer, getTimeAtPixel, getNearestRowHeight} from 'utils/itemUtils';
=======
import {sumStyle, pixToInt, intToPix} from 'utils/common';
import {rowItemsRenderer, getTimeAtPixel, getNearestRowHeight, getMaxOverlappingItems} from 'utils/itemUtils';
>>>>>>>
import {sumStyle, pixToInt, intToPix} from 'utils/common';
import {
rowItemsRenderer,
getTimeAtPixel,
getNearestRowHeight,
getMaxOverlappingItems,
getDurationFromPixels
} from 'utils/itemUtils';
<<<<<<<
=======
import Timebar from 'components/timebar';
>>>>>>>
import Timebar from 'components/timebar';
<<<<<<<
=======
setSelection(start, end) {
this.setState({selection: [{start: start.clone(), end: end.clone()}]});
}
clearSelection() {
this.setState({selection: []});
}
>>>>>>>
setSelection(start, end) {
this.setState({selection: [{start: start.clone(), end: end.clone()}]});
}
clearSelection() {
this.setState({selection: []});
}
<<<<<<<
})
.on('dragmove', e => {
=======
//TODO: This should use state reducer
//TODO: Should be able to optimize the lookup below
const index = e.target.getAttribute('item-index');
const rowNo = this.itemRowMap[index];
const itemIndex = _.findIndex(this.rowItemMap[rowNo], i => i.key == index);
const item = this.rowItemMap[rowNo][itemIndex];
this.setSelection(item.start, item.end);
},
onmove: e => {
>>>>>>>
})
.on('dragmove', e => {
<<<<<<<
let newRow = getNearestRowHeight(rowNo, ITEM_HEIGHT, pixToInt(offset));
console.log('To ' + newRow);
=======
let newRow = getNearestRowHeight(e.clientX, e.clientY);
console.log('To ' + newRow);
>>>>>>>
let newRow = getNearestRowHeight(e.clientX, e.clientY);
console.log('To ' + newRow);
<<<<<<<
e.target.style['top'] = '0px';
this._grid.forceUpdate();
})
.resizable({
edges: {left: true, right: true, bottom: false, top: false}
})
.on('resizestart', e => {
console.log('resizestart', e.dx, e.target.style.left, e.target.style.width);
})
.on('resizemove', e => {
console.log('resizemove', e.dx, e.target.style.width, e.target.style.left);
// Determine if the resize is from the right or left
const isStartTimeChange = e.deltaRect.left !== 0;
const index = e.target.getAttribute('item-index');
const rowNo = this.itemRowMap[index];
const itemIndex = _.findIndex(this.rowItemMap[rowNo], i => i.key == index);
const item = this.rowItemMap[rowNo][itemIndex];
// Add the duration to the start or end time depending on where the resize occurred
if (isStartTimeChange) {
item.start = getTimeAtPixel(
pixToInt(e.target.style.left) + e.dx,
VISIBLE_START,
VISIBLE_END,
this._grid.props.width
);
} else {
item.end = getTimeAtPixel(
pixToInt(e.target.style.left) + pixToInt(e.target.style.width) + e.dx,
VISIBLE_START,
VISIBLE_END,
this._grid.props.width
);
}
this._grid.forceUpdate();
})
.on('resizeend', e => {
console.log('resizeend', e);
});
=======
e.target.style['top'] = intToPix(ITEM_HEIGHT * Math.round(pixToInt(e.target.style['top']) / ITEM_HEIGHT));
// e.target.style['top'] = '0px';
// Check row height doesn't need changing
let need_recompute = false;
let new_to_row_height = getMaxOverlappingItems(this.rowItemMap[newRow], VISIBLE_START, VISIBLE_END);
if (new_to_row_height !== this.rowHeightCache[newRow]) {
this.rowHeightCache[newRow] = new_to_row_height;
need_recompute = true;
}
let new_from_row_height = getMaxOverlappingItems(this.rowItemMap[rowNo], VISIBLE_START, VISIBLE_END);
if (new_from_row_height !== this.rowHeightCache[rowNo]) {
this.rowHeightCache[rowNo] = new_from_row_height;
need_recompute = true;
}
if (need_recompute) this._grid.recomputeGridSize({rowIndex: Math.min(newRow, rowNo)});
else this._grid.forceUpdate();
}
});
>>>>>>>
e.target.style['top'] = intToPix(ITEM_HEIGHT * Math.round(pixToInt(e.target.style['top']) / ITEM_HEIGHT));
// e.target.style['top'] = '0px';
// Check row height doesn't need changing
let need_recompute = false;
let new_to_row_height = getMaxOverlappingItems(this.rowItemMap[newRow], VISIBLE_START, VISIBLE_END);
if (new_to_row_height !== this.rowHeightCache[newRow]) {
this.rowHeightCache[newRow] = new_to_row_height;
need_recompute = true;
}
let new_from_row_height = getMaxOverlappingItems(this.rowItemMap[rowNo], VISIBLE_START, VISIBLE_END);
if (new_from_row_height !== this.rowHeightCache[rowNo]) {
this.rowHeightCache[rowNo] = new_from_row_height;
need_recompute = true;
}
if (need_recompute) this._grid.recomputeGridSize({rowIndex: Math.min(newRow, rowNo)});
else this._grid.forceUpdate();
})
.resizable({
edges: {left: true, right: true, bottom: false, top: false}
})
.on('resizestart', e => {
console.log('resizestart', e.dx, e.target.style.left, e.target.style.width);
})
.on('resizemove', e => {
console.log('resizemove', e.dx, e.target.style.width, e.target.style.left);
// Determine if the resize is from the right or left
const isStartTimeChange = e.deltaRect.left !== 0;
const index = e.target.getAttribute('item-index');
const rowNo = this.itemRowMap[index];
const itemIndex = _.findIndex(this.rowItemMap[rowNo], i => i.key == index);
const item = this.rowItemMap[rowNo][itemIndex];
// Add the duration to the start or end time depending on where the resize occurred
if (isStartTimeChange) {
item.start = getTimeAtPixel(
pixToInt(e.target.style.left) + e.dx,
VISIBLE_START,
VISIBLE_END,
this._grid.props.width
);
} else {
item.end = getTimeAtPixel(
pixToInt(e.target.style.left) + pixToInt(e.target.style.width) + e.dx,
VISIBLE_START,
VISIBLE_END,
this._grid.props.width
);
}
this._grid.forceUpdate();
})
.on('resizeend', e => {
console.log('resizeend', e);
}); |
<<<<<<<
var recursion = function(amount, coinsICanUse) {
if (amount === 0) {
return 1;
}
var result = 0;
var largestCoin = coinsICanUse[0];
var minusOneOfLargestCoin = amount - largestCoin;
if (minusOneOfLargestCoin >= 0) {
result += recursion(minusOneOfLargestCoin, coinsICanUse);
}
if (coinsICanUse.length > 1) {
result += recursion(amount, coinsICanUse.slice(1));
}
return result;
};
return recursion(amount, coinValues.slice());
};
=======
return 1;
>>>>>>>
var recursion = function(amount, coinsICanUse) {
if (amount === 0) {
return 1;
}
var result = 0;
var largestCoin = coinsICanUse[0];
var minusOneOfLargestCoin = amount - largestCoin;
if (minusOneOfLargestCoin >= 0) {
result += recursion(minusOneOfLargestCoin, coinsICanUse);
}
if (coinsICanUse.length > 1) {
result += recursion(amount, coinsICanUse.slice(1));
}
return result;
};
return recursion(amount, coinValues.slice()); |
<<<<<<<
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
var body = 'response' in xhr ? xhr.response : xhr.responseText
setTimeout(function() {
resolve(new Response(body, options));
}, 0);
}
xhr.onerror = function() {
setTimeout(function() {
reject(new TypeError('Network request failed'));
}, 0);
}
xhr.ontimeout = function() {
setTimeout(function() {
reject(new TypeError('Network request failed'));
}, 0);
}
xhr.open(request.method, request.url, true)
if (request.credentials === 'include') {
xhr.withCredentials = true
} else if (request.credentials === 'omit') {
xhr.withCredentials = false
=======
>>>>>>> |
<<<<<<<
const remote = require('remote');
const Menu = remote.require('menu');
const MenuItem = remote.require('menu-item');
const tinycolor = require("tinycolor2");
const _ = require('lodash');
=======
const remote = electron.remote;
const Menu = remote.Menu;
const MenuItem = remote.MenuItem;
>>>>>>>
const remote = electron.remote;
const Menu = remote.Menu;
const MenuItem = remote.MenuItem;
const tinycolor = require("tinycolor2");
const _ = require('lodash'); |
<<<<<<<
it('should allow demand option with boolean flag', function () {
var r = checkUsage(function () {
return yargs('-y 10 -z 20'.split(' '))
.usage('Usage: $0 -x NUM [-y NUM]')
.options({
'x': { description: 'an option', demand: true },
'y': { description: 'another option', demand: false }
})
.argv;
});
r.result.should.have.property('y', 10);
r.result.should.have.property('z', 20);
r.result.should.have.property('_').with.length(0);
r.errors.join('\n').split(/\n/).should.deep.equal([
'Usage: ./usage -x NUM [-y NUM]',
'',
'Options:',
' -x an option [required]',
' -y another option',
'',
'Missing required arguments: x'
]);
r.logs.should.have.length(0);
r.exit.should.be.ok;
});
=======
describe('help option', function () {
it('should display usage', function () {
var r = checkUsage(function () {
return yargs(['--help'])
.demand(['y'])
.help('help')
.argv;
});
r.should.have.property('result');
r.result.should.have.property('_').with.length(0);
r.should.have.property('errors');
r.should.have.property('logs').with.length(1);
r.should.have.property('exit').and.be.ok;
r.logs.join('\n').split(/\n+/).should.deep.equal([
'Options:',
' --help Show help',
' -y [required]',
''
]);
});
});
describe('version option', function () {
it('should display version', function () {
var r = checkUsage(function () {
return yargs(['--version'])
.version('1.0.1', 'version', 'Show version number')
.argv;
});
r.should.have.property('result');
r.result.should.have.property('_').with.length(0);
r.should.have.property('errors');
r.should.have.property('logs').with.length(1);
r.should.have.property('exit').and.be.ok;
r.logs.join('\n').split(/\n+/).should.deep.equal([
'1.0.1'
]);
});
});
describe('showHelpOnFail', function () {
it('should display user supplied message', function () {
var opts = {
foo: { desc: 'foo option', alias: 'f' },
bar: { desc: 'bar option', alias: 'b' }
};
var r = checkUsage(function () {
return yargs(['--foo'])
.usage('Usage: $0 [options]')
.options(opts)
.demand(['foo', 'bar'])
.showHelpOnFail(false, "Specify --help for available options")
.argv;
});
r.should.have.property('result');
r.result.should.have.property('_').with.length(0);
r.should.have.property('errors');
r.should.have.property('logs').with.length(0);
r.should.have.property('exit').and.be.ok;
r.errors.join('\n').split(/\n/).should.deep.equal([
'Missing required arguments: bar',
'',
'Specify --help for available options'
]);
});
});
>>>>>>>
it('should allow demand option with boolean flag', function () {
var r = checkUsage(function () {
return yargs('-y 10 -z 20'.split(' '))
.usage('Usage: $0 -x NUM [-y NUM]')
.options({
'x': { description: 'an option', demand: true },
'y': { description: 'another option', demand: false }
})
.argv;
});
r.result.should.have.property('y', 10);
r.result.should.have.property('z', 20);
r.result.should.have.property('_').with.length(0);
r.errors.join('\n').split(/\n/).should.deep.equal([
'Usage: ./usage -x NUM [-y NUM]',
'',
'Options:',
' -x an option [required]',
' -y another option',
'',
'Missing required arguments: x'
]);
r.logs.should.have.length(0);
r.exit.should.be.ok;
});
describe('help option', function () {
it('should display usage', function () {
var r = checkUsage(function () {
return yargs(['--help'])
.demand(['y'])
.help('help')
.argv;
});
r.should.have.property('result');
r.result.should.have.property('_').with.length(0);
r.should.have.property('errors');
r.should.have.property('logs').with.length(1);
r.should.have.property('exit').and.be.ok;
r.logs.join('\n').split(/\n+/).should.deep.equal([
'Options:',
' --help Show help',
' -y [required]',
''
]);
});
});
describe('version option', function () {
it('should display version', function () {
var r = checkUsage(function () {
return yargs(['--version'])
.version('1.0.1', 'version', 'Show version number')
.argv;
});
r.should.have.property('result');
r.result.should.have.property('_').with.length(0);
r.should.have.property('errors');
r.should.have.property('logs').with.length(1);
r.should.have.property('exit').and.be.ok;
r.logs.join('\n').split(/\n+/).should.deep.equal([
'1.0.1'
]);
});
});
describe('showHelpOnFail', function () {
it('should display user supplied message', function () {
var opts = {
foo: { desc: 'foo option', alias: 'f' },
bar: { desc: 'bar option', alias: 'b' }
};
var r = checkUsage(function () {
return yargs(['--foo'])
.usage('Usage: $0 [options]')
.options(opts)
.demand(['foo', 'bar'])
.showHelpOnFail(false, "Specify --help for available options")
.argv;
});
r.should.have.property('result');
r.result.should.have.property('_').with.length(0);
r.should.have.property('errors');
r.should.have.property('logs').with.length(0);
r.should.have.property('exit').and.be.ok;
r.errors.join('\n').split(/\n/).should.deep.equal([
'Missing required arguments: bar',
'',
'Specify --help for available options'
]);
});
}); |
<<<<<<<
onDrop: (itemPosition: {
x: number,
y: number,
w: number,
h: number,
e: Event
}) => void,
children: ReactChildrenArray<ReactElement<any>>,
innerRef?: Ref<"div">
=======
onDrop: (layout: Layout, item: ?LayoutItem, e: Event) => void,
children: ReactChildrenArray<ReactElement<any>>
>>>>>>>
onDrop: (layout: Layout, item: ?LayoutItem, e: Event) => void,
children: ReactChildrenArray<ReactElement<any>>,
innerRef?: Ref<"div"> |
<<<<<<<
$scope.$watch(
() => this.ngModelController && this.ngModelController.$viewValue ? this.ngModelController.$viewValue : this.ngModelController,
(nVal, oVal) => {
if (nVal !== oVal && Boolean(this.placeholder)) $container.html(this.ngModelController.$viewValue);
});
$scope.$on('execCommand', (event, params) => {
let selection = $document[0].getSelection().toString();
let command = params.command;
let options = params.options;
event.stopPropagation && event.stopPropagation();
$container[0].focus();
if ($document[0].queryCommandSupported && !$document[0].queryCommandSupported(command)) {
throw 'The command "' + command + '" is not supported';
}
// use insertHtml for `createlink` command to account for IE/Edge purposes, in case there is no selection
if(command === 'createlink' && selection === ''){
$document[0].execCommand('insertHtml', false, '<a href="' + options + '">' + options + '</a>');
}
else{
$document[0].execCommand(command, false, options);
}
});
=======
>>>>>>>
$scope.$watch(
() => this.ngModelController && this.ngModelController.$viewValue ? this.ngModelController.$viewValue : this.ngModelController,
(nVal, oVal) => {
if (nVal !== oVal && Boolean(this.placeholder)) $container.html(this.ngModelController.$viewValue);
}); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.