conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
this.addEventListener("enterframe", function(e) {
tl.dispatchEvent(e);
=======
this.addEventListener("enterframe", function(e) {
tl.dispatchEvent(e);
>>>>>>>
this.addEventListener("enterframe", function(e) {
tl.dispatchEvent(e);
<<<<<<<
* @constructs
=======
* タイムラインクラスはフレームとタイムのアニメーションができる。
*
>>>>>>>
* タイムラインクラスはフレームとタイムのアニメーションができる。
*
* @constructs |
<<<<<<<
* var game = new Game(320, 320);
* game.preload('avatarBg1.png','avatarBg2.png','avatarBg3.png','bigmonster1.gif');
* game.onload = function(){
* game.rootScene.backgroundColor="#000000";
* // show infinite scrolling background
* bg =new AvatarBG(0);
* bg.y=50;
* game.rootScene.addChild(bg);
*
* //show monster
* monster = new AvatarMonster(game.assets['bigmonster1.gif']);
* monster.x=200;
* monster.y=100;
* game.rootScene.addChild(monster);
*
* //show avatar
* chara = new Avatar("2:2:1:2004:21230:22480");
* game.rootScene.addChild(chara);
* chara.scaleX=-1;
* chara.scaleY=1;
* chara.x=50;
* chara.y=100;
=======
* var core = new Core(320, 320);
* core.preload('avatarBg1.png','avatarBg2.png','avatarBg3.png','bigmonster1.gif');
* core.onload = function(){
* core.rootScene.backgroundColor="#000000";
* // show infinite scrolling background
* bg =new AvatarBG(0);
* bg.y=50;
* core.rootScene.addChild(bg);
*
* //show monster
* monster = new AvatarMonster(core.assets['bigmonster1.gif']);
* monster.x=200;
* monster.y=100;
* core.rootScene.addChild(monster);
*
* //show avatar
* chara = new Avatar("2:2:1:2004:21230:22480");
* core.rootScene.addChild(chara);
* chara.scaleX=-1;
* chara.scaleY=1;
* chara.x=50;
* chara.y=100;
>>>>>>>
* var core = new Core(320, 320);
* core.preload('avatarBg1.png','avatarBg2.png','avatarBg3.png','bigmonster1.gif');
* core.onload = function(){
* core.rootScene.backgroundColor="#000000";
* // show infinite scrolling background
* bg =new AvatarBG(0);
* bg.y=50;
* core.rootScene.addChild(bg);
*
* //show monster
* monster = new AvatarMonster(core.assets['bigmonster1.gif']);
* monster.x=200;
* monster.y=100;
* core.rootScene.addChild(monster);
*
* //show avatar
* chara = new Avatar("2:2:1:2004:21230:22480");
* core.rootScene.addChild(chara);
* chara.scaleX=-1;
* chara.scaleY=1;
* chara.x=50;
* chara.y=100;
<<<<<<<
var bg = new enchant.Sprite(320, 32);
bg.image = game.assets["avatarBg3.png"];
=======
var bg = new Sprite(320, 32);
bg.image = core.assets["avatarBg3.png"];
>>>>>>>
var bg = new enchant.Sprite(320, 32);
bg.image = core.assets["avatarBg3.png"];
<<<<<<<
var tile = new enchant.Sprite(32, 128);
tile.image = game.assets["avatarBg1.png"];
=======
var tile = new Sprite(32, 128);
tile.image = core.assets["avatarBg1.png"];
>>>>>>>
var tile = new enchant.Sprite(32, 128);
tile.image = core.assets["avadtarBg1.png"]; |
<<<<<<<
[lang:ja]
* WebAudioを有効にするどうか.
* trueならサウンドの再生の際HTMLAudioElementの代わりにWebAudioAPIを使用する.
[/lang]
[lang:en]
=======
* @type Boolean
*/
USE_TOUCH_TO_START_SCENE: true,
/**
>>>>>>>
* @type Boolean
*/
USE_TOUCH_TO_START_SCENE: true,
/**
[lang:ja]
* WebAudioを有効にするどうか.
* trueならサウンドの再生の際HTMLAudioElementの代わりにWebAudioAPIを使用する.
[/lang]
[lang:en] |
<<<<<<<
=======
*/
enchant.Event.A_BUTTON_DOWN = 'abuttondown';
/**
* aボタンが離された発生するイベント.
* 発行するオブジェクト: {@link enchant.Game}, {@link enchant.Scene}
* @type {String}
*/
enchant.Event.A_BUTTON_UP = 'abuttonup';
/**
* bボタンが押された発生するイベント.
* 発行するオブジェクト: {@link enchant.Game}, {@link enchant.Scene}
* @type {String}
*/
enchant.Event.B_BUTTON_DOWN = 'bbuttondown';
/**
* bボタンが離された発生するイベント.
* 発行するオブジェクト: {@link enchant.Game}, {@link enchant.Scene}
* @type {String}
*/
enchant.Event.B_BUTTON_UP = 'bbuttonup';
/**
* アクションがタイムラインに追加された時に発行されるイベント
* @type {String}
*/
enchant.Event.ADDED_TO_TIMELINE = "addedtotimeline";
/**
* アクションがタイムラインから削除された時に発行されるイベント
* looped が設定されている時も、アクションは一度タイムラインから削除されもう一度追加される
* @type {String}
*/
enchant.Event.REMOVED_FROM_TIMELINE = "removedfromtimeline";
/**
* アクションが開始された時に発行されるイベント
* @type {String}
*/
enchant.Event.ACTION_START = "actionstart";
/**
* アクションが終了するときに発行されるイベント
* @type {String}
*/
enchant.Event.ACTION_END = "actionend";
/**
* アクションが1フレーム経過するときに発行されるイベント
* @type {String}
*/
enchant.Event.ACTION_TICK = "actiontick";
/**
* アクションが追加された時に、タイムラインに対して発行されるイベント
* @type {String}
*/
enchant.Event.ACTION_ADDED = "actionadded";
/**
* アクションが削除された時に、タイムラインに対して発行されるイベント
* @type {String}
*/
enchant.Event.ACTION_REMOVED = "actionremoved";
/**
* @scope enchant.EventTarget.prototype
*/
enchant.EventTarget = enchant.Class.create({
/**
* DOM Event風味の独自イベント実装を行ったクラス.
* ただしフェーズの概念はなし.
>>>>>>>
<<<<<<<
this._dirty = false;
this.redraw(0, 0, core.width, core.height);
=======
this.redraw(0, 0, game.width, game.height);
>>>>>>>
this.redraw(0, 0, core.width, core.height);
<<<<<<<
if (core._debug) {
if (node instanceof enchant.Label || node instanceof enchant.Sprite) {
ctx.strokeStyle = '#ff0000';
=======
enchant.DomlessManager = enchant.Class.create({
initialize: function(node) {
this._domRef = [];
this.targetNode = node;
},
_register: function(element, nextElement) {
var i = this._domRef.indexOf(nextElement);
if (element instanceof DocumentFragment) {
if (i === -1) {
Array.prototype.push.apply(this._domRef, element.childNodes);
>>>>>>>
enchant.DomlessManager = enchant.Class.create({
initialize: function(node) {
this._domRef = [];
this.targetNode = node;
},
_register: function(element, nextElement) {
var i = this._domRef.indexOf(nextElement);
if (element instanceof DocumentFragment) {
if (i === -1) {
Array.prototype.push.apply(this._domRef, element.childNodes);
<<<<<<<
* 表示オブジェクトツリーのルートになるクラス.
*
* @example
* var scene = new CanvasScene();
* scene.addChild(player);
* scene.addChild(enemy);
* core.pushScene(scene);
*
=======
* Canvas を用いた描画を行うクラス。
* 子を Canvas を用いた描画に切り替えるクラス
>>>>>>>
* Canvas を用いた描画を行うクラス。
* 子を Canvas を用いた描画に切り替えるクラス
<<<<<<<
this._element.style[enchant.ENV.VENDOR_PREFIX + 'Transform'] = 'scale(' + enchant.Core.instance.scale + ')';
=======
this._element.style[enchant.ENV.VENDOR_PREFIX + 'Transform'] = 'scale(' + enchant.Game.instance.scale + ')';
this._layers = {};
this._layerPriority = [];
this.addLayer('Canvas');
this.addLayer('Dom');
this.addEventListener(enchant.Event.CHILD_ADDED, this._onchildadded);
this.addEventListener(enchant.Event.CHILD_REMOVED, this._onchildremoved);
this.addEventListener(enchant.Event.ENTER, this._onenter);
this.addEventListener(enchant.Event.EXIT, this._onexit);
>>>>>>>
this._element.style[enchant.ENV.VENDOR_PREFIX + 'Transform'] = 'scale(' + enchant.Game.instance.scale + ')';
this._layers = {};
this._layerPriority = [];
this.addLayer('Canvas');
this.addLayer('Dom');
this.addEventListener(enchant.Event.CHILD_ADDED, this._onchildadded);
this.addEventListener(enchant.Event.CHILD_REMOVED, this._onchildremoved);
this.addEventListener(enchant.Event.ENTER, this._onenter);
this.addEventListener(enchant.Event.EXIT, this._onexit);
var that = this;
this._dispatchExitframe = function() {
var layer;
for (var prop in that._layers) {
layer = that._layers[prop];
layer.dispatchEvent(new enchant.Event(enchant.Event.EXIT_FRAME));
}
}; |
<<<<<<<
* bear.image = core.assets['chara1.gif'];
*
* @param {Number} [width] Sprite width.g
* @param {Number} [height] Sprite height.
=======
* bear.image = game.assets['chara1.gif'];
*
>>>>>>>
* bear.image = core.assets['chara1.gif'];
* |
<<<<<<<
=======
this._setFrame(this._frame);
>>>>>>>
this._setFrame(this._frame);
<<<<<<<
var canvas = document.createElement('canvas');
canvas.style.position = 'absolute';
if (enchant.ENV.RETINA_DISPLAY && game.scale === 2) {
canvas.width = game.width * 2;
canvas.height = game.height * 2;
this._style.webkitTransformOrigin = '0 0';
this._style.webkitTransform = 'scale(0.5)';
} else {
canvas.width = game.width;
canvas.height = game.height;
}
this._context = canvas.getContext('2d');
this._tileWidth = tileWidth || 0;
this._tileHeight = tileHeight || 0;
this._image = null;
this._data = [
[
[]
]
];
this._dirty = false;
this._tight = false;
=======
var canvas = document.createElement('canvas');
canvas.style.position = 'absolute';
if (enchant.ENV.RETINA_DISPLAY && game.scale === 2) {
canvas.width = game.width * 2;
canvas.height = game.height * 2;
this._style.webkitTransformOrigin = '0 0';
this._style.webkitTransform = 'scale(0.5)';
} else {
canvas.width = game.width;
canvas.height = game.height;
}
this._context = canvas.getContext('2d');
>>>>>>>
var canvas = document.createElement('canvas');
canvas.style.position = 'absolute';
if (enchant.ENV.RETINA_DISPLAY && game.scale === 2) {
canvas.width = game.width * 2;
canvas.height = game.height * 2;
this._style.webkitTransformOrigin = '0 0';
this._style.webkitTransform = 'scale(0.5)';
} else {
canvas.width = game.width;
canvas.height = game.height;
}
this._context = canvas.getContext('2d');
<<<<<<<
this._tight = false;
for (var i = 0, len = this._data.length; i < len; i++) {
var c = 0;
data = this._data[i];
for (var y = 0, l = data.length; y < l; y++) {
for (var x = 0, ll = data[y].length; x < ll; x++) {
if (data[y][x] >= 0) {
c++;
}
=======
this._tight = false;
for (var i = 0, len = this._data.length; i < len; i++) {
var c = 0;
data = this._data[i];
for (var y = 0, l = data.length; y < l; y++) {
for (var x = 0, ll = data[y].length; x < ll; x++) {
if (data[y][x] >= 0) {
c++;
>>>>>>>
this._tight = false;
for (var i = 0, len = this._data.length; i < len; i++) {
var c = 0;
data = this._data[i];
for (var y = 0, l = data.length; y < l; y++) {
for (var x = 0, ll = data[y].length; x < ll; x++) {
if (data[y][x] >= 0) {
c++;
<<<<<<<
});
}());
/**
* @scope enchant.Group.prototype
*/
enchant.Group = enchant.Class.create(enchant.Node, {
=======
},
>>>>>>>
},
<<<<<<<
this._originX = null;
this._originY = null;
this._rotation = 0;
[enchant.Event.ADDED_TO_SCENE, enchant.Event.REMOVED_FROM_SCENE]
.forEach(function(event) {
this.addEventListener(event, function(e) {
this.childNodes.forEach(function(child) {
child.scene = this.scene;
child.dispatchEvent(e);
}, this);
});
}, this);
=======
this._rotation = 0;
this._scaleX = 1;
this._scaleY = 1;
this._originX = null;
this._originY = null;
[enchant.Event.ADDED_TO_SCENE, enchant.Event.REMOVED_FROM_SCENE]
.forEach(function(event) {
this.addEventListener(event, function(e) {
this.childNodes.forEach(function(child) {
child.scene = this.scene;
child.dispatchEvent(e);
}, this);
});
}, this);
>>>>>>>
this._rotation = 0;
this._scaleX = 1;
this._scaleY = 1;
this._originX = null;
this._originY = null;
[enchant.Event.ADDED_TO_SCENE, enchant.Event.REMOVED_FROM_SCENE]
.forEach(function(event) {
this.addEventListener(event, function(e) {
this.childNodes.forEach(function(child) {
child.scene = this.scene;
child.dispatchEvent(e);
}, this);
});
}, this);
<<<<<<<
set: function(originX) {
this._originX = originX;
this._dirty = true;
=======
set: function(scale) {
this._scaleX = scale;
this._dirty = true;
>>>>>>>
set: function(scale) {
this._scaleX = scale;
this._dirty = true;
<<<<<<<
set: function(originY) {
this._originY = originY;
this._dirty = true;
=======
set: function(scale) {
this._scaleY = scale;
this._dirty = true;
}
},
/**
* origin point of rotation, scaling
* @type {Number}
*/
originX: {
get: function() {
return this._originX;
},
set: function(originX) {
this._originX = originX;
this._dirty = true;
}
},
/**
* origin point of rotation, scaling
* @type {Number}
*/
originY: {
get: function() {
return this._originY;
},
set: function(originY) {
this._originY = originY;
this._dirty = true;
>>>>>>>
set: function(scale) {
this._scaleY = scale;
this._dirty = true;
}
},
/**
* origin point of rotation, scaling
* @type {Number}
*/
originX: {
get: function() {
return this._originX;
},
set: function(originX) {
this._originX = originX;
this._dirty = true;
}
},
/**
* origin point of rotation, scaling
* @type {Number}
*/
originY: {
get: function() {
return this._originY;
},
set: function(originY) {
this._originY = originY;
this._dirty = true;
<<<<<<<
this._scaleX = 1;
this._scaleY = 1;
=======
>>>>>>>
<<<<<<<
propagationUp.call(this._touching, e, this.parentNode);
this._touching = null;
},
/**
* scaling of group in the direction of x axis
* @see enchant.CanvasGroup.originX
* @see enchant.CanvasGroup.originY
* @type {Number}
*/
scaleX: {
get: function() {
return this._scaleX;
},
set: function(scale) {
this._scaleX = scale;
this._dirty = true;
}
},
/**
* scaling of group in the direction of y axis
* @see enchant.CanvasGroup.originX
* @see enchant.CanvasGroup.originY
* @type {Number}
*/
scaleY: {
get: function() {
return this._scaleY;
},
set: function(scale) {
this._scaleY = scale;
this._dirty = true;
}
},
addChild: function(node) {
this.childNodes.push(node);
node.parentNode = this;
node.dispatchEvent(new enchant.Event('added'));
if (this.scene) {
node.scene = this.scene;
var e = new enchant.Event('addedtoscene');
_onaddedtoscene.call(node, e, this._colorManager);
}
},
insertBefore: function(node, reference) {
var i = this.childNodes.indexOf(reference);
if (i !== -1) {
this.childNodes.splice(i, 0, node);
node.parentNode = this;
node.dispatchEvent(new enchant.Event('added'));
if (this.scene) {
node.scene = this.scene;
var e = new enchant.Event('addedtoscene');
_onaddedtoscene.call(node, e, this._colorManager);
}
} else {
this.addChild(node);
}
},
removeChild: function(node) {
var i;
if ((i = this.childNodes.indexOf(node)) !== -1) {
this.childNodes.splice(i, 1);
node.parentNode = null;
node.dispatchEvent(new enchant.Event('removed'));
if (this.scene) {
node.scene = null;
var e = new enchant.Event('removedfromscene');
_onremovedfromscene.call(node, e, this._colorManager);
}
}
=======
propagationUp.call(this._touching, e, this.parentNode);
this._touching = null;
>>>>>>>
propagationUp.call(this._touching, e, this.parentNode);
this._touching = null;
<<<<<<<
enchant.Map.prototype.cvsRender = function(ctx) {
var game = enchant.Game.instance;
ctx.save();
ctx.setTransform(1, 0, 0, 1, 0, 0);
var cvs = this._context.canvas;
ctx.drawImage(cvs, 0, 0, game.width, game.height);
ctx.restore();
};
enchant.Sprite.prototype.cvsRender = function(ctx) {
var img, imgdata, row, frame;
var sx, sy, sw, sh;
if (this._image) {
frame = Math.abs(this._frame) || 0;
img = this._image;
imgdata = img._element;
row = img.width / this._width | 0;
sx = (frame % row | 0) * this._width;
sy = (frame / row | 0) * this._height % img.height;
sy = Math.min(sy, img.height - this._height);
sw = Math.min(img.width - sx, this._width);
sh = Math.min(img.height - sy, this._height);
ctx.drawImage(imgdata, sx, sy, sw, sh, RENDER_OFFSET, RENDER_OFFSET, this._width + RENDER_OFFSET, this._height + RENDER_OFFSET);
}
};
enchant.Label.prototype.cvsRender = function(ctx) {
if (this.text) {
ctx.textBaseline = 'top';
ctx.font = this.font;
ctx.fillStyle = this.color || '#000000';
ctx.fillText(this.text, RENDER_OFFSET, RENDER_OFFSET);
}
};
=======
>>>>>>>
<<<<<<<
var x = node.x;
var y = node.y;
var width = node.width || 0;
var height = node.height || 0;
var rotation = node.rotation || 0;
var originX = (typeof node.originX === 'number') ? node.originX : this.width / 2;
var originY = (typeof node.originY === 'number') ? node.originY : this.height / 2;
var scaleX = (typeof node.scaleX === 'number') ? node.scaleX : 1;
var scaleY = (typeof node.scaleY === 'number') ? node.scaleY : 1;
var theta = rotation * Math.PI / 180;
=======
var x = node._x;
var y = node._y;
var width = node._width || 0;
var height = node._height || 0;
var rotation = node._rotation || 0;
var scaleX = (typeof node._scaleX === 'number') ? node._scaleX : 1;
var scaleY = (typeof node._scaleY === 'number') ? node._scaleY : 1;
var theta = rotation * Math.PI / 180;
>>>>>>>
var x = node._x;
var y = node._y;
var width = node._width || 0;
var height = node._height || 0;
var rotation = node._rotation || 0;
var scaleX = (typeof node._scaleX === 'number') ? node._scaleX : 1;
var scaleY = (typeof node._scaleY === 'number') ? node._scaleY : 1;
var theta = rotation * Math.PI / 180;
<<<<<<<
var dirtyCheck = function(node) {
if (node._dirty) {
makeTransformMatrix(node, node._cvsCache.matrix);
node._cvsCache.x = node.x;
node._cvsCache.y = node.y;
node._cvsCache.width = node.width;
node._cvsCache.height = node.height;
node._dirty = false;
}
};
=======
>>>>>>>
<<<<<<<
ctx.globalAlpha = (typeof node.opacity === 'number') ? node.opacity : 1.0;
=======
ctx.globalAlpha = (typeof node.opacity === 'number') ? node.opacity : 1.0;
};
var _multiply = function(m1, m2, dest) {
var a11 = m1[0], a21 = m1[2], adx = m1[4],
a12 = m1[1], a22 = m1[3], ady = m1[5];
var b11 = m2[0], b21 = m2[2], bdx = m2[4],
b12 = m2[1], b22 = m2[3], bdy = m2[5];
dest[0] = a11 * b11 + a21 * b12;
dest[1] = a12 * b11 + a22 * b12;
dest[2] = a11 * b21 + a21 * b22;
dest[3] = a12 * b21 + a22 * b22;
dest[4] = a11 * bdx + a21 * bdy + adx;
dest[5] = a12 * bdx + a22 * bdy + ady;
};
var _multiplyVec = function(mat, vec, dest) {
var x = vec[0], y = vec[1];
var m11 = mat[0], m21 = mat[2], mdx = mat[4],
m12 = mat[1], m22 = mat[3], mdy = mat[5];
dest[0] = m11 * x + m21 * y + mdx;
dest[1] = m12 * x + m22 * y + mdy;
};
var _stuck = [ [ 1, 0, 0, 1, 0, 0 ] ];
var _transform = function(mat) {
var newmat = [];
_multiply(_stuck[_stuck.length - 1], mat, newmat);
_stuck.push(newmat);
>>>>>>>
ctx.globalAlpha = (typeof node.opacity === 'number') ? node.opacity : 1.0;
};
var _multiply = function(m1, m2, dest) {
var a11 = m1[0], a21 = m1[2], adx = m1[4],
a12 = m1[1], a22 = m1[3], ady = m1[5];
var b11 = m2[0], b21 = m2[2], bdx = m2[4],
b12 = m2[1], b22 = m2[3], bdy = m2[5];
dest[0] = a11 * b11 + a21 * b12;
dest[1] = a12 * b11 + a22 * b12;
dest[2] = a11 * b21 + a21 * b22;
dest[3] = a12 * b21 + a22 * b22;
dest[4] = a11 * bdx + a21 * bdy + adx;
dest[5] = a12 * bdx + a22 * bdy + ady;
};
var _multiplyVec = function(mat, vec, dest) {
var x = vec[0], y = vec[1];
var m11 = mat[0], m21 = mat[2], mdx = mat[4],
m12 = mat[1], m22 = mat[3], mdy = mat[5];
dest[0] = m11 * x + m21 * y + mdx;
dest[1] = m12 * x + m22 * y + mdy;
};
var _stuck = [ [ 1, 0, 0, 1, 0, 0 ] ];
var _transform = function(mat) {
var newmat = [];
_multiply(_stuck[_stuck.length - 1], mat, newmat);
_stuck.push(newmat);
<<<<<<<
var attachCache = function(colorManager) {
if (this._cvsCache) {
return;
}
this._cvsCache = {};
this._cvsCache.matrix = [];
this._cvsCache.detectColor = array2hexrgb(colorManager.attachDetectColor(this));
};
var detachCache = function(colorManager) {
if (!this._cvsCache) {
return;
}
colorManager.detachDetectColor(this);
delete this._cvsCache;
};
var checkCache = nodesWalker(
=======
var attachCache = nodesWalker(
>>>>>>>
var attachCache = nodesWalker( |
<<<<<<<
var game = enchant.Game.instance;
if (this.width !== 0 && this.height !== 0) {
ctx.save();
ctx.setTransform(1, 0, 0, 1, 0, 0);
var cvs = this._context.canvas;
ctx.drawImage(cvs, 0, 0, game.width, game.height);
ctx.restore();
}
=======
var core = enchant.Core.instance;
ctx.save();
ctx.setTransform(1, 0, 0, 1, 0, 0);
var cvs = this._context.canvas;
ctx.drawImage(cvs, 0, 0, core.width, core.height);
ctx.restore();
>>>>>>>
var core = enchant.Core.instance;
if (this.width !== 0 && this.height !== 0) {
ctx.save();
ctx.setTransform(1, 0, 0, 1, 0, 0);
var cvs = this._context.canvas;
ctx.drawImage(cvs, 0, 0, core.width, core.height);
ctx.restore();
} |
<<<<<<<
=======
this._spriteImageDirty = false;
>>>>>>> |
<<<<<<<
=======
this._setFrame(this._frame);
>>>>>>>
this._setFrame(this._frame);
<<<<<<<
initialize: function(tileWidth, tileHeight) {
var game = enchant.Game.instance;
enchant.Entity.call(this);
var canvas = document.createElement('canvas');
canvas.style.position = 'absolute';
if (enchant.ENV.RETINA_DISPLAY && game.scale === 2) {
canvas.width = game.width * 2;
canvas.height = game.height * 2;
this._style.webkitTransformOrigin = '0 0';
this._style.webkitTransform = 'scale(0.5)';
} else {
canvas.width = game.width;
canvas.height = game.height;
}
this._context = canvas.getContext('2d');
this._tileWidth = tileWidth || 0;
this._tileHeight = tileHeight || 0;
this._image = null;
this._data = [
[
[]
]
];
this._dirty = false;
this._tight = false;
this.touchEnabled = false;
/**
[lang:ja]
* タイルが衝突判定を持つかを表す値の二元配列.
* @type {Array.<Array.<Number>>}
[/lang]
[lang:en]
* Two dimensional array to show level of tiles with collision detection.
* @type {Array.<Array.<Number>>}
[/lang]
*/
this.collisionData = null;
=======
this.collisionData = null;
>>>>>>>
this.collisionData = null;
<<<<<<<
this._tight = false;
for (var i = 0, len = this._data.length; i < len; i++) {
var c = 0;
data = this._data[i];
for (var y = 0, l = data.length; y < l; y++) {
for (var x = 0, ll = data[y].length; x < ll; x++) {
if (data[y][x] >= 0) {
c++;
}
=======
this._tight = false;
for (var i = 0, len = this._data.length; i < len; i++) {
var c = 0;
data = this._data[i];
for (var y = 0, l = data.length; y < l; y++) {
for (var x = 0, ll = data[y].length; x < ll; x++) {
if (data[y][x] >= 0) {
c++;
>>>>>>>
this._tight = false;
for (var i = 0, len = this._data.length; i < len; i++) {
var c = 0;
data = this._data[i];
for (var y = 0, l = data.length; y < l; y++) {
for (var x = 0, ll = data[y].length; x < ll; x++) {
if (data[y][x] >= 0) {
c++;
<<<<<<<
});
}());
=======
}
});
>>>>>>>
}
});
<<<<<<<
this._originX = null;
this._originY = null;
this._rotation = 0;
[enchant.Event.ADDED_TO_SCENE, enchant.Event.REMOVED_FROM_SCENE]
.forEach(function(event) {
this.addEventListener(event, function(e) {
this.childNodes.forEach(function(child) {
child.scene = this.scene;
child.dispatchEvent(e);
}, this);
});
}, this);
=======
this._rotation = 0;
this._scaleX = 1;
this._scaleY = 1;
this._originX = null;
this._originY = null;
[enchant.Event.ADDED_TO_SCENE, enchant.Event.REMOVED_FROM_SCENE]
.forEach(function(event) {
this.addEventListener(event, function(e) {
this.childNodes.forEach(function(child) {
child.scene = this.scene;
child.dispatchEvent(e);
}, this);
});
}, this);
>>>>>>>
this._rotation = 0;
this._scaleX = 1;
this._scaleY = 1;
this._originX = null;
this._originY = null;
[enchant.Event.ADDED_TO_SCENE, enchant.Event.REMOVED_FROM_SCENE]
.forEach(function(event) {
this.addEventListener(event, function(e) {
this.childNodes.forEach(function(child) {
child.scene = this.scene;
child.dispatchEvent(e);
}, this);
});
}, this);
<<<<<<<
set: function(originX) {
this._originX = originX;
this._dirty = true;
=======
set: function(scale) {
this._scaleX = scale;
this._dirty = true;
>>>>>>>
set: function(scale) {
this._scaleX = scale;
this._dirty = true;
<<<<<<<
set: function(originY) {
this._originY = originY;
this._dirty = true;
=======
set: function(scale) {
this._scaleY = scale;
this._dirty = true;
}
},
/**
* origin point of rotation, scaling
* @type {Number}
*/
originX: {
get: function() {
return this._originX;
},
set: function(originX) {
this._originX = originX;
this._dirty = true;
}
},
/**
* origin point of rotation, scaling
* @type {Number}
*/
originY: {
get: function() {
return this._originY;
},
set: function(originY) {
this._originY = originY;
this._dirty = true;
>>>>>>>
set: function(scale) {
this._scaleY = scale;
this._dirty = true;
}
},
/**
* origin point of rotation, scaling
* @type {Number}
*/
originX: {
get: function() {
return this._originX;
},
set: function(originX) {
this._originX = originX;
this._dirty = true;
}
},
/**
* origin point of rotation, scaling
* @type {Number}
*/
originY: {
get: function() {
return this._originY;
},
set: function(originY) {
this._originY = originY;
this._dirty = true;
<<<<<<<
this._scaleX = 1;
this._scaleY = 1;
=======
>>>>>>>
<<<<<<<
propagationUp.call(this._touching, e, this.parentNode);
this._touching = null;
},
/**
* scaling of group in the direction of x axis
* @see enchant.CanvasGroup.originX
* @see enchant.CanvasGroup.originY
* @type {Number}
*/
scaleX: {
get: function() {
return this._scaleX;
},
set: function(scale) {
this._scaleX = scale;
this._dirty = true;
}
},
/**
* scaling of group in the direction of y axis
* @see enchant.CanvasGroup.originX
* @see enchant.CanvasGroup.originY
* @type {Number}
*/
scaleY: {
get: function() {
return this._scaleY;
},
set: function(scale) {
this._scaleY = scale;
this._dirty = true;
}
},
addChild: function(node) {
this.childNodes.push(node);
node.parentNode = this;
node.dispatchEvent(new enchant.Event('added'));
if (this.scene) {
node.scene = this.scene;
var e = new enchant.Event('addedtoscene');
_onaddedtoscene.call(node, e, this._colorManager);
}
},
insertBefore: function(node, reference) {
var i = this.childNodes.indexOf(reference);
if (i !== -1) {
this.childNodes.splice(i, 0, node);
node.parentNode = this;
node.dispatchEvent(new enchant.Event('added'));
if (this.scene) {
node.scene = this.scene;
var e = new enchant.Event('addedtoscene');
_onaddedtoscene.call(node, e, this._colorManager);
}
} else {
this.addChild(node);
}
},
removeChild: function(node) {
var i;
if ((i = this.childNodes.indexOf(node)) !== -1) {
this.childNodes.splice(i, 1);
node.parentNode = null;
node.dispatchEvent(new enchant.Event('removed'));
if (this.scene) {
node.scene = null;
var e = new enchant.Event('removedfromscene');
_onremovedfromscene.call(node, e, this._colorManager);
}
}
=======
propagationUp.call(this._touching, e, this.parentNode);
this._touching = null;
>>>>>>>
propagationUp.call(this._touching, e, this.parentNode);
this._touching = null;
<<<<<<<
enchant.Map.prototype.cvsRender = function(ctx) {
var game = enchant.Game.instance;
ctx.save();
ctx.setTransform(1, 0, 0, 1, 0, 0);
var cvs = this._context.canvas;
ctx.drawImage(cvs, 0, 0, game.width, game.height);
ctx.restore();
};
enchant.Sprite.prototype.cvsRender = function(ctx) {
var img, imgdata, row, frame;
var sx, sy, sw, sh;
if (this._image) {
frame = Math.abs(this._frame) || 0;
img = this._image;
imgdata = img._element;
row = img.width / this._width | 0;
sx = (frame % row | 0) * this._width;
sy = (frame / row | 0) * this._height % img.height;
sy = Math.min(sy, img.height - this._height);
sw = Math.min(img.width - sx, this._width);
sh = Math.min(img.height - sy, this._height);
ctx.drawImage(imgdata, sx, sy, sw, sh, RENDER_OFFSET, RENDER_OFFSET, this._width + RENDER_OFFSET, this._height + RENDER_OFFSET);
}
};
enchant.Label.prototype.cvsRender = function(ctx) {
if (this.text) {
ctx.textBaseline = 'top';
ctx.font = this.font;
ctx.fillStyle = this.color || '#000000';
ctx.fillText(this.text, RENDER_OFFSET, RENDER_OFFSET);
}
};
=======
>>>>>>>
<<<<<<<
var x = node.x;
var y = node.y;
var width = node.width || 0;
var height = node.height || 0;
var rotation = node.rotation || 0;
var originX = (typeof node.originX === 'number') ? node.originX : this.width / 2;
var originY = (typeof node.originY === 'number') ? node.originY : this.height / 2;
var scaleX = (typeof node.scaleX === 'number') ? node.scaleX : 1;
var scaleY = (typeof node.scaleY === 'number') ? node.scaleY : 1;
var theta = rotation * Math.PI / 180;
=======
var x = node._x;
var y = node._y;
var width = node._width || 0;
var height = node._height || 0;
var rotation = node._rotation || 0;
var scaleX = (typeof node._scaleX === 'number') ? node._scaleX : 1;
var scaleY = (typeof node._scaleY === 'number') ? node._scaleY : 1;
var theta = rotation * Math.PI / 180;
>>>>>>>
var x = node._x;
var y = node._y;
var width = node._width || 0;
var height = node._height || 0;
var rotation = node._rotation || 0;
var scaleX = (typeof node._scaleX === 'number') ? node._scaleX : 1;
var scaleY = (typeof node._scaleY === 'number') ? node._scaleY : 1;
var theta = rotation * Math.PI / 180;
<<<<<<<
var dirtyCheck = function(node) {
if (node._dirty) {
makeTransformMatrix(node, node._cvsCache.matrix);
node._cvsCache.x = node.x;
node._cvsCache.y = node.y;
node._cvsCache.width = node.width;
node._cvsCache.height = node.height;
node._dirty = false;
}
};
=======
>>>>>>>
<<<<<<<
ctx.globalAlpha = (typeof node.opacity === 'number') ? node.opacity : 1.0;
=======
ctx.globalAlpha = (typeof node.opacity === 'number') ? node.opacity : 1.0;
};
var _multiply = function(m1, m2, dest) {
var a11 = m1[0], a21 = m1[2], adx = m1[4],
a12 = m1[1], a22 = m1[3], ady = m1[5];
var b11 = m2[0], b21 = m2[2], bdx = m2[4],
b12 = m2[1], b22 = m2[3], bdy = m2[5];
dest[0] = a11 * b11 + a21 * b12;
dest[1] = a12 * b11 + a22 * b12;
dest[2] = a11 * b21 + a21 * b22;
dest[3] = a12 * b21 + a22 * b22;
dest[4] = a11 * bdx + a21 * bdy + adx;
dest[5] = a12 * bdx + a22 * bdy + ady;
};
var _multiplyVec = function(mat, vec, dest) {
var x = vec[0], y = vec[1];
var m11 = mat[0], m21 = mat[2], mdx = mat[4],
m12 = mat[1], m22 = mat[3], mdy = mat[5];
dest[0] = m11 * x + m21 * y + mdx;
dest[1] = m12 * x + m22 * y + mdy;
};
var _stuck = [ [ 1, 0, 0, 1, 0, 0 ] ];
var _transform = function(mat) {
var newmat = [];
_multiply(_stuck[_stuck.length - 1], mat, newmat);
_stuck.push(newmat);
>>>>>>>
ctx.globalAlpha = (typeof node.opacity === 'number') ? node.opacity : 1.0;
};
var _multiply = function(m1, m2, dest) {
var a11 = m1[0], a21 = m1[2], adx = m1[4],
a12 = m1[1], a22 = m1[3], ady = m1[5];
var b11 = m2[0], b21 = m2[2], bdx = m2[4],
b12 = m2[1], b22 = m2[3], bdy = m2[5];
dest[0] = a11 * b11 + a21 * b12;
dest[1] = a12 * b11 + a22 * b12;
dest[2] = a11 * b21 + a21 * b22;
dest[3] = a12 * b21 + a22 * b22;
dest[4] = a11 * bdx + a21 * bdy + adx;
dest[5] = a12 * bdx + a22 * bdy + ady;
};
var _multiplyVec = function(mat, vec, dest) {
var x = vec[0], y = vec[1];
var m11 = mat[0], m21 = mat[2], mdx = mat[4],
m12 = mat[1], m22 = mat[3], mdy = mat[5];
dest[0] = m11 * x + m21 * y + mdx;
dest[1] = m12 * x + m22 * y + mdy;
};
var _stuck = [ [ 1, 0, 0, 1, 0, 0 ] ];
var _transform = function(mat) {
var newmat = [];
_multiply(_stuck[_stuck.length - 1], mat, newmat);
_stuck.push(newmat);
<<<<<<<
var attachCache = function(colorManager) {
if (this._cvsCache) {
return;
}
this._cvsCache = {};
this._cvsCache.matrix = [];
this._cvsCache.detectColor = array2hexrgb(colorManager.attachDetectColor(this));
};
var detachCache = function(colorManager) {
if (!this._cvsCache) {
return;
}
colorManager.detachDetectColor(this);
delete this._cvsCache;
};
var checkCache = nodesWalker(
=======
var attachCache = nodesWalker(
>>>>>>>
var attachCache = nodesWalker( |
<<<<<<<
this._dirty = false;
this.redraw(0, 0, core.width, core.height);
=======
this.redraw(0, 0, game.width, game.height);
>>>>>>>
this.redraw(0, 0, core.width, core.height);
<<<<<<<
if (core._debug) {
if (node instanceof enchant.Label || node instanceof enchant.Sprite) {
ctx.strokeStyle = '#ff0000';
=======
enchant.DomlessManager = enchant.Class.create({
initialize: function(node) {
this._domRef = [];
this.targetNode = node;
},
_register: function(element, nextElement) {
var i = this._domRef.indexOf(nextElement);
if (element instanceof DocumentFragment) {
if (i === -1) {
Array.prototype.push.apply(this._domRef, element.childNodes);
>>>>>>>
enchant.DomlessManager = enchant.Class.create({
initialize: function(node) {
this._domRef = [];
this.targetNode = node;
},
_register: function(element, nextElement) {
var i = this._domRef.indexOf(nextElement);
if (element instanceof DocumentFragment) {
if (i === -1) {
Array.prototype.push.apply(this._domRef, element.childNodes);
<<<<<<<
*
* @example
* var scene = new CanvasScene();
* scene.addChild(player);
* scene.addChild(enemy);
* core.pushScene(scene);
*
=======
>>>>>>>
<<<<<<<
this._element.style[enchant.ENV.VENDOR_PREFIX + 'Transform'] = 'scale(' + enchant.Core.instance.scale + ')';
=======
this._element.style[enchant.ENV.VENDOR_PREFIX + 'Transform'] = 'scale(' + enchant.Game.instance.scale + ')';
this._layers = {};
this._layerPriority = [];
this.addLayer('Canvas');
this.addLayer('Dom');
this.addEventListener(enchant.Event.CHILD_ADDED, this._onchildadded);
this.addEventListener(enchant.Event.CHILD_REMOVED, this._onchildremoved);
this.addEventListener(enchant.Event.ENTER, this._onenter);
this.addEventListener(enchant.Event.EXIT, this._onexit);
>>>>>>>
this._element.style[enchant.ENV.VENDOR_PREFIX + 'Transform'] = 'scale(' + enchant.Game.instance.scale + ')';
this._layers = {};
this._layerPriority = [];
this.addLayer('Canvas');
this.addLayer('Dom');
this.addEventListener(enchant.Event.CHILD_ADDED, this._onchildadded);
this.addEventListener(enchant.Event.CHILD_REMOVED, this._onchildremoved);
this.addEventListener(enchant.Event.ENTER, this._onenter);
this.addEventListener(enchant.Event.EXIT, this._onexit);
var that = this;
this._dispatchExitframe = function() {
var layer;
for (var prop in that._layers) {
layer = that._layers[prop];
layer.dispatchEvent(new enchant.Event(enchant.Event.EXIT_FRAME));
}
}; |
<<<<<<<
export { default as RatingBadge } from './RatingBadge'
=======
export { default as OutlineButton } from './OutlineButton'
export { default as RedButton } from './RedButton'
>>>>>>>
export { default as OutlineButton } from './OutlineButton'
export { default as RatingBadge } from './RatingBadge'
export { default as RedButton } from './RedButton' |
<<<<<<<
<RadioInput type="radio" {...props} />
<Icon name={radioIconName} size={24} />
=======
<RadioInput id="radio-input" type="radio" {...props} />
<RadioIcon name={radioIconName} size={24} />
>>>>>>>
<RadioInput type="radio" {...props} />
<RadioIcon name={radioIconName} size={24} /> |
<<<<<<<
class Landing extends Component {
render() {
return (
<div className={styles.landing}>
<div className={styles.pageHeading}>
<h1>The largest community dedicated to helping military veterans and
families launch software development careers.</h1>
<LinkButton text="Join" theme="red" link="/signup" />
</div>
<GalaBanner />
<WhatWeDo />
<Membership />
<MoreInformation />
<SuccessStories />
<Partners />
<Donate />
<Join />
</div>
);
}
}
=======
const Landing = () => (
<div className={styles.landing}>
<div className={styles.pageHeading}>
<h1>The largest community dedicated to helping military veterans and
families launch software development careers.</h1>
<LinkButton text="Join" theme="red" link="/signup" />
</div>
<WhatWeDo />
<Membership />
<MoreInformation />
<Partners />
<Donate />
<Join />
</div>
);
>>>>>>>
const Landing = () => (
<div className={styles.landing}>
<div className={styles.pageHeading}>
<h1>The largest community dedicated to helping military veterans and
families launch software development careers.</h1>
<LinkButton text="Join" theme="red" link="/signup" />
</div>
<WhatWeDo />
<Membership />
<MoreInformation />
<SuccessStories />
<Partners />
<Donate />
<Join />
</div>
); |
<<<<<<<
class MentorshipProgram extends React.Component {
componentDidMount() {
const { hash } = window.location;
if (hash !== '') {
const id = hash.replace('#', '');
const element = document.getElementById(id);
if (element) {
setTimeout(() => {
element.scrollIntoView();
}, 0);
}
}
}
render() {
return (
<Section title="Mentorship Program" id="mentorshipProgram">
<div className={styles.flexContainer}>
<div className={styles.featureHeading}>
<FaCheck size={this.props.fontSize} />
<p>What It Is</p>
</div>
<div className={styles.featureDescription}>
<ul>
<li>
A one-on-one session via phone call or Slack aimed at having professional developers
guide your next steps.
</li>
<li>
Friendly monitoring from a volunteer staff member, encouraging you to keep working
towards your goal.
</li>
<li>An environment of friendly support from developers of many experience levels.</li>
<li>A phenomenal tool for growth in your journey into the tech industry.</li>
</ul>
</div>
</div>
<div className={styles.flexContainer}>
<div className={styles.featureHeading}>
<FaBan size={this.props.fontSize} />
<p>What It Isn't</p>
</div>
<div className={styles.featureDescription}>
<ul>
<li>
A live "Ask Jeeves" alternative. Mentors are happy to help you, but also
expert a certain degree of individual effort. Please spend time{' '}
<a
href="https://community.operationcode.org/t/the-art-of-asking-questions/121"
target="_blank"
rel="noopener noreferrer"
>
learning how to ask questions
</a>{' '}
and Googling for yourself before going to our volunteers for aid.
</li>
<li>
A guarantee that someone will work with you on a long-term basis. All our mentors work
on a volunteer basis, taking on mentees as their schedule allows.
</li>
</ul>
</div>
</div>
</Section>
);
}
}
=======
const MentorshipProgram = ({ fontSize }) => (
<Section title="Mentorship Program">
<div className={styles.flexContainer}>
<div className={styles.featureHeading}>
<FaCheck size={fontSize} />
<p>What It Is</p>
</div>
<div className={styles.featureDescription}>
<ul>
<li>
A one-on-one session via phone call or Slack aimed at having professional developers
guide your next steps.
</li>
<li>
Friendly monitoring from a volunteer staff member, encouraging you to keep working
towards your goal.
</li>
<li>An environment of friendly support from developers of many experience levels.</li>
<li>A phenomenal tool for growth in your journey into the tech industry.</li>
</ul>
</div>
</div>
<div className={styles.flexContainer}>
<div className={styles.featureHeading}>
<FaBan size={fontSize} />
<p>What It Isn't</p>
</div>
<div className={styles.featureDescription}>
<ul>
<li>
A live "Ask Jeeves" alternative. Mentors are happy to help you, but also
expect a certain degree of individual effort. Please spend time{' '}
<a
href="https://community.operationcode.org/t/the-art-of-asking-questions/121"
target="_blank"
rel="noopener noreferrer"
>
learning how to ask questions
</a>{' '}
and Googling for yourself before going to our volunteers for aid.
</li>
<li>
A guarantee that someone will work with you on a long-term basis. All our mentors work
on a volunteer basis, taking on mentees as their schedule allows.
</li>
</ul>
</div>
</div>
</Section>
);
>>>>>>>
class MentorshipProgram extends React.Component {
componentDidMount() {
const { hash } = window.location;
if (hash !== '') {
const id = hash.replace('#', '');
const element = document.getElementById(id);
if (element) {
setTimeout(() => {
element.scrollIntoView();
}, 0);
}
}
}
render() {
return (
<Section title="Mentorship Program" id="mentorshipProgram">
<div className={styles.flexContainer}>
<div className={styles.featureHeading}>
<FaCheck size={this.props.fontSize} />
<p>What It Is</p>
</div>
<div className={styles.featureDescription}>
<ul>
<li>
A one-on-one session via phone call or Slack aimed at having professional developers
guide your next steps.
</li>
<li>
Friendly monitoring from a volunteer staff member, encouraging you to keep working
towards your goal.
</li>
<li>An environment of friendly support from developers of many experience levels.</li>
<li>A phenomenal tool for growth in your journey into the tech industry.</li>
</ul>
</div>
</div>
<div className={styles.flexContainer}>
<div className={styles.featureHeading}>
<FaBan size={this.props.fontSize} />
<p>What It Isn't</p>
</div>
<div className={styles.featureDescription}>
<ul>
<li>
A live "Ask Jeeves" alternative. Mentors are happy to help you, but also
expect a certain degree of individual effort. Please spend time{' '}
<a
href="https://community.operationcode.org/t/the-art-of-asking-questions/121"
target="_blank"
rel="noopener noreferrer"
>
learning how to ask questions
</a>{' '}
and Googling for yourself before going to our volunteers for aid.
</li>
<li>
A guarantee that someone will work with you on a long-term basis. All our mentors work
on a volunteer basis, taking on mentees as their schedule allows.
</li>
</ul>
</div>
</div>
</Section>
);
}
} |
<<<<<<<
import { FaClose } from 'react-icons/lib/fa';
// import LinkButton from 'shared/components/linkButton/linkButton';
import TriGroup from './triGroup/triGroup';
=======
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import { faTimes } from '@fortawesome/fontawesome-free-solid';
import LinkButton from 'shared/components/linkButton/linkButton';
import WhatWeDo from './whatWeDo/whatWeDo';
>>>>>>>
import TriGroup from './triGroup/triGroup';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import { faTimes } from '@fortawesome/fontawesome-free-solid'; |
<<<<<<<
'SCATTER' : { 'displayName':'Scatter Chart', 'name':'scatter' },
'BAR3D' : { 'displayName':'3D Bar Chart' , 'name':'bar3D' }
=======
'SCATTER' : { 'displayName':'Scatter Chart', 'name':'scatter' },
'RADAR' : { 'displayName':'Radar Chart', 'name':'radar' }
>>>>>>>
'SCATTER' : { 'displayName':'Scatter Chart', 'name':'scatter' },
'RADAR' : { 'displayName':'Radar Chart', 'name':'radar' },
'BAR3D' : { 'displayName':'3D Bar Chart' , 'name':'bar3D' }
<<<<<<<
case 'bar3D':
=======
case 'radar':
>>>>>>>
case 'bar3D':
case 'radar':
<<<<<<<
// 3: Add more chart options (gapWidth, line Marker, etc.)
=======
// 3: "Data Labels"
{
strXml += ' <c:dLbls>';
strXml += ' <c:numFmt formatCode="'+ opts.dataLabelFormatCode +'" sourceLinked="0"/>';
strXml += ' <c:txPr>';
strXml += ' <a:bodyPr/>';
strXml += ' <a:lstStyle/>';
strXml += ' <a:p><a:pPr>';
strXml += ' <a:defRPr b="0" i="0" strike="noStrike" sz="'+ (opts.dataLabelFontSize || DEF_FONT_SIZE) +'00" u="none">';
strXml += ' <a:solidFill>'+ createColorElement(opts.dataLabelColor || DEF_FONT_COLOR) +'</a:solidFill>';
strXml += ' <a:latin typeface="'+ (opts.dataLabelFontFace || 'Arial') +'"/>';
strXml += ' </a:defRPr>';
strXml += ' </a:pPr></a:p>';
strXml += ' </c:txPr>';
if ( opts.type.name != 'area' && opts.type.name != 'radar') strXml += '<c:dLblPos val="'+ (opts.dataLabelPosition || 'outEnd') +'"/>';
strXml += ' <c:showLegendKey val="0"/>';
strXml += ' <c:showVal val="'+ (opts.showValue ? '1' : '0') +'"/>';
strXml += ' <c:showCatName val="0"/>';
strXml += ' <c:showSerName val="0"/>';
strXml += ' <c:showPercent val="0"/>';
strXml += ' <c:showBubbleSize val="0"/>';
strXml += ' <c:showLeaderLines val="0"/>';
strXml += ' </c:dLbls>';
}
// 4: Add more chart options (gapWidth, line Marker, etc.)
>>>>>>>
// 3: "Data Labels"
{
strXml += ' <c:dLbls>';
strXml += ' <c:numFmt formatCode="'+ opts.dataLabelFormatCode +'" sourceLinked="0"/>';
strXml += ' <c:txPr>';
strXml += ' <a:bodyPr/>';
strXml += ' <a:lstStyle/>';
strXml += ' <a:p><a:pPr>';
strXml += ' <a:defRPr b="0" i="0" strike="noStrike" sz="'+ (opts.dataLabelFontSize || DEF_FONT_SIZE) +'00" u="none">';
strXml += ' <a:solidFill>'+ createColorElement(opts.dataLabelColor || DEF_FONT_COLOR) +'</a:solidFill>';
strXml += ' <a:latin typeface="'+ (opts.dataLabelFontFace || 'Arial') +'"/>';
strXml += ' </a:defRPr>';
strXml += ' </a:pPr></a:p>';
strXml += ' </c:txPr>';
if ( opts.type.name != 'area' && opts.type.name != 'radar') strXml += '<c:dLblPos val="'+ (opts.dataLabelPosition || 'outEnd') +'"/>';
strXml += ' <c:showLegendKey val="0"/>';
strXml += ' <c:showVal val="'+ (opts.showValue ? '1' : '0') +'"/>';
strXml += ' <c:showCatName val="0"/>';
strXml += ' <c:showSerName val="0"/>';
strXml += ' <c:showPercent val="0"/>';
strXml += ' <c:showBubbleSize val="0"/>';
strXml += ' <c:showLeaderLines val="0"/>';
strXml += ' </c:dLbls>';
}
// 4: Add more chart options (gapWidth, line Marker, etc.) |
<<<<<<<
import StyledButton from '../../components/styled/styled-button';
=======
import UnderConstruction from "../../components/utils/under-construction";
import Button from 'react-bootstrap/Button';
>>>>>>>
import StyledButton from '../../components/styled/styled-button';
import UnderConstruction from "../../components/utils/under-construction"; |
<<<<<<<
import StyledButton from '../../components/styled/styled-button';
=======
import UnderConstruction from '../../components/utils/under-construction';
>>>>>>>
import StyledButton from '../../components/styled/styled-button';
import UnderConstruction from '../../components/utils/under-construction'; |
<<<<<<<
reClassNameCache: {},
each: function(fn) {
for ( var i = 0, len = this.elements.length; i<len; ++i ) {
fn.call(this,this.elements[i]);
}
return this;
},
setStyle: function(prop, val) {
this.each(function(el) {
el.style[prop] = val;
});
return this;
},
// EXP - Not Chainable
getStyle: function(oElm, strCssRule) {
var strValue = "";
if(document.defaultView && document.defaultView.getComputedStyle){
strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
=======
reClassNameCache: {},
each: function(fn) {
for ( var i = 0, len = this.elements.length; i<len; ++i ) {
fn.call(this,this.elements[i]);
}
return this;
},
setStyle: function(prop, val) {
this.each(function(el) {
el.style[prop] = val;
});
return this;
},
getClassRegEx: function(className) {
var re = this.reClassNameCache[className];
if (!re) {
re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
this.reClassNameCache[className] = re;
}
return re;
},
addClass: function(className) {
this.each(function(el) {
el.className += ' '+className;
});
return this;
},
hasClass: function(el,className) {
var re = this.getClassRegEx(className);
return re.test(el.className);
},
removeClass:function(className) {
var re = this.getClassRegEx(className);
this.each(function(el) {
el.className = el.className.replace(re, ' ');
});
return this;
},
toggleClass:function(className) {
var that = this;
this.each(function(el) {
(this.hasClass(el,className)==true)? this.removeClass(className) : this.addClass(className);
});
return this;
},
// Event System
eventfunctions : [],
click: function(fn) { return this.on('click',fn); },
dblclick: function(fn) { return this.on('dblclick',fn); },
load: function(fn) { return this.on('load',fn); },
on: function(type, fn) {
var listen = function(el) {
if (window.addEventListener) {
el.addEventListener(type, fn, false);
}
};
this.each(function(el) {
listen(el);
});
return this;
},
subscribe: function(fn) {
this.eventfunctions.push(fn);
},
unsubscribe: function(fn) {
this.eventfunctions = this.eventfunctions.filter (
function(el) {
if ( el !== fn ) {
return el;
}
}
);
},
fire: function(o, thisObj) {
var scope = thisObj || window;
this.eventfunctions.forEach(
function(el) {
el.call(scope, o);
}
);
},
stop: function(e) {
if(window.event && window.event.returnValue)
window.event.returnValue = false;
if(e && e.preventDefault)
e.preventDefault();
},
css: function(o) {
var that = this;
this.each(function(el) {
for (var prop in o) {
that.setStyle(prop, o[prop]);
>>>>>>>
reClassNameCache: {},
each: function(fn) {
for ( var i = 0, len = this.elements.length; i<len; ++i ) {
fn.call(this,this.elements[i]);
}
return this;
},
setStyle: function(prop, val) {
this.each(function(el) {
el.style[prop] = val;
});
return this;
},
// EXP - Not Chainable
getStyle: function(oElm, strCssRule) {
var strValue = "";
if(document.defaultView && document.defaultView.getComputedStyle){
strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
},
getClassRegEx: function(className) {
var re = this.reClassNameCache[className];
if (!re) {
re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
this.reClassNameCache[className] = re;
}
return re;
},
addClass: function(className) {
this.each(function(el) {
el.className += ' '+className;
});
return this;
},
hasClass: function(el,className) {
var re = this.getClassRegEx(className);
return re.test(el.className);
},
removeClass:function(className) {
var re = this.getClassRegEx(className);
this.each(function(el) {
el.className = el.className.replace(re, ' ');
});
return this;
},
toggleClass:function(className) {
var that = this;
this.each(function(el) {
(this.hasClass(el,className)==true)? this.removeClass(className) : this.addClass(className);
});
return this;
},
// Event System
eventfunctions : [],
click: function(fn) { return this.on('click',fn); },
dblclick: function(fn) { return this.on('dblclick',fn); },
load: function(fn) { return this.on('load',fn); },
on: function(type, fn) {
var listen = function(el) {
if (window.addEventListener) {
el.addEventListener(type, fn, false);
}
};
this.each(function(el) {
listen(el);
});
return this;
},
subscribe: function(fn) {
this.eventfunctions.push(fn);
},
unsubscribe: function(fn) {
this.eventfunctions = this.eventfunctions.filter (
function(el) {
if ( el !== fn ) {
return el;
}
}
);
},
fire: function(o, thisObj) {
var scope = thisObj || window;
this.eventfunctions.forEach(
function(el) {
el.call(scope, o);
}
);
},
stop: function(e) {
if(window.event && window.event.returnValue)
window.event.returnValue = false;
if(e && e.preventDefault)
e.preventDefault();
},
css: function(o) {
var that = this;
this.each(function(el) {
for (var prop in o) {
that.setStyle(prop, o[prop]); |
<<<<<<<
} from './status/StatusIndicator';
export {fetch, fetchData} from './fetch'
export {
PipelineResult,
SvgDuration,
SvgTime,
SvgError,
SvgSuccess,
} from './pipeResult/Result'
=======
} from './status/StatusIndicator';
export {Favorite} from './favorite/Favorite';
>>>>>>>
} from './status/StatusIndicator';
export {fetch, fetchData} from './fetch'
export {
PipelineResult,
SvgDuration,
SvgTime,
SvgError,
SvgSuccess,
} from './pipeResult/Result'
export {Favorite} from './favorite/Favorite'; |
<<<<<<<
} from './status/StatusIndicator';
export ReadableDate from './ReadableDate';
export CommitHash from './CommitHash';
=======
} from './status/StatusIndicator';
export {Favorite} from './favorite/Favorite';
>>>>>>>
} from './status/StatusIndicator';
export {Favorite} from './favorite/Favorite';
export ReadableDate from './ReadableDate';
export CommitHash from './CommitHash'; |
<<<<<<<
=======
<div className="dialog" style={dialogStyles}>
<div className={`header ${result.toLowerCase()}`} style={headerStyle}>
<a onClick={() => this.hide()}
role="button"
className="closeButton"
style={closeButtonStyle}>×</a>
<div className="header-content">
{
head && head[0] ? head : <Header {...titleStyle} {...rest}/>
}
</div>
</div>
<div className="content" style={contentStyle}>
{
body ? body[0] : <Body {...rest}>{children}</Body>
}
</div>
>>>>>>> |
<<<<<<<
closeOnEscapeKey: PropTypes.bool
};
ModalView.defaultProps = {
styles: false,
showOverlay: true,
hideOnOverlayClicked: false,
closeOnEscapeKey: true
=======
>>>>>>>
closeOnEscapeKey: PropTypes.bool |
<<<<<<<
import { TestUtils } from '@jenkins-cd/blueocean-core-js';
=======
import findAndUpdate from '../../main/js/util/find-and-update';
const debugLog = require('debug')('push-events-actions:debug');
>>>>>>>
import { TestUtils } from '@jenkins-cd/blueocean-core-js';
import findAndUpdate from '../../main/js/util/find-and-update';
const debugLog = require('debug')('push-events-actions:debug');
<<<<<<<
=======
const originalFetchJson = actions.fetchJson;
>>>>>>>
<<<<<<<
TestUtils.restoreFetch();
=======
actions.fetchJson = originalFetchJson;
nock.cleanAll();
>>>>>>>
TestUtils.restoreFetch();
nock.cleanAll();
<<<<<<<
return fireEvent().then(() => {
const runs = adminStore.runs['PR-demo'];
assert.equal(runs.length, 1);
assert.equal(runs[0].enQueueTime, '2016-05-19T22:05:39.301+0100');
assert.equal(runs[0].state, 'RUNNING');
});
=======
fireEvent();
var runs = adminStore.runs['PR-demo'];
debugLog('Got PR-demo: ', runs);
assert.equal(runs.length, 1);
assert.equal(runs[0].enQueueTime, '2016-05-19T22:05:39.301+0100');
assert.equal(runs[0].state, 'RUNNING');
>>>>>>>
fireEvent();
var runs = adminStore.runs['PR-demo'];
debugLog('Got PR-demo: ', runs);
assert.equal(runs.length, 1);
assert.equal(runs[0].enQueueTime, '2016-05-19T22:05:39.301+0100');
assert.equal(runs[0].state, 'RUNNING');
<<<<<<<
TestUtils.patchFetchWithData((url) => {
assert.equal(url, '/jenkins/rest/organizations/jenkins/pipelines/PR-demo/branches/quicker/runs/12');
Promise.reject({});
});
=======
mockFetch('/jenkins/rest/organizations/jenkins/pipelines/PR-demo/branches/quicker/runs/12',
new Error());
>>>>>>>
mockFetch('/jenkins/rest/organizations/jenkins/pipelines/PR-demo/branches/quicker/runs/12',
new Error());
<<<<<<<
return dispatcher(function (actualDispatchObj) {
adminStore.runs['PR-demo'] = actualDispatchObj.payload;
=======
dispatcher(function (actualDispatchObj) {
debugLog('dispatch type: ', actualDispatchObj.type, 'with payload:', actualDispatchObj.payload);
if (actualDispatchObj.type == 'FIND_AND_UPDATE') {
debugLog('findAndUpdate: ', adminStore, ' with payload: ', actualDispatchObj.payload);
adminStore = findAndUpdate(adminStore, actualDispatchObj.payload);
debugLog('runs after update: ', adminStore);
} else {
if (actualDispatchObj.type === 'UPDATE_RUN_DETAILS') {
adminStore.runs['PR-demo'] = actualDispatchObj.payload;
}
}
>>>>>>>
dispatcher(function (actualDispatchObj) {
debugLog('dispatch type: ', actualDispatchObj.type, 'with payload:', actualDispatchObj.payload);
if (actualDispatchObj.type == 'FIND_AND_UPDATE') {
debugLog('findAndUpdate: ', adminStore, ' with payload: ', actualDispatchObj.payload);
adminStore = findAndUpdate(adminStore, actualDispatchObj.payload);
debugLog('runs after update: ', adminStore);
} else {
if (actualDispatchObj.type === 'UPDATE_RUN_DETAILS') {
adminStore.runs['PR-demo'] = actualDispatchObj.payload;
}
} |
<<<<<<<
"꒰•̥̥̥̥̥̥̥ ﹏ •̥̥̥̥̥̥̥̥๑꒱",
"ಠ_ರೃ",
"(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू)",
"(ꈨຶꎁꈨຶ)۶”",
"(ꐦ°᷄д°᷅)",
"(۶ૈ ۜ ᵒ̌▱๋ᵒ̌ )۶ૈ=͟͟͞͞ ⌨",
"₍˄·͈༝·͈˄₎◞ ̑̑ෆ⃛",
"(*゚⚙͠ ∀ ⚙͠)ノ❣",
"٩꒰・ัε・ั ꒱۶",
"ヘ(。□°)ヘ",
"˓˓(ृ ु ॑꒳’)ु(ृ’꒳ ॑ ृ )ु˒˒˒",
"꒰✘Д✘◍꒱",
"૮( ᵒ̌ૢཪᵒ̌ૢ )ა",
"“ψ(`∇´)ψ",
"ಠﭛಠ",
"(๑>ᴗ<๑)",
"(۶ꈨຶꎁꈨຶ )۶ʸᵉᵃʰᵎ",
"٩(•̤̀ᵕ•̤́๑)ᵒᵏᵎᵎᵎᵎ",
"(oT-T)尸",
"(✌゚∀゚)☞",
"ಥ‿ಥ",
"ॱ॰⋆(˶ॢ‾᷄﹃‾᷅˵ॢ)",
"┬┴┬┴┤ (ಠ├┬┴┬┴",
"( ˘ ³˘)♥",
"Σ (੭ु ຶਊ ຶ)੭ु⁾⁾",
"(⑅ ॣ•͈ᴗ•͈ ॣ)",
"ヾ(´¬`)ノ",
"(•̀o•́)ง",
"(๑•॒̀ ູ॒•́๑)",
"⚈้̤͡ ˌ̫̮ ⚈้̤͡",
"=͟͟͞͞ =͟͟͞͞ ヘ( ´Д`)ノ",
"(((╹д╹;)))",
"•̀.̫•́✧",
"(ᵒ̤̑ ₀̑ ᵒ̤̑)",
"\_(ʘ_ʘ)_/",
"乙(ツ)乙",
"乙(のっの)乙",
"ヾ(¯∇ ̄๑)",
"\_(ʘ_ʘ)_/",
"༼;´༎ຶ ༎ຶ༽"
=======
"(╯°□°)╯︵ ┻━┻",
"꒰•̥̥̥̥̥̥̥ ﹏ •̥̥̥̥̥̥̥̥๑꒱"
>>>>>>>
"(╯°□°)╯︵ ┻━┻",
"꒰•̥̥̥̥̥̥̥ ﹏ •̥̥̥̥̥̥̥̥๑꒱",
"ಠ_ರೃ",
"(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू)",
"(ꈨຶꎁꈨຶ)۶”",
"(ꐦ°᷄д°᷅)",
"(۶ૈ ۜ ᵒ̌▱๋ᵒ̌ )۶ૈ=͟͟͞͞ ⌨",
"₍˄·͈༝·͈˄₎◞ ̑̑ෆ⃛",
"(*゚⚙͠ ∀ ⚙͠)ノ❣",
"٩꒰・ัε・ั ꒱۶",
"ヘ(。□°)ヘ",
"˓˓(ृ ु ॑꒳’)ु(ृ’꒳ ॑ ृ )ु˒˒˒",
"꒰✘Д✘◍꒱",
"૮( ᵒ̌ૢཪᵒ̌ૢ )ა",
"“ψ(`∇´)ψ",
"ಠﭛಠ",
"(๑>ᴗ<๑)",
"(۶ꈨຶꎁꈨຶ )۶ʸᵉᵃʰᵎ",
"٩(•̤̀ᵕ•̤́๑)ᵒᵏᵎᵎᵎᵎ",
"(oT-T)尸",
"(✌゚∀゚)☞",
"ಥ‿ಥ",
"ॱ॰⋆(˶ॢ‾᷄﹃‾᷅˵ॢ)",
"┬┴┬┴┤ (ಠ├┬┴┬┴",
"( ˘ ³˘)♥",
"Σ (੭ु ຶਊ ຶ)੭ु⁾⁾",
"(⑅ ॣ•͈ᴗ•͈ ॣ)",
"ヾ(´¬`)ノ",
"(•̀o•́)ง",
"(๑•॒̀ ູ॒•́๑)",
"⚈้̤͡ ˌ̫̮ ⚈้̤͡",
"=͟͟͞͞ =͟͟͞͞ ヘ( ´Д`)ノ",
"(((╹д╹;)))",
"•̀.̫•́✧",
"(ᵒ̤̑ ₀̑ ᵒ̤̑)",
"\_(ʘ_ʘ)_/",
"乙(ツ)乙",
"乙(のっの)乙",
"ヾ(¯∇ ̄๑)",
"\_(ʘ_ʘ)_/",
"༼;´༎ຶ ༎ຶ༽" |
<<<<<<<
=======
new eclipse.SelectionService(serviceRegistry);
new eclipse.SshService(serviceRegistry);
>>>>>>>
new eclipse.SshService(serviceRegistry); |
<<<<<<<
function(require, mBootstrap, mStatus, mProgress, mDialogs, mCommandRegistry, mFavorites, mStringExternalizerConfig,
mSearchClient, mFileClient, mOperationsClient, mSearchResults, mGlobalCommands, mContentTypes) {
=======
function(require, mBootstrap, mStatus, mProgress, mDialogs, mCommands, mFavorites, mStringExternalizerConfig,
mSearchClient, mFileClient, mOperationsClient, mSearchResults, mGlobalCommands, mThemePreferences, mThemeData, mContentTypes) {
>>>>>>>
function(require, mBootstrap, mStatus, mProgress, mDialogs, mCommandRegistry, mFavorites, mStringExternalizerConfig,
mSearchClient, mFileClient, mOperationsClient, mSearchResults, mGlobalCommands, mThemePreferences, mThemeData, mContentTypes) { |
<<<<<<<
define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'orion/commands', 'orion/util', 'orion/git/util', 'orion/git/widgets/CloneGitRepositoryDialog',
=======
define(['require', 'dojo', 'orion/commands', 'orion/util', 'orion/git/util', 'orion/compare/compareUtils', 'orion/git/widgets/CloneGitRepositoryDialog',
>>>>>>>
define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'orion/commands', 'orion/util', 'orion/git/util', 'orion/compare/compareUtils', 'orion/git/widgets/CloneGitRepositoryDialog',
<<<<<<<
function(messages, require, dojo, mCommands, mUtil, mGitUtil) {
=======
function(require, dojo, mCommands, mUtil, mGitUtil, mCompareUtils) {
>>>>>>>
function(messages, require, dojo, mCommands, mUtil, mGitUtil, mCompareUtils) {
<<<<<<<
return serviceRegistry.getService("orion.git.provider").getDiff(item[1].DiffLocation, item[0].Name).then(function(diffLocation) { //$NON-NLS-0$
return require.toUrl("compare/compare.html") + "?readonly#" + diffLocation; //$NON-NLS-1$ //$NON-NLS-0$
=======
return serviceRegistry.getService("orion.git.provider").getDiff(item[1].DiffLocation, item[0].Name).then(function(diffLocation) {
return mCompareUtils.generateCompareHref(diffLocation, {readonly: true});
>>>>>>>
return serviceRegistry.getService("orion.git.provider").getDiff(item[1].DiffLocation, item[0].Name).then(function(diffLocation) {
return mCompareUtils.generateCompareHref(diffLocation, {readonly: true});
<<<<<<<
return require.toUrl("compare/compare.html")+"#" + data.items.DiffLocation; //$NON-NLS-1$ //$NON-NLS-0$
=======
return mCompareUtils.generateCompareHref(data.items.DiffLocation, {});
>>>>>>>
return mCompareUtils.generateCompareHref(data.items.DiffLocation, {}); |
<<<<<<<
=======
var searcher = new eclipse.Searcher({serviceRegistry: serviceRegistry});
var editorFactory = function() {
return new eclipse.Editor({
parent: editorContainerDomNode,
stylesheet: [ "/editor/samples/editor.css",
"/default-theme.css" ],
tabSize: 4
});
};
>>>>>>>
<<<<<<<
var statusReporter = function(message, isError) {
if (isError) {
statusReportingService.setErrorMessage(message);
} else {
statusReportingService.setMessage(message);
}
};
=======
// splitter binding
editor.getEditorWidget().setKeyBinding(new eclipse.KeyBinding("o", true), "toggle");
editor.getEditorWidget().setAction("toggle", function(){
topContainerWidget.toggle();
});
};
var statusReporter = function(message, isError) {
if (isError) {
statusReportingService.setErrorMessage(message);
} else {
statusReportingService.setMessage(message);
}
};
var annotationFactory = new orion.AnnotationFactory();
var syntaxHighlightProviders = serviceRegistry.getServiceReferences("ISyntaxHighlight");
var editorContainer = new orion.EditorContainer({
editorFactory: editorFactory,
undoStackFactory: new orion.UndoCommandFactory(serviceRegistry, commandService, "pageActions"),
annotationFactory: annotationFactory,
lineNumberRulerFactory: new orion.LineNumberRulerFactory(),
contentAssistFactory: contentAssistFactory,
keyBindingFactory: keyBindingFactory,
statusReporter: statusReporter,
domNode: editorContainerDomNode,
syntaxHighlightProviders: syntaxHighlightProviders
});
>>>>>>>
var statusReporter = function(message, isError) {
if (isError) {
statusReportingService.setErrorMessage(message);
} else {
statusReportingService.setMessage(message);
}
}; |
<<<<<<<
getActiveBranch: function() {
return this.currentBranch;
=======
_getStash: function() {
var that = this;
var repository = this.root.repository;
var stashLocation = this.stashLocation || repository.StashLocation + pageSizeQuery;
return that.progressService.progress(that.gitClient.doStashList(stashLocation), messages["Getting stashed changes..."]).then(function(resp) {
return that.stashedChanges = resp;
}, function(error){
that.handleError(error);
});
},
getLocalBranch: function() {
var ref = this.log ? this.log.toRef : this.currentBranch;
if (ref && ref.Type === "RemoteTrackingBranch") { //$NON-NLS-0$
this.tracksRemoteBranch();// compute localBranch
return this.localBranch;
} else {
return ref;
}
>>>>>>>
_getStash: function() {
var that = this;
var repository = this.root.repository;
var stashLocation = this.stashLocation || repository.StashLocation + pageSizeQuery;
return that.progressService.progress(that.gitClient.doStashList(stashLocation), messages["Getting stashed changes..."]).then(function(resp) {
return that.stashedChanges = resp;
}, function(error){
that.handleError(error);
});
},
getActiveBranch: function() {
return this.currentBranch;
<<<<<<<
Type: "Synchronized", //$NON-NLS-0$
selectable: false,
isNotSelectable: true,
}
=======
Type: "Synchronized" //$NON-NLS-0$
}/*,
{
TODO: Remove stash references when the view gets stabilized
Type: "Stash" //$NON-NLS-0$
}*/
>>>>>>>
Type: "Synchronized", //$NON-NLS-0$
selectable: false,
isNotSelectable: true,
}/*,
{
TODO: Remove stash references when the view gets stabilized
Type: "Stash" //$NON-NLS-0$
selectable: false,
isNotSelectable: true,
}*/
<<<<<<<
} else if (parentItem.Type === "Commit" && that.showCommitChanges) { //$NON-NLS-0$
=======
} else if (parentItem.Type === "Stash"){ //$NON-NLS-0$
return Deferred.when(that.stashedChanges || that._getStash(), function(stash) {
var children = stash.Children;
onComplete(that.processChildren(parentItem, that.processMoreChildren(parentItem, children, stash, "MoreStashCommits")));
});
} else if (parentItem.Type === "Commit" || parentItem.Type === "StashCommit") { //$NON-NLS-0$
>>>>>>>
} else if (parentItem.Type === "Stash") { //$NON-NLS-0$
return Deferred.when(that.stashedChanges || that._getStash(), function(stash) {
var children = stash.Children;
onComplete(that.processChildren(parentItem, that.processMoreChildren(parentItem, children, stash, "MoreStashCommits"))); //$NON-NLS-0$
});
} else if ((parentItem.Type === "Commit" || parentItem.Type === "StashCommit") && that.showCommitChanges) { //$NON-NLS-1$ //$NON-NLS-0$
<<<<<<<
fullList.push({Type: "MoreCommits", NextLocation: item.NextLocation, selectable: false, isNotSelectable: true}); //$NON-NLS-0$
=======
fullList.push({Type: type, NextLocation: item.NextLocation}); //$NON-NLS-0$
>>>>>>>
fullList.push({Type: type, NextLocation: item.NextLocation, selectable: false, isNotSelectable: true}); //$NON-NLS-0$
<<<<<<<
if (this.selection) {
this.selection.addEventListener("selectionChanged", function(e) { //$NON-NLS-0$
this.updateSelectionCommands(e.selections);
}.bind(this));
}
=======
this.stashActionScope = "StashActions"; //$NON-NLS-0$
>>>>>>>
this.stashActionScope = "StashActions"; //$NON-NLS-0$
if (this.selection) {
this.selection.addEventListener("selectionChanged", function(e) { //$NON-NLS-0$
this.updateSelectionCommands(e.selections);
}.bind(this));
}
<<<<<<<
commandService.addCommandGroup(incomingActionScope, "eclipse.gitFetchGroup", 500, "Fetch", null, null, null, "Fetch", null, "eclipse.orion.git.fetch"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
=======
commandService.addCommandGroup(incomingActionScope, "eclipse.gitFetchGroup", 100, messages['fetchGroup'], null, null, null, "Fetch", null, "eclipse.orion.git.fetch"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
>>>>>>>
commandService.addCommandGroup(incomingActionScope, "eclipse.gitFetchGroup", 500, messages['fetchGroup'], null, null, null, "Fetch", null, "eclipse.orion.git.fetch"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
<<<<<<<
commandService.addCommandGroup(outgoingActionScope, "eclipse.gitPushGroup", 1000, "Push", null, null, null, "Push", null, "eclipse.orion.git.push"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
=======
commandService.addCommandGroup(outgoingActionScope, "eclipse.gitPushGroup", 1000, messages['pushGroup'], null, null, null, "Push", null, "eclipse.orion.git.push"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
>>>>>>>
commandService.addCommandGroup(outgoingActionScope, "eclipse.gitPushGroup", 1000, messages['pushGroup'], null, null, null, "Push", null, "eclipse.orion.git.push"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
<<<<<<<
} else if (item.Type === "Status") { //$NON-NLS-0$
sectionItem.classList.add("sectionTableItem"); //$NON-NLS-0$
detailsView = document.createElement("div"); //$NON-NLS-0$
detailsView.className = "stretch"; //$NON-NLS-0$
horizontalBox.appendChild(detailsView);
title = document.createElement("div"); //$NON-NLS-0$
title.textContent = messages["LocalChanges"];
title.classList.add("gitStatusTitle"); //$NON-NLS-0$
detailsView.appendChild(title);
} else if (item.Type !== "Commit") { //$NON-NLS-0$
=======
} else if (item.Type !== "Commit" && item.Type !== "StashCommit") { //$NON-NLS-0$
>>>>>>>
} else if (item.Type === "Status") { //$NON-NLS-0$
sectionItem.classList.add("sectionTableItem"); //$NON-NLS-0$
detailsView = document.createElement("div"); //$NON-NLS-0$
detailsView.className = "stretch"; //$NON-NLS-0$
horizontalBox.appendChild(detailsView);
title = document.createElement("div"); //$NON-NLS-0$
title.textContent = messages["LocalChanges"];
title.classList.add("gitStatusTitle"); //$NON-NLS-0$
detailsView.appendChild(title);
} else if (item.Type !== "Commit" && item.Type !== "StashCommit") { //$NON-NLS-1$ //$NON-NLS-0$ |
<<<<<<<
// commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.pull", 200); //$NON-NLS-1$ //$NON-NLS-0$
=======
commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.applyStash", 100); //$NON-NLS-0$
commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.dropStash", 200); //$NON-NLS-0$
commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.popStash", 100); //$NON-NLS-0$
commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.pull", 300); //$NON-NLS-1$ //$NON-NLS-0$
>>>>>>>
// commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.pull", 200); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.applyStash", 100); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.dropStash", 200); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.popStash", 100); //$NON-NLS-1$ //$NON-NLS-0$
<<<<<<<
// commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.applyPatch", 300); //$NON-NLS-1$ //$NON-NLS-0$
=======
commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.applyPatch", 200); //$NON-NLS-1$ //$NON-NLS-0$
>>>>>>>
// commandRegistry.registerCommandContribution("itemLevelCommands", "eclipse.orion.git.applyPatch", 200); //$NON-NLS-1$ //$NON-NLS-0$ |
<<<<<<<
const { createTempDir } = require('broccoli-test-helper');
=======
const chalk = require('chalk');
>>>>>>>
const { createTempDir } = require('broccoli-test-helper');
const chalk = require('chalk'); |
<<<<<<<
const expect = require('chai').expect;
=======
const preprocess = require('@glimmer/syntax').preprocess;
>>>>>>>
<<<<<<<
expect(AstNodeInfo.hasChildren(parse(''))).to.be.false;
=======
expect(AstNodeInfo.hasChildren(preprocess(''))).toBe(false);
>>>>>>>
expect(AstNodeInfo.hasChildren(parse(''))).toBe(false);
<<<<<<<
let ast = parse('<div></div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).to.be.false;
expect(AstNodeInfo.hasChildren(ast)).to.be.true;
=======
let ast = preprocess('<div></div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).toBe(false);
expect(AstNodeInfo.hasChildren(ast)).toBe(true);
>>>>>>>
let ast = parse('<div></div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).toBe(false);
expect(AstNodeInfo.hasChildren(ast)).toBe(true);
<<<<<<<
let ast = parse('<div>hello</div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).to.be.true;
=======
let ast = preprocess('<div>hello</div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).toBe(true);
>>>>>>>
let ast = parse('<div>hello</div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).toBe(true);
<<<<<<<
let ast = parse('<div> </div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).to.be.true;
=======
let ast = preprocess('<div> </div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).toBe(true);
>>>>>>>
let ast = parse('<div> </div>');
expect(AstNodeInfo.hasChildren(ast.body[0])).toBe(true); |
<<<<<<<
// Same logic applies to textareas
'<label>LabelText<textarea /></label>',
'<label><textarea />LabelText</label>',
'<label>LabelText<Textarea /></label>',
'<label><Textarea />LabelText</label>',
'<label>Label Text<div><textarea /></div></label>', // technically okay, hopefully no one does this though
'<textarea id="probablyHasLabel" />', // it's likely to have an associated label if it has an id attribute
'<textarea aria-label={{labelText}} />',
'<textarea aria-labelledby="someIdValue" />',
'<textarea ...attributes/>', // we are unable to correctly determine if this has a label or not, so we have to allow it
'<Textarea ...attributes />',
'<Textarea id="foo" />',
'{{textarea id="foo"}}',
'<label>Text here<Textarea /></label>',
'<label>Text here {{textarea}}</label>',
'<textarea id="label-input" ...attributes />',
// Same logic applies to select menus
'<label>LabelText<select></select></label>',
'<label><select></select>LabelText</label>',
'<label>Label Text<div><select></select></div></label>', // technically okay, hopefully no one does this though
'<select id="probablyHasLabel" ></select>', // it's likely to have an associated label if it has an id attribute
'<select aria-label={{labelText}} ></select>',
'<select aria-labelledby="someIdValue" ></select>',
'<select ...attributes></select>', // we are unable to correctly determine if this has a label or not, so we have to allow it
'<select id="label-input" ...attributes ></select>',
=======
// Hidden inputs are allowed.
'<input type="hidden"/>',
'<Input type="hidden" />',
'{{input type="hidden"}}',
>>>>>>>
// Same logic applies to textareas
'<label>LabelText<textarea /></label>',
'<label><textarea />LabelText</label>',
'<label>LabelText<Textarea /></label>',
'<label><Textarea />LabelText</label>',
'<label>Label Text<div><textarea /></div></label>', // technically okay, hopefully no one does this though
'<textarea id="probablyHasLabel" />', // it's likely to have an associated label if it has an id attribute
'<textarea aria-label={{labelText}} />',
'<textarea aria-labelledby="someIdValue" />',
'<textarea ...attributes/>', // we are unable to correctly determine if this has a label or not, so we have to allow it
'<Textarea ...attributes />',
'<Textarea id="foo" />',
'{{textarea id="foo"}}',
'<label>Text here<Textarea /></label>',
'<label>Text here {{textarea}}</label>',
'<textarea id="label-input" ...attributes />',
// Same logic applies to select menus
'<label>LabelText<select></select></label>',
'<label><select></select>LabelText</label>',
'<label>Label Text<div><select></select></div></label>', // technically okay, hopefully no one does this though
'<select id="probablyHasLabel" ></select>', // it's likely to have an associated label if it has an id attribute
'<select aria-label={{labelText}} ></select>',
'<select aria-labelledby="someIdValue" ></select>',
'<select ...attributes></select>', // we are unable to correctly determine if this has a label or not, so we have to allow it
'<select id="label-input" ...attributes ></select>',
// Hidden inputs are allowed.
'<input type="hidden"/>',
'<Input type="hidden" />',
'{{input type="hidden"}}',
<<<<<<<
{
template: '<div><textarea /></div>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 5,
source: '<textarea />',
},
},
{
template: '<textarea />',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<textarea />',
},
},
{
template: '<textarea title="some title value" />',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<textarea title="some title value" />',
},
},
{
template: '<label><textarea /></label>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 7,
source: '<textarea />',
},
},
{
template: '<div>{{textarea}}</div>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 5,
source: '{{textarea}}',
},
},
{
template: '<Textarea />',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<Textarea />',
},
},
{
template: '<textarea aria-label="first label" aria-labelledby="second label" />',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 0,
source: '<textarea aria-label="first label" aria-labelledby="second label" />',
},
},
{
template: '<textarea id="label-input" aria-label="second label" />',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 0,
source: '<textarea id="label-input" aria-label="second label" />',
},
},
{
template: '<label>Textarea label<textarea aria-label="Custom label" /></label>',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 21,
source: '<textarea aria-label="Custom label" />',
},
},
{
template: '<div><select></select></div>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 5,
source: '<select></select>',
},
},
{
template: '<select></select>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<select></select>',
},
},
{
template: '<select title="some title value" />',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<select title="some title value" />',
},
},
{
template: '<label><select></select></label>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 7,
source: '<select></select>',
},
},
{
template: '<select aria-label="first label" aria-labelledby="second label" />',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 0,
source: '<select aria-label="first label" aria-labelledby="second label" />',
},
},
{
template: '<select id="label-input" aria-label="second label" />',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 0,
source: '<select id="label-input" aria-label="second label" />',
},
},
{
template: '<label>Select label<select aria-label="Custom label" /></label>',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 19,
source: '<select aria-label="Custom label" />',
},
},
=======
{
template: '{{input type="button"}}',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '{{input type="button"}}',
},
},
{
template: '{{input type=myType}}',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '{{input type=myType}}',
},
},
{
template: '<input type="button"/>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<input type="button"/>',
},
},
{
template: '<input type={{myType}}/>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<input type={{myType}}/>',
},
},
{
template: '<Input type="button"/>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<Input type="button"/>',
},
},
{
template: '<Input type={{myType}}/>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<Input type={{myType}}/>',
},
},
>>>>>>>
{
template: '{{input type="button"}}',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '{{input type="button"}}',
},
},
{
template: '{{input type=myType}}',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '{{input type=myType}}',
},
},
{
template: '<input type="button"/>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<input type="button"/>',
},
},
{
template: '<input type={{myType}}/>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<input type={{myType}}/>',
},
},
{
template: '<Input type="button"/>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<Input type="button"/>',
},
},
{
template: '<Input type={{myType}}/>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<Input type={{myType}}/>',
},
},
{
template: '<div><textarea /></div>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 5,
source: '<textarea />',
},
},
{
template: '<textarea />',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<textarea />',
},
},
{
template: '<textarea title="some title value" />',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<textarea title="some title value" />',
},
},
{
template: '<label><textarea /></label>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 7,
source: '<textarea />',
},
},
{
template: '<div>{{textarea}}</div>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 5,
source: '{{textarea}}',
},
},
{
template: '<Textarea />',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<Textarea />',
},
},
{
template: '<textarea aria-label="first label" aria-labelledby="second label" />',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 0,
source: '<textarea aria-label="first label" aria-labelledby="second label" />',
},
},
{
template: '<textarea id="label-input" aria-label="second label" />',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 0,
source: '<textarea id="label-input" aria-label="second label" />',
},
},
{
template: '<label>Textarea label<textarea aria-label="Custom label" /></label>',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 21,
source: '<textarea aria-label="Custom label" />',
},
},
{
template: '<div><select></select></div>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 5,
source: '<select></select>',
},
},
{
template: '<select></select>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<select></select>',
},
},
{
template: '<select title="some title value" />',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 0,
source: '<select title="some title value" />',
},
},
{
template: '<label><select></select></label>',
result: {
message: ERROR_MESSAGE,
line: 1,
column: 7,
source: '<select></select>',
},
},
{
template: '<select aria-label="first label" aria-labelledby="second label" />',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 0,
source: '<select aria-label="first label" aria-labelledby="second label" />',
},
},
{
template: '<select id="label-input" aria-label="second label" />',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 0,
source: '<select id="label-input" aria-label="second label" />',
},
},
{
template: '<label>Select label<select aria-label="Custom label" /></label>',
result: {
message: ERROR_MESSAGE_MULTIPLE_LABEL,
line: 1,
column: 19,
source: '<select aria-label="Custom label" />',
},
}, |
<<<<<<<
const expect = require('chai').expect;
const { parse } = require('ember-template-recast');
=======
const preprocess = require('@glimmer/syntax').preprocess;
>>>>>>>
const { parse } = require('ember-template-recast'); |
<<<<<<<
async getVisitor() {
let pluginContext = this;
=======
getVisitor(env) {
let pluginContext = this; // eslint-disable-line unicorn/no-this-assignment
>>>>>>>
async getVisitor() {
let pluginContext = this; // eslint-disable-line unicorn/no-this-assignment |
<<<<<<<
const chalk = require('chalk');
const { createTempDir } = require('broccoli-test-helper');
=======
const buildFakeConsole = require('./helpers/console');
>>>>>>>
const buildFakeConsole = require('./helpers/console');
const { createTempDir } = require('broccoli-test-helper');
<<<<<<<
let project = null;
function buildFakeConsole() {
return {
_logLines: [],
log(data) {
this._logLines.push(data);
},
};
}
=======
>>>>>>>
let project = null; |
<<<<<<<
'attribute-indentation': require('./lint-attribute-indentation'),
'block-indentation': require('./lint-block-indentation'),
'deprecated-each-syntax': require('./deprecations/lint-deprecated-each-syntax'),
'deprecated-inline-view-helper': require('./deprecations/lint-deprecated-inline-view-helper'),
'deprecated-render-helper': require('./deprecations/lint-deprecated-render-helper'),
'eol-last': require('./lint-eol-last'),
'inline-link-to': require('./lint-inline-link-to'),
'invocable-blacklist': require('./lint-invocable-blacklist'),
'linebreak-style': require('./lint-linebreak-style'),
'link-href-attributes': require('./lint-link-href-attributes'),
'link-rel-noopener': require('./lint-link-rel-noopener'),
'no-abstract-roles': require('./lint-no-abstract-roles'),
'no-action-modifiers': require('./lint-no-action-modifiers'),
'no-attrs-in-components': require('./lint-no-attrs-in-components'),
'no-action': require('./lint-no-action'),
'no-args-paths': require('./lint-no-args-paths'),
'no-bare-strings': require('./lint-no-bare-strings'),
'no-curly-component-invocation': require('./lint-no-curly-component-invocation'),
'no-debugger': require('./lint-no-debugger'),
'no-duplicate-attributes': require('./lint-no-duplicate-attributes'),
'no-element-event-actions': require('./lint-no-element-event-actions'),
'no-extra-mut-helper-argument': require('./lint-no-extra-mut-helper-argument'),
'no-html-comments': require('./lint-no-html-comments'),
'no-implicit-this': require('./lint-no-implicit-this'),
'no-inline-styles': require('./lint-no-inline-styles'),
'no-input-block': require('./lint-no-input-block'),
'no-input-tagname': require('./lint-no-input-tagname'),
'no-invalid-interactive': require('./lint-no-invalid-interactive'),
'no-log': require('./lint-no-log'),
'no-meta-redirect-with-time-limit': require('./lint-no-meta-redirect-with-time-limit'),
'no-multiple-empty-lines': require('./lint-no-multiple-empty-lines'),
'no-negated-condition': require('./lint-no-negated-condition'),
'no-nested-interactive': require('./lint-no-nested-interactive'),
'no-obsolete-elements': require('./lint-no-obsolete-elements'),
'no-outlet-outside-routes': require('./lint-no-outlet-outside-routes'),
'no-partial': require('./lint-no-partial'),
'no-positive-tabindex': require('./lint-no-positive-tabindex'),
'no-quoteless-attributes': require('./lint-no-quoteless-attributes'),
'no-shadowed-elements': require('./lint-no-shadowed-elements'),
'no-trailing-dot-in-path-expression': require('./lint-no-trailing-dot-in-path-expression'),
'no-trailing-spaces': require('./lint-no-trailing-spaces'),
'no-triple-curlies': require('./lint-no-triple-curlies'),
'no-unbound': require('./lint-no-unbound'),
'no-unnecessary-component-helper': require('./lint-no-unnecessary-component-helper'),
'no-unnecessary-concat': require('./lint-no-unnecessary-concat'),
'no-unused-block-params': require('./lint-no-unused-block-params'),
'no-whitespace-for-layout': require('./lint-no-whitespace-for-layout'),
'no-whitespace-within-word': require('./lint-no-whitespace-within-word'),
quotes: require('./lint-quotes'),
'require-button-type': require('./lint-require-button-type'),
'require-iframe-title': require('./lint-require-iframe-title'),
'require-valid-alt-text': require('./lint-require-valid-alt-text'),
'self-closing-void-elements': require('./lint-self-closing-void-elements'),
'simple-unless': require('./lint-simple-unless'),
'style-concatenation': require('./lint-style-concatenation'),
'table-groups': require('./lint-table-groups'),
'template-length': require('./lint-template-length'),
=======
'attribute-indentation': require('./attribute-indentation'),
'block-indentation': require('./block-indentation'),
'deprecated-each-syntax': require('./deprecations/deprecated-each-syntax'),
'deprecated-inline-view-helper': require('./deprecations/deprecated-inline-view-helper'),
'deprecated-render-helper': require('./deprecations/deprecated-render-helper'),
'eol-last': require('./eol-last'),
'img-alt-attributes': require('./img-alt-attributes'),
'inline-link-to': require('./inline-link-to'),
'invocable-blacklist': require('./invocable-blacklist'),
'linebreak-style': require('./linebreak-style'),
'link-href-attributes': require('./link-href-attributes'),
'link-rel-noopener': require('./link-rel-noopener'),
'no-abstract-roles': require('./no-abstract-roles'),
'no-action-modifiers': require('./no-action-modifiers'),
'no-attrs-in-components': require('./no-attrs-in-components'),
'no-action': require('./no-action'),
'no-args-paths': require('./no-args-paths'),
'no-bare-strings': require('./no-bare-strings'),
'no-curly-component-invocation': require('./no-curly-component-invocation'),
'no-debugger': require('./no-debugger'),
'no-duplicate-attributes': require('./no-duplicate-attributes'),
'no-element-event-actions': require('./no-element-event-actions'),
'no-extra-mut-helper-argument': require('./no-extra-mut-helper-argument'),
'no-html-comments': require('./no-html-comments'),
'no-implicit-this': require('./no-implicit-this'),
'no-inline-styles': require('./no-inline-styles'),
'no-input-block': require('./no-input-block'),
'no-input-tagname': require('./no-input-tagname'),
'no-invalid-interactive': require('./no-invalid-interactive'),
'no-log': require('./no-log'),
'no-meta-redirect-with-time-limit': require('./no-meta-redirect-with-time-limit'),
'no-multiple-empty-lines': require('./no-multiple-empty-lines'),
'no-negated-condition': require('./no-negated-condition'),
'no-nested-interactive': require('./no-nested-interactive'),
'no-obsolete-elements': require('./no-obsolete-elements'),
'no-outlet-outside-routes': require('./no-outlet-outside-routes'),
'no-partial': require('./no-partial'),
'no-positive-tabindex': require('./no-positive-tabindex'),
'no-quoteless-attributes': require('./no-quoteless-attributes'),
'no-shadowed-elements': require('./no-shadowed-elements'),
'no-trailing-dot-in-path-expression': require('./no-trailing-dot-in-path-expression'),
'no-trailing-spaces': require('./no-trailing-spaces'),
'no-triple-curlies': require('./no-triple-curlies'),
'no-unbound': require('./no-unbound'),
'no-unnecessary-component-helper': require('./no-unnecessary-component-helper'),
'no-unnecessary-concat': require('./no-unnecessary-concat'),
'no-unused-block-params': require('./no-unused-block-params'),
'no-whitespace-for-layout': require('./no-whitespace-for-layout'),
'no-whitespace-within-word': require('./no-whitespace-within-word'),
quotes: require('./quotes'),
'require-button-type': require('./require-button-type'),
'require-iframe-title': require('./require-iframe-title'),
'require-valid-alt-text': require('./require-valid-alt-text'),
'self-closing-void-elements': require('./self-closing-void-elements'),
'simple-unless': require('./simple-unless'),
'style-concatenation': require('./style-concatenation'),
'table-groups': require('./table-groups'),
'template-length': require('./template-length'),
>>>>>>>
'attribute-indentation': require('./attribute-indentation'),
'block-indentation': require('./block-indentation'),
'deprecated-each-syntax': require('./deprecations/deprecated-each-syntax'),
'deprecated-inline-view-helper': require('./deprecations/deprecated-inline-view-helper'),
'deprecated-render-helper': require('./deprecations/deprecated-render-helper'),
'eol-last': require('./eol-last'),
'inline-link-to': require('./inline-link-to'),
'invocable-blacklist': require('./invocable-blacklist'),
'linebreak-style': require('./linebreak-style'),
'link-href-attributes': require('./link-href-attributes'),
'link-rel-noopener': require('./link-rel-noopener'),
'no-abstract-roles': require('./no-abstract-roles'),
'no-action-modifiers': require('./no-action-modifiers'),
'no-attrs-in-components': require('./no-attrs-in-components'),
'no-action': require('./no-action'),
'no-args-paths': require('./no-args-paths'),
'no-bare-strings': require('./no-bare-strings'),
'no-curly-component-invocation': require('./no-curly-component-invocation'),
'no-debugger': require('./no-debugger'),
'no-duplicate-attributes': require('./no-duplicate-attributes'),
'no-element-event-actions': require('./no-element-event-actions'),
'no-extra-mut-helper-argument': require('./no-extra-mut-helper-argument'),
'no-html-comments': require('./no-html-comments'),
'no-implicit-this': require('./no-implicit-this'),
'no-inline-styles': require('./no-inline-styles'),
'no-input-block': require('./no-input-block'),
'no-input-tagname': require('./no-input-tagname'),
'no-invalid-interactive': require('./no-invalid-interactive'),
'no-log': require('./no-log'),
'no-meta-redirect-with-time-limit': require('./no-meta-redirect-with-time-limit'),
'no-multiple-empty-lines': require('./no-multiple-empty-lines'),
'no-negated-condition': require('./no-negated-condition'),
'no-nested-interactive': require('./no-nested-interactive'),
'no-obsolete-elements': require('./no-obsolete-elements'),
'no-outlet-outside-routes': require('./no-outlet-outside-routes'),
'no-partial': require('./no-partial'),
'no-positive-tabindex': require('./no-positive-tabindex'),
'no-quoteless-attributes': require('./no-quoteless-attributes'),
'no-shadowed-elements': require('./no-shadowed-elements'),
'no-trailing-dot-in-path-expression': require('./no-trailing-dot-in-path-expression'),
'no-trailing-spaces': require('./no-trailing-spaces'),
'no-triple-curlies': require('./no-triple-curlies'),
'no-unbound': require('./no-unbound'),
'no-unnecessary-component-helper': require('./no-unnecessary-component-helper'),
'no-unnecessary-concat': require('./no-unnecessary-concat'),
'no-unused-block-params': require('./no-unused-block-params'),
'no-whitespace-for-layout': require('./no-whitespace-for-layout'),
'no-whitespace-within-word': require('./no-whitespace-within-word'),
quotes: require('./quotes'),
'require-button-type': require('./require-button-type'),
'require-iframe-title': require('./require-iframe-title'),
'require-valid-alt-text': require('./require-valid-alt-text'),
'self-closing-void-elements': require('./self-closing-void-elements'),
'simple-unless': require('./simple-unless'),
'style-concatenation': require('./style-concatenation'),
'table-groups': require('./table-groups'),
'template-length': require('./template-length'), |
<<<<<<<
const DEFAULT_CODE = `const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
}
return go(f, seed, [])
}
`
class Home extends React.Component {
=======
class Index extends React.Component {
>>>>>>>
const DEFAULT_CODE = `const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
}
return go(f, seed, [])
}
`
class Index extends React.Component {
<<<<<<<
=======
constructor() {
super()
this.state = {
bgColor: '#111111'
}
}
save () {
// domtoimage.toPng(document.getElementById('container'))
domtoimage.toJpeg(document.getElementById('container'))
.then((dataUrl) => {
const link = document.createElement('a')
// link.download = 'snippet.png'
link.download = 'snippet.jpeg'
link.href = dataUrl
link.click()
})
}
upload () {
domtoimage.toBlob(document.getElementById('container'))
.then(api.uploadImage)
.then(res => res.data.link)
.then(console.log)
}
>>>>>>>
constructor() {
super()
this.state = {
bgColor: '#111111'
}
}
save () {
// domtoimage.toPng(document.getElementById('container'))
domtoimage.toJpeg(document.getElementById('container'))
.then((dataUrl) => {
const link = document.createElement('a')
// link.download = 'snippet.png'
link.download = 'snippet.jpeg'
link.href = dataUrl
link.click()
})
}
upload () {
domtoimage.toBlob(document.getElementById('container'))
.then(api.uploadImage)
.then(res => res.data.link)
.then(console.log)
}
<<<<<<<
<div>
<style jsx>{`
div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
`}
</style>
<h1>Welcome to Code Image</h1>
<CodeImage>
{DEFAULT_CODE}
</CodeImage>
</div>
=======
<div className="main">
<Meta />
<h1>Welcome to Code Image</h1>
<div id="editor">
<Toolbar
save={this.save}
upload={this.upload}
onBGChange={color => this.setState({ bgColor: color })}
bg={this.state.bgColor}
/>
<CodeImage bg={this.state.bgColor}>
{this.props.content}
</CodeImage>
</div>
<style jsx>{`
h1 {
color: #fff;
}
div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#editor {
height: 460px;
background: #151515;
padding: 16px;
}
`}
</style>
</div>
>>>>>>>
<div className="main">
<Meta />
<h1>Welcome to Code Image</h1>
<div id="editor">
<Toolbar
save={this.save}
upload={this.upload}
onBGChange={color => this.setState({ bgColor: color })}
bg={this.state.bgColor}
/>
<CodeImage bg={this.state.bgColor}>
{this.props.content || DEFAULT_CODE}
</CodeImage>
</div>
<style jsx>{`
h1 {
color: #fff;
}
div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#editor {
height: 460px;
background: #151515;
padding: 16px;
}
`}
</style>
</div> |
<<<<<<<
width : 80,
=======
width : 20,
ensurePxWidth : true,
>>>>>>>
width : 80,
ensurePxWidth : true,
<<<<<<<
=======
// Make the default action columns
object[key].splice(i, 0, {
headerText : '',
cellFormatter : function(args) {
if ($.isPlainObject(args.row.data)) {
args.$container.parent()
.addClass("buttontd ui-state-default")
.hover(
function() {
args.$container.parent().addClass("ui-state-hover");
},
function() {
args.$container.parent().removeClass("ui-state-hover");
}
)
.click(function(e) {
fct = actions[0].action;
fct(args);
e.stopImmediatePropagation();
})
.find("div")
.text(actions[0].label);
return true;
}
},
allowSizing : false,
width : actions[0].width ? actions[0].width : 60,
ensurePxWidth : true,
showFilter: false
});
>>>>>>>
<<<<<<<
log($.nos.$noviusos);
var where = $.nos.$noviusos.ostabs ? $.nos.$noviusos.ostabs('current').panel : $('body');
var $dialog = $(document.createElement('div')).appendTo(where);
$.nos.data('dialog_media', $dialog);
=======
var $dialog = $(document.createElement('div')).appendTo($('body'));
if (typeof wijdialog_options['content'] != 'undefined') {
$dialog.append(wijdialog_options.content);
}
>>>>>>>
var where = $.nos.$noviusos.ostabs ? $.nos.$noviusos.ostabs('current').panel : $('body');
var $dialog = $(document.createElement('div')).appendTo(where);
$.nos.data('dialog_media', $dialog);
if (typeof wijdialog_options['content'] != 'undefined') {
$dialog.append(wijdialog_options.content);
} |
<<<<<<<
string = new String('string'), // prevents Goog compiler from removing primative and subsidising out allowing us to compress further
document = window.document, // obvious really
idExpr = /^#([\w-]+)$/, // for situations of dire need. Symbian and the such
slice = function (e) { return [].slice.call(e, 0); };
=======
string = new String('string'), // prevents Goog compiler from removing primative and subsidising out allowing us to compress further
document = window.document, // obvious really
idExpr = /^#([\w-]+)$/, // for situations of dire need. Symbian and the such
tagExpr = /<(\S+).*\/>|<(\S+).*>.*<\/\S+>/, // so you can create elements on the fly a la x$('<img/>')
slice = [].slice;
>>>>>>>
string = new String('string'), // prevents Goog compiler from removing primative and subsidising out allowing us to compress further
document = window.document, // obvious really
idExpr = /^#([\w-]+)$/, // for situations of dire need. Symbian and the such
tagExpr = /<(\S+).*\/>|<(\S+).*>.*<\/\S+>/, // so you can create elements on the fly a la x$('<img/>')
slice = function (e) { return [].slice.call(e, 0); };
<<<<<<<
that = arguments[1]; // wait, what's that!? awwww rem. here I thought I knew ya!
// @rem - that that is a hat tip to your thats :)
=======
that = arguments[1], // wait, what's that!? awwww rem. here I thought I knew ya!
i;
>>>>>>>
that = arguments[1]; // wait, what's that!? awwww rem. here I thought I knew ya!
// @rem - that that is a hat tip to your thats :)
i;
<<<<<<<
var list = slice(this);
=======
var list = slice.call(this);
>>>>>>>
var list = slice.call(this); |
<<<<<<<
} else {
$invisiblePanel.append(
$inspectorEl
);
}
}
$layout.append($notLayout);
self._uiSettingsMenuPopupRefreshLayout($layout);
},
_uiSettingsMenuPopupRefreshLayout : function($layout) {
$leftPanel = $layout.find('.left-panel');
$topPanel = $layout.find('.top-panel');
$invisiblePanel = $layout.find('.invisible-panel');
$leftLis = $leftPanel.find('li').not('.moving');
$leftLis.css({
height: (200 - $leftLis.length) / $leftLis.length,
width: "inherit"
});
$leftLis.removeClass('last');
$($leftLis[$leftLis.length - 1]).addClass('last');
$topLis = $topPanel.find('li').not('.moving');
$topLis.css({
width: (200 - $topLis.length) / $topLis.length,
height: "inherit"
});
$topLis.removeClass('last');
$($topLis[$topLis.length - 1]).addClass('last');
$invisibleLis = $invisiblePanel.find('li').not('.moving');
$invisibleLis.css({
width: '',
height: ''
});
$invisibleLis.removeClass('last');
$($invisibleLis[$invisibleLis.length - 1]).addClass('last');
$invisiblePanel.css({
width: Math.max(($invisibleLis.length + 1) * ($invisibleLis.width() + 1), 100)
});
},
_uiSettingsMenuPopupSave : function() {
var self = this,
o = self.options;
newInspectors = [];
layoutSettings = $('#layout_settings');
layoutSettings.find('.layout-inspector').each(function() {
newInspector = self.options.inspectors[$(this).data('inspector-id')];
$panel = $(this).closest('.panels');
newInspector.hide = $panel.hasClass('invisible-panel');
newInspector.vertical = $panel.hasClass('left-panel');
newInspectors.push(newInspector);
});
self.options.inspectors = newInspectors;
$('li.ui-widget-content').remove();
self._uiInspectors();
self.uiGrid.nosgrid('doRefresh');
},
_uiSettingsMenuPopupAddItem : function(element, itemName, content) {
if ( typeof this.idMenu == 'undefined' ) this.idMenu = 0;
element.find('ul').append('<li><a href="#settings_menu_popup_item_' + this.idMenu + '">' + itemName + '</a></li>');
element.append($('<div id="settings_menu_popup_item_' + this.idMenu + '"></div>').append(content));
this.idMenu++;
},
=======
$layout.append($notLayout);
self._uiSettingsMenuPopupRefreshLayout($layout);
},
_uiSettingsMenuPopupRefreshLayout : function($layout) {
$leftPanel = $layout.find('.left-panel');
$topPanel = $layout.find('.top-panel');
$invisiblePanel = $layout.find('.invisible-panel');
$leftLis = $leftPanel.find('li').not('.moving');
$leftLis.css({
height: (200 - $leftLis.length) / $leftLis.length,
width: "inherit"
});
$leftLis.removeClass('last');
$($leftLis[$leftLis.length - 1]).addClass('last');
$topLis = $topPanel.find('li').not('.moving');
$topLis.css({
width: (200 - $topLis.length) / $topLis.length,
height: "inherit"
});
$topLis.removeClass('last');
$($topLis[$topLis.length - 1]).addClass('last');
$invisibleLis = $invisiblePanel.find('li').not('.moving');
$invisibleLis.css({
width: '',
height: ''
});
$invisibleLis.removeClass('last');
$($invisibleLis[$invisibleLis.length - 1]).addClass('last');
$invisiblePanel.css({
width: Math.max(($invisibleLis.length + 1) * ($invisibleLis.width() + 1), 100)
});
},
_uiSettingsMenuPopupSave : function() {
var self = this,
o = self.options;
for (var j = 0; j < o.inspectors.length; j++) {
if (o.inspectors[j].grid) {
gridColumns = o.inspectors[j].grid.columns;
newColumns = [];
$('#settings-inspector-' + j + ' .widget-columns > li').each(function(i, el) {
$this = $(this);
newColumn = gridColumns[$this.data('column-id')];
newColumn.dataIndex = i;
newColumn.leavesIdx = i;
newColumn.linearIdx = i;
newColumn.thX = i;
newColumn.travIdx = i;
newColumn.visLeavesIdx = i;
newColumn.visible = !$this.hasClass('invisible');
newColumns.push(newColumn);
});
o.inspectors[j].grid.columns = newColumns;
}
}
newInspectors = [];
layoutSettings = $('#layout_settings');
layoutSettings.find('.layout-inspector').each(function() {
newInspector = self.options.inspectors[$(this).data('inspector-id')];
$panel = $(this).closest('.panels');
newInspector.hide = $panel.hasClass('invisible-panel');
newInspector.vertical = $panel.hasClass('left-panel');
newInspectors.push(newInspector);
});
self.options.inspectors = newInspectors;
newColumns = [];
$('#settings-main-view .widget-columns > li').each(function(i, el) {
$this = $(this);
newColumn = o.grid.columns[$this.data('column-id')];
newColumn.dataIndex = i;
newColumn.leavesIdx = i;
newColumn.linearIdx = i;
newColumn.thX = i;
newColumn.travIdx = i;
newColumn.visLeavesIdx = i;
newColumn.visible = !$this.hasClass('invisible');
newColumns.push(newColumn);
});
self.options.grid.columns = newColumns;
$('li.ui-widget-content').remove();
self._uiInspectors();
self.uiGrid.nosgrid('columns', newColumns);
self.uiGrid.nosgrid('doRefresh');
},
_uiSettingsMenuPopupAddItem : function(element, itemName, content) {
if ( typeof this.idMenu == 'undefined' ) this.idMenu = 0;
element.find('> ul').append('<li><a href="#settings_menu_popup_item_' + this.idMenu + '">' + itemName + '</a></li>');
element.append($('<div id="settings_menu_popup_item_' + this.idMenu + '"></div>').append(content));
this.idMenu++;
},
>>>>>>>
} else {
$invisiblePanel.append(
$inspectorEl
);
}
}
$layout.append($notLayout);
self._uiSettingsMenuPopupRefreshLayout($layout);
},
_uiSettingsMenuPopupRefreshLayout : function($layout) {
$leftPanel = $layout.find('.left-panel');
$topPanel = $layout.find('.top-panel');
$invisiblePanel = $layout.find('.invisible-panel');
$leftLis = $leftPanel.find('li').not('.moving');
$leftLis.css({
height: (200 - $leftLis.length) / $leftLis.length,
width: "inherit"
});
$leftLis.removeClass('last');
$($leftLis[$leftLis.length - 1]).addClass('last');
$topLis = $topPanel.find('li').not('.moving');
$topLis.css({
width: (200 - $topLis.length) / $topLis.length,
height: "inherit"
});
$topLis.removeClass('last');
$($topLis[$topLis.length - 1]).addClass('last');
$invisibleLis = $invisiblePanel.find('li').not('.moving');
$invisibleLis.css({
width: '',
height: ''
});
$invisibleLis.removeClass('last');
$($invisibleLis[$invisibleLis.length - 1]).addClass('last');
$invisiblePanel.css({
width: Math.max(($invisibleLis.length + 1) * ($invisibleLis.width() + 1), 100)
});
},
_uiSettingsMenuPopupSave : function() {
var self = this,
o = self.options;
for (var j = 0; j < o.inspectors.length; j++) {
if (o.inspectors[j].grid) {
gridColumns = o.inspectors[j].grid.columns;
newColumns = [];
$('#settings-inspector-' + j + ' .widget-columns > li').each(function(i, el) {
$this = $(this);
newColumn = gridColumns[$this.data('column-id')];
newColumn.dataIndex = i;
newColumn.leavesIdx = i;
newColumn.linearIdx = i;
newColumn.thX = i;
newColumn.travIdx = i;
newColumn.visLeavesIdx = i;
newColumn.visible = !$this.hasClass('invisible');
newColumns.push(newColumn);
});
o.inspectors[j].grid.columns = newColumns;
}
}
newInspectors = [];
layoutSettings = $('#layout_settings');
layoutSettings.find('.layout-inspector').each(function() {
newInspector = self.options.inspectors[$(this).data('inspector-id')];
$panel = $(this).closest('.panels');
newInspector.hide = $panel.hasClass('invisible-panel');
newInspector.vertical = $panel.hasClass('left-panel');
newInspectors.push(newInspector);
});
self.options.inspectors = newInspectors;
newColumns = [];
$('#settings-main-view .widget-columns > li').each(function(i, el) {
$this = $(this);
newColumn = o.grid.columns[$this.data('column-id')];
newColumn.dataIndex = i;
newColumn.leavesIdx = i;
newColumn.linearIdx = i;
newColumn.thX = i;
newColumn.travIdx = i;
newColumn.visLeavesIdx = i;
newColumn.visible = !$this.hasClass('invisible');
newColumns.push(newColumn);
});
self.options.grid.columns = newColumns;
$('li.ui-widget-content').remove();
self._uiInspectors();
self.uiGrid.nosgrid('columns', newColumns);
self.uiGrid.nosgrid('doRefresh');
},
_uiSettingsMenuPopupAddItem : function(element, itemName, content) {
if ( typeof this.idMenu == 'undefined' ) this.idMenu = 0;
element.find('> ul').append('<li><a href="#settings_menu_popup_item_' + this.idMenu + '">' + itemName + '</a></li>');
element.append($('<div id="settings_menu_popup_item_' + this.idMenu + '"></div>').append(content));
this.idMenu++;
}, |
<<<<<<<
cellFormatter : function(args) {
if ($.isPlainObject(args.row.data)) {
args.$container.closest("td").attr("title", args.row.data.title);
$("<a href=\"admin/cms_blog/form?id=" + args.row.data.id + "\"></a>")
.text(args.row.data.title)
.appendTo(args.$container);
return true;
}
},
dataKey : 'title',
sortDirection : 'ascending'
=======
dataKey : 'title'
>>>>>>>
dataKey : 'title',
sortDirection : 'ascending' |
<<<<<<<
const rnInstall = await reactNative.install({ name })
=======
const rnInstall = await reactNative.install({ name, skipJest: true, version: REACT_NATIVE_VERSION })
>>>>>>>
const rnInstall = await reactNative.install({ name, version: REACT_NATIVE_VERSION }) |
<<<<<<<
const SafeTouchAction = htmlSafe('touch-action: manipulation; -ms-touch-action: manipulation; cursor: pointer;');
const SafeEmptyString = htmlSafe('');
export default Ember.Mixin.create({
=======
export default Mixin.create({
touchActionSelectors: ['button', 'input', 'a', 'textarea'],
touchActionProperties: 'touch-action: manipulation; -ms-touch-action: manipulation; cursor: pointer;',
>>>>>>>
const SafeTouchAction = htmlSafe('touch-action: manipulation; -ms-touch-action: manipulation; cursor: pointer;');
const SafeEmptyString = htmlSafe('');
const FocusableInputTypes = ['button', 'submit', 'text', 'file'];
const TouchActionSelectors = ['button', 'input', 'a', 'textarea'];
export default Mixin.create({
touchActionSelectors: TouchActionSelectors,
touchActionProperties: SafeTouchAction,
<<<<<<<
touchActionStyle: computed(function() {
const type = get(this, 'type');
const click = get(this, 'click');
const tagName = get(this, 'tagName');
=======
touchActionStyle: computed('touchActionSelectors', 'touchActionProperties', function() {
>>>>>>>
touchActionStyle: computed(function() {
const type = get(this, 'type');
const tagName = get(this, 'tagName');
<<<<<<<
return applyStyle ? SafeTouchAction : SafeEmptyString;
=======
return htmlSafe(applyStyle ? this.get('touchActionProperties') : '');
>>>>>>>
return applyStyle ? this.touchActionProperties : SafeEmptyString; |
<<<<<<<
// @version 0.8.18
// @description 四川大学综合教务系统助手,是一个优化四川大学综合教务系统的「Userscript」,即用户脚本。这不是一个独立的软件,也不是一个浏览器的插件,但可以依赖浏览器的插件运行,或者作为一个Bookmarklet在点击后运行。目前包括的功能有:1. 一键评教的功能。2. 恢复登陆页面的「两周之内不必登录」选项。3. 增强绩点与均分的计算功能。
=======
// @version 0.8.20
// @description 四川大学综合教务系统助手,是一个优化四川大学综合教务系统的「Userscript」,即用户脚本。这不是一个独立的软件,也不是一个浏览器的插件,但可以依赖浏览器的插件运行,或者作为一个Bookmarklet在点击后运行。目前包括的功能有:1. 一键评教的功能。2. 为手动评教页面「去除 2 分钟时间限制」。3. 恢复登陆页面的「两周之内不必登录」选项。4. 增强绩点与均分的计算功能。
>>>>>>>
// @version 0.8.20
// @description 四川大学综合教务系统助手,是一个优化四川大学综合教务系统的「Userscript」,即用户脚本。这不是一个独立的软件,也不是一个浏览器的插件,但可以依赖浏览器的插件运行,或者作为一个Bookmarklet在点击后运行。目前包括的功能有:1. 一键评教的功能。2. 恢复登陆页面的「两周之内不必登录」选项。3. 增强绩点与均分的计算功能。 |
<<<<<<<
// @version 0.8.18
// @description 四川大学综合教务系统助手,是一个优化四川大学综合教务系统的「Userscript」,即用户脚本。这不是一个独立的软件,也不是一个浏览器的插件,但可以依赖浏览器的插件运行,或者作为一个Bookmarklet在点击后运行。目前包括的功能有:1. 一键评教的功能。2. 恢复登陆页面的「两周之内不必登录」选项。3. 增强绩点与均分的计算功能。
=======
// @version 0.8.20
// @description 四川大学综合教务系统助手,是一个优化四川大学综合教务系统的「Userscript」,即用户脚本。这不是一个独立的软件,也不是一个浏览器的插件,但可以依赖浏览器的插件运行,或者作为一个Bookmarklet在点击后运行。目前包括的功能有:1. 一键评教的功能。2. 为手动评教页面「去除 2 分钟时间限制」。3. 恢复登陆页面的「两周之内不必登录」选项。4. 增强绩点与均分的计算功能。
>>>>>>>
// @version 0.8.20
// @description 四川大学综合教务系统助手,是一个优化四川大学综合教务系统的「Userscript」,即用户脚本。这不是一个独立的软件,也不是一个浏览器的插件,但可以依赖浏览器的插件运行,或者作为一个Bookmarklet在点击后运行。目前包括的功能有:1. 一键评教的功能。2. 恢复登陆页面的「两周之内不必登录」选项。3. 增强绩点与均分的计算功能。 |
<<<<<<<
if (this.preparedBuffer.nrIndices == 0) {
return;
}
Utils.updateBuffer(this.renderLayer.gl, this.preparedBuffer.indices, stream.dataView, stream.pos, totalNrIndices * 4);
stream.pos += totalNrIndices * 4;
=======
// This is always the last message (before end), so we know all objects have been created
preparedBuffer.nrObjects = stream.readInt();
preparedBuffer.nrIndices = stream.readInt();
preparedBuffer.positionsIndex = stream.readInt();
preparedBuffer.normalsIndex = stream.readInt();
preparedBuffer.colorsIndex = stream.readInt();
preparedBuffer.indices = Utils.createBuffer(this.renderLayer.gl, stream.dataView, preparedBuffer.nrIndices * 4, this.renderLayer.gl.ELEMENT_ARRAY_BUFFER, 3, stream.pos, WebGL2RenderingContext.UNSIGNED_INT, "Uint32Array");
stream.pos += preparedBuffer.nrIndices * 4;
preparedBuffer.geometryIdToIndex = new Map();
preparedBuffer.geometryIdToMeta = new Map();
>>>>>>>
if (this.preparedBuffer.nrIndices == 0) {
return;
}
// This is always the last message (before end), so we know all objects have been created
preparedBuffer.nrObjects = stream.readInt();
preparedBuffer.nrIndices = stream.readInt();
preparedBuffer.positionsIndex = stream.readInt();
preparedBuffer.normalsIndex = stream.readInt();
preparedBuffer.colorsIndex = stream.readInt();
preparedBuffer.indices = Utils.createBuffer(this.renderLayer.gl, stream.dataView, preparedBuffer.nrIndices * 4, this.renderLayer.gl.ELEMENT_ARRAY_BUFFER, 3, stream.pos, WebGL2RenderingContext.UNSIGNED_INT, "Uint32Array");
stream.pos += preparedBuffer.nrIndices * 4;
preparedBuffer.geometryIdToIndex = new Map();
preparedBuffer.geometryIdToMeta = new Map();
Utils.updateBuffer(this.renderLayer.gl, this.preparedBuffer.indices, stream.dataView, stream.pos, totalNrIndices * 4);
stream.pos += totalNrIndices * 4;
<<<<<<<
Utils.updateBuffer(this.renderLayer.gl, this.preparedBuffer.pickColors, pickColors, 0, pickColors.i);
=======
preparedBuffer.pickColors = Utils.createBuffer(this.renderLayer.gl, pickColors, pickColors.i, this.renderLayer.gl.ARRAY_BUFFER, 4);
preparedBuffer.bytes = RenderLayer.calculateBytesUsed(this.settings, preparedBuffer.positionsIndex, nrColors, preparedBuffer.nrIndices, preparedBuffer.normalsIndex);
preparedBuffer.unquantizationMatrix = this.unquantizationMatrix;
var newBuffer = this.renderLayer.addCompleteBuffer(preparedBuffer, this.gpuBufferManager);
>>>>>>>
Utils.updateBuffer(this.renderLayer.gl, this.preparedBuffer.pickColors, pickColors, 0, pickColors.i);
preparedBuffer.bytes = RenderLayer.calculateBytesUsed(this.settings, preparedBuffer.positionsIndex, nrColors, preparedBuffer.nrIndices, preparedBuffer.normalsIndex);
preparedBuffer.unquantizationMatrix = this.unquantizationMatrix;
var newBuffer = this.renderLayer.addCompleteBuffer(preparedBuffer, this.gpuBufferManager); |
<<<<<<<
import { Utils } from "./utils.js"
import { RenderLayer } from "./renderlayer.js"
import { DefaultColors } from "./defaultcolors.js"
import * as vec4 from "./glmatrix/vec4.js";
// temporary for emergency quantization
const v4 = vec4.create();
=======
import {Utils} from "./utils.js"
>>>>>>>
import { Utils } from "./utils.js"
import * as vec4 from "./glmatrix/vec4.js";
// temporary for emergency quantization
const v4 = vec4.create(); |
<<<<<<<
import iconsShape from './shapes/iconsShape';
import languageShape from './shapes/languageShape';
import nodeShape from './shapes/nodeShape';
=======
>>>>>>>
import iconsShape from './shapes/iconsShape';
import languageShape from './shapes/languageShape';
<<<<<<<
icons: iconsShape.isRequired,
=======
isLeaf: PropTypes.bool.isRequired,
>>>>>>>
icons: iconsShape.isRequired,
isLeaf: PropTypes.bool.isRequired,
<<<<<<<
if (!this.hasChildren()) {
return leaf;
=======
if (this.props.isLeaf) {
return <span className="rct-icon rct-icon-leaf" />;
>>>>>>>
if (this.props.isLeaf) {
return leaf; |
<<<<<<<
}
function use(Super, originalTopLevel) {
return function(methods, toplevelMethods) {
function Sub() {
Stream.apply(this, arguments);
}
inherits(Sub, Super);
function topLevel() {
return __(Sub).apply(null, arguments);
}
for (var p in originalTopLevel) {
if (hasOwn.call(originalTopLevel, p)) {
var fn = originalTopLevel[p];
topLevel[p] = (typeof fn._relevel === 'function') ? fn._relevel(topLevel) : fn;
}
}
_addMethods(Sub.prototype, topLevel, methods || {});
_addToplevelMethods(topLevel, toplevelMethods || {});
topLevel.use = use(Sub, topLevel);
=======
else if (_.isString(xs)) {
var mapper = hintMapper(mappingHint);
>>>>>>>
}
function use(Super, originalTopLevel) {
return function(methods, toplevelMethods) {
function Sub() {
Stream.apply(this, arguments);
}
inherits(Sub, Super);
function topLevel() {
return __(Sub).apply(null, arguments);
}
for (var p in originalTopLevel) {
if (hasOwn.call(originalTopLevel, p)) {
var fn = originalTopLevel[p];
topLevel[p] = (typeof fn._relevel === 'function') ? fn._relevel(topLevel) : fn;
}
}
_addMethods(Sub.prototype, topLevel, methods || {});
_addToplevelMethods(topLevel, toplevelMethods || {});
topLevel.use = use(Sub, topLevel);
<<<<<<<
});
=======
if (!this._is_observer && this.source) {
this.source._checkBackPressure();
}
};
/**
* When there is a change in downstream consumers, it will often ask
* the parent Stream to re-check it's state and pause/resume accordingly.
*/
Stream.prototype._checkBackPressure = function () {
if (!this._consumers.length) {
this._repeat_resume = false;
return this.pause();
}
for (var i = 0, len = this._consumers.length; i < len; i++) {
if (this._consumers[i].paused) {
this._repeat_resume = false;
return this.pause();
}
}
return this.resume();
};
>>>>>>>
});
<<<<<<<
return this.create(function (push, next) {
if (running.length && running[0].buffer.length) {
// send buffered data
flushBuffer();
next();
// still waiting for more data before we can shift
// the running array...
}
else if (running.length < n && !ended && !reading_source) {
=======
return _(function (push, next) {
if (running.length < n && !ended && !reading_source) {
>>>>>>>
return this.create(function (push, next) {
if (running.length < n && !ended && !reading_source) {
<<<<<<<
addToplevelMethod('wrapCallback', function (f) {
var stream = this;
=======
/*eslint-disable no-multi-spaces */
_.wrapCallback = function (f, /*optional*/mappingHint) {
/*eslint-enable no-multi-spaces */
var mapper = hintMapper(mappingHint);
>>>>>>>
/*eslint-disable no-multi-spaces */
addToplevelMethod('wrapCallback', function (f, /*optional*/mappingHint) {
/*eslint-enable no-multi-spaces */
var stream = this;
var mapper = hintMapper(mappingHint);
<<<<<<<
return stream(function (push) {
var cb = function (err, x) {
=======
return _(function (push) {
var cb = function (err) {
>>>>>>>
return stream(function (push) {
var cb = function (err) { |
<<<<<<<
function newPullFunction(xs) {
return function pull(cb) {
xs.pull(cb);
};
}
function newDelegateGenerator(pull) {
return function delegateGenerator(push, next) {
var self = this;
pull(function (err, x) {
// Minor optimization to immediately call the
// generator if requested.
var old = self._defer_run_generator;
self._defer_run_generator = true;
push(err, x);
if (x !== nil) {
next();
}
self._defer_run_generator = old;
if (!old && self._run_generator_deferred) {
self._runGenerator();
}
});
};
}
function promiseStream(Stream, promise) {
return new Stream(function (push) {
=======
function nop() {
// Do nothing.
}
function pipeReadable(xs, stream) {
// write any errors into the stream
xs.on('error', writeStreamError);
xs.pipe(stream);
// TODO: Replace with onDestroy in v3.
stream._destructors.push(function () {
if (xs.unpipe) {
xs.unpipe(stream);
}
xs.removeListener('error', writeStreamError);
});
function writeStreamError(err) {
stream.write(new StreamError(err));
}
}
function promiseStream(promise) {
return _(function (push) {
>>>>>>>
function nop() {
// Do nothing.
}
function pipeReadable(xs, stream) {
// write any errors into the stream
xs.on('error', writeStreamError);
xs.pipe(stream);
stream.onDestroy(function () {
if (xs.unpipe) {
xs.unpipe(stream);
}
xs.removeListener('error', writeStreamError);
});
function writeStreamError(err) {
stream.write(new StreamError(err));
}
}
function newPullFunction(xs) {
return function pull(cb) {
xs.pull(cb);
};
}
function newDelegateGenerator(pull) {
return function delegateGenerator(push, next) {
var self = this;
pull(function (err, x) {
// Minor optimization to immediately call the
// generator if requested.
var old = self._defer_run_generator;
self._defer_run_generator = true;
push(err, x);
if (x !== nil) {
next();
}
self._defer_run_generator = old;
if (!old && self._run_generator_deferred) {
self._runGenerator();
}
});
};
}
function promiseStream(Stream, promise) {
return new Stream(function (push) {
<<<<<<<
function iteratorStream(Stream, it) {
return new Stream(function (push, next) {
=======
function iteratorStream(it) {
return _(function (push, next) {
>>>>>>>
function iteratorStream(Stream, it) {
return new Stream(function (push, next) {
<<<<<<<
function _addMethod(proto, topLevel) {
return function(name, f) {
proto[name] = f;
var n = f.length;
function relevel(coerce) {
return _.ncurry(n + 1, function () {
var args = slice.call(arguments);
var s = coerce(args.pop());
return f.apply(s, args);
});
}
topLevel[name] = relevel(topLevel);
topLevel[name]._relevel = relevel;
};
}
var addMethod = _addMethod(Stream.prototype, _);
=======
if (_.isUndefined(xs)) {
// nothing else to do
return this;
}
else if (_.isArray(xs)) {
self._incoming = xs.concat([nil]);
}
else if (_.isFunction(xs)) {
this._generator = xs;
this._generator_push = generatorPush(this);
this._generator_next = function (s) {
if (self._nil_seen) {
throw new Error('Can not call next after nil');
}
>>>>>>>
function _addMethod(proto, topLevel) {
return function(name, f) {
proto[name] = f;
var n = f.length;
function relevel(coerce) {
return _.ncurry(n + 1, function () {
var args = slice.call(arguments);
var s = coerce(args.pop());
return f.apply(s, args);
});
}
topLevel[name] = relevel(topLevel);
topLevel[name]._relevel = relevel;
};
}
var addMethod = _addMethod(Stream.prototype, _);
<<<<<<<
addMethod('pipe', function (dest) {
var self = this;
=======
Stream.prototype.pipe = function (dest) {
>>>>>>>
addMethod('pipe', function (dest) {
<<<<<<<
=======
_(this._destructors).each(function (destructor) {
destructor.call(self);
});
>>>>>>>
<<<<<<<
start = this();
=======
start = _();
startHighland = start;
>>>>>>>
start = this();
startHighland = start;
<<<<<<<
start = this(start);
=======
startHighland = _(start);
>>>>>>>
startHighland = this(start);
<<<<<<<
}, start);
var wrapper = this(function (push, next) {
=======
}, startHighland);
var wrapper = _(function (push, next) {
>>>>>>>
}, startHighland);
var wrapper = this(function (push, next) { |
<<<<<<<
function takeNext(xs, array, times, cb) {
xs.pull(function (err, x) {
if (x !== _.nil) {
array.push(x);
if (times - 1 > 0) {
takeNext(xs, array, times - 1, cb);
}
}
if (cb && (times <= 1 || x === _.nil)) {
cb(array);
}
});
}
=======
function takeNextCb(xs, times, array, cb) {
if (!array) {
array = [];
}
xs.pull(function (err, x) {
array.push(x);
if (x !== _.nil) {
if (times - 1 > 0) {
takeNextCb(xs, times - 1, array, cb);
}
}
if (cb && (times <= 1 || x === _.nil)) {
cb(array);
}
});
}
function takeNext(xs, times, array) {
return new Promise(function (res, rej) {
takeNextCb(xs, times, array, res);
});
}
>>>>>>>
function takeNextCb(xs, times, array, cb) {
if (!array) {
array = [];
}
xs.pull(function (err, x) {
array.push(x);
if (x !== _.nil) {
if (times - 1 > 0) {
takeNextCb(xs, times - 1, array, cb);
}
}
if (cb && (times <= 1 || x === _.nil)) {
cb(array);
}
});
}
function takeNext(xs, times, array) {
return new Promise(function (res, rej) {
takeNextCb(xs, times, array, res);
});
}
<<<<<<<
exports['consume - source resume should buffer'] = function (test) {
test.expect(2);
var values = [];
var s = _([1, 2, 3]);
var s2 = s.consume(function (err, x, push, next) {
values.push(x);
if (x !== _.nil) {
next();
}
});
s.resume();
test.same(values, []);
s2.resume();
test.same(values, [1, 2, 3, _.nil]);
test.done();
};
exports['passing Stream to constructor returns original'] = function (test) {
var s = _([1,2,3]);
test.strictEqual(s, _(s));
test.done();
};
=======
exports['consume - fork after consume should not throw (issue #366)'] = function (test) {
test.expect(2);
var arr1, arr2;
var s = _();
var s1 = s.toArray(function (a) {
arr1 = a;
if (arr1 && arr2) {
runTest();
}
});
var s2 = s.fork().toArray(function (a) {
arr2 = a;
if (arr1 && arr2) {
runTest();
}
});
s.write(1);
s.end();
function runTest() {
test.same(arr1, [1]);
test.same(arr2, [1]);
test.done();
}
}
>>>>>>>
exports['consume - source resume should buffer'] = function (test) {
test.expect(2);
var values = [];
var s = _([1, 2, 3]);
var s2 = s.consume(function (err, x, push, next) {
values.push(x);
if (x !== _.nil) {
next();
}
});
s.resume();
test.same(values, []);
s2.resume();
test.same(values, [1, 2, 3, _.nil]);
test.done();
};
exports['consume - fork after consume should not throw (issue #366)'] = function (test) {
test.expect(2);
var arr1, arr2;
var s = _();
var s1 = s.fork().toArray(function (a) {
arr1 = a;
if (arr1 && arr2) {
runTest();
}
});
var s2 = s.fork().toArray(function (a) {
arr2 = a;
if (arr1 && arr2) {
runTest();
}
});
s.write(1);
s.end();
function runTest() {
test.same(arr1, [1]);
test.same(arr2, [1]);
test.done();
}
}
<<<<<<<
/* TODO: not working, doesn't consume
exports['observe - returnsSameStream'] = returnsSameStreamTest(function(s) {
return s.observe();
}, [1]);
*/
=======
exports['observe - observe consume before source emit should not throw'] = function (test) {
test.expect(2);
var arr1, arr2;
var s = _();
var s1 = s.observe().toArray(function (a) {
arr1 = a;
if (arr1 && arr2) {
runTest();
}
});
var s2 = s.observe().toArray(function (a) {
arr2 = a;
if (arr1 && arr2) {
runTest();
}
});
s.write(1);
s.end();
s.resume();
function runTest() {
test.same(arr1, [1]);
test.same(arr2, [1]);
test.done();
}
};
>>>>>>>
/* TODO: not working, doesn't consume
exports['observe - returnsSameStream'] = returnsSameStreamTest(function(s) {
return s.observe();
}, [1]);
*/
exports['observe - observe consume before source emit should not throw'] = function (test) {
test.expect(2);
var arr1, arr2;
var s = _();
var s1 = s.observe().toArray(function (a) {
arr1 = a;
if (arr1 && arr2) {
runTest();
}
});
var s2 = s.observe().toArray(function (a) {
arr2 = a;
if (arr1 && arr2) {
runTest();
}
});
s.write(1);
s.end();
s.resume();
function runTest() {
test.same(arr1, [1]);
test.same(arr2, [1]);
test.done();
}
}; |
<<<<<<<
function newPullFunction(xs) {
return function pull(cb) {
xs.pull(cb);
};
}
function newDelegateGenerator(pull) {
return function delegateGenerator(push, next) {
pull(function (err, x) {
push(err, x);
if (x !== nil) {
next();
}
});
};
}
=======
function promiseGenerator(promise) {
return _(function (push) {
promise.then(function (value) {
push(null, value);
return push(null, nil);
},
function (err) {
push(err);
return push(null, nil);
});
});
}
function iteratorGenerator(it) {
return _(function (push, next) {
var iterElem, iterErr;
try {
iterElem = it.next();
}
catch (err) {
iterErr = err;
}
if (iterErr) {
push(iterErr);
push(null, _.nil);
}
else if (iterElem.done) {
if (!_.isUndefined(iterElem.value)) {
// generators can return a final
// value on completion using return
// keyword otherwise value will be
// undefined
push(null, iterElem.value);
}
push(null, _.nil);
}
else {
push(null, iterElem.value);
next();
}
});
}
>>>>>>>
function newPullFunction(xs) {
return function pull(cb) {
xs.pull(cb);
};
}
function newDelegateGenerator(pull) {
return function delegateGenerator(push, next) {
pull(function (err, x) {
push(err, x);
if (x !== nil) {
next();
}
});
};
}
function promiseStream(promise) {
return _(function (push) {
promise.then(function (value) {
push(null, value);
return push(null, nil);
},
function (err) {
push(err);
return push(null, nil);
});
});
}
function iteratorStream(it) {
return _(function (push, next) {
var iterElem, iterErr;
try {
iterElem = it.next();
}
catch (err) {
iterErr = err;
}
if (iterErr) {
push(iterErr);
push(null, _.nil);
}
else if (iterElem.done) {
if (!_.isUndefined(iterElem.value)) {
// generators can return a final
// value on completion using return
// keyword otherwise value will be
// undefined
push(null, iterElem.value);
}
push(null, _.nil);
}
else {
push(null, iterElem.value);
next();
}
});
}
<<<<<<<
self.paused = true;
self._outgoing = new Queue();
self._observers = [];
self._destructors = [];
self._send_events = false;
self.ended = false;
self._request = null;
self._multiplexer = null;
self._consumer = null;
self._generator = generator;
// These are defined here instead of on the prototype
// because bind is super slow.
self._push_fn = function (err, x) {
self._writeOutgoing(err ? new StreamError(err) : x);
};
self._next_fn = function (xs) {
// console.log(self.id, '_next', xs, self.paused);
self._generator_running = false;
if (xs) {
xs = _(xs);
var pull = newPullFunction(xs);
self._generator = newDelegateGenerator(pull);
}
if (!self.paused) {
self._runGenerator();
}
};
self._generator_running = false;
self._repeat_run_generator = true;
=======
this.paused = true;
this._incoming = [];
this._outgoing = [];
this._consumers = [];
this._observers = [];
this._destructors = [];
this._send_events = false;
this._nil_seen = false;
this._delegate = null;
this._is_observer = false;
this.source = null;
>>>>>>>
self._outgoing = new Queue();
self._observers = [];
self._destructors = [];
self._send_events = false;
self.paused = true;
self.ended = false;
self._nil_seen = false;
self._request = null;
self._multiplexer = null;
self._consumer = null;
self._generator = generator;
self._generator_running = false;
self._repeat_run_generator = true;
// These are defined here instead of on the prototype
// because bind is super slow.
self._push_fn = function (err, x) {
if (self._nil_seen) {
throw new Error('Can not write to stream after nil');
}
if (x === nil) {
self._nil_seen = true;
}
self._writeOutgoing(err ? new StreamError(err) : x);
};
self._next_fn = function (xs) {
// console.log(self.id, '_next', xs, self.paused);
if (self._nil_seen) {
throw new Error('Can not call next after nil');
}
self._generator_running = false;
if (xs) {
xs = _(xs);
var pull = newPullFunction(xs);
self._generator = newDelegateGenerator(pull);
}
if (!self.paused) {
self._runGenerator();
}
};
<<<<<<<
=======
if (_.isUndefined(xs)) {
// nothing else to do
return this;
}
else if (_.isArray(xs)) {
self._incoming = xs.concat([nil]);
}
else if (_.isFunction(xs)) {
this._generator = xs;
this._generator_push = function (err, x) {
if (self._nil_seen) {
throw new Error('Can not write to stream after nil');
}
if (x === nil) {
self._nil_seen = true;
}
self.write(err ? new StreamError(err) : x);
};
this._generator_next = function (s) {
if (self._nil_seen) {
throw new Error('Can not call next after nil');
}
if (s) {
// we MUST pause to get the redirect object into the _incoming
// buffer otherwise it would be passed directly to _send(),
// which does not handle StreamRedirect objects!
var _paused = self.paused;
if (!_paused) {
self.pause();
}
self.write(new StreamRedirect(s));
if (!_paused) {
self.resume();
}
}
else {
self._generator_running = false;
}
if (!self.paused) {
self.resume();
}
};
}
else if (_.isObject(xs)) {
// check to see if we have a readable stream
if (_.isFunction(xs.on) && _.isFunction(xs.pipe)) {
// write any errors into the stream
xs.on('error', function (err) {
self.write(new StreamError(err));
});
xs.pipe(self);
}
else if (_.isFunction(xs.then)) {
//probably a promise
return promiseGenerator(xs);
}
// must check iterators and iterables in this order
// because generators are both iterators and iterables:
// their Symbol.iterator method returns the `this` object
// and an infinite loop would result otherwise
else if (_.isFunction(xs.next)) {
//probably an iterator
return iteratorGenerator(xs);
}
else if (!_.isUndefined(_global.Symbol) && xs[_global.Symbol.iterator]) {
//probably an iterable
return iteratorGenerator(xs[_global.Symbol.iterator]());
}
else {
throw new Error(
'Object was not a stream, promise, iterator or iterable: ' + (typeof xs)
);
}
}
else if (_.isString(xs)) {
var mappingHintType = (typeof mappingHint);
var mapper;
if (mappingHintType === 'function') {
mapper = mappingHint;
}
else if (mappingHintType === 'number') {
mapper = function () {
return slice.call(arguments, 0, mappingHint);
};
}
else if (_.isArray(mappingHint)) {
mapper = function () {
var args = arguments;
return mappingHint.reduce(function (ctx, hint, idx) {
ctx[hint] = args[idx];
return ctx;
}, {});
};
}
else {
mapper = function (x) { return x; };
}
ee.on(xs, function () {
var ctx = mapper.apply(this, arguments);
self.write(ctx);
});
}
else {
throw new Error(
'Unexpected argument type to Stream(): ' + (typeof xs)
);
}
>>>>>>>
<<<<<<<
Stream.prototype._send = function (token) {
// console.log(this.id, '_send', token, this._send_events);
var err = null,
x;
if (_._isStreamError(token)) {
err = token.error;
}
else {
x = token;
}
=======
Stream.prototype._send = function (err, x) {
//console.log(['_send', this.id, err, x]);
var token;
>>>>>>>
Stream.prototype._send = function (token) {
// console.log(this.id, '_send', token, this._send_events);
var err = null,
x;
if (_._isStreamError(token)) {
err = token.error;
}
else {
x = token;
}
<<<<<<<
=======
if (!this._is_observer && this.source) {
this.source._checkBackPressure();
}
>>>>>>>
<<<<<<<
if (this.paused) {
return;
}
if (this._generator) {
this._runGenerator();
}
else {
// perhaps a node stream is being piped in
this.emit('drain');
}
=======
// we may have paused while reading from buffer
if (!this.paused && !this._is_observer) {
// ask parent for more data
if (this.source) {
//console.log(['ask parent for more data']);
this.source._checkBackPressure();
}
// run _generator to fill up _incoming buffer
else if (this._generator) {
//console.log(['run generator to fill up _incoming buffer']);
this._runGenerator();
}
else {
// perhaps a node stream is being piped in
this.emit('drain');
}
}
} while (this._repeat_resume);
this._resume_running = false;
>>>>>>>
if (this.paused) {
return;
}
if (this._generator) {
this._runGenerator();
}
else {
// perhaps a node stream is being piped in
this.emit('drain');
}
<<<<<<<
this._generator = null;
this._request = null;
this.ended = true;
this._outgoing = new Queue();
=======
_(this._consumers).each(function (consumer) {
self._removeConsumer(consumer);
});
_(this._observers).each(function (observer) {
self._removeObserver(observer);
});
if (this.source) {
var source = this.source;
source._removeConsumer(this);
source._removeObserver(this);
}
>>>>>>>
this._generator = null;
this._request = null;
this.ended = true;
this._outgoing = new Queue();
this._observers = [];
<<<<<<<
if (self._multiplexer) {
throw new Error(
'Stream has been forked. You must either fork() or observe().'
);
}
self._consumer = new ConsumeStream(this, f);
return self._consumer;
=======
var s = new Stream();
var _send = s._send;
var push = function (err, x) {
//console.log(['push', err, x, s.paused]);
if (s._nil_seen) {
throw new Error('Can not write to stream after nil');
}
if (x === nil) {
// ended, remove consumer from source
s._nil_seen = true;
self._removeConsumer(s);
}
if (s.paused) {
if (err) {
s._outgoing.push(new StreamError(err));
}
else {
s._outgoing.push(x);
}
}
else {
_send.call(s, err, x);
}
};
var async;
var next_called;
var next = function (s2) {
//console.log(['next', async]);
if (s._nil_seen) {
throw new Error('Can not call next after nil');
}
if (s2) {
// we MUST pause to get the redirect object into the _incoming
// buffer otherwise it would be passed directly to _send(),
// which does not handle StreamRedirect objects!
var _paused = s.paused;
if (!_paused) {
s.pause();
}
s.write(new StreamRedirect(s2));
if (!_paused) {
s.resume();
}
}
else if (async) {
s.resume();
}
else {
next_called = true;
}
};
s._send = function (err, x) {
async = false;
next_called = false;
f(err, x, push, next);
async = true;
// Don't pause if x is nil -- as next will never be called after
if (!next_called && x !== nil) {
s.pause();
}
};
self._addConsumer(s);
return s;
>>>>>>>
if (self._multiplexer) {
throw new Error(
'Stream has been forked. You must either fork() or observe().'
);
}
self._consumer = new ConsumeStream(this, f);
return self._consumer;
<<<<<<<
// s.source = this;
=======
s.source = this;
s._is_observer = true;
>>>>>>>
var self = this;
s._destructors.push(function () {
self._removeObserver(s);
});
// s.source = this; |
<<<<<<<
stream.onDestroy(function () {
=======
// TODO: Replace with onDestroy in v3.
stream._destructors.push(unbind);
function streamEndCb(error) {
if (stream._nil_pushed) {
return;
}
unbind();
if (error) {
stream.write(new StreamError(error));
}
stream.end();
}
function unbind() {
if (unbound) {
return;
}
unbound = true;
if (cleanup) {
cleanup();
}
>>>>>>>
stream.onDestroy(unbind);
function streamEndCb(error) {
if (stream._nil_pushed) {
return;
}
unbind();
if (error) {
stream.write(new StreamError(error));
}
stream.end();
}
function unbind() {
if (unbound) {
return;
}
unbound = true;
if (cleanup) {
cleanup();
}
<<<<<<<
function newPullFunction(xs) {
return function pull(cb) {
xs.pull(cb);
};
}
function newDelegateGenerator(pull) {
return function delegateGenerator(push, next) {
var self = this;
pull(function (err, x) {
// Minor optimization to immediately call the
// generator if requested.
var old = self._defer_run_generator;
self._defer_run_generator = true;
push(err, x);
if (x !== nil) {
next();
}
self._defer_run_generator = old;
if (!old && self._run_generator_deferred) {
self._runGenerator();
}
});
};
}
function promiseStream(StreamCtor, promise) {
return new StreamCtor(function (push) {
promise.then(function (value) {
=======
function promiseStream(promise) {
if (_.isFunction(promise['finally'])) { // eslint-disable-line dot-notation
// Using finally handles also bluebird promise cancellation
return _(function (push) {
promise.then(function (value) {
return push(null, value);
},
function (err) {
return push(err);
})['finally'](function () { // eslint-disable-line dot-notation
return push(null, nil);
});
});
}
else {
// Sticking to promise standard only
return _(function (push) {
promise.then(function (value) {
>>>>>>>
function newPullFunction(xs) {
return function pull(cb) {
xs.pull(cb);
};
}
function newDelegateGenerator(pull) {
return function delegateGenerator(push, next) {
var self = this;
pull(function (err, x) {
// Minor optimization to immediately call the
// generator if requested.
var old = self._defer_run_generator;
self._defer_run_generator = true;
push(err, x);
if (x !== nil) {
next();
}
self._defer_run_generator = old;
if (!old && self._run_generator_deferred) {
self._runGenerator();
}
});
};
}
function promiseStream(StreamCtor, promise) {
if (_.isFunction(promise['finally'])) { // eslint-disable-line dot-notation
// Using finally handles also bluebird promise cancellation
return new StreamCtor(function (push) {
promise.then(function (value) {
return push(null, value);
},
function (err) {
return push(err);
})['finally'](function () { // eslint-disable-line dot-notation
return push(null, nil);
});
});
}
else {
// Sticking to promise standard only
return new StreamCtor(function (push) {
promise.then(function (value) {
<<<<<<<
=======
function generatorPush(stream, write) {
if (!write) {
write = stream.write;
}
return function (err, x) {
// This will set _nil_pushed if necessary.
write.call(stream, err ? new StreamError(err) : x);
};
}
>>>>>>>
<<<<<<<
function Stream(generator) {
=======
/*eslint-disable no-multi-spaces */
function Stream(/*optional*/xs, /*optional*/secondArg, /*optional*/mappingHint) {
/*eslint-enable no-multi-spaces */
if (xs && _.isStream(xs)) {
// already a Stream
return xs;
}
EventEmitter.call(this);
>>>>>>>
function Stream(generator) {
<<<<<<<
addMethod('end', function () {
=======
Stream.prototype.end = function () {
if (this._nil_pushed) {
// Allow ending multiple times.
return;
}
>>>>>>>
addMethod('end', function () {
if (this._nil_pushed) {
// Allow ending multiple times.
return;
}
<<<<<<<
this.readable = this.writable = false;
this.end();
=======
if (!this._nil_pushed) {
this.end();
}
>>>>>>>
this.readable = this.writable = false;
if (!this._nil_pushed) {
this.end();
}
<<<<<<<
// This should be a subclass, but prototype resolution is slow, and
// consume is on the critical path, so we inline it.
var gen = function () {
// Important. next may not be called outside of
// pullCb.
source.pull(pullCb);
=======
var s = new Stream();
// Hack. Not needed in v3.0.
s._is_consumer = true;
var _send = s._send;
var push = function (err, x) {
//console.log(['push', err, x, s.paused]);
if (s._nil_pushed) {
throw new Error('Cannot write to stream after nil');
}
if (x === nil) {
// ended, remove consumer from source
s._nil_pushed = true;
self._removeConsumer(s);
}
if (s.paused) {
if (err) {
s._outgoing.push(new StreamError(err));
}
else {
s._outgoing.push(x);
}
}
else {
_send.call(s, err, x);
}
};
var async;
var next_called;
var next = function (s2) {
//console.log(['next', async]);
if (s._nil_pushed) {
throw new Error('Cannot call next after nil');
}
if (s2) {
// we MUST pause to get the redirect object into the _incoming
// buffer otherwise it would be passed directly to _send(),
// which does not handle StreamRedirect objects!
var _paused = s.paused;
if (!_paused) {
s.pause();
}
s.write(new StreamRedirect(s2));
if (!_paused) {
s.resume();
}
}
else if (async) {
s.resume();
}
else {
next_called = true;
}
>>>>>>>
// This should be a subclass, but prototype resolution is slow, and
// consume is on the critical path, so we inline it.
var gen = function () {
// Important. next may not be called outside of
// pullCb.
source.pull(pullCb);
<<<<<<<
addMethod('write', function (x) {
// console.log(this.id, 'write', x, this.paused);
this._writeOutgoing(x);
=======
Stream.prototype.write = function (x) {
if (this._nil_pushed) {
throw new Error('Cannot write to stream after nil');
}
// The check for _is_consumer is kind of a hack. Not
// needed in v3.0.
if (x === _.nil && !this._is_consumer) {
this._nil_pushed = true;
}
if (this.paused) {
this._incoming.push(x);
}
else {
if (_._isStreamError(x)) {
this._send(x.error);
}
else {
this._send(null, x);
}
}
>>>>>>>
addMethod('write', function (x) {
// console.log(this.id, 'write', x, this.paused);
this._writeOutgoing(x); |
<<<<<<<
// Make sure to reset state when closed.
frame.once( 'close submit', function() {
frame.mediaController.reset();
} );
/* Trigger render_edit */
/*
* Action run after an edit shortcode overlay is rendered.
*
* Called as `shortcode-ui.render_edit`.
*
* @param shortcodeModel (object)
* Reference to the shortcode model used in this overlay.
*/
var hookName = 'shortcode-ui.render_edit';
var shortcodeModel = this.shortcodeModel;
wp.shortcake.hooks.doAction( hookName, shortcodeModel );
=======
>>>>>>>
// Make sure to reset state when closed.
frame.once( 'close submit', function() {
frame.mediaController.reset();
} ); |
<<<<<<<
=======
var Shortcodes = require('sui-collections/shortcodes');
sui = require('sui-utils/sui');
>>>>>>> |
<<<<<<<
wp = (typeof window !== "undefined" ? window.wp : typeof global !== "undefined" ? global.wp : null),
$ = (typeof window !== "undefined" ? window.jQuery : typeof global !== "undefined" ? global.jQuery : null);
=======
fetcher = require('./fetcher.js'),
wp = (typeof window !== "undefined" ? window['wp'] : typeof global !== "undefined" ? global['wp'] : null),
$ = (typeof window !== "undefined" ? window['jQuery'] : typeof global !== "undefined" ? global['jQuery'] : null);
>>>>>>>
fetcher = require('./fetcher.js'),
wp = (typeof window !== "undefined" ? window['wp'] : typeof global !== "undefined" ? global['wp'] : null),
$ = (typeof window !== "undefined" ? window['jQuery'] : typeof global !== "undefined" ? global['jQuery'] : null);
<<<<<<<
},{"./../collections/shortcodes.js":2}],10:[function(require,module,exports){
(function (global){
=======
},{"./../collections/shortcodes.js":2}],11:[function(require,module,exports){
>>>>>>>
},{"./../collections/shortcodes.js":2}],11:[function(require,module,exports){
(function (global){
<<<<<<<
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./../utils/sui.js":9}],11:[function(require,module,exports){
=======
},{"./../utils/sui.js":10}],12:[function(require,module,exports){
>>>>>>>
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./../utils/sui.js":10}],12:[function(require,module,exports){
<<<<<<<
var wp = (typeof window !== "undefined" ? window.wp : typeof global !== "undefined" ? global.wp : null),
sui = require('./../utils/sui.js'),
backbone = (typeof window !== "undefined" ? window.Backbone : typeof global !== "undefined" ? global.Backbone : null),
=======
var wp = (typeof window !== "undefined" ? window['wp'] : typeof global !== "undefined" ? global['wp'] : null),
sui = require('./../utils/sui.js'),
backbone = (typeof window !== "undefined" ? window['Backbone'] : typeof global !== "undefined" ? global['Backbone'] : null),
>>>>>>>
var wp = (typeof window !== "undefined" ? window['wp'] : typeof global !== "undefined" ? global['wp'] : null),
sui = require('./../utils/sui.js'),
backbone = (typeof window !== "undefined" ? window['Backbone'] : typeof global !== "undefined" ? global['Backbone'] : null), |
<<<<<<<
// New Web Audio API
/**
* @constructor
* @extends {AudioNode}
* @param {Object=} options
*/
var AudioWorkletNode = function(context, name, options)
{
this.port =
{
/**
* @param {Object} data
* @param {Object=} transfer
*/
postMessage: function(data, transfer) {}
};
};
/**
* @constructor
*/
var AudioWorkletProcessor = function()
{
this.port =
{
/**
* @param {Object} data
* @param {Object=} transfer
*/
postMessage: function(data, transfer) {}
};
}
var AudioWorklet = function() {};
AudioContext.prototype.audioWorklet =
{
/** @return {Promise} */
addModule: function(file) {}
};
/**
* @param {string} name
* @param {function()} processor
*/
var registerProcessor = function(name, processor) {}
/** @const */
var currentTime = 0;
/** @const */
var sampleRate = 0;
=======
var WebAssembly = {
Memory() {},
Table() {},
instantiate() { return { instance: null, module: null }; },
compile() {},
Instance() {},
Module() {},
};
WebAssembly.Module.customSections = function(module, section) {};
var WabtModule = {
readWasm: function(buf, opt) {},
generateNames: function() {},
applyNames: function() {},
toText: function() {},
};
var cs = {
Capstone: function() {},
ARCH_X86: 0,
MODE_16: 0,
MODE_32: 0,
disasm: { bytes: "", mnemonic: "", op_str: "", },
};
const Buffer = {
allocUnsafe : function(length) {},
from : function(arrayBuffer, byteOffset, length) {},
};
>>>>>>>
/**
* @param {string} name
* @param {function()} processor
*/
var registerProcessor = function(name, processor) {};
/** @const */
var currentTime = 0;
/** @const */
var sampleRate = 0;
var WebAssembly = {
Memory() {},
Table() {},
instantiate() { return { instance: null, module: null }; },
compile() {},
Instance() {},
Module() {},
};
WebAssembly.Module.customSections = function(module, section) {};
var WabtModule = {
readWasm: function(buf, opt) {},
generateNames: function() {},
applyNames: function() {},
toText: function() {},
};
var cs = {
Capstone: function() {},
ARCH_X86: 0,
MODE_16: 0,
MODE_32: 0,
disasm: { bytes: "", mnemonic: "", op_str: "", },
};
const Buffer = {
allocUnsafe : function(length) {},
from : function(arrayBuffer, byteOffset, length) {},
}; |
<<<<<<<
$scope.course = Course.get({
id: $stateParams.courseId
}, function (response) {
$scope.getPage(1);
});
=======
$scope.pageChanged = function() {
$scope.getPage($scope.currentPage);
}
$scope.getPage(1);
>>>>>>>
$scope.course = Course.get({
id: $stateParams.courseId
}, function (response) {
$scope.getPage(1);
});
$scope.pageChanged = function() {
$scope.getPage($scope.currentPage);
} |
<<<<<<<
classNames: ['Ta-start', 'Ta-end', 'Bgc-#fff.4', 'Bgc-#fff', 'P-55px', 'H-100%', 'M-a', 'test:h>Op-1:h', 'test:h_Op-1:h', 'Op-1', 'Op-1!', 'D-n!', 'C-#333', 'C-#333:li', 'Mt-neg10px', 'W-1/3']
=======
classNames: ['Trsdu-.3s', 'sibling:c+D-n', 'End-0', 'Ta-start', 'Ta-end', 'Bgc-#fff.4', 'Bgc-#fff', 'P-55px', 'H-100%', 'M-a', 'test:h>Op-1:h', 'test:h_Op-1:h', 'Op-1', 'Op-1!', 'D-n!', 'C-#333', 'Mt-neg10px', 'W-1/3']
>>>>>>>
classNames: ['Trsdu-.3s', 'sibling:c+D-n', 'End-0', 'Ta-start', 'Ta-end', 'Bgc-#fff.4', 'Bgc-#fff', 'P-55px', 'H-100%', 'M-a', 'test:h>Op-1:h', 'test:h_Op-1:h', 'Op-1', 'Op-1!', 'D-n!', 'C-#333', 'C-#333:li', 'Mt-neg10px', 'W-1/3'] |
<<<<<<<
Request({method: 'POST', url: API_URL + SELL_URL, headers: header, form:form },cp);
=======
Request({method: 'POST', url: API_TRADE_URL + BUY_URL, headers: header, form:form },cp);
>>>>>>>
Request({method: 'POST', url: API_TRADE_URL + SELL_URL, headers: header, form:form },cp); |
<<<<<<<
/**
* This is for transforms that may call their nested transforms before
* Reduced-wrapping the result (e.g. "take"), to avoid nested Reduced.
*/
function ensure_reduced(val) {
if (val instanceof Reduced) {
return val;
} else {
return new Reduced(val);
}
}
=======
/**
* This is for tranforms that call their nested transforms when
* performing completion (like "partition"), to avoid signaling
* termination after already completing.
*/
function ensure_unreduced(v) {
if (v instanceof Reduced) {
return v.val;
} else {
return v;
}
}
>>>>>>>
/**
* This is for transforms that may call their nested transforms before
* Reduced-wrapping the result (e.g. "take"), to avoid nested Reduced.
*/
function ensure_reduced(val) {
if (val instanceof Reduced) {
return val;
} else {
return new Reduced(val);
}
}
/**
* This is for tranforms that call their nested transforms when
* performing completion (like "partition"), to avoid signaling
* termination after already completing.
*/
function ensure_unreduced(v) {
if (v instanceof Reduced) {
return v.val;
} else {
return v;
}
} |
<<<<<<<
import cx from 'classnames'
import config from '../config'
=======
>>>>>>>
<<<<<<<
import twreporterRedux from '@twreporter/redux'
import { ABOUT_US_FOOTER, ARTICLE_STYLE, BRIGHT, CONTACT_FOOTER, DARK, PHOTOGRAPHY_ARTICLE_STYLE, PRIVACY_FOOTER, SITE_META, SITE_NAME, appId, LINK_PREFIX } from '../constants/index'
import { Link, browserHistory } from 'react-router'
=======
import twreporterRedux from '@twreporter/redux'
import { PHOTOGRAPHY_ARTICLE_STYLE, SITE_META, SITE_NAME, appId, LINK_PREFIX } from '../constants/index'
import { globalColor, colors, componentMargin, layout, letterSpace } from '../themes/common-variables'
import { Link } from 'react-router'
>>>>>>>
import twreporterRedux from '@twreporter/redux'
import { PHOTOGRAPHY_ARTICLE_STYLE, SITE_META, SITE_NAME, appId, LINK_PREFIX } from '../constants/index'
import { globalColor, colors, componentMargin, layout, letterSpace } from '../themes/common-variables'
import { Link, browserHistory } from 'react-router'
<<<<<<<
const { entities, params, selectedPost } = this.props
=======
const { entities, params, selectedPost, theme } = this.props
>>>>>>>
const { entities, params, selectedPost, theme } = this.props
<<<<<<<
const createBookmarkData = () => {
const slug = _.get(selectedPost, 'slug', '')
return {
slug,
is_external: _.get(entities, `posts.${slug}.style`) === 'interactive',
title: _.get(entities, `posts.${slug}.title`),
desc: _.get(entities, `posts.${slug}.og_description`),
thumbnail: _.get(entities, `posts.${slug}.hero_image.resized_targets.mobile.url`),
category: _.get(entities, `posts.${slug}.categories[0].name`),
published_date: _.get(entities, `posts.${slug}.published_date`)
}
}
=======
const pathname = _.get(this.props, 'location.pathname')
// theme
const bgColor = _.get(theme, 'bgColor')
// const footerBgColor = _.get(theme, 'footer_bg_color')
const fontColor = _.get(theme, 'fontColor')
const titlePosition = _.get(theme, 'titlePosition')
const headerPosition = _.get(theme, 'headerPosition')
const titleColor = _.get(theme, 'titleColor')
const subTitleColor = _.get(theme, 'subtitleColor')
const topicColor = _.get(theme, 'topicColor')
const logoColor = _.get(theme, 'logoColor')
const fontColorSet = {
topicFontColor: topicColor,
titleFontColor: titleColor,
subtitleFontColor: subTitleColor
}
>>>>>>>
const createBookmarkData = () => {
const slug = _.get(selectedPost, 'slug', '')
return {
slug,
is_external: _.get(entities, `posts.${slug}.style`) === 'interactive',
title: _.get(entities, `posts.${slug}.title`),
desc: _.get(entities, `posts.${slug}.og_description`),
thumbnail: _.get(entities, `posts.${slug}.hero_image.resized_targets.mobile.url`),
category: _.get(entities, `posts.${slug}.categories[0].name`),
published_date: _.get(entities, `posts.${slug}.published_date`)
}
}
const pathname = _.get(this.props, 'location.pathname')
// theme
const bgColor = _.get(theme, 'bgColor')
// const footerBgColor = _.get(theme, 'footer_bg_color')
const fontColor = _.get(theme, 'fontColor')
const titlePosition = _.get(theme, 'titlePosition')
const headerPosition = _.get(theme, 'headerPosition')
const titleColor = _.get(theme, 'titleColor')
const subTitleColor = _.get(theme, 'subtitleColor')
const topicColor = _.get(theme, 'topicColor')
const logoColor = _.get(theme, 'logoColor')
const fontColorSet = {
topicFontColor: topicColor,
titleFontColor: titleColor,
subtitleFontColor: subTitleColor
}
<<<<<<<
params: React.PropTypes.object,
createBookmark: React.PropTypes.func,
getCurrentBookmark: React.PropTypes.func,
deleteBookmark: React.PropTypes.func
=======
theme: React.PropTypes.object,
params: React.PropTypes.object,
ifDelegateImage: React.PropTypes.bool
>>>>>>>
theme: React.PropTypes.object
<<<<<<<
params: {},
createBookmark: () => {},
getCurrentBookmark: () => {},
deleteBookmark: () => {}
=======
theme: defaultTheme,
params: {},
ifDelegateImage: false
>>>>>>>
theme: defaultTheme
<<<<<<<
export default connect(mapStateToProps, { fetchAFullPost, setHeaderInfo, createBookmark, deleteBookmark, getCurrentBookmark })(Article)
=======
export default connect(mapStateToProps, { fetchAFullPost })(withLayout(Article))
>>>>>>>
export default connect(mapStateToProps, { fetchAFullPost, createBookmark, deleteBookmark, getCurrentBookmark })(withLayout(Article)) |
<<<<<<<
let d = new Date()
d.setTime(a.lastPublish*1000)
let d_str = d.toISOString().substring(0,10)
let url = '/a/' + a.slug
=======
const d_str = ts2yyyymmdd(a.lastPublish * 1000 , '.')
let url = 'https://www.twreporter.org/a/' + a.slug
>>>>>>>
const d_str = ts2yyyymmdd(a.lastPublish * 1000 , '.')
let url = '/a/' + a.slug |
<<<<<<<
import { setupTokenInLocalStorage, deletAuthInfoAction, authUserByTokenAction, keys } from '@twreporter/registration'
=======
import ReactGA from 'react-ga'
import configureStore from './store/configureStore'
import createRoutes from './routes'
import { Provider } from 'react-redux'
import { Router } from 'react-router'
import { colors, layout, letterSpace, lineHeight, typography } from './themes/common-variables'
import { injectGlobal } from 'styled-components'
import { match, browserHistory } from 'react-router'
import { screen as mq } from './themes/screen'
import { syncHistoryWithStore } from 'react-router-redux'
// inject global styles into html
injectGlobal`
html {
font-size: ${typography.font.size.base};
::selection {
background-color: ${colors.red.lightRed};
color: $FFF;
}
}
body {
letter-spacing: ${letterSpace.generalLetterSpace};
line-height: ${lineHeight.lineHeightMedium};
font-family: "source-han-sans-traditional", "Noto Sans TC", "PingFang TC", "Apple LiGothic Medium", Roboto, "Microsoft JhengHei", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
abbr[title], abbr[data-original-title] {
border-bottom: 0;
}
a {
text-decoration: none;
}
.hidden {
display: none !important;
}
.container {
line-height: ${lineHeight.linHeightLarge};
}
.inner-max {
${mq.desktopAbove`
max-width: ${layout.article.innerWidth};
`}
}
.outer-max {
${mq.desktopAbove`
max-width: ${layout.article.outerWidth};
`}
}
.no-hover {
border-bottom: 0 !important;
&:after {
display: none;
}
&:hover:after {
width: 0;
display: none;
}
}
.text-justify {
text-align: justify;
}
.text-center {
text-align: center;
}
.center-block {
display:block;
margin-left:auto;
margin-right:auto;
}
.visible-print {
display: none;
}
figure, p {
margin: 0;
}
@media print {
.hidden-print {
display: none !important;
}
.visible-print {
display: block !important;
}
a[href]:after {
content: '';
}
}
}
`
>>>>>>>
import ReactGA from 'react-ga'
import configureStore from './store/configureStore'
import createRoutes from './routes'
import { Provider } from 'react-redux'
import { Router } from 'react-router'
import { colors, layout, letterSpace, lineHeight, typography } from './themes/common-variables'
import { injectGlobal } from 'styled-components'
import { match, browserHistory } from 'react-router'
import { screen as mq } from './themes/screen'
import { setupTokenInLocalStorage, deletAuthInfoAction, authUserByTokenAction, keys } from '@twreporter/registration'
import { syncHistoryWithStore } from 'react-router-redux'
// inject global styles into html
injectGlobal`
html {
font-size: ${typography.font.size.base};
::selection {
background-color: ${colors.red.lightRed};
color: $FFF;
}
}
body {
letter-spacing: ${letterSpace.generalLetterSpace};
line-height: ${lineHeight.lineHeightMedium};
font-family: "source-han-sans-traditional", "Noto Sans TC", "PingFang TC", "Apple LiGothic Medium", Roboto, "Microsoft JhengHei", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
abbr[title], abbr[data-original-title] {
border-bottom: 0;
}
a {
text-decoration: none;
}
.hidden {
display: none !important;
}
.container {
line-height: ${lineHeight.linHeightLarge};
}
.inner-max {
${mq.desktopAbove`
max-width: ${layout.article.innerWidth};
`}
}
.outer-max {
${mq.desktopAbove`
max-width: ${layout.article.outerWidth};
`}
}
.no-hover {
border-bottom: 0 !important;
&:after {
display: none;
}
&:hover:after {
width: 0;
display: none;
}
}
.text-justify {
text-align: justify;
}
.text-center {
text-align: center;
}
.center-block {
display:block;
margin-left:auto;
margin-right:auto;
}
.visible-print {
display: none;
}
figure, p {
margin: 0;
}
@media print {
.hidden-print {
display: none !important;
}
.visible-print {
display: block !important;
}
a[href]:after {
content: '';
}
}
}
` |
<<<<<<<
import { Link } from 'react-router'
import PropTypes from 'prop-types'
import React from 'react'
=======
import Link from 'react-router/lib/Link'
import React, { PropTypes } from 'react'
>>>>>>>
import Link from 'react-router/lib/Link'
import PropTypes from 'prop-types'
import React from 'react' |
<<<<<<<
__tracker.trackEvent(obj);
console.log("GA: EVENT - "+JSON.stringify(obj));
=======
try { $TRACKER.trackEvent(obj); } catch (err) {}
Ti.API.debug("GA: EVENT - "+JSON.stringify(obj));
>>>>>>>
try { __tracker.trackEvent(obj); } catch (err) {}
console.log("GA: EVENT - "+JSON.stringify(obj));
<<<<<<<
__tracker.trackScreen(name);
console.log("GA: SCREEN - "+name);
=======
try { $TRACKER.trackScreen(name); } catch (err) {}
Ti.API.debug("GA: SCREEN - "+name);
>>>>>>>
try { __tracker.trackScreen(name); } catch (err) {}
console.log("GA: SCREEN - "+name);
<<<<<<<
__tracker.trackSocial(net);
console.log("GA: SOCIAL - "+JSON.stringify(obj));
=======
try { $TRACKER.trackSocial(obj); } catch (err) {}
Ti.API.debug("GA: SOCIAL - "+JSON.stringify(obj));
>>>>>>>
try { __tracker.trackSocial(net); } catch (err) {}
console.log("GA: SOCIAL - "+JSON.stringify(obj));
<<<<<<<
__tracker.trackTiming(obj);
console.log("GA: TIME - "+JSON.stringify(obj));
=======
try { $TRACKER.trackTiming(obj); } catch (err) {}
Ti.API.debug("GA: TIME - "+JSON.stringify(obj));
>>>>>>>
try { __tracker.trackTiming(obj); } catch (err) {}
console.log("GA: TIME - "+JSON.stringify(obj)); |
<<<<<<<
this.data_points = [{}]
/*
=======
for (var key in Keyframe.properties) {
Keyframe.properties[key].reset(this);
}
this.channel = 'rotation';
>>>>>>>
this.data_points = [{}]
for (var key in Keyframe.properties) {
Keyframe.properties[key].reset(this);
}
/*
this.channel = 'rotation'; |
<<<<<<<
x: sigma.utils.getX(e) - sigma.utils.getWidth(e) / 2,
y: sigma.utils.getY(e) - sigma.utils.getHeight(e) / 2
=======
x: sigma.utils.getX(e) - e.target.width / 2,
y: sigma.utils.getY(e) - e.target.height / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
>>>>>>>
x: sigma.utils.getX(e) - sigma.utils.getWidth(e) / 2,
y: sigma.utils.getY(e) - sigma.utils.getHeight(e) / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
<<<<<<<
x: x - sigma.utils.getWidth(e) / 2,
y: y - sigma.utils.getHeight(e) / 2
=======
x: x - e.target.width / 2,
y: y - e.target.height / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
>>>>>>>
x: x - sigma.utils.getWidth(e) / 2,
y: y - sigma.utils.getHeight(e) / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
<<<<<<<
_self.dispatchEvent('mousedown', {
x: _startMouseX - sigma.utils.getWidth(e) / 2,
y: _startMouseY - sigma.utils.getHeight(e) / 2
});
=======
switch (e.which) {
case 2:
// Middle mouse button pressed
// Do nothing.
break;
case 3:
// Right mouse button pressed
_self.dispatchEvent('rightclick', {
x: _startMouseX - e.target.width / 2,
y: _startMouseY - e.target.height / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
});
break;
// case 1:
default:
// Left mouse button pressed
_isMouseDown = true;
_self.dispatchEvent('mousedown', {
x: _startMouseX - e.target.width / 2,
y: _startMouseY - e.target.height / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
});
}
>>>>>>>
switch (e.which) {
case 2:
// Middle mouse button pressed
// Do nothing.
break;
case 3:
// Right mouse button pressed
_self.dispatchEvent('rightclick', {
x: _startMouseX - sigma.utils.getWidth(e) / 2,
y: _startMouseY - sigma.utils.getHeight(e) / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
});
break;
// case 1:
default:
// Left mouse button pressed
_isMouseDown = true;
_self.dispatchEvent('mousedown', {
x: _startMouseX - sigma.utils.getWidth(e) / 2,
y: _startMouseY - sigma.utils.getHeight(e) / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
});
}
<<<<<<<
x: sigma.utils.getX(e) - sigma.utils.getWidth(e) / 2,
y: sigma.utils.getY(e) - sigma.utils.getHeight(e) / 2
=======
x: sigma.utils.getX(e) - e.target.width / 2,
y: sigma.utils.getY(e) - e.target.height / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
>>>>>>>
x: sigma.utils.getX(e) - sigma.utils.getWidth(e) / 2,
y: sigma.utils.getY(e) - sigma.utils.getHeight(e) / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
<<<<<<<
x: _startMouseX - sigma.utils.getWidth(e) / 2,
y: _startMouseY - sigma.utils.getHeight(e) / 2
=======
x: _startMouseX - e.target.width / 2,
y: _startMouseY - e.target.height / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey
>>>>>>>
x: _startMouseX - sigma.utils.getWidth(e) / 2,
y: _startMouseY - sigma.utils.getHeight(e) / 2,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
shiftKey: e.shiftKey |
<<<<<<<
Prop.removeProperty('auth.me');
exports.resetUserWantsToUseBiometricIdentity();
=======
exports.OAuth.resetCredentials();
purgeData();
if (_.isFunction(callback)) callback();
} else {
>>>>>>>
exports.OAuth.resetCredentials();
purgeData();
exports.resetUserWantsToUseBiometricIdentity();
if (_.isFunction(callback)) callback();
} else { |
<<<<<<<
=======
/** @private
* connectionState の状態を変更します。
*/
_beginConnect(): void {
this._setConnectionState('connecting');
}
/** @private
* peer connection の状態を判断します。
*/
_updateConnectionState(): void {
logger.group(`# PeerConnection[${this._valueTag}]: update connection state`);
logger.log("# signaling state => ", this.signalingState);
logger.log("# ice connection state => ", this.iceConnectionState);
logger.log("# ice gathering state => ", this.iceGatheringState);
// if (this.signalingState == 'stable' &&
// this.iceConnectionState == 'connected' &&
// this.iceGatheringState == 'complete') {
// logger.log("# connection connected");
// this._setConnectionState('connected');
// }
if (this.signalingState == 'stable' &&
this.iceConnectionState == 'connected') {
logger.log("# connection connected");
this._setConnectionState('connected');
}
logger.groupEnd();
}
_setConnectionState(state: RTCPeerConnectionState): void {
logger.log(`# PeerConnection[${this._valueTag}]: set connection state => `, state);
this.connectionState = state;
this.dispatchEvent(new RTCEvent('connectionstatechange'));
}
>>>>>>>
<<<<<<<
logger.log("# connection close");
=======
logger.log(`# PeerConnection[${this._valueTag}]: connection close`);
this._setConnectionState('closed');
this._finish();
}
_fail(): void {
logger.log(`# PeerConnection[${this._valueTag}]: connection fail`);
this._setConnectionState('failed');
>>>>>>>
logger.log(`# PeerConnection[${this._valueTag}]: connection close`);
<<<<<<<
logger.log("# create answer");
return RTCPeerConnection.nativeCreateAnswer(this._valueTag, constraints)
=======
logger.log(`# PeerConnection[${this._valueTag}]: create answer`);
return WebRTC.peerConnectionCreateAnswer(this._valueTag, constraints)
>>>>>>>
logger.log(`# PeerConnection[${this._valueTag}]: create answer`);
return RTCPeerConnection.nativeCreateAnswer(this._valueTag, constraints)
<<<<<<<
logger.log("# create offer");
return RTCPeerConnection.nativeCreateOffer(this._valueTag, constraints)
=======
logger.log(`# PeerConnection[${this._valueTag}]: create offer`);
return WebRTC.peerConnectionCreateOffer(this._valueTag, constraints)
>>>>>>>
logger.log(`# PeerConnection[${this._valueTag}]: create offer`);
return RTCPeerConnection.nativeCreateOffer(this._valueTag, constraints)
<<<<<<<
RTCPeerConnection.nativeRemoveTrack(this._valueTag, sender._valueTag);
=======
return WebRTC.peerConnectionRemoveTrack(this._valueTag, sender._valueTag)
.then(() => {
console.log("removeTrack: sender => ", sender);
return;
});
>>>>>>>
return RTCPeerConnection.nativeRemoveTrack(this._valueTag, sender._valueTag);
<<<<<<<
logger.log("# set configuration");
RTCPeerConnection.nativeSetConfiguration(this._valueTag, configuration);
=======
logger.log(`# PeerConnection[${this._valueTag}]: set configuration`);
WebRTC.peerConnectionSetConfiguration(this._valueTag, configuration);
>>>>>>>
logger.log(`# PeerConnection[${this._valueTag}]: set configuration`);
RTCPeerConnection.nativeSetConfiguration(this._valueTag, configuration);
<<<<<<<
logger.log("# set local description");
return RTCPeerConnection.nativeSetLocalDescription(
=======
logger.log(`# PeerConnection[${this._valueTag}]: set local description`);
return WebRTC.peerConnectionSetLocalDescription(
>>>>>>>
logger.log(`# PeerConnection[${this._valueTag}]: set local description`);
return RTCPeerConnection.nativeSetLocalDescription(
<<<<<<<
logger.log("# set remote description");
return RTCPeerConnection.nativeSetRemoteDescription(
=======
logger.log(`# PeerConnection[${this._valueTag}]: set remote description`);
return WebRTC.peerConnectionSetRemoteDescription(
>>>>>>>
logger.log(`# PeerConnection[${this._valueTag}]: set remote description`);
return RTCPeerConnection.nativeSetRemoteDescription( |
<<<<<<<
if (document.readyState == "complete" || document.readyState == "loaded") {
setupAFDom();
=======
if (document.readyState === "complete" || document.readyState === "loaded") {
>>>>>>>
if (document.readyState === "complete" || document.readyState === "loaded") {
setupAFDom();
<<<<<<<
=======
$(document).ready(function() {
//boot touchLayer
//create afui element if it still does not exist
var afui = document.getElementById("afui");
if (afui === null) {
afui = document.createElement("div");
afui.id = "afui";
var body = document.body;
while (body&&body.firstChild) {
afui.appendChild(body.firstChild);
}
$(document.body).prepend(afui);
}
that.isIntel = "intel" in window&&window.intel&&window.intel.xdk&&window.intel.xdk.app;
if ($.os.supportsTouch) $.touchLayer(afui);
setupCustomTheme();
});
>>>>>>>
<<<<<<<
if(fnc)
this.dispatchPanelEvent(fnc,myPanel);
=======
if (typeof fnc === "string" && window[fnc]) {
window[fnc](myPanel);
}
>>>>>>>
if(fnc)
this.dispatchPanelEvent(fnc,myPanel);
<<<<<<<
if(fnc)
this.dispatchPanelEvent(fnc,tmp.get(0));
=======
if (typeof fnc === "string" && window[fnc]) {
window[fnc](tmp.get(0));
}
>>>>>>>
if(fnc)
this.dispatchPanelEvent(fnc,tmp.get(0));
<<<<<<<
if($(tmp).hasClass("no-scroll") || (tmp.getAttribute("scrolling") && tmp.getAttribute("scrolling") == "no")) {
=======
if (tmp.getAttribute("scrolling") && tmp.getAttribute("scrolling") === "no") {
>>>>>>>
if($(tmp).hasClass("no-scroll") || (tmp.getAttribute("scrolling") && tmp.getAttribute("scrolling") == "no")) {
<<<<<<<
if(fnc)
this.dispatchPanelEvent(fnc,oldDiv);
=======
if (typeof fnc === "string" && window[fnc]) {
window[fnc](oldDiv);
}
>>>>>>>
if(fnc)
this.dispatchPanelEvent(fnc,oldDiv);
<<<<<<<
if(fnc)
this.dispatchPanelEvent(fnc,what);
=======
if (typeof fnc === "string" && window[fnc]) {
window[fnc](what);
}
>>>>>>>
if(fnc)
this.dispatchPanelEvent(fnc,what); |
<<<<<<<
consumer(
{
groupId,
partitionAssigners,
metadataMaxAge,
sessionTimeout,
heartbeatInterval,
maxBytesPerPartition,
minBytes,
maxBytes,
maxWaitTimeInMs,
retry,
allowAutoTopicCreation,
} = {}
) {
const cluster = this[PRIVATE.CREATE_CLUSTER]({
metadataMaxAge,
allowAutoTopicCreation,
})
=======
consumer({
groupId,
partitionAssigners,
metadataMaxAge,
sessionTimeout,
heartbeatInterval,
maxBytesPerPartition,
minBytes,
maxBytes,
maxWaitTimeInMs,
retry,
} = {}) {
const cluster = this[PRIVATE.CREATE_CLUSTER](metadataMaxAge)
>>>>>>>
consumer({
groupId,
partitionAssigners,
metadataMaxAge,
sessionTimeout,
heartbeatInterval,
maxBytesPerPartition,
minBytes,
maxBytes,
maxWaitTimeInMs,
retry,
allowAutoTopicCreation,
} = {}) {
const cluster = this[PRIVATE.CREATE_CLUSTER]({
metadataMaxAge,
allowAutoTopicCreation,
}) |
<<<<<<<
addPartitions,
=======
unsupportedVersionResponse,
>>>>>>>
addPartitions,
unsupportedVersionResponse, |
<<<<<<<
const util = {
select: {
compare: (lhs, cmp, rhs) => {
switch (cmp) {
case "<":
return lhs < rhs;
case ">":
return lhs > rhs;
case "<=":
return lhs <= rhs;
case ">=":
return lhs >= rhs;
case "==":
return lhs == rhs;
case "!=":
return lhs != rhs;
case "has":
return lhs.hasOwnProperty(rhs);
case "!has":
return !lhs.hasOwnProperty(rhs);
default:
throw new TypeError("Unkown comparator " + cmp);
}
},
all: (requirements) => (doc) => {
const dat = doc.data();
for (let [lhs, cmp, rhs] of requirements)
if (!util.compare(dat[lhs], cmp, rhs))
return false;
return true;
},
any: (requirements) => (doc) => {
const dat = doc.data();
for (let [lhs, cmp, rhs] of requirements)
if (util.compare(dat[lhs], cmp, rhs))
return true;
return false;
},
atLeast: (requirements, threshold) => (doc) => {
const dat = doc.data();
let counter = 0;
for (let [lhs, cmp, rhs] of requirements)
if (util.compare(dat[lhs], cmp, rhs)) {
++counter;
if (counter >= threshold)
return true;
}
return false;
},
atMost: (requirements, threshold) => (doc) => {
const dat = doc.data();
let counter = 0;
for (let [lhs, cmp, rhs] of requirements)
if (util.compare(dat[lhs], cmp, rhs)) {
++counter;
if (counter > threshold)
return false;
}
return true;
}
},
debug: {
log: (arg) => {
console.log(arg);
return arg;
},
trace: (arg) => {
console.trace(arg);
return arg;
}
}
}
=======
const util = {
dump: (arg) => { console.trace(arg); return arg; }
};
>>>>>>>
const util = {
select: {
compare: (lhs, cmp, rhs) => {
switch (cmp) {
case "<":
return lhs < rhs;
case ">":
return lhs > rhs;
case "<=":
return lhs <= rhs;
case ">=":
return lhs >= rhs;
case "==":
return lhs == rhs;
case "!=":
return lhs != rhs;
case "has":
return lhs.hasOwnProperty(rhs);
case "!has":
return !lhs.hasOwnProperty(rhs);
default:
throw new TypeError("Unkown comparator " + cmp);
}
},
all: (requirements) => (doc) => {
const dat = doc.data();
for (let [lhs, cmp, rhs] of requirements)
if (!util.compare(dat[lhs], cmp, rhs))
return false;
return true;
},
any: (requirements) => (doc) => {
const dat = doc.data();
for (let [lhs, cmp, rhs] of requirements)
if (util.compare(dat[lhs], cmp, rhs))
return true;
return false;
},
atLeast: (requirements, threshold) => (doc) => {
const dat = doc.data();
let counter = 0;
for (let [lhs, cmp, rhs] of requirements)
if (util.compare(dat[lhs], cmp, rhs)) {
++counter;
if (counter >= threshold)
return true;
}
return false;
},
atMost: (requirements, threshold) => (doc) => {
const dat = doc.data();
let counter = 0;
for (let [lhs, cmp, rhs] of requirements)
if (util.compare(dat[lhs], cmp, rhs)) {
++counter;
if (counter > threshold)
return false;
}
return true;
}
},
debug: {
log: (arg) => {
console.log(arg);
return arg;
},
trace: (arg) => {
console.trace(arg);
return arg;
}
}
}
<<<<<<<
let inboxDocs = await cRef(
"users", userID,
"tasks",
['project', '==', ''],
['isComplete', "==", false])
.get()
.then(snap => snap.docs)
.catch(err => {
console.error('Error getting documents', err);
});
inboxDocs.sort((a,b) => a.data().order - b.data().order); // TODO: use firebase native ordering
=======
let inboxDocs = await cRef(
"users", userID,
"tasks")
//['project', '==', ''],
//['isComplete', "==", false])
.get()
.then(snap => snap.docs
.filter(doc => (doc.data().project === '') && (doc.data().isComplete === false))
.sort((a,b) => a.data().order - b.data().order)
).catch(err => {
console.error('Error getting documents', err);
});
>>>>>>>
let inboxDocs = await cRef(
"users", userID,
"tasks")
//['project', '==', ''],
//['isComplete', "==", false])
.get()
.then(snap => snap.docs
.filter(doc => (doc.data().project === '') && (doc.data().isComplete === false))
.sort((a,b) => a.data().order - b.data().order)
).catch(err => {
console.error('Error getting documents', err);
});
<<<<<<<
return cRef("users", userID,
"tasks",
['due', '<=', dsTime],
['isComplete', "==", false])
.get()
.then(snap => snap.docs
.map(doc => doc.id)
=======
let dsDocs = await cRef("users", userID,
"tasks")
//['due', '<=', dsTime],
//['isComplete', "==", false])
.get()
.then(snap => snap.docs
.filter(doc => (doc.data().due ? (doc.data().due.seconds <= (dsTime.getTime()/1000)) : false) && (doc.data().isComplete === false))
.sort((a,b) => a.data().due.seconds - b.data().due.seconds)
>>>>>>>
let dsDocs = await cRef("users", userID,
"tasks")
//['due', '<=', dsTime],
//['isComplete', "==", false])
.get()
.then(snap => snap.docs
.filter(doc => (doc.data().due ? (doc.data().due.seconds <= (dsTime.getTime()/1000)) : false) && (doc.data().isComplete === false))
.sort((a,b) => a.data().due.seconds - b.data().due.seconds)
<<<<<<<
return (await cRef("users", userID, "tasks", taskID).get()).data();
}
async function getTopLevelProjects(userID) {
let projectIdByName = {};
let projectNameById = {};
let snap = (await cRef('users', userID, "projects",
["top_level", "==", true])
.get())
snap.docs.forEach(proj => {
if (proj.exists) {
projectNameById[proj.id] = proj.data().name;
projectIdByName[proj.data().name] = proj.id;
}
});
return [projectNameById, projectIdByName];
=======
return (await cRef("users", userID, "tasks").get()
.then(snap => snap.docs
.filter(doc => doc.id === taskID))
)[0].data();
}
async function getTopLevelProjects(userID) {
let projectIdByName = {};
let projectNameById = {};
let snap = (await cRef('users', userID, "projects")
.get())
snap.docs.forEach(proj => {
if (proj.exists && proj.data().top_level === true) {
projectNameById[proj.id] = proj.data().name;
projectIdByName[proj.data().name] = proj.id;
}
});
return [projectNameById, projectIdByName];
>>>>>>>
return (await cRef("users", userID, "tasks").get()
.then(snap => snap.docs
.filter(doc => doc.id === taskID))
)[0].data();
}
async function getTopLevelProjects(userID) {
let projectIdByName = {};
let projectNameById = {};
let snap = (await cRef('users', userID, "projects")
.get())
snap.docs.forEach(proj => {
if (proj.exists && proj.data().top_level === true) {
projectNameById[proj.id] = proj.data().name;
projectIdByName[proj.data().name] = proj.id;
}
});
return [projectNameById, projectIdByName];
<<<<<<<
cRef("users", userID, "tasks", taskID).get()
.then((doc) => { // TODO: create a doc exists? wrapper
if (doc.exists !== true)
throw "excuse me wth, why are you getting me to modify something that does not exist???? *hacker noises*";
});
//console.log(taskID, updateQuery);
await cRef("users", userID, "tasks", taskID)
=======
//console.log(taskID, updateQuery);
await cRef("users", userID, "tasks", taskID)
>>>>>>>
//console.log(taskID, updateQuery);
await cRef("users", userID, "tasks", taskID)
<<<<<<<
async function newTask(userID, taskObj) {
=======
async function newTask(userID, taskObj) {
>>>>>>>
async function newTask(userID, taskObj) {
<<<<<<<
await cRef("users", userID, "projects", projectID, "children").get()
.then(snapshot => {snapshot.docs
.forEach(async doc => { // for each child
if (doc.data().type === "task") { // TODO combine these if statements
let order = (await cRef("users", userID, "tasks", doc.data().childrenID).get()).data().order;//.collection("users").doc(userID).collection("tasks").doc(doc.data().childrenID).get()).data().order; // get the order of the task // TODO: replace with cRef.get()
children.push({type: "task", content: doc.data().childrenID, sortOrder: order}); // push its ID to the array
} else if (doc.data().type === "project") { // if the child is a project
// push the children of this project---same structure as the return obj of this func
let order = (await cRef("users", userID, "projects", (doc.data().childrenID)).get()).data().order;//.collection("users").doc(userID).collection("projects").doc(doc.data().childrenID).get()).data().order; // get the order of theproject // TODO: replace with cRef.get()
children.push({type: "project", content: (await getProjectStructure(userID, doc.data().childrenID)), sortOrder: order});
=======
// absurdly hitting the cache with a very broad query so that the
// cache will catch all projects and only hit the db once
let project = (await cRef("users", userID, "projects").get().then(snap => snap.docs)).filter(doc=>doc.id === projectID)[0];
for (let [itemID, type] of Object.entries(project.data().children)) {
if (type === "task") {
let task = await getTaskInformation(userID, itemID);
if (!task.isComplete) {
children.push({type: "task", content: itemID, sortOrder: task.order});
>>>>>>>
// absurdly hitting the cache with a very broad query so that the
// cache will catch all projects and only hit the db once
let project = (await cRef("users", userID, "projects").get().then(snap => snap.docs)).filter(doc=>doc.id === projectID)[0];
for (let [itemID, type] of Object.entries(project.data().children)) {
if (type === "task") { // TODO: combine if statements
let task = await getTaskInformation(userID, itemID);
if (!task.isComplete) {
children.push({type: "task", content: itemID, sortOrder: task.order}); |
<<<<<<<
/**
* @param {string} groupId
* @param {string} topic
* @return {Promise}
*/
const fetchOffsets = async ({ groupId, topic }) => {
if (!groupId) {
throw new KafkaJSNonRetriableError(`Invalid groupId ${groupId}`)
}
if (!topic) {
throw new KafkaJSNonRetriableError(`Invalid topic ${topic}`)
}
const partitions = await findTopicPartitions(cluster, topic)
const coordinator = await cluster.findGroupCoordinator({ groupId })
const partitionsToFetch = partitions.map(partition => ({ partition }))
const { responses } = await coordinator.offsetFetch({
groupId,
topics: [{ topic, partitions: partitionsToFetch }],
})
return responses
.filter(response => response.topic === topic)
.map(({ partitions }) => partitions.map(({ partition, offset }) => ({ partition, offset })))
.pop()
}
/**
* @param {string} groupId
* @param {string} topic
* @param {boolean} [earliest=false]
* @return {Promise}
*/
const resetOffsets = async ({ groupId, topic, earliest = false }) => {
if (!groupId) {
throw new KafkaJSNonRetriableError(`Invalid groupId ${groupId}`)
}
if (!topic) {
throw new KafkaJSNonRetriableError(`Invalid topic ${topic}`)
}
const partitions = await findTopicPartitions(cluster, topic)
const partitionsToSeek = partitions.map(partition => ({
partition,
offset: cluster.defaultOffset({ fromBeginning: earliest }),
}))
return setOffsets({ groupId, topic, partitions: partitionsToSeek })
}
/**
* @param {string} groupId
* @param {string} topic
* @param {Array<SeekEntry>} partitions
* @return {Promise}
*
* @typedef {Object} SeekEntry
* @property {number} partition
* @property {string} offset
*/
const setOffsets = async ({ groupId, topic, partitions }) => {
if (!groupId) {
throw new KafkaJSNonRetriableError(`Invalid groupId ${groupId}`)
}
if (!topic) {
throw new KafkaJSNonRetriableError(`Invalid topic ${topic}`)
}
if (!partitions || partitions.length === 0) {
throw new KafkaJSNonRetriableError(`Invalid partitions`)
}
const consumer = createConsumer({ logger: rootLogger, cluster, groupId })
await consumer.subscribe({ topic, fromBeginning: true })
const description = await consumer.describeGroup()
if (!isConsumerGroupRunning(description)) {
throw new KafkaJSNonRetriableError(
`The consumer group must have no running instances, current state: ${description.state}`
)
}
return new Promise((resolve, reject) => {
consumer.on(consumer.events.FETCH, async () =>
consumer
.stop()
.then(resolve)
.catch(reject)
)
consumer
.run({
eachBatchAutoResolve: false,
eachBatch: async () => true,
})
.catch(reject)
// This consumer doesn't need to consume any data
consumer.pause([{ topic }])
for (let seekData of partitions) {
consumer.seek({ topic, ...seekData })
}
})
}
=======
/**
* @return {Object} logger
*/
const getLogger = () => logger
>>>>>>>
/**
* @param {string} groupId
* @param {string} topic
* @return {Promise}
*/
const fetchOffsets = async ({ groupId, topic }) => {
if (!groupId) {
throw new KafkaJSNonRetriableError(`Invalid groupId ${groupId}`)
}
if (!topic) {
throw new KafkaJSNonRetriableError(`Invalid topic ${topic}`)
}
const partitions = await findTopicPartitions(cluster, topic)
const coordinator = await cluster.findGroupCoordinator({ groupId })
const partitionsToFetch = partitions.map(partition => ({ partition }))
const { responses } = await coordinator.offsetFetch({
groupId,
topics: [{ topic, partitions: partitionsToFetch }],
})
return responses
.filter(response => response.topic === topic)
.map(({ partitions }) => partitions.map(({ partition, offset }) => ({ partition, offset })))
.pop()
}
/**
* @param {string} groupId
* @param {string} topic
* @param {boolean} [earliest=false]
* @return {Promise}
*/
const resetOffsets = async ({ groupId, topic, earliest = false }) => {
if (!groupId) {
throw new KafkaJSNonRetriableError(`Invalid groupId ${groupId}`)
}
if (!topic) {
throw new KafkaJSNonRetriableError(`Invalid topic ${topic}`)
}
const partitions = await findTopicPartitions(cluster, topic)
const partitionsToSeek = partitions.map(partition => ({
partition,
offset: cluster.defaultOffset({ fromBeginning: earliest }),
}))
return setOffsets({ groupId, topic, partitions: partitionsToSeek })
}
/**
* @param {string} groupId
* @param {string} topic
* @param {Array<SeekEntry>} partitions
* @return {Promise}
*
* @typedef {Object} SeekEntry
* @property {number} partition
* @property {string} offset
*/
const setOffsets = async ({ groupId, topic, partitions }) => {
if (!groupId) {
throw new KafkaJSNonRetriableError(`Invalid groupId ${groupId}`)
}
if (!topic) {
throw new KafkaJSNonRetriableError(`Invalid topic ${topic}`)
}
if (!partitions || partitions.length === 0) {
throw new KafkaJSNonRetriableError(`Invalid partitions`)
}
const consumer = createConsumer({ logger: rootLogger, cluster, groupId })
await consumer.subscribe({ topic, fromBeginning: true })
const description = await consumer.describeGroup()
if (!isConsumerGroupRunning(description)) {
throw new KafkaJSNonRetriableError(
`The consumer group must have no running instances, current state: ${description.state}`
)
}
return new Promise((resolve, reject) => {
consumer.on(consumer.events.FETCH, async () =>
consumer
.stop()
.then(resolve)
.catch(reject)
)
consumer
.run({
eachBatchAutoResolve: false,
eachBatch: async () => true,
})
.catch(reject)
// This consumer doesn't need to consume any data
consumer.pause([{ topic }])
for (let seekData of partitions) {
consumer.seek({ topic, ...seekData })
}
})
}
/**
* @return {Object} logger
*/
const getLogger = () => logger
<<<<<<<
fetchOffsets,
setOffsets,
resetOffsets,
=======
logger: getLogger,
>>>>>>>
fetchOffsets,
setOffsets,
resetOffsets,
logger: getLogger, |
<<<<<<<
if (spec.primaryKey && (!options || options.emitPrimaryKey)) {
constraint.push('PRIMARY KEY');
=======
if (spec.primaryKey) {
if (options.emitPrimaryKey) {
constraint.push('PRIMARY KEY');
}
>>>>>>>
if (spec.primaryKey) {
if (!options || options.emitPrimaryKey) {
constraint.push('PRIMARY KEY');
} |
<<<<<<<
const OPERATION_TYPES = require('../protocol/operationsTypes')
const PERMISSION_TYPES = require('../protocol/permissionTypes')
const RESOURCE_PATTERN_TYPES = require('../protocol/resourcePatternTypes')
=======
const CONFIG_RESOURCE_TYPES = require('../protocol/configResourceTypes')
const { EARLIEST_OFFSET, LATEST_OFFSET } = require('../constants')
>>>>>>>
const CONFIG_RESOURCE_TYPES = require('../protocol/configResourceTypes')
const OPERATION_TYPES = require('../protocol/operationsTypes')
const PERMISSION_TYPES = require('../protocol/permissionTypes')
const RESOURCE_PATTERN_TYPES = require('../protocol/resourcePatternTypes')
const { EARLIEST_OFFSET, LATEST_OFFSET } = require('../constants') |
<<<<<<<
/**
* @typedef {number} ACLResourceTypes
*
* Enum for ACL Resource Types
* @readonly
* @enum {ACLResourceTypes}
*/
=======
/**
* @deprecated
* @see https://github.com/tulios/kafkajs/issues/649
*
* Use ConfigResourceTypes instead
*/
>>>>>>>
/**
* @typedef {number} ACLResourceTypes
*
* Enum for ACL Resource Types
* @readonly
* @enum {ACLResourceTypes}
*
* @deprecated
* @see https://github.com/tulios/kafkajs/issues/649
*
* Use ConfigResourceTypes instead
*/ |
<<<<<<<
=======
const cardSizes = [300, 400, 450, 630]
const code = JSON.stringify(data, null, 2)
>>>>>>>
const code = JSON.stringify(data, null, 2)
<<<<<<<
<Provider mountStylesheet={false} code={JSON.stringify(data, null, 2)}>
<Row
justify='space-around'
direction={[ 'column-reverse', '', 'row' ]}
align='center'
wrap
>
=======
<Provider
code={code}
noInline
mountStylesheet={false}>
<Row justify='space-around' direction={['column-reverse', 'row']} align='center' wrap>
>>>>>>>
<Provider
code={code}
noInline
mountStylesheet={false}>
<Row justify='space-around' direction={[ 'column-reverse', '', 'row' ]} align='center' wrap> |
<<<<<<<
const Long = require('../../utils/long')
const isNumber = number => /^-?\d+$/.test(number)
=======
const Long = require('long')
>>>>>>>
const Long = require('../../utils/long') |
<<<<<<<
renderFilterComponent = (columnDef) => (
React.createElement(columnDef.filterComponent, { columnDef: columnDef, onFilterChanged: this.props.onFilterChanged })
)
=======
getLocalizationData = () => ({ ...MTableFilterRow.defaultProps.localization, ...this.props.localization });
getLocalizedFilterPlaceHolder = columnDef => columnDef.filterPlaceholder || this.getLocalizationData().filterPlaceHolder || "";
>>>>>>>
getLocalizationData = () => ({ ...MTableFilterRow.defaultProps.localization, ...this.props.localization });
getLocalizedFilterPlaceHolder = columnDef => columnDef.filterPlaceholder || this.getLocalizationData().filterPlaceHolder || "";
<<<<<<<
=======
const pickerProps = {
value: columnDef.tableData.filterValue || null,
onChange: onDateInputChange,
placeholder: this.getLocalizedFilterPlaceHolder(columnDef),
clearable: true
};
let dateInputElement = null;
>>>>>>>
const pickerProps = {
value: columnDef.tableData.filterValue || null,
onChange: onDateInputChange,
placeholder: this.getLocalizedFilterPlaceHolder(columnDef),
clearable: true
};
let dateInputElement = null;
<<<<<<<
if (this.props.hasActions) {
=======
if (this.props.emptyCell && this.props.hasActions) {
>>>>>>>
if (this.props.hasActions) { |
<<<<<<<
const proposalDeposit = await moloch.proposalDeposit()
await tokenAlpha.transfer(deploymentConfig.SUMMONER, proposalDeposit, { from: creator })
await tokenAlpha.approve(moloch.address, proposalDeposit, { from: deploymentConfig.SUMMONER })
=======
>>>>>>>
const proposalDeposit = await moloch.proposalDeposit()
await tokenAlpha.transfer(deploymentConfig.SUMMONER, proposalDeposit, { from: creator })
await tokenAlpha.approve(moloch.address, proposalDeposit, { from: deploymentConfig.SUMMONER })
<<<<<<<
assert.equal(
+proposerBalance,
initialProposerBalance
)
=======
const expectedProposerBalance = initialProposerBalance + deploymentConfig.PROPOSAL_DEPOSIT - deploymentConfig.PROCESSING_REWARD
assert.equal(+proposerBalance, +expectedProposerBalance, 'proposer balance incorrect')
>>>>>>>
const expectedProposerBalance = initialProposerBalance
assert.equal(+proposerBalance, +expectedProposerBalance, 'proposer balance incorrect') |
<<<<<<<
return columns.map(col => {
const colClone = { ...col };
=======
return columns.map((col) => {
const colClone = { ...col };
>>>>>>>
return columns.map((col) => {
const colClone = { ...col };
<<<<<<<
propsChanged = propsChanged || !equal(prevProps.options, this.props.options);
if (!this.isRemoteData()) {
=======
propsChanged =
propsChanged || !equal(prevProps.options, this.props.options);
if (!this.isRemoteData()) {
>>>>>>>
propsChanged =
propsChanged || !equal(prevProps.options, this.props.options);
if (!this.isRemoteData()) {
<<<<<<<
.catch(reason => {
const errorState = {
message: reason,
errorCause: "add"
};
this.setState({ isLoading: false, errorState });
=======
.catch((reason) => {
this.setState({ isLoading: false });
>>>>>>>
.catch((reason) => {
const errorState = {
message: reason,
errorCause: "add"
};
this.setState({ isLoading: false, errorState });
<<<<<<<
.catch(reason => {
const errorState = {
message: reason,
errorCause: "update"
};
this.setState({ isLoading: false, errorState });
=======
.catch((reason) => {
this.setState({ isLoading: false });
>>>>>>>
.catch((reason) => {
const errorState = {
message: reason,
errorCause: "update"
};
this.setState({ isLoading: false, errorState });
<<<<<<<
.catch(reason => {
const errorState = {
message: reason,
errorCause: "delete"
};
this.setState({ isLoading: false, errorState });
=======
.catch((reason) => {
this.setState({ isLoading: false });
>>>>>>>
.catch((reason) => {
const errorState = {
message: reason,
errorCause: "delete"
};
this.setState({ isLoading: false, errorState });
<<<<<<<
}
retry = () => {
this.onQueryChange(this.state.query);
}
=======
};
>>>>>>>
}
retry = () => {
this.onQueryChange(this.state.query);
}
<<<<<<<
this.setState({
isLoading: false,
errorState: false,
...this.dataManager.getRenderState(),
query
}, () => {
callback && callback();
});
}).catch((error) => {
const localization = { ...MaterialTable.defaultProps.localization, ...this.props.localization };
const errorState = {
message: typeof error === 'object' ? error.message : error !== undefined ? error : localization.error,
errorCause: 'query'
};
this.setState({
isLoading: false,
errorState,
...this.dataManager.getRenderState(),
});
=======
this.setState(
{
isLoading: false,
...this.dataManager.getRenderState(),
query,
},
() => {
callback && callback();
}
);
>>>>>>>
this.setState(
{
isLoading: false,
errorState: false,
...this.dataManager.getRenderState(),
query
},
() => {
callback && callback();
});
}).catch((error) => {
const localization = { ...MaterialTable.defaultProps.localization, ...this.props.localization };
const errorState = {
message: typeof error === 'object' ? error.message : error !== undefined ? error : localization.error,
errorCause: 'query'
};
this.setState({
isLoading: false,
errorState,
...this.dataManager.getRenderState(),
});
<<<<<<<
{(this.state.isLoading || props.isLoading) && props.options.loadingType === 'overlay' &&
<div style={{ position: 'absolute', top: 0, left: 0, height: '100%', width: '100%', zIndex: 11 }}>
<props.components.OverlayLoading theme={props.theme} />
</div>
}
{this.state.errorState && this.state.errorCause === 'query' &&
<div style={{ position: 'absolute', top: 0, left: 0, height: '100%', width: '100%', zIndex: 11 }}>
<props.components.OverlayError error={this.state.errorState} retry={this.retry} theme={props.theme} icon={props.icons.Retry} />
</div>
}
=======
{(this.state.isLoading || props.isLoading) &&
props.options.loadingType === "overlay" && (
<div
style={{
position: "absolute",
top: 0,
left: 0,
height: "100%",
width: "100%",
zIndex: 11,
}}
>
<props.components.OverlayLoading theme={props.theme} />
</div>
)}
>>>>>>>
{(this.state.isLoading || props.isLoading) &&
props.options.loadingType === "overlay" && (
<div
style={{
position: "absolute",
top: 0,
left: 0,
height: "100%",
width: "100%",
zIndex: 11,
}}
>
<props.components.OverlayLoading theme={props.theme} />
</div>
)}
{this.state.errorState && this.state.errorCause === 'query' &&
<div
style={{ position: 'absolute', top: 0, left: 0, height: '100%', width: '100%', zIndex: 11 }}>
<props.components.OverlayError
error={this.state.errorState}
retry={this.retry}
theme={props.theme}
icon={props.icons.Retry} />
</div>
} |
<<<<<<<
code={code}
=======
shortUrl={`/s/${code}`}
owner={owner}
repo={repo}
>>>>>>>
code={code}
owner={owner}
repo={repo}
<<<<<<<
tags: PropTypes.object.isRequired,
code: PropTypes.string.isRequired
=======
tags: PropTypes.object.isRequired,
owner: PropTypes.string.isRequired,
repo: PropTypes.string.isRequired
>>>>>>>
tags: PropTypes.object.isRequired,
code: PropTypes.string.isRequired,
owner: PropTypes.string.isRequired,
repo: PropTypes.string.isRequired
<<<<<<<
const { deployInfo, commits, tags, code } = this.props;
const shortUrl = `/s/${code}`;
=======
const { deployInfo, commits, tags, owner, repo, shortUrl } = this.props;
>>>>>>>
const { deployInfo, commits, tags, owner, repo, code } = this.props;
const shortUrl = `/s/${code}`; |
<<<<<<<
searchAutoFocus: PropTypes.bool,
=======
searchFieldVariant: PropTypes.oneOf( ['standard', 'filled', 'outlined']),
>>>>>>>
searchAutoFocus: PropTypes.bool,
searchFieldVariant: PropTypes.oneOf( ['standard', 'filled', 'outlined']), |
<<<<<<<
local.isXml = function(element){
var ownerDocument = element.ownerDocument || element;
return (!!ownerDocument.xmlVersion)
|| (!!ownerDocument.xml)
|| (ownerDocument.toString && ownerDocument.toString() == '[object XMLDocument]')
|| (ownerDocument.nodeType == 9 && ownerDocument.documentElement.nodeName != 'HTML');
};
=======
local.getByTagName = (local.starSelectsComments || local.starSelectsClosed) ? function(context, tag){
var found = context.getElementsByTagName(tag);
if(tag != '*') return found;
var nodes = [];
for (var i = 0, node; (node = found[i]); i++) {
if (node.nodeType == 1 && node.nodeName.substring(0,1) != '/'){
nodes.push(node);
}
}
return nodes;
} : function(context, tag){
return context.getElementsByTagName(tag);
};
>>>>>>>
local.isXml = function(element){
var ownerDocument = element.ownerDocument || element;
return (!!ownerDocument.xmlVersion)
|| (!!ownerDocument.xml)
|| (ownerDocument.toString && ownerDocument.toString() == '[object XMLDocument]')
|| (ownerDocument.nodeType == 9 && ownerDocument.documentElement.nodeName != 'HTML');
};
local.getByTagName = (local.starSelectsComments || local.starSelectsClosed) ? function(context, tag){
var found = context.getElementsByTagName(tag);
if(tag != '*') return found;
var nodes = [];
for (var i = 0, node; (node = found[i]); i++) {
if (node.nodeType == 1 && node.nodeName.substring(0,1) != '/'){
nodes.push(node);
}
}
return nodes;
} : function(context, tag){
return context.getElementsByTagName(tag);
}; |
<<<<<<<
if (tag && tag === '*' && (node.nodeType !== 1 || node.nodeName.charAt(0) === '/')) return false; // Fix for comment nodes and closed nodes
if (tag && tag !== '*' && (!node.nodeName || node.nodeName != tag)) return false;
if (id && node.getAttribute('id') != id) return false;
for (var i = 0, l = parts.length, part; i < l; i++){
=======
if (parts) for (var i = 0, l = parts.length, part, cls; i < l; i++){
>>>>>>>
if(parts) for (var i = 0, l = parts.length, part, cls; i < l; i++){
<<<<<<<
=======
Slick.defineEngine = function(name, fn, shouldDefine){
if (shouldDefine == null) shouldDefine = true;
if (typeof shouldDefine == 'function') shouldDefine = shouldDefine.call(local);
if (shouldDefine) local['customEngine:' + name] = local['customEngine:' + fn] || fn;
return this;
};
// Slick.lookupEngine = function(name){
// var engine = local['customEngine:' + name];
// if (engine) return function(context, parsed){
// return engine.call(this, context, parsed);
// };
// };
Slick.defineEngine('className', function(context, parts){
var results = context.getElementsByTagName(parts.expressions[0][0].tag);
parts = parts.expressions[0][0].parts;
N: for (var i = 0, p, node, className; node = results[i++];) {
if (!(className = node.className)) continue N;
for (p = 0; p < parts.length; p++)
if (!parts[p].regexp.test(className)) continue N;
this.found.push(node);
}
},function(){
return !this.root.querySelectorAll && !(this.root.getElementsByClassName && this.cachedGetElementsByClassName === false);
});
Slick.defineEngine('className', function(context, parsed){
this.found.push.apply(this.found, this.collectionToArray(context.getElementsByClassName(parsed.expressions[0][0].classes.join(' '))));
}, function(){
return this.root.getElementsByClassName && this.cachedGetElementsByClassName === false;
});
Slick.defineEngine('classNames', 'className');
Slick.defineEngine('tagName:className', 'className', function(){
return !(this.root.getElementsByClassName && this.cachedGetElementsByClassName === false);
});
Slick.defineEngine('tagName:classNames', 'tagName:className');
Slick.defineEngine('tagName', function(context, parsed){
this.found.push.apply(this.found, this.collectionToArray(context.getElementsByTagName(parsed.expressions[0][0].tag)));
});
Slick.defineEngine('tagName*','tagName', function(){
return !(this.starSelectsComments || this.starSelectsClosed || this.starSelectsClosedQSA);
});
Slick.defineEngine('XML:tagName','tagName');
// Slick.defineEngine('id',function(context, parsed){
// context = context.ownerDocument || context;
// var el = context.getElementById(parsed.expressions[0][0].id)
// this.found.push( );
// },function(){
// return !this.idGetsName;
// });
// add pseudos
>>>>>>> |
<<<<<<<
describe('gulp-browserify non stream error', function () {
var testFile = path.join(__dirname, './error/index.js');
it('emits error if browserify calls callback with error', function (done) {
gulp.src(testFile, { read: false })
.pipe(gulpB())
.on('error', function () { done(); })
.on('postbundle', function () { throw new Error('No error was emitted.') });
});
});
=======
describe('gulp-browserify extensions', function () {
var testFile = path.join(__dirname, './extensions/index.js');
var postData, outputFile;
beforeEach(function (done) {
gulp.src(testFile)
.pipe(gulpB({ extensions: ['.foo', '.bar'] }))
.on('postbundle', function(data) {
postdata = data;
})
.pipe(es.map(function(file){
outputFile = file;
done();
}));
});
it('should find dependencies with given extension', function () {
expect(outputFile.contents.toString()).to.contain("foo: 'Foo!'");
expect(outputFile.contents.toString()).to.contain("bar: 'Bar!'");
});
});
>>>>>>>
describe('gulp-browserify non stream error', function () {
var testFile = path.join(__dirname, './error/index.js');
it('emits error if browserify calls callback with error', function (done) {
gulp.src(testFile, { read: false })
.pipe(gulpB())
.on('error', function () { done(); })
.on('postbundle', function () { throw new Error('No error was emitted.') });
describe('gulp-browserify extensions', function () {
var testFile = path.join(__dirname, './extensions/index.js');
var postData, outputFile;
beforeEach(function (done) {
gulp.src(testFile)
.pipe(gulpB({ extensions: ['.foo', '.bar'] }))
.on('postbundle', function(data) {
postdata = data;
})
.pipe(es.map(function(file){
outputFile = file;
done();
}));
});
it('should find dependencies with given extension', function () {
expect(outputFile.contents.toString()).to.contain("foo: 'Foo!'");
expect(outputFile.contents.toString()).to.contain("bar: 'Bar!'");
});
}); |
<<<<<<<
angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'images', 'image', 'startContainer', 'sidebar', 'info', 'builder', 'containerLogs', 'containerTop', 'events'])
=======
angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'containersNetwork', 'images', 'image', 'startContainer', 'sidebar', 'info', 'builder', 'containerLogs', 'containerTop'])
>>>>>>>
angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'containersNetwork', 'images', 'image', 'startContainer', 'sidebar', 'info', 'builder', 'containerLogs', 'containerTop', 'events']) |
<<<<<<<
$routeProvider.when('/images/:id*/', {templateUrl: 'app/components/image/image.html', controller: 'ImageController'});
$routeProvider.when('/settings', {templateUrl: 'app/components/settings/settings.html', controller: 'SettingsController'});
=======
$routeProvider.when('/images/:id/', {templateUrl: 'app/components/image/image.html', controller: 'ImageController'});
$routeProvider.when('/info', {templateUrl: 'app/components/info/info.html', controller: 'InfoController'});
>>>>>>>
$routeProvider.when('/images/:id*/', {templateUrl: 'app/components/image/image.html', controller: 'ImageController'});
$routeProvider.when('/info', {templateUrl: 'app/components/info/info.html', controller: 'InfoController'}); |
<<<<<<<
import RadioTest from './radio';
=======
import RangepickerTest from './rangepicker';
import Datepicker from './datepicker/app.js'
console.log('eeeee', Datepicker);
>>>>>>>
import RadioTest from './radio';
import RangepickerTest from './rangepicker';
import Datepicker from './datepicker/app.js'
<<<<<<<
ButtonTest.name,
CheckboxTest.name,
RadioTest.name
=======
ButtonTest.name,
CheckboxTest.name,
Datepicker.name,
RangepickerTest.name
>>>>>>>
ButtonTest.name,
CheckboxTest.name,
RadioTest.name,
Datepicker.name,
RangepickerTest.name |
<<<<<<<
import Transfer from './transfer';
=======
>>>>>>>
import Transfer from './transfer'; |
<<<<<<<
], function (App, Marionette, Backgrid, ToggleCell, EpisodeTitleCell, RelativeDateCell, EpisodeStatusCell, CommandController, Actioneer) {
=======
], function ( Marionette, Backgrid, ToggleCell, EpisodeTitleCell, RelativeDateCell, EpisodeStatusCell, Actioneer) {
>>>>>>>
], function (App, Marionette, Backgrid, ToggleCell, EpisodeTitleCell, RelativeDateCell, EpisodeStatusCell, Actioneer) {
<<<<<<<
element : this.ui.seasonRename,
failMessage: 'Season rename failed',
context : this,
onSuccess : this._afterRename
=======
element : this.ui.seasonRename,
errorMessage: 'Season rename failed'
>>>>>>>
element : this.ui.seasonRename,
errorMessage: 'Season rename failed',
context : this,
onSuccess : this._afterRename |
<<<<<<<
import React from "react";
import logo from "./assets/images/logo.png";
import "./App.css";
import TestReduxSaga from "./pages/TestReduxSaga";
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
<div>
<label>Testing Redux store</label>
<TestReduxSaga />
</div>
</header>
</div>
);
}
export default App;
=======
import React from "react";
import TestReducer from "./pages/TestReducer";
import { useTranslation } from "react-i18next";
import logo from "~/assets/images/logo.png";
function App() {
const [t, i18n] = useTranslation();
function handleChangeLang(lang) {
i18n.changeLanguage(lang);
}
return (
<div>
<img src={logo} alt="CovidZero" width={200} height={200} />
<label>{t("title")}</label>
<div>
<button type="button" onClick={() => handleChangeLang("pt")}>
PT-BR
</button>
<button type="button" onClick={() => handleChangeLang("en")}>
EN
</button>
</div>
<TestReducer />
</div>
);
}
export default App;
>>>>>>>
import React from "react";
import TestReduxSaga from "./pages/TestReduxSaga";
import { useTranslation } from "react-i18next";
import logo from "~/assets/images/logo.png";
function App() {
const [t, i18n] = useTranslation();
function handleChangeLang(lang) {
i18n.changeLanguage(lang);
}
return (
<div>
<img src={logo} alt="CovidZero" width={200} height={200} />
<label>{t("title")}</label>
<div>
<button type="button" onClick={() => handleChangeLang("pt")}>
PT-BR
</button>
<button type="button" onClick={() => handleChangeLang("en")}>
EN
</button>
</div>
<TestReduxSaga />
</div>
);
}
export default App; |
<<<<<<<
allNetworksServiceName = "World Bikeshares",
allNetworksAllDataLayerId = 0,
allNetworksAllDataLayerName = "All Bikeshares",
allNetworksGoodDataLayerId = 1,
allNetworksGoodDataLayerName = "Bikeshares with Stations";
=======
allNetworksServiceName = "World Bikeshares";
var states = {
empty: "empty",
loading: "loading",
loaded: "loaded"
};
>>>>>>>
allNetworksServiceName = "World Bikeshares",
allNetworksAllDataLayerId = 0,
allNetworksAllDataLayerName = "All Bikeshares",
allNetworksGoodDataLayerId = 1,
allNetworksGoodDataLayerName = "Bikeshares with Stations";
var states = {
empty: "empty",
loading: "loading",
loaded: "loaded"
};
<<<<<<<
if (n.timezone)
{
var gmtOffset = parseInt(n.timezone.gmtOffset);
localEpochMS = localEpochMS + (gmtOffset * 1000);
gmtOffStr = this._getGMTOffsetString(n.timezone);
station["timezone"] = n.timezone.abbreviation;
station["timezoneOffset"] = parseInt(n.timezone.gmtOffset);
}
else
{
// We haven't been able to get timezone information for this
// network so we must default to everything beting UTC (akaGMT).
gmtOffStr += "+0000";
station["timezone"] = "GMT";
station["timezoneOffset"] = 0;
console.log("Uh oh - no timezone for " + n.network.name);
}
station["timezoneOffsetString"] = "GMT" + gmtOffStr;
station["localTimeString"] = new Date(localEpochMS).toUTCString() + gmtOffStr;
// Fix the lat/lng
var x = station.lng / 1000000;
var y = station.lat / 1000000;
if (x < -180 || x > 180 || y < -90 || y > 90 || x == 0 || y == 0) {
console.log("Invalid GeoLocation!! " + y + "," + x);
console.log(station);
x = n.network.lng;
y = n.network.lat;
console.log("Corrected GeoLocation!! " + y + "," + x);
}
// And build that extent so that the "Layer (Feature Service)"
// JSON can specify the extent of the layer. That way, when it's
// added to a map, it can be zoomed to easily.
if (i==0) {
minX = x;
maxX = x;
minY = y;
maxY = y;
} else {
if (x < minX) minX = x;
if (x > maxX) maxX = x;
if (y < minY) minY = y;
if (y > maxY) maxY = y;
}
=======
if (n.timezone)
{
var gmtOffset = parseInt(n.timezone.gmtOffset);
localEpochMS = localEpochMS + (gmtOffset * 1000);
gmtOffStr = this._getGMTOffsetString(n.timezone);
station["timezone"] = n.timezone.abbreviation;
station["timezoneOffset"] = parseInt(n.timezone.gmtOffset);
}
else
{
// We haven't been able to get timezone information for this
// network so we must default to everything beting UTC (akaGMT).
gmtOffStr += "+0000";
station["timezone"] = "GMT";
station["timezoneOffset"] = 0;
console.log("Uh oh - no timezone for " + n.network.name);
}
station["timezoneOffsetString"] = "GMT" + gmtOffStr;
station["localTimeString"] = new Date(localEpochMS).toUTCString() + gmtOffStr;
// Fix the lat/lng
var x = station.lng / 1000000;
var y = station.lat / 1000000;
if (x < -180 || x > 180 || y < -90 || y > 90) {
console.log("Invalid GeoLocation!! " + y + "," + x);
console.log(station);
x = n.network.lng;
y = n.network.lat;
console.log("Corrected GeoLocation!! " + y + "," + x);
}
// And build that extent so that the "Layer (Feature Service)"
// JSON can specify the extent of the layer. That way, when it's
// added to a map, it can be zoomed to easily.
if (i==0) {
minX = x;
maxX = x;
minY = y;
maxY = y;
} else {
if (x < minX) minX = x;
if (x > maxX) maxX = x;
if (y < minY) minY = y;
if (y > maxY) maxY = y;
}
>>>>>>>
if (n.timezone)
{
var gmtOffset = parseInt(n.timezone.gmtOffset);
localEpochMS = localEpochMS + (gmtOffset * 1000);
gmtOffStr = this._getGMTOffsetString(n.timezone);
station["timezone"] = n.timezone.abbreviation;
station["timezoneOffset"] = parseInt(n.timezone.gmtOffset);
}
else
{
// We haven't been able to get timezone information for this
// network so we must default to everything beting UTC (akaGMT).
gmtOffStr += "+0000";
station["timezone"] = "GMT";
station["timezoneOffset"] = 0;
console.log("Uh oh - no timezone for " + n.network.name);
}
station["timezoneOffsetString"] = "GMT" + gmtOffStr;
station["localTimeString"] = new Date(localEpochMS).toUTCString() + gmtOffStr;
// Fix the lat/lng
var x = station.lng / 1000000;
var y = station.lat / 1000000;
if (x < -180 || x > 180 || y < -90 || y > 90 || x == 0 || y == 0) {
console.log("Invalid GeoLocation!! " + y + "," + x);
console.log(station);
x = n.network.lng;
y = n.network.lat;
console.log("Corrected GeoLocation!! " + y + "," + x);
}
// And build that extent so that the "Layer (Feature Service)"
// JSON can specify the extent of the layer. That way, when it's
// added to a map, it can be zoomed to easily.
if (i==0) {
minX = x;
maxX = x;
minY = y;
maxY = y;
} else {
if (x < minX) minX = x;
if (x > maxX) maxX = x;
if (y < minY) minY = y;
if (y > maxY) maxY = y;
}
<<<<<<<
if (layerId == allNetworksGoodDataLayerId) {
// Filter out Stations == 0
results = results.filter(function (feature) {
return feature.attributes.stations > 0;
});
}
=======
>>>>>>>
if (layerId == allNetworksGoodDataLayerId) {
// Filter out Stations == 0
results = results.filter(function (feature) {
return feature.attributes.stations > 0;
});
} |
<<<<<<<
#### Version <%= conf.pkg.version %>
The entire dc.js library is scoped under the **dc** name space. It does not introduce anything else
into the global name space.
#### Function Chaining
Most dc functions are designed to allow function chaining, meaning they return the current chart
instance whenever it is appropriate. This way chart configuration can be written in the following
style:
```js
chart.width(300)
.height(300)
.filter('sunday')
```
The getter forms of functions do not participate in function chaining because they necessarily
return values that are not the chart. (Although some, such as `.svg` and `.xAxis`, return values
that are chainable d3 objects.)
**/
=======
* The entire dc.js library is scoped under the **dc** name space. It does not introduce
* anything else into the global name space.
*
* Most `dc` functions are designed to allow function chaining, meaning they return the current chart
* instance whenever it is appropriate. The getter forms of functions do not participate in function
* chaining because they necessarily return values that are not the chart. Although some,
* such as `.svg` and `.xAxis`, return values that are chainable d3 objects.
* @namespace dc
* @version <%= conf.pkg.version %>
* @example
* // Example chaining
* chart.width(300)
* .height(300)
* .filter('sunday');
*/
/*jshint -W062*/
>>>>>>>
* The entire dc.js library is scoped under the **dc** name space. It does not introduce
* anything else into the global name space.
*
* Most `dc` functions are designed to allow function chaining, meaning they return the current chart
* instance whenever it is appropriate. The getter forms of functions do not participate in function
* chaining because they necessarily return values that are not the chart. Although some,
* such as `.svg` and `.xAxis`, return values that are chainable d3 objects.
* @namespace dc
* @version <%= conf.pkg.version %>
* @example
* // Example chaining
* chart.width(300)
* .height(300)
* .filter('sunday');
*/ |
<<<<<<<
_resizing = false;
=======
_chart.fadeDeselectedArea();
>>>>>>>
_chart.fadeDeselectedArea();
_resizing = false; |
<<<<<<<
return _chart.anchorName() + '-clip';
=======
return _chart.anchorName().replace(/[ .#]/g, '-') + "-clip";
>>>>>>>
return _chart.anchorName().replace(/[ .#]/g, '-') + '-clip'; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.