conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
require("./attrs");
require("./adler32");
=======
require("./attrs");
require("./render-error");
>>>>>>>
require("./attrs");
require("./adler32");
require("./render-error"); |
<<<<<<<
return response.data
=======
const result = _endpoint.propertyName ? getProp(response.data, _endpoint.propertyName) : response.data
if (withResponse) {
return {
response,
result
}
} else {
return result
}
>>>>>>>
const result = response.data
if (withResponse) {
return {
response,
result
}
} else {
return result
} |
<<<<<<<
// Ditch any leftover local tokens before attempting to log in
await this._logoutLocally()
if (this.options.tokenRequired) {
const token = this.$auth.addTokenPrefix(tokenValue)
this.$auth.setToken(this.name, token)
this._setToken(token)
}
=======
const token = this.options.tokenType
? this.options.tokenType + ' ' + tokenValue
: tokenValue
this.$auth.setToken(this.name, token)
this._setToken(token)
>>>>>>>
const token = this.$auth.addTokenPrefix(tokenValue)
this.$auth.setToken(this.name, token)
this._setToken(token) |
<<<<<<<
import defu from 'defu'
import { getProp, addTokenPrefix } from '../utilities'
=======
import defu from 'defu'
import { getProp } from '../utilities'
>>>>>>>
import defu from 'defu'
import { getProp } from '../utilities'
<<<<<<<
this.options = defu(options, DEFAULTS)
}
_setToken (token) {
if (this.options.globalToken) {
// Set Authorization token for all axios requests
this.$auth.ctx.app.$axios.setHeader(this.options.tokenName, token)
}
}
_clearToken () {
if (this.options.globalToken) {
// Clear Authorization token for all axios requests
this.$auth.ctx.app.$axios.setHeader(this.options.tokenName, false)
}
=======
this.options = defu(options, DEFAULTS)
>>>>>>>
this.options = defu(options, DEFAULTS)
<<<<<<<
// Make login request
const { response, result } = await this.$auth.request(
=======
const { response, data } = await this.$auth.request(
>>>>>>>
// Make login request
const { response, data } = await this.$auth.request(
<<<<<<<
let user = await this.$auth.requestWith(
=======
const { data } = await this.$auth.requestWith(
>>>>>>>
const { data } = await this.$auth.requestWith(
<<<<<<<
user = getProp(user, this.options.user)
this.$auth.setUser(user)
=======
this.$auth.setUser(getProp(data, this.options.user.property))
>>>>>>>
this.$auth.setUser(getProp(data, this.options.user.property))
<<<<<<<
if (this.options.tokenRequired) {
this._clearToken()
}
this._setClientId(false)
=======
>>>>>>>
this._setClientId(false)
<<<<<<<
this.$auth.setToken(this.name, false)
=======
this.$auth.token.reset()
this.$auth.refreshToken.reset()
>>>>>>>
this.$auth.token.reset()
<<<<<<<
tokenRequired: true,
tokenType: 'Bearer',
globalToken: true,
tokenName: 'Authorization',
token: {
property: 'token',
maxAge: 1800
},
user: 'user',
clientId: 'client_id',
dataClientId: false,
clientIdPrefix: '_client_id.',
endpoints: {
login: {
url: '/api/auth/login',
method: 'post'
},
logout: {
url: '/api/auth/logout',
method: 'post'
},
user: {
url: '/api/auth/user',
method: 'get'
}
},
autoFetchUser: true
=======
token: {
property: 'token',
type: 'Bearer',
name: 'Authorization',
maxAge: 1800,
global: true,
required: true
},
user: {
property: 'user',
autoFetch: true
}
>>>>>>>
token: {
property: 'token',
type: 'Bearer',
name: 'Authorization',
maxAge: 1800,
global: true,
required: true
},
user: {
property: 'user',
autoFetch: true
},
clientId: 'client_id',
dataClientId: false,
clientIdPrefix: '_client_id.',
endpoints: {
login: {
url: '/api/auth/login',
method: 'post'
},
logout: {
url: '/api/auth/logout',
method: 'post'
},
user: {
url: '/api/auth/user',
method: 'get'
}
} |
<<<<<<<
=======
// __MAGIC IMPORTS__
let contextFactory
let contextProviders
try {
contextFactory = require('contextFactory').default
} catch (e) {
contextFactory = async () => ({})
}
try {
contextProviders = require('contextProviders').default
} catch (e) {
contextProviders = []
}
// END __MAGIC IMPORTS__
>>>>>>>
// __MAGIC IMPORTS__
let contextProviders
try {
contextProviders = require('contextProviders').default
} catch (e) {
contextProviders = []
}
// END __MAGIC IMPORTS__ |
<<<<<<<
import React, {useState} from 'react'
=======
/* global __EXPERIMENTAL_TEST__ */
import React from 'react'
>>>>>>>
import React, {useState} from 'react'
<<<<<<<
const getFromStorage = (key, defaultValue) =>
window.sessionStorage[key] || defaultValue
=======
const importComponent = () => import('component/index.js')
const importTest = () => import('test/index.js')
class Root extends React.PureComponent {
static propTypes = {
componentID: PropTypes.string,
contexts: PropTypes.object,
demo: PropTypes.node,
demoStyles: PropTypes.string,
themes: PropTypes.object
}
>>>>>>>
const importComponent = () => import('component/index.js')
const importTest = () => import('test/index.js')
const getFromStorage = (key, defaultValue) =>
window.sessionStorage[key] || defaultValue
<<<<<<<
return (
<div className="Root">
<div className="Root-top">
<Header componentID={componentID} iframeSrc={iframeSrc}>
<Select
label="Contexts"
options={contexts}
initValue={actualContext}
onChange={updateOnChange(setActualContext, 'actualContext')}
/>
<Select
label="Themes"
options={themes}
initValue={actualStyle}
onChange={updateOnChange(setActualStyle, 'actualStyle')}
/>
<Select
label="Devices"
options={DEVICES}
initValue={actualDevice}
onChange={updateOnChange(setActualDevice, 'actualDevice')}
/>
</Header>
=======
render() {
const {actualContext, actualStyle, actualDevice} = this.state
const {contexts = {}, themes, componentID} = this.props
return (
<div className="Root">
<div className="Root-top">
<Header componentID={componentID}>
<Select
label="Contexts"
options={contexts}
initValue={actualContext}
onChange={nextValue => {
window.sessionStorage.setItem('actualContext', nextValue)
this.setState({actualContext: nextValue})
}}
/>
<Select
label="Themes"
options={themes}
initValue={actualStyle}
onChange={nextValue => {
window.sessionStorage.setItem('actualStyle', nextValue)
this.setState({actualStyle: nextValue})
}}
/>
<Select
label="Devices"
options={DEVICES}
initValue={actualDevice}
onChange={nextValue => {
window.sessionStorage.setItem('actualDevice', nextValue)
this.setState({actualDevice: nextValue})
}}
/>
</Header>
</div>
<div className={`Root-center`}>
<div className={`Root-${actualDevice}`}>
<span className={`Root-${actualDevice}-camera`} />
<span className={`Root-${actualDevice}-speaker`} />
<span className={`Root-${actualDevice}-button`} />
<iframe
style={{
width: DEVICES[actualDevice].width,
height: DEVICES[actualDevice].height,
zoom: 1,
display: 'block',
margin: '10px auto',
overflow: 'scroll',
backgroundColor: '#fff',
border: '1px solid gray'
}}
src={`/?raw=true&actualStyle=${actualStyle}&actualContext=${actualContext}`}
scrolling="yes"
/>
</div>
<When value={__EXPERIMENTAL_TEST__}>
{() => (
<div className={`Root-test`}>
<Test
open
context={contexts[actualContext]}
importComponent={importComponent}
importTest={importTest}
/>
</div>
)}
</When>
</div>
<div className="Root-bottom" />
>>>>>>>
return (
<div className="Root">
<div className="Root-top">
<Header componentID={componentID} iframeSrc={iframeSrc}>
<Select
label="Contexts"
options={contexts}
initValue={actualContext}
onChange={updateOnChange(setActualContext, 'actualContext')}
/>
<Select
label="Themes"
options={themes}
initValue={actualStyle}
onChange={updateOnChange(setActualStyle, 'actualStyle')}
/>
<Select
label="Devices"
options={DEVICES}
initValue={actualDevice}
onChange={updateOnChange(setActualDevice, 'actualDevice')}
/>
</Header> |
<<<<<<<
const Test = ({open}) => {
const [failures, setFailures] = useState(0)
=======
const Test = ({open, importTest, importComponent, context}) => {
>>>>>>>
const Test = ({open, importTest, importComponent, context}) => {
const [failures, setFailures] = useState(0)
<<<<<<<
window.mocha.run(failures => {
setFailures(failures)
})
}, [])
=======
importComponent().then(module => {
const Component = module.default || module
const EnhanceComponent = withContext(/* flag */ context, context)(
Component
)
!EnhanceComponent.displayName &&
console.error('[sui-Test] Component without displayName')
window[cleanDisplayName(EnhanceComponent.displayName)] = props => (
<SUIContext.Provider value={context}>
<EnhanceComponent {...props} />
</SUIContext.Provider>
)
importTest().then(() => {
window.mocha.run()
})
})
}, [context, importComponent, importTest])
>>>>>>>
window.mocha.run(failures => {
setFailures(failures)
})
}, [])
useEffect(() => {
importComponent().then(module => {
const Component = module.default || module
const EnhanceComponent = withContext(/* flag */ context, context)(
Component
)
!EnhanceComponent.displayName &&
console.error('[sui-Test] Component without displayName')
window[cleanDisplayName(EnhanceComponent.displayName)] = props => (
<SUIContext.Provider value={context}>
<EnhanceComponent {...props} />
</SUIContext.Provider>
)
importTest().then(() => {
window.mocha.run()
})
})
}, [context, importComponent, importTest]) |
<<<<<<<
name: 'authorName',
message: 'Your name please?'
},{
name: 'authorGithub',
message: 'Your Github username please?'
},{
=======
name: 'appDescription',
message: 'Your application description please?'
},{
>>>>>>>
name: 'authorName',
message: 'Your name please?'
},{
name: 'authorGithub',
message: 'Your Github username please?'
},{
name: 'appDescription',
message: 'Your application description please?'
},{
<<<<<<<
this.authorName = answers.authorName;
this.authorGithub = answers.authorGithub;
=======
this.appDescription = answers.appDescription;
>>>>>>>
this.authorName = answers.authorName;
this.authorGithub = answers.authorGithub;
this.appDescription = answers.appDescription; |
<<<<<<<
'&:hover, &:focus-within': {
width: _.isEmpty(speaker.links) ? beat(7) : beat(10),
=======
'&:hover': {
width: beat(10),
>>>>>>>
'&:hover, &:focus-within': {
width: beat(10),
<<<<<<<
{sliceArrayRepeatedly(SPEAKERS, 3).map((row, i) => (
<div
key={i}
css={{
display: 'flex',
justifyContent: 'center',
maxWidth: beat(25),
}}
>
{row.map(speaker => this.renderSpeaker(speaker))}
</div>
))}
=======
<div
css={{
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'center',
maxWidth: beat(25),
paddingTop: beat(4),
}}
>
{SPEAKERS.map(speaker => this.renderSpeaker(speaker))}
</div>
>>>>>>>
<div
css={{
paddingTop: beat(4),
}}
>
{sliceArrayRepeatedly(SPEAKERS, 3).map((row, i) => (
<div
key={i}
css={{
display: 'flex',
justifyContent: 'center',
maxWidth: beat(25),
}}
>
{row.map(speaker => this.renderSpeaker(speaker))}
</div>
))}
</div> |
<<<<<<<
var anchor, bleed, bottomShader, content, contentHolder, elStyle, hMask, hPanel, i, leftShader, panel, rightShader, shader, stage, topShader, vMask, vPanel, xOffset, yOffset, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _o, _p, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
=======
var anchor, bleed, bottomShader, content, contentHolder, hMask, hPanel, i, leftShader, metric, panel, rightShader, shader, stage, topShader, vMask, vPanel, xMetrics, xOffset, yMetrics, yOffset, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _p, _q, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
>>>>>>>
var anchor, bleed, bottomShader, content, contentHolder, hMask, hPanel, i, leftShader, metric, panel, rightShader, shader, stage, topShader, vMask, vPanel, xMetrics, xOffset, yMetrics, yOffset, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _p, _q, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
<<<<<<<
this.stageEl.addEventListener('touchstart', this._onTouchStart, false);
this.stageEl.addEventListener('mousedown', this._onTouchStart, false);
this.stageEl.addEventListener('touchend', this._onTouchEnd, false);
this.stageEl.addEventListener('mouseup', this._onTouchEnd, false);
if (this.settings.touchEnabled) {
this.enableTouch();
}
_ref8 = this.anchors;
for (_p = 0, _len5 = _ref8.length; _p < _len5; _p++) {
anchor = _ref8[_p];
=======
_ref7 = this.anchors;
for (_q = 0, _len6 = _ref7.length; _q < _len6; _q++) {
anchor = _ref7[_q];
>>>>>>>
this.stageEl.addEventListener('touchstart', this._onTouchStart, false);
this.stageEl.addEventListener('mousedown', this._onTouchStart, false);
this.stageEl.addEventListener('touchend', this._onTouchEnd, false);
this.stageEl.addEventListener('mouseup', this._onTouchEnd, false);
if (this.settings.touchEnabled) {
this.enableTouch();
}
_ref7 = this.anchors;
for (_q = 0, _len6 = _ref7.length; _q < _len6; _q++) {
anchor = _ref7[_q];
<<<<<<<
var _ref;
_this.stageEl.removeEventListener('touchstart', _this._onTouchStart, false);
_this.stageEl.removeEventListener('mousedown', _this._onTouchStart, false);
_this.stageEl.removeEventListener('touchend', _this._onTouchEnd, false);
_this.stageEl.removeEventListener('mouseup', _this._onTouchEnd, false);
=======
var changedKeys, _i, _len;
>>>>>>>
var changedKeys, _i, _len;
_this.stageEl.removeEventListener('touchstart', _this._onTouchStart, false);
_this.stageEl.removeEventListener('mousedown', _this._onTouchStart, false);
_this.stageEl.removeEventListener('touchend', _this._onTouchEnd, false);
_this.stageEl.removeEventListener('mouseup', _this._onTouchEnd, false);
<<<<<<<
OriDomi.VERSION = '0.2.0';
=======
OriDomi.VERSION = '0.1.5';
>>>>>>>
OriDomi.VERSION = '0.2.0'; |
<<<<<<<
if (event === "owa.mediation.sizeToContent" && !args) {
let body = document.getElementsByTagName('body')[0];
=======
if (event === "sizeToContent" && !args) {
// hrmph - we used to use document.getElementsByTagName('body')[0], but
// sometimes that returns undefined while document.body always works.
let body = document.body;
>>>>>>>
if (event === "owa.mediation.sizeToContent" && !args) {
// hrmph - we used to use document.getElementsByTagName('body')[0], but
// sometimes that returns undefined while document.body always works.
let body = document.body; |
<<<<<<<
if (e.touches && e.touches.length)
console.log("TOUCH DOWN target: " + e.target + " class: " + e.target.className + " id: " + e.target.id);
else
console.log("MOUSE DOWN target: " + e.target + " class: " + e.target.className + " id: " + e.target.id);
=======
e.preventDefault();
console.log("target: " + e.target + " class: " + e.target.className + " id: " + e.target.id);
>>>>>>>
if (e.touches && e.touches.length)
console.log("TOUCH DOWN target: " + e.target + " class: " + e.target.className + " id: " + e.target.id);
else
console.log("MOUSE DOWN target: " + e.target + " class: " + e.target.className + " id: " + e.target.id);
e.preventDefault();
<<<<<<<
if (e.touches && e.touches.length)
console.log("TOUCH UP");
else
console.log("MOUSE UP");
=======
e.preventDefault();
>>>>>>>
if (e.touches && e.touches.length)
console.log("TOUCH UP");
else
console.log("MOUSE UP");
e.preventDefault(); |
<<<<<<<
upload: {
handlers: {
added: function(e, data) {
var files = data.files
html = '<li id="%id"><div><div class="img"><label>%label</label></div><div class="progress"><div></div></div></li>';
data.id=parseInt(Math.random()*1000);
for(i=0; i<files.length; i++) {
$(html.replace('%id', data.id).replace('%label', files[i].fileName))
.prependTo("ul#upload-queue");
}
},
done: function(e, data) {
var resp = data.result,
id = resp.result.id,
img = resp.result.path100x100;
$("#"+data.id+" div.progress div.img").css("width", "").css("height", "");
$("#"+data.id+" div.progress div").css("width", "100%").addClass('complete');
$("#"+data.id+" div.img").replaceWith('<a href="/photo/'+id+'/view"><img src="'+img+'"></a>');
},
progress: function(e, data) {
var pct = parseInt(data.loaded/data.total*100);
$("#"+data.id+" div.progress div").css("width", pct+"%");
if(pct > 95)
$("#"+data.id+" div.img").html("Crunching...");
else if(pct > 85)
$("#"+data.id+" div.img").html("Backing up...");
},
progressall: function(e, data) {
var pct = parseInt(data.loaded/data.total*100);
$("#upload-progress").html("%s% completed".replace('%s', pct));
}
}
},
=======
// upload: {
// handlers: {
// added: function(e, data) {
// var files = data.files
// html = '<li id="%id"><div><div class="img"><label>%label</label></div><div class="progress"><div></div></div></li>';
// data.id=parseInt(Math.random()*1000);
// for(i=0; i<files.length; i++) {
// $(html.replace('%id', data.id).replace('%label', files[i].fileName))
// .prependTo("ul#upload-queue");
// }
// },
// done: function(e, data) {
// var resp = data.result,
// id = resp.result.id,
// img = resp.result.path100x100;
// $("#"+data.id+" div.progress div.img").css("width", "").css("height", "");
// $("#"+data.id+" div.progress div").css("width", "100%").addClass('complete');
// $("#"+data.id+" div.img").replaceWith('<a href="/photo/'+id+'"><img src="'+img+'"></a>');
// },
// progress: function(e, data) {
// var pct = parseInt(data.loaded/data.total*100);
// $("#"+data.id+" div.progress div").css("width", pct+"%");
// if(pct > 95)
// $("#"+data.id+" div.img").html("Crunching...");
// else if(pct > 85)
// $("#"+data.id+" div.img").html("Backing up...");
//
//
// },
// progressall: function(e, data) {
// var pct = parseInt(data.loaded/data.total*100);
// $("#upload-progress").html("%s% completed".replace('%s', pct));
// }
// }
// },
>>>>>>>
// upload: {
// handlers: {
// added: function(e, data) {
// var files = data.files
// html = '<li id="%id"><div><div class="img"><label>%label</label></div><div class="progress"><div></div></div></li>';
// data.id=parseInt(Math.random()*1000);
// for(i=0; i<files.length; i++) {
// $(html.replace('%id', data.id).replace('%label', files[i].fileName))
// .prependTo("ul#upload-queue");
// }
// },
// done: function(e, data) {
// var resp = data.result,
// id = resp.result.id,
// img = resp.result.path100x100;
// $("#"+data.id+" div.progress div.img").css("width", "").css("height", "");
// $("#"+data.id+" div.progress div").css("width", "100%").addClass('complete');
// $("#"+data.id+" div.img").replaceWith('<a href="/photo/'+id+'/view"><img src="'+img+'"></a>');
// },
// progress: function(e, data) {
// var pct = parseInt(data.loaded/data.total*100);
// $("#"+data.id+" div.progress div").css("width", pct+"%");
// if(pct > 95)
// $("#"+data.id+" div.img").html("Crunching...");
// else if(pct > 85)
// $("#"+data.id+" div.img").html("Backing up...");
//
//
// },
// progressall: function(e, data) {
// var pct = parseInt(data.loaded/data.total*100);
// $("#upload-progress").html("%s% completed".replace('%s', pct));
// }
// }
// } |
<<<<<<<
'src/editors/radio.js',
=======
'src/editors/describedby.js',
>>>>>>>
'src/editors/radio.js',
'src/editors/describedby.js', |
<<<<<<<
let buttonsOnErrorMessage = document.getElementsByClassName("btn_grey_white_innerfade btn_medium");
if(buttonsOnErrorMessage.length > 0) {
setTimeout(function tick() {
buttonsOnErrorMessage[0].click();
}, 2000);
}
=======
let buttonsOnErrorMessage = document.getElementsByClassName("btn_grey_white_innerfade btn_medium");
if(buttonsOnErrorMessage.length > 0) {
buttonsOnErrorMessage[0].click();
return;
}
>>>>>>>
let buttonsOnErrorMessage = document.getElementsByClassName("btn_grey_white_innerfade btn_medium");
if(buttonsOnErrorMessage.length > 0) {
setTimeout(function tick() {
buttonsOnErrorMessage[0].click();
}, 2000);
}
<<<<<<<
=======
>>>>>>> |
<<<<<<<
$.ajax({
type : 'POST',
url : this.options.ajaxUrl,
contentType: "application/json",
data : $.toJSON(request),
dataType : 'json',
cache : false,
headers : this.options.headers,
=======
var deferred = $.ajax({
type : 'POST',
url : this.options.ajaxUrl,
data : $.toJSON(request),
dataType : 'json',
cache : false,
>>>>>>>
var deferred = $.ajax({
type : 'POST',
url : this.options.ajaxUrl,
contentType: "application/json",
data : $.toJSON(request),
dataType : 'json',
cache : false,
headers : this.options.headers,
<<<<<<<
$.ajax({
type : 'POST',
url : this.options.ajaxUrl,
contentType: "application/json",
data : $.toJSON(request),
dataType : 'json',
cache : false,
headers : this.options.headers
=======
var deferred = $.ajax({
type : 'POST',
url : this.options.ajaxUrl,
data : $.toJSON(request),
dataType : 'json',
cache : false
>>>>>>>
var deferred = $.ajax({
type : 'POST',
url : this.options.ajaxUrl,
contentType: "application/json",
data : $.toJSON(request),
dataType : 'json',
cache : false,
headers : this.options.headers
<<<<<<<
=======
return null;
>>>>>>>
return null;
<<<<<<<
$.ajax({
url : self.jsonrpcclient.options.ajaxUrl,
contentType: "application/json",
data : $.toJSON(batch_request),
dataType : 'json',
cache : false,
type : 'POST',
headers : self.jsonrpcclient.options.headers,
=======
deferred = $.ajax({
url : self.jsonrpcclient.options.ajaxUrl,
data : $.toJSON(batch_request),
dataType : 'json',
cache : false,
type : 'POST',
>>>>>>>
deferred = $.ajax({
url : self.jsonrpcclient.options.ajaxUrl,
contentType: "application/json",
data : $.toJSON(batch_request),
dataType : 'json',
cache : false,
type : 'POST',
headers : self.jsonrpcclient.options.headers, |
<<<<<<<
=======
@param {Object} [hash] `options.hash` from the helper
@param {Object} [ctx] Context of the helper
>>>>>>>
@param {Object} [hash] `options.hash` from the helper
@param {Object} [ctx] Context of the helper
<<<<<<<
formatOptions = hash.format && _numberFormats[hash.format] || hash,
locale = _getLocale(hash, this),
=======
locale = _getLocale(hash, this),
>>>>>>>
formatOptions = hash.format && _numberFormats[hash.format] || hash,
locale = _getLocale(hash, this),
<<<<<<<
formatOptions = hash.format && _dateTimeFormats[hash.format] || hash,
locale = _getLocale(hash, this),
=======
formatOptions = hash,
locale = _getLocale(hash, this),
>>>>>>>
formatOptions = hash.format && _dateTimeFormats[hash.format] || hash,
locale = _getLocale(hash, this),
<<<<<<<
=======
if (hash.format) {
}
>>>>>>> |
<<<<<<<
gulp.task( "serve", function () {
=======
watch( [ "app/build/babel/**/*"
, "app/build/app.js"
, "app/build/libs.js"
, "app/server.js"
]
, _.debounce( buildChangeHandler, 3000 ) );
gulp.task( "serve",
[ "browser-sync" ], function () {
>>>>>>>
gulp.task( "serve",
[ "browser-sync" ], function () { |
<<<<<<<
this.$el.addClass('date').datepicker({
keyboardNavigation: false, // Makes it possible to manually type in
todayHighlight: true,
orientation: 'top left'
});
=======
this.$el.addClass('date').datepicker();
// Add events
this.$input.on('change', this.update);
this.$input.on('blur', this.blur);
>>>>>>>
this.$el.addClass('date').datepicker({
keyboardNavigation: false, // Makes it possible to manually type in
todayHighlight: true,
orientation: 'top left'
});
// Add events
this.$input.on('change', this.update);
this.$input.on('blur', this.blur); |
<<<<<<<
// XXX slicedArgs will stand in for "A" if used
var args = slice.call(arguments); // for normal call
var slicedArgs; // memoize later if used as constructor
=======
var args = slice.call(arguments, 1);
>>>>>>>
// XXX slicedArgs will stand in for "A" if used
var args = slice.call(arguments, 1); // for normal call |
<<<<<<<
import { Picker, Emoji, emojiIndex, getEmojiDataFromNative } from '../dist'
import data from '../data/all.json'
=======
import { Picker, Emoji, emojiIndex, NimbleEmojiIndex } from '../dist'
import data from '../data/all.json'
>>>>>>>
import { Picker, Emoji, emojiIndex, NimbleEmojiIndex, getEmojiDataFromNative } from '../dist'
import data from '../data/all.json'
<<<<<<<
})
storiesOf('Get emoji data from Native', module)
.addDecorator(withKnobs)
.add('Default', () => {
let emojiData = getEmojiDataFromNative(
text('Unicode', '๐๐ฟโโ๏ธ'),
select('Emoji pack', SETS, SETS[0]),
data
)
if (!emojiData) {
return (
<div>
Couldn`t find any emoji data from native...
</div>
)
}
return (
<div>
<Emoji
emoji={emojiData}
set={select('Emoji pack', SETS, SETS[0])}
skin={emojiData.skin || 1}
size={48}
/>
<pre>
emojiData: {JSON.stringify(emojiData, null, 2)}
</pre>
</div>
)
=======
})
.add('With skin tone from store', () => {
const nimbleEmojiIndex = new NimbleEmojiIndex(data)
let results = nimbleEmojiIndex.search(text('Search', 'thumbs'), {
custom: CUSTOM_EMOJIS,
})
if (!results) {
return null
}
return (
<div>
{results.map((emoji) => {
return (
<span key={emoji.id} style={{ marginLeft: '1.4em' }}>
<Emoji
native={true}
emoji={emoji}
skin={emoji.skin || 1}
size={48}
/>
</span>
)
})}
</div>
)
>>>>>>>
})
.add('With skin tone from store', () => {
const nimbleEmojiIndex = new NimbleEmojiIndex(data)
let results = nimbleEmojiIndex.search(text('Search', 'thumbs'), {
custom: CUSTOM_EMOJIS,
})
if (!results) {
return null
}
return (
<div>
{results.map((emoji) => {
return (
<span key={emoji.id} style={{ marginLeft: '1.4em' }}>
<Emoji
native={true}
emoji={emoji}
skin={emoji.skin || 1}
size={48}
/>
</span>
)
})}
</div>
)
})
storiesOf('Get emoji data from Native', module)
.addDecorator(withKnobs)
.add('Default', () => {
let emojiData = getEmojiDataFromNative(
text('Unicode', '๐๐ฟโโ๏ธ'),
select('Emoji pack', SETS, SETS[0]),
data
)
if (!emojiData) {
return (
<div>
Couldn`t find any emoji data from native...
</div>
)
}
return (
<div>
<Emoji
emoji={emojiData}
set={select('Emoji pack', SETS, SETS[0])}
skin={emojiData.skin || 1}
size={48}
/>
<pre>
emojiData: {JSON.stringify(emojiData, null, 2)}
</pre>
</div>
) |
<<<<<<<
skinIcon: PropTypes.string,
=======
notFound: PropTypes.func,
notFoundEmoji: PropTypes.string,
icons: PropTypes.object,
>>>>>>>
skinIcon: PropTypes.string,
notFound: PropTypes.func,
notFoundEmoji: PropTypes.string,
icons: PropTypes.object,
<<<<<<<
skinIcon: '',
=======
notFound: () => {},
notFoundEmoji: 'sleuth_or_spy',
icons: {},
>>>>>>>
skinIcon: '',
notFound: () => {},
notFoundEmoji: 'sleuth_or_spy',
icons: {}, |
<<<<<<<
import React, { Component } from 'react';
import { Dimensions, Platform, ActivityIndicator, Picker } from 'react-native';
=======
import React, { PureComponent } from 'react';
import { Dimensions, Platform, ActivityIndicator, AsyncStorage, Picker } from 'react-native';
>>>>>>>
import React, { PureComponent } from 'react';
import { Dimensions, Platform, ActivityIndicator, Picker } from 'react-native'; |
<<<<<<<
if (HTMLWidgets.shinyMode) {
console.log("custom handler");
Shiny.addCustomMessageHandler("googlemap-calls", function(data) {
let id = data.id;
let el = document.getElementById(id);
let map = el ? $(el).data("googlemap") : null;
if (!map) {
log("Couldn't find map with id " + id);
return;
}
for (let i = 0; i < data.calls.length; i++) {
let call = data.calls[i];
if (call.dependencies) {
Shiny.renderDependencies(call.dependencies);
}
if (functions[call.function])
functions[call.function].apply(map, call.args);
else
log("Unknown function " + call.function);
}
});
}
=======
if (HTMLWidgets.shinyMode) {
Shiny.addCustomMessageHandler("googlemap-calls", function(data) {
var id = data.id; // the div id of the map
var el = document.getElementById(id);
var map = el;
if (!map) {
console.log("Couldn't find map with id " + id);
return;
}
for (let i = 0; i < data.calls.length; i++) {
var call = data.calls[i];
//push the mapId inot the call.args
call.args.unshift(id);
if (call.dependencies) {
Shiny.renderDependencies(call.dependencies);
}
if (window[call.method])
window[call.method].apply(window[id + 'map'], call.args);
else
console.log("Unknown function " + call.method);
}
});
}
function add_markers(map_id, lat, lng, title, opacity, draggable, label){
var i;
for (i = 0; i < lat.length; i++) {
var latlon = new google.maps.LatLng(lat[i], lng[i]);
var marker = new google.maps.Marker({
position: latlon,
draggable: draggable[i],
opacity: opacity[i],
title: title[i],
label: label[i]
});
window[map_id + 'googleMarkers'].push(marker);
marker.setMap(window[map_id + 'map']);
}
}
function clear_markers(map_id){
// the markers know which map they're on
// http://stackoverflow.com/questions/7961522/removing-a-marker-in-google-maps-api-v3
for (i = 0; i < window[map_id + 'googleMarkers'].length; i++){
window[map_id + 'googleMarkers'][i].setMap(null);
}
}
>>>>>>>
if (HTMLWidgets.shinyMode) {
Shiny.addCustomMessageHandler("googlemap-calls", function(data) {
var id = data.id; // the div id of the map
var el = document.getElementById(id);
var map = el;
if (!map) {
console.log("Couldn't find map with id " + id);
return;
}
for (let i = 0; i < data.calls.length; i++) {
var call = data.calls[i];
//push the mapId inot the call.args
call.args.unshift(id);
if (call.dependencies) {
Shiny.renderDependencies(call.dependencies);
}
if (window[call.method])
window[call.method].apply(window[id + 'map'], call.args);
else
console.log("Unknown function " + call.method);
}
});
}
function add_markers(map_id, lat, lng, title, opacity, draggable, label){
var i;
for (i = 0; i < lat.length; i++) {
var latlon = new google.maps.LatLng(lat[i], lng[i]);
var marker = new google.maps.Marker({
position: latlon,
draggable: draggable[i],
opacity: opacity[i],
title: title[i],
label: label[i]
});
window[map_id + 'googleMarkers'].push(marker);
marker.setMap(window[map_id + 'map']);
}
}
function clear_markers(map_id){
// the markers know which map they're on
// http://stackoverflow.com/questions/7961522/removing-a-marker-in-google-maps-api-v3
for (i = 0; i < window[map_id + 'googleMarkers'].length; i++){
window[map_id + 'googleMarkers'][i].setMap(null);
}
}
<<<<<<<
console.log("heatmap");
console.log(heat);
console.log(heat_options);
=======
var i;
>>>>>>>
var i;
<<<<<<<
heatmap.setMap(map);
=======
window[map_id + 'googleHeatmapLayer'] = heatmap;
heatmap.setMap(window[map_id + 'map']);
}
function update_heatmap(map_id, lat, lng, weight){
// update the heatmap array
window[map_id + 'googleHeatmapLayerMVC'].clear();
var heatmapData = [];
var i;
// turn row of the data into LatLng, and push it to the array
for(i = 0; i < lat.length; i++){
heatmapData[i] = {
location: new google.maps.LatLng(lat[i], lng[i]),
weight: weight[i]
};
window[map_id + 'googleHeatmapLayerMVC'].push(heatmapData[i]);
}
}
function clear_heatmap(map_id){
window[map_id + 'googleHeatmapLayer'].setMap(null);
>>>>>>>
window[map_id + 'googleHeatmapLayer'] = heatmap;
heatmap.setMap(window[map_id + 'map']);
}
function update_heatmap(map_id, lat, lng, weight){
// update the heatmap array
window[map_id + 'googleHeatmapLayerMVC'].clear();
var heatmapData = [];
var i;
// turn row of the data into LatLng, and push it to the array
for(i = 0; i < lat.length; i++){
heatmapData[i] = {
location: new google.maps.LatLng(lat[i], lng[i]),
weight: weight[i]
};
window[map_id + 'googleHeatmapLayerMVC'].push(heatmapData[i]);
}
}
function clear_heatmap(map_id){
window[map_id + 'googleHeatmapLayer'].setMap(null);
<<<<<<<
circle.setMap(map);
}
}
=======
>>>>>>>
<<<<<<<
var marker = new google.maps.Marker({
position: latlon,
draggable: markers[i].draggable,
opacity: markers[i].opacity,
title: markers[i].title,
});
marker.setMap(map);
}
=======
function clear_circles(map_id){
window[map_id + 'googleCircles'].setMap(null);
>>>>>>>
function clear_circles(map_id){
window[map_id + 'googleCircles'].setMap(null); |
<<<<<<<
const displayName = 'SelectSearch';
const propTypes = {
options : React.PropTypes.array.isRequired,
className : React.PropTypes.string.isRequired,
search : React.PropTypes.bool.isRequired,
placeholder : React.PropTypes.string,
multiple : React.PropTypes.bool.isRequired,
height : React.PropTypes.number,
name : React.PropTypes.string,
autofocus : React.PropTypes.bool,
fuse : React.PropTypes.object.isRequired,
onChange : React.PropTypes.func.isRequired,
onHighlight : React.PropTypes.func.isRequired,
onMount : React.PropTypes.func.isRequired,
onBlur : React.PropTypes.func.isRequired,
onFocus : React.PropTypes.func.isRequired,
renderOption : React.PropTypes.func.isRequired,
value : React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.array
])
};
const defaultProps = {
options : [],
className : 'select-search-box',
search : true,
value : '',
placeholder : null,
multiple : false,
height : 200,
name : null,
autofocus : false,
onHighlight : function () {},
onMount : function () {},
onBlur : function () {},
onFocus : function () {},
onChange : function () {},
renderOption : function (option) {
return option.name;
},
fuse: {
keys : ['name'],
threshold : 0.3
}
};
class Component extends React.Component {
=======
class SelectSearch extends React.Component {
static defaultProps = {
className: 'select-search-box',
search: true,
value: '',
placeholder: null,
multiple: false,
height: 200,
name: null,
onHighlight: () => {},
onMount: () => {},
onBlur: () => {},
onFocus: () => {},
onChange: () => {},
renderOption: option => option.name,
fuse: {
keys: ['name'],
threshold: 0.3,
},
};
>>>>>>>
class SelectSearch extends React.Component {
static defaultProps = {
className: 'select-search-box',
search: true,
value: '',
placeholder: null,
multiple: false,
height: 200,
name: null,
autofocus: false,
onHighlight: () => {},
onMount: () => {},
onBlur: () => {},
onFocus: () => {},
onChange: () => {},
renderOption: option => option.name,
fuse: {
keys: ['name'],
threshold: 0.3,
},
};
<<<<<<<
componentDidMount() {
this.props.onMount.call(null, this.publishOption(), this.state, this.props);
if (this.props.autofocus === true) {
this.refs.search.focus();
}
this.scrollToSelected();
}
componentWillUnmount() {
document.removeEventListener('keydown', this.bound.onKeyDown);
document.removeEventListener('keypress', this.bound.onKeyPress);
document.removeEventListener('keyup', this.bound.onKeyUp);
}
=======
>>>>>>> |
<<<<<<<
import VoteVarification from "./VoteVarification";
=======
import Notifications from "./Notifications";
>>>>>>>
import VoteVarification from "./VoteVarification";
import Notifications from "./Notifications";
<<<<<<<
Navigation.registerComponent(
"democracy.VoteVarification",
() => VoteVarification,
client.store,
ApolloProvider,
{ client }
);
=======
Navigation.registerComponent(
"democracy.Notifications",
() => Notifications,
client.store,
ApolloProvider,
{ client }
);
>>>>>>>
Navigation.registerComponent(
"democracy.VoteVarification",
() => VoteVarification,
client.store,
ApolloProvider,
{ client }
);
Navigation.registerComponent(
"democracy.Notifications",
() => Notifications,
client.store,
ApolloProvider,
{ client }
); |
<<<<<<<
controller.hears(['structured'],'message_received',function(bot, message) {
bot.reply(message, {
attachment: {
'type':'template',
'payload':{
'template_type':'generic',
'elements':[
{
'title':'Classic White T-Shirt',
'image_url':'http://petersapparel.parseapp.com/img/item100-thumb.png',
'subtitle':'Soft white cotton t-shirt is back in style',
'buttons':[
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/view_item?item_id=100',
'title':'View Item'
},
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/buy_item?item_id=100',
'title':'Buy Item'
},
{
'type':'postback',
'title':'Bookmark Item',
'payload':'USER_DEFINED_PAYLOAD_FOR_ITEM100'
}
]
},
{
'title':'Classic Grey T-Shirt',
'image_url':'http://petersapparel.parseapp.com/img/item101-thumb.png',
'subtitle':'Soft gray cotton t-shirt is back in style',
'buttons':[
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/view_item?item_id=101',
'title':'View Item'
},
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/buy_item?item_id=101',
'title':'Buy Item'
},
{
'type':'postback',
'title':'Bookmark Item',
'payload':'USER_DEFINED_PAYLOAD_FOR_ITEM101'
}
]
}
]
}
}
});
});
controller.on('facebook_postback', function(bot, message) {
bot.reply(message, message.payload);
});
controller.hears(['call me (.*)'],'message_received',function(bot, message) {
var matches = message.text.match(/call me (.*)/i);
var name = matches[1];
controller.storage.users.get(message.user,function(err, user) {
=======
controller.hears(['call me (.*)', 'my name is (.*)'], 'direct_message,direct_mention,mention', function(bot, message) {
var name = message.match[1];
controller.storage.users.get(message.user, function(err, user) {
>>>>>>>
controller.hears(['structured'],'message_received',function(bot, message) {
bot.reply(message, {
attachment: {
'type':'template',
'payload':{
'template_type':'generic',
'elements':[
{
'title':'Classic White T-Shirt',
'image_url':'http://petersapparel.parseapp.com/img/item100-thumb.png',
'subtitle':'Soft white cotton t-shirt is back in style',
'buttons':[
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/view_item?item_id=100',
'title':'View Item'
},
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/buy_item?item_id=100',
'title':'Buy Item'
},
{
'type':'postback',
'title':'Bookmark Item',
'payload':'USER_DEFINED_PAYLOAD_FOR_ITEM100'
}
]
},
{
'title':'Classic Grey T-Shirt',
'image_url':'http://petersapparel.parseapp.com/img/item101-thumb.png',
'subtitle':'Soft gray cotton t-shirt is back in style',
'buttons':[
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/view_item?item_id=101',
'title':'View Item'
},
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/buy_item?item_id=101',
'title':'Buy Item'
},
{
'type':'postback',
'title':'Bookmark Item',
'payload':'USER_DEFINED_PAYLOAD_FOR_ITEM101'
}
]
}
]
}
}
});
});
controller.on('facebook_postback', function(bot, message) {
bot.reply(message, message.payload);
});
controller.hears(['call me (.*)', 'my name is (.*)'], 'direct_message,direct_mention,mention', function(bot, message) {
var name = message.match[1];
controller.storage.users.get(message.user, function(err, user) {
<<<<<<<
controller.hears(['what is my name','who am i'],'message_received',function(bot, message) {
=======
controller.hears(['what is my name', 'who am i'], 'direct_message,direct_mention,mention', function(bot, message) {
>>>>>>>
controller.hears(['what is my name', 'who am i'], 'direct_message,direct_mention,mention', function(bot, message) {
<<<<<<<
controller.hears(['shutdown'],'message_received',function(bot, message) {
=======
controller.hears(['shutdown'], 'direct_message,direct_mention,mention', function(bot, message) {
>>>>>>>
controller.hears(['structured'],'message_received',function(bot, message) {
bot.reply(message, {
attachment: {
'type':'template',
'payload':{
'template_type':'generic',
'elements':[
{
'title':'Classic White T-Shirt',
'image_url':'http://petersapparel.parseapp.com/img/item100-thumb.png',
'subtitle':'Soft white cotton t-shirt is back in style',
'buttons':[
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/view_item?item_id=100',
'title':'View Item'
},
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/buy_item?item_id=100',
'title':'Buy Item'
},
{
'type':'postback',
'title':'Bookmark Item',
'payload':'USER_DEFINED_PAYLOAD_FOR_ITEM100'
}
]
},
{
'title':'Classic Grey T-Shirt',
'image_url':'http://petersapparel.parseapp.com/img/item101-thumb.png',
'subtitle':'Soft gray cotton t-shirt is back in style',
'buttons':[
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/view_item?item_id=101',
'title':'View Item'
},
{
'type':'web_url',
'url':'https://petersapparel.parseapp.com/buy_item?item_id=101',
'title':'Buy Item'
},
{
'type':'postback',
'title':'Bookmark Item',
'payload':'USER_DEFINED_PAYLOAD_FOR_ITEM101'
}
]
}
]
}
}
});
});
controller.on('facebook_postback', function(bot, message) {
bot.reply(message, message.payload);
});
controller.hears(['call me (.*)', 'my name is (.*)'], 'direct_message,direct_mention,mention', function(bot, message) {
var name = message.match[1];
controller.storage.users.get(message.user, function(err, user) {
if (!user) {
user = {
id: message.user,
};
}
user.name = name;
controller.storage.users.save(user, function(err, id) {
bot.reply(message, 'Got it. I will call you ' + user.name + ' from now on.');
});
});
});
controller.hears(['what is my name', 'who am i'], 'direct_message,direct_mention,mention', function(bot, message) {
controller.storage.users.get(message.user, function(err, user) {
if (user && user.name) {
bot.reply(message, 'Your name is ' + user.name);
} else {
bot.startConversation(message, function(err, convo) {
if (!err) {
convo.say('I do not know your name yet!');
convo.ask('What should I call you?', function(response, convo) {
convo.ask('You want me to call you `' + response.text + '`?', [
{
pattern: 'yes',
callback: function(response, convo) {
// since no further messages are queued after this,
// the conversation will end naturally with status == 'completed'
convo.next();
}
},
{
pattern: 'no',
callback: function(response, convo) {
// stop the conversation. this will cause it to end with status == 'stopped'
convo.stop();
}
},
{
default: true,
callback: function(response, convo) {
convo.repeat();
convo.next();
}
}
]);
convo.next();
}, {'key': 'nickname'}); // store the results in a field called nickname
convo.on('end', function(convo) {
if (convo.status == 'completed') {
bot.reply(message, 'OK! I will update my dossier...');
controller.storage.users.get(message.user, function(err, user) {
if (!user) {
user = {
id: message.user,
};
}
user.name = convo.extractResponse('nickname');
controller.storage.users.save(user, function(err, id) {
bot.reply(message, 'Got it. I will call you ' + user.name + ' from now on.');
});
});
} else {
// this happens if the conversation ended prematurely for some reason
bot.reply(message, 'OK, nevermind!');
}
});
}
});
}
});
});
controller.hears(['shutdown'],'message_received',function(bot, message) {
<<<<<<<
controller.hears(['uptime','identify yourself','who are you','what is your name'],'message_received',function(bot, message) {
=======
controller.hears(['uptime', 'identify yourself', 'who are you', 'what is your name'],
'direct_message,direct_mention,mention', function(bot, message) {
>>>>>>>
controller.hears(['uptime','identify yourself','who are you','what is your name'],'message_received',function(bot, message) { |
<<<<<<<
=======
var SparkBot = require(__dirname + '/CiscoSparkbot.js');
var ConsoleBot = require(__dirname + '/ConsoleBot.js');
>>>>>>>
var SparkBot = require(__dirname + '/CiscoSparkbot.js');
var ConsoleBot = require(__dirname + '/ConsoleBot.js');
<<<<<<<
teamsbot: require(__dirname + '/Teams.js'),
=======
consolebot: ConsoleBot,
>>>>>>>
teamsbot: require(__dirname + '/Teams.js'),
consolebot: ConsoleBot, |
<<<<<<<
=======
const caps = require('node-xmpp-caps');
>>>>>>> |
<<<<<<<
console.error('An error occured in the ingest middleware: ', err);
botkit.trigger('ingest_error', [err, obot, opayload]);
botkit.trigger('pipeline_error', [err, obot, opayload, 'ingest']);
=======
console.error('An error occurred in the ingest middleware: ', err);
>>>>>>>
console.error('An error occurred in the ingest middleware: ', err);
botkit.trigger('ingest_error', [err, obot, opayload]);
botkit.trigger('pipeline_error', [err, obot, opayload, 'ingest']);
<<<<<<<
console.error('An error occured in the normalize middleware: ', err);
botkit.trigger('normalize_error', [err, obot, opayload]);
botkit.trigger('pipeline_error', [err, obot, opayload, 'normalize']);
=======
console.error('An error occurred in the normalize middleware: ', err);
>>>>>>>
console.error('An error occurred in the normalize middleware: ', err);
botkit.trigger('normalize_error', [err, obot, opayload]);
botkit.trigger('pipeline_error', [err, obot, opayload, 'normalize']);
<<<<<<<
console.error('An error occured in the categorize middleware: ', err);
botkit.trigger('categorize_error', [err, obot, omessage]);
botkit.trigger('pipeline_error', [err, obot, omessage, 'categorize']);
=======
console.error('An error occurred in the categorize middleware: ', err);
>>>>>>>
console.error('An error occurred in the categorize middleware: ', err);
botkit.trigger('categorize_error', [err, obot, omessage]);
botkit.trigger('pipeline_error', [err, obot, omessage, 'categorize']);
<<<<<<<
// log the error to console, so people recognize it
console.error('An error occured in the receive middleware: ', err);
// an error occured in the receive middleware
// fire the error event instead of disposing the message
// can be obtained by using controller.on('receive_error')[...]
botkit.trigger('receive_error', [err, obot, omessage]);
botkit.trigger('pipeline_error', [err, obot, omessage, 'receive']);
=======
console.error('An error occurred in the receive middleware: ', err);
return;
>>>>>>>
// log the error to console, so people recognize it
console.error('An error occurred in the receive middleware: ', err);
// an error occured in the receive middleware
// fire the error event instead of disposing the message
// can be obtained by using controller.on('receive_error')[...]
botkit.trigger('receive_error', [err, obot, omessage]);
botkit.trigger('pipeline_error', [err, obot, omessage, 'receive']); |
<<<<<<<
=======
// set up axes
const myYAxis = gAxis.yLinear();
const myXAxis = gAxis.xLinear();
const axisLabelX = {
tag: xVar,
hori:'middle',
vert: 'bottom',
anchor: 'middle',
rotate: 0
}
const axisLabelY = {
tag: yVar,
hori:'left',
vert: 'middle',
anchor: 'middle',
rotate: 0
}
>>>>>>>
<<<<<<<
const axisLabelX = {
tag: xVar,
hori:'middle',
vert: 'bottom',
anchor: 'middle',
rotate: 0
}
const axisLabelY = {
tag: yVar,
hori:'left',
vert: 'middle',
anchor: 'middle',
rotate: 0
}
const sqrtScale = d3.scaleSqrt()
.domain(sizeExtent)
=======
const sqrtScale = d3.scaleSqrt()
.domain(sizeExtent)
>>>>>>>
const axisLabelX = {
tag: xVar,
hori:'middle',
vert: 'bottom',
anchor: 'middle',
rotate: 0
}
const axisLabelY = {
tag: yVar,
hori:'left',
vert: 'middle',
anchor: 'middle',
rotate: 0
}
const sqrtScale = d3.scaleSqrt()
.domain(sizeExtent)
<<<<<<<
myAnnotations
.xScale(myXAxis.scale())
.yScale(myYAxis.scale())
.rem(currentFrame.rem())
.sizeScale(sqrtScale)
.frameName(frameName)
.lineWidth(currentFrame.rem() * 5)
.plotDim([currentFrame.dimension().width,currentFrame.dimension().height])
// Draw the annotations before the lines
plotAnnotation
.selectAll('.annotations')
.data(annos)
.enter()
.append('g')
.call(myAnnotations)
=======
>>>>>>>
myAnnotations
.xScale(myXAxis.scale())
.yScale(myYAxis.scale())
.rem(currentFrame.rem())
.sizeScale(sqrtScale)
.frameName(frameName)
.lineWidth(currentFrame.rem() * 5)
.plotDim([currentFrame.dimension().width,currentFrame.dimension().height])
// Draw the annotations before the lines
plotAnnotation
.selectAll('.annotations')
.data(annos)
.enter()
.append('g')
.call(myAnnotations) |
<<<<<<<
textLabel.append('text')
.attr('class', 'highlighted-label')
.attr('x',d => xScale(d.targetX))
.attr('y',d => yScale(d.targetY))
=======
let labelText = annotation.append('text')
.attr('class', 'highlighted-label')
.attr('x',d => xScale(d.targetX))
.attr('y',d => yScale(d.targetY))
>>>>>>>
let labelText = annotation.append('text')
.attr('class', 'highlighted-label')
.attr('x',d => xScale(d.targetX))
.attr('y',d => yScale(d.targetY))
<<<<<<<
path.attr("d", function(d) {
let sourceX = xScale(d.targetX) + d.xOffset
let sourceY = yScale(d.targetY) + d.yOffset
let points = [
[sourceX, sourceY],
[xScale(d.targetX), yScale(d.targetY)],
];
let pathData = lineGenerator(points);
return pathData
});
textLabel
=======
let path = annotation.append('path')
.attr('id', d=> d.title)
.attr('stroke', '#000000')
.attr('stroke-width', 1)
.attr("d", function(d) {
let pathData = lineGenerator(lineData(d, this));
return pathData
})
annotation
>>>>>>>
let path = annotation.append('path')
.attr('id', d=> d.title)
.attr('stroke', '#000000')
.attr('stroke-width', 1)
.attr("d", function(d) {
let pathData = lineGenerator(lineData(d, this));
return pathData
})
annotation
<<<<<<<
=======
function lineData(d, container) {
let sourceX = xScale(d.targetX) + getOffset(d, container)[0]
let sourceY = yScale(d.targetY) + getOffset(d, container)[1]
let points = [
[sourceX, sourceY],
[sourceX-20, sourceY],
[xScale(d.targetX), yScale(d.targetY)],
];
return points
}
>>>>>>>
function lineData(d, container) {
let sourceX = xScale(d.targetX) + getOffset(d, container)[0]
let sourceY = yScale(d.targetY) + getOffset(d, container)[1]
let points = [
[sourceX, sourceY],
[sourceX-20, sourceY],
[xScale(d.targetX), yScale(d.targetY)],
];
return points
}
<<<<<<<
console.log(d.xOffset,d.yOffset)
let sourceX = d3.event.x + d.xOffset
let sourceY = d3.event.y + d.yOffset
=======
let label = d3.select(this).select('text')
let translate = [label.node().transform.baseVal[0].matrix.e, label.node().transform.baseVal[0].matrix.f];
let sourceX = d3.event.x + translate[0]
let sourceY = d3.event.y + translate[1]
>>>>>>>
let label = d3.select(this).select('text')
let translate = [label.node().transform.baseVal[0].matrix.e, label.node().transform.baseVal[0].matrix.f];
let sourceX = d3.event.x + translate[0]
let sourceY = d3.event.y + translate[1]
<<<<<<<
d3.select(this).selectAll('path').attr("d", (el) => {
let points = [
[sourceX, sourceY],
[xScale(d.targetX), yScale(d.targetY)],
];
let pathData = lineGenerator(points);
return pathData
=======
d3.select(this).selectAll('path').attr("d", function(el) {
let points = getPathData(label, sourceX, sourceY, el)
//let pathData = lineGenerator(points);
return points
>>>>>>>
d3.select(this).selectAll('path').attr("d", function(el) {
let points = getPathData(label, sourceX, sourceY, el)
//let pathData = lineGenerator(points);
return points
<<<<<<<
=======
function dragended(d) {
d3.select(this).classed('active', false);
}
>>>>>>>
function dragended(d) {
d3.select(this).classed('active', false);
} |
<<<<<<<
t.equal(err && err.message, 'Provided basedir "' + __filename + '" is not a directory, or a symlink to a directory');
t.equal(err && err.code, 'INVALID_BASEDIR');
=======
t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'");
t.equal(err && err.code, 'MODULE_NOT_FOUND');
}
t.end();
});
test('non-string "main" field in package.json', function (t) {
var dir = path.join(__dirname, 'resolver');
try {
var result = resolve.sync('./invalid_main', { basedir: dir });
t.equal(result, undefined, 'result should not exist');
t.fail('should not get here');
} catch (err) {
t.ok(err, 'errors on non-string main');
t.equal(err.message, 'package โinvalid mainโ `main` must be a string');
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
>>>>>>>
t.equal(err && err.message, 'Provided basedir "' + __filename + '" is not a directory, or a symlink to a directory');
t.equal(err && err.code, 'INVALID_BASEDIR');
}
t.end();
});
test('non-string "main" field in package.json', function (t) {
var dir = path.join(__dirname, 'resolver');
try {
var result = resolve.sync('./invalid_main', { basedir: dir });
t.equal(result, undefined, 'result should not exist');
t.fail('should not get here');
} catch (err) {
t.ok(err, 'errors on non-string main');
t.equal(err.message, 'package โinvalid mainโ `main` must be a string');
t.equal(err.code, 'INVALID_PACKAGE_MAIN'); |
<<<<<<<
}
};
var dialog = calli.openDialog(href, title, options);
var onlinked = function() {
calli.closeDialog(dialog);
};
list.bind('calliLinked', onlinked);
return false;
=======
};
var searchTerms = list.find('[data-search]');
if (searchTerms.length && searchTerms.attr("data-search").indexOf('{searchTerms}') >= 0) {
options.onlookup = function(terms) {
var searchUrl = searchTerms.attr("data-search").replace('{searchTerms}', encodeURIComponent(terms));
listSearchResults(searchUrl, dialog, node, function(href){
closed = true;
calli.closeDialog(dialog);
callback(href);
});
};
}
var dialog = calli.openDialog(href, title, options);
});
>>>>>>>
};
var dialog = calli.openDialog(href, title, options);
});
<<<<<<<
=======
function listSearchResults(url, win, button, callback) {
calli.getText(url, function(data) {
if (data) {
var result = $(data).children("[data-var-about],[data-var-resource]");
result.find('input,textarea,select').remove();
var ul = $("<ul/>");
result.each(function() {
var resource = $(this).attr("about") || $(this).attr("resource");
if (resource && resource.indexOf('[') < 0) {
var li = $("<li/>");
var link = $('<a/>');
link.attr("class", "option");
link.attr("href", resource);
link.append($(this).html());
link.find('a').each(function(){
$(this).replaceWith($(this).contents());
});
li.append(link);
ul.append(li);
}
});
var doc = win.document;
var html = ul.html();
if (html) {
doc.open();
doc.write("<ul>" + html + "</ul>");
doc.close();
$('a.option', doc).click(function(event) {
event.preventDefault();
var href = event.target.href;
var de = jQuery.Event('drop');
de.dataTransfer = {getData:function(){return href;}};
$(button).trigger(de);
callback(href);
});
} else {
doc.open();
doc.write('<p style="text-align:center">No match found</p>');
doc.close();
}
}
}).then(undefined, calli.error);
}
>>>>>>> |
<<<<<<<
=======
var broadcastLoggedIn;
$(document).bind("calliLoggedIn", function(event) {
broadcastLoggedIn = true;
});
$(document).bind("calliLoggedOut", function(event) {
broadcastLoggedIn = false;
});
if (isLoggedIn())
$(document.documentElement).addClass('login');
else
$(document.documentElement).addClass('logout');
>>>>>>>
if (isLoggedIn())
$(document.documentElement).addClass('login');
else
$(document.documentElement).addClass('logout'); |
<<<<<<<
const EventEmitter = require('events')
=======
>>>>>>>
const EventEmitter = require('events')
<<<<<<<
const inquirer = require('inquirer')
const { loadOptions, saveOptions } = require('../options')
const { request, pauseSpinner, resumeSpinner } = require('@vue/cli-shared-utils')
=======
const registries = require('./registries')
const shouldUseTaobao = require('./shouldUseTaobao')
>>>>>>>
const registries = require('./registries')
const shouldUseTaobao = require('./shouldUseTaobao')
<<<<<<<
class InstallProgress extends EventEmitter {
constructor () {
super()
this._progress = -1
}
get progress () {
return this._progress
}
set progress (value) {
this._progress = value
this.emit('progress', value)
}
get enabled () {
return this._progress !== -1
}
set enabled (value) {
this.progress = value ? 0 : -1
}
log (value) {
this.emit('log', value)
}
}
const progress = exports.progress = new InstallProgress()
async function ping (registry) {
await request.get(`${registry}/vue-cli-version-marker/latest`)
return registry
}
function removeSlash (url) {
return url.replace(/\/$/, '')
}
let checked
let result
async function shouldUseTaobao () {
// ensure this only gets called once.
if (checked) return result
checked = true
// previously saved preference
const saved = loadOptions().useTaobaoRegistry
if (typeof saved === 'boolean') {
return (result = saved)
}
const save = val => {
result = val
saveOptions({ useTaobaoRegistry: val })
return val
}
const userCurrent = (await execa(`npm`, ['config', 'get', 'registry'])).stdout
const defaultRegistry = registries.npm
if (removeSlash(userCurrent) !== removeSlash(defaultRegistry)) {
// user has configured custom regsitry, respect that
return save(false)
}
const faster = await Promise.race([
ping(defaultRegistry),
ping(registries.taobao)
])
if (faster !== registries.taobao) {
// default is already faster
return save(false)
}
// ask and save preference
pauseSpinner()
const { useTaobaoRegistry } = await inquirer.prompt([{
name: 'useTaobaoRegistry',
type: 'confirm',
message: chalk.yellow(
` Your connection to the the default npm registry seems to be slow.\n` +
` Use ${chalk.cyan(registries.taobao)} for faster installation?`
)
}])
resumeSpinner()
return save(useTaobaoRegistry)
}
=======
>>>>>>>
class InstallProgress extends EventEmitter {
constructor () {
super()
this._progress = -1
}
get progress () {
return this._progress
}
set progress (value) {
this._progress = value
this.emit('progress', value)
}
get enabled () {
return this._progress !== -1
}
set enabled (value) {
this.progress = value ? 0 : -1
}
log (value) {
this.emit('log', value)
}
}
const progress = exports.progress = new InstallProgress() |
<<<<<<<
const EventEmitter = require('events')
=======
const fs = require('fs-extra')
>>>>>>>
const EventEmitter = require('events')
const fs = require('fs-extra')
<<<<<<<
this.emit('creation', { event: 'invoking-generators' })
const plugins = this.resolvePlugins(preset.plugins)
=======
const plugins = await this.resolvePlugins(preset.plugins)
>>>>>>>
this.emit('creation', { event: 'invoking-generators' })
const plugins = await this.resolvePlugins(preset.plugins) |
<<<<<<<
class Details extends Component {
shouldComponentUpdate(p) {
const {
subjectGroups,
submissionDate,
dateVote,
abstract,
procedureId,
currentStatus,
type,
voted,
} = this.props;
return (
submissionDate !== p.submissionDate ||
dateVote !== p.dateVote ||
abstract !== p.abstract ||
procedureId !== p.procedureId ||
currentStatus !== p.currentStatus ||
type !== p.type ||
voted !== p.voted ||
JSON.stringify(subjectGroups) !== JSON.stringify(p.subjectGroups)
);
}
render() {
const {
subjectGroups,
submissionDate,
dateVote,
abstract,
procedureId,
currentStatus,
type,
voted,
} = this.props;
return (
<Wrapper>
<Head>
{subjectGroups.length > 0 && (
<HeadLeft>
<DefTitle>Sachgebiete</DefTitle>
<DefDescr>{subjectGroups.join('\n')}</DefDescr>
</HeadLeft>
)}
<HeadRight>
<HeadRightTitle>
<DefTitleRight>Typ</DefTitleRight>
<DefTitleRight>Vorgang</DefTitleRight>
<DefTitleRight>erstellt am</DefTitleRight>
{dateVote && <DefTitleRight>Abstimmung</DefTitleRight>}
</HeadRightTitle>
<HeadRightDescr>
<DefDescr>{renderType(type)}</DefDescr>
<DefDescr>{procedureId}</DefDescr>
<DefDescr>{submissionDate && m(submissionDate).format('DD.MM.YY')}</DefDescr>
{dateVote && <DefDescr>{m(dateVote).format('DD.MM.YY')}</DefDescr>}
</HeadRightDescr>
</HeadRight>
</Head>
<DefTitle style={{ paddingTop: 8 }}>Aktueller Stand</DefTitle>
<DefDescr>
{['Angenommen', 'Abgelehnt'].indexOf(currentStatus) === -1 || voted
? currentStatus
: 'Abgestimmt'}
</DefDescr>
<Content>
{abstract && (
<View>
<DefTitle>Inhalt</DefTitle>
<ContentText>{abstract}</ContentText>
</View>
)}
</Content>
</Wrapper>
);
}
}
=======
const Details = ({
subjectGroups,
submissionDate,
dateVote,
abstract,
procedureId,
currentStatus,
type,
}) => (
<Wrapper>
<Head>
{subjectGroups.length > 0 && (
<HeadLeft>
<DefTitle>Sachgebiete</DefTitle>
<DefDescr>{subjectGroups.join('\n')}</DefDescr>
</HeadLeft>
)}
<HeadRight>
<HeadRightTitle>
<DefTitleRight>Typ</DefTitleRight>
<DefTitleRight>Vorgang</DefTitleRight>
<DefTitleRight>erstellt am</DefTitleRight>
{dateVote && <DefTitleRight>Abstimmung</DefTitleRight>}
</HeadRightTitle>
<HeadRightDescr>
<DefDescr>{renderType(type)}</DefDescr>
<DefDescr>{procedureId}</DefDescr>
<DefDescr>{submissionDate && m(submissionDate).format('DD.MM.YY')}</DefDescr>
{dateVote && <DefDescr>{m(dateVote).format('DD.MM.YY')}</DefDescr>}
</HeadRightDescr>
</HeadRight>
</Head>
<DefTitle style={{ paddingTop: 8 }}>Aktueller Stand</DefTitle>
<DefDescr>{currentStatus}</DefDescr>
<Content>
{abstract && (
<View>
<DefTitle>Inhalt</DefTitle>
<ContentText>{abstract}</ContentText>
</View>
)}
</Content>
</Wrapper>
);
>>>>>>>
class Details extends Component {
shouldComponentUpdate(p) {
const {
subjectGroups,
submissionDate,
dateVote,
abstract,
procedureId,
currentStatus,
type,
} = this.props;
return (
submissionDate !== p.submissionDate ||
dateVote !== p.dateVote ||
abstract !== p.abstract ||
procedureId !== p.procedureId ||
currentStatus !== p.currentStatus ||
type !== p.type ||
JSON.stringify(subjectGroups) !== JSON.stringify(p.subjectGroups)
);
}
render() {
const {
subjectGroups,
submissionDate,
dateVote,
abstract,
procedureId,
currentStatus,
type,
} = this.props;
return (
<Wrapper>
<Head>
{subjectGroups.length > 0 && (
<HeadLeft>
<DefTitle>Sachgebiete</DefTitle>
<DefDescr>{subjectGroups.join('\n')}</DefDescr>
</HeadLeft>
)}
<HeadRight>
<HeadRightTitle>
<DefTitleRight>Typ</DefTitleRight>
<DefTitleRight>Vorgang</DefTitleRight>
<DefTitleRight>erstellt am</DefTitleRight>
{dateVote && <DefTitleRight>Abstimmung</DefTitleRight>}
</HeadRightTitle>
<HeadRightDescr>
<DefDescr>{renderType(type)}</DefDescr>
<DefDescr>{procedureId}</DefDescr>
<DefDescr>{submissionDate && m(submissionDate).format('DD.MM.YY')}</DefDescr>
{dateVote && <DefDescr>{m(dateVote).format('DD.MM.YY')}</DefDescr>}
</HeadRightDescr>
</HeadRight>
</Head>
<DefTitle style={{ paddingTop: 8 }}>Aktueller Stand</DefTitle>
<DefDescr>{currentStatus}</DefDescr>
<Content>
{abstract && (
<View>
<DefTitle>Inhalt</DefTitle>
<ContentText>{abstract}</ContentText>
</View>
)}
</Content>
</Wrapper>
);
}
} |
<<<<<<<
var MessageIOClient = require('./messageIOClient');
=======
>>>>>>>
var MessageIOClient = require('./messageIOClient');
<<<<<<<
debug("connected", socket.id);
=======
>>>>>>>
<<<<<<<
socket.emit('ready', readyMessage);
=======
socket.emit('ready', readyMessage);
// Have device join its uuid room name so that others can subscribe to it
>>>>>>>
socket.emit('ready', readyMessage);
<<<<<<<
debug('setting up message bus', socket.id);
socket.messageIOClient = new MessageIOClient();
socket.messageIOClient.on('message', function(message){
debug(socket.id, 'relay message', message, socket.skynetDevice.uuid);
socket.emit('message', message);
});
socket.messageIOClient.on('data', function(message){
debug(socket.id, 'relay data', message, socket.skynetDevice.uuid);
socket.emit('data', message);
});
socket.messageIOClient.on('config', function(message){
debug(socket.id, 'relay config', message);
socket.emit('config', message);
});
socket.messageIOClient.start()
// Have device join its uuid room name so that others can subscribe to it
debug(socket.id, 'subscribing to received and broadcast', auth.device.uuid);
socket.messageIOClient.subscribe(auth.device.uuid, ['received', 'broadcast']);
=======
//make sure not in there already:
try{
socket.leave(auth.device.uuid);
}catch(lexp){
console.log('error leaving room', lexp);
}
socket.join(auth.device.uuid);
} else {
socket.emit('notReady', {api: 'connect', status: auth.status, uuid: data.uuid});
}
>>>>>>>
debug('setting up message bus', socket.id);
socket.messageIOClient = new MessageIOClient();
socket.messageIOClient.on('message', function(message){
debug(socket.id, 'relay message', message, socket.skynetDevice.uuid);
socket.emit('message', message);
});
socket.messageIOClient.on('data', function(message){
debug(socket.id, 'relay data', message, socket.skynetDevice.uuid);
socket.emit('data', message);
});
socket.messageIOClient.on('config', function(message){
debug(socket.id, 'relay config', message);
socket.emit('config', message);
});
socket.messageIOClient.start()
// Have device join its uuid room name so that others can subscribe to it
debug(socket.id, 'subscribing to received and broadcast', auth.device.uuid);
socket.messageIOClient.subscribe(auth.device.uuid, ['received', 'broadcast']);
<<<<<<<
debug('disconnecting', socket.id);
if (socket.messageIOClient) {
socket.messageIOClient.close()
}
=======
>>>>>>>
debug('disconnecting', socket.id);
if (socket.messageIOClient) {
socket.messageIOClient.close()
}
<<<<<<<
var subscriptionTypes = []
if(message.token) {
authDevice(message.uuid, message.token, function(error, authedDevice) {
if (!authedDevice || error) {
return;
}
subscriptionTypes.push('broadcast');
subscriptionTypes.push('received');
subscriptionTypes.push('sent');
socket.messageIOClient.subscribe(message.uuid, message.types || subscriptionTypes);
return;
});
}
=======
>>>>>>>
var subscriptionTypes = []
if(message.token) {
authDevice(message.uuid, message.token, function(error, authedDevice) {
if (!authedDevice || error) {
return;
}
subscriptionTypes.push('broadcast');
subscriptionTypes.push('received');
subscriptionTypes.push('sent');
socket.messageIOClient.subscribe(message.uuid, message.types || subscriptionTypes);
return;
});
}
<<<<<<<
socket.messageIOClient.unsubscribe(data.uuid);
socket.messageIOClient.unsubscribe(data.uuid + '_bc');
socket.messageIOClient.unsubscribe(data.uuid + '_sent');
=======
socket.leave(data.uuid);
socket.leave(data.uuid + "_bc");
socket.leave(data.uuid + "_sent");
>>>>>>>
socket.messageIOClient.unsubscribe(data.uuid);
socket.messageIOClient.unsubscribe(data.uuid + '_bc');
socket.messageIOClient.unsubscribe(data.uuid + '_sent'); |
<<<<<<<
this.last_read_version = ver.val = this.ntoi2();
=======
this.last_read_version = ver.val = this.ntoi2();
>>>>>>>
this.last_read_version = ver.val = this.ntoi2();
<<<<<<<
if ((ver.val <= 0) && ver.bytecnt && (ver.bytecnt>=6)) {
// this is foreign class, extra stored checksum
ver.checksum = this.ntou4();
}
=======
if ((ver.val <= 0) && ver.bytecnt && (ver.bytecnt>=6)) {
ver.checksum = this.ntou4();
if (!this.fFile.FindSinfoCheckum(ver.checksum)) {
// JSROOT.console('Fail to find streamer info with check sum ' + ver.checksum + ' val ' + ver.val);
this.o-=4; // not found checksum in the list
delete ver.checksum; // remove checksum
}
}
>>>>>>>
if ((ver.val <= 0) && ver.bytecnt && (ver.bytecnt>=6)) {
ver.checksum = this.ntou4();
if (!this.fFile.FindSinfoCheckum(ver.checksum)) {
// JSROOT.console('Fail to find streamer info with check sum ' + ver.checksum + ' val ' + ver.val);
this.o-=4; // not found checksum in the list
delete ver.checksum; // remove checksum
}
}
<<<<<<<
for (var i = 0; i < n; ++i)
array[i] = this.ntou1();
=======
while (i < n) array[i++] = this.ntou1();
>>>>>>>
while (i < n) array[i++] = this.ntou1();
<<<<<<<
this.CheckBytecount(ver, classname);
=======
var streamer = this.fFile.GetStreamer(classname, ver);
if (streamer !== null) {
for (var n = 0; n < streamer.length; ++n) {
streamer[n].func(this, obj);
}
>>>>>>>
var streamer = this.fFile.GetStreamer(classname, ver);
if (streamer !== null) {
for (var n = 0; n < streamer.length; ++n)
streamer[n].func(this, obj);
<<<<<<<
if (element.fArrayLength>1) {
member.arrlen = element.fArrayLength;
member.func = function(buf, obj) {
obj[this.name] = [];
for (var k=0;k<this.arrlen;++k)
obj[this.name].push(buf.ClassStreamer({}, this.classname));
};
} else {
member.func = function(buf, obj) {
obj[this.name] = buf.ClassStreamer({}, this.classname);
};
}
=======
if (element.fArrayLength>1) {
member.func = function(buf, obj) {
obj[this.name] = buf.ReadNdimArray(this, function(buf, handle) {
return buf.ClassStreamer({}, handle.classname);
});
};
} else {
member.func = function(buf, obj) {
obj[this.name] = buf.ClassStreamer({}, this.classname);
};
}
>>>>>>>
if (element.fArrayLength>1) {
member.func = function(buf, obj) {
obj[this.name] = buf.ReadNdimArray(this, function(buf, handle) {
return buf.ClassStreamer({}, handle.classname);
});
};
} else {
member.func = function(buf, obj) {
obj[this.name] = buf.ClassStreamer({}, this.classname);
};
}
<<<<<<<
case JSROOT.IO.kCharStar:
member.func = function(buf,obj) {
obj[this.name] = "";
var n = buf.ntoi4();
for (var i=0;i<n;++i) {
obj[this.name] += String.fromCharCode(buf.ntou1());
}
};
break;
case JSROOT.IO.kShort:
member.func = function(buf,obj) { obj[this.name] = buf.ntoi2(); }; break;
case JSROOT.IO.kInt:
case JSROOT.IO.kCounter:
member.func = function(buf,obj) { obj[this.name] = buf.ntoi4(); }; break;
case JSROOT.IO.kLong:
case JSROOT.IO.kLong64:
member.func = function(buf,obj) { obj[this.name] = buf.ntoi8(); }; break;
case JSROOT.IO.kDouble:
member.func = function(buf,obj) { obj[this.name] = buf.ntod(); }; break;
case JSROOT.IO.kFloat:
case JSROOT.IO.kDouble32:
member.func = function(buf,obj) { obj[this.name] = buf.ntof(); }; break;
case JSROOT.IO.kLegacyChar:
case JSROOT.IO.kUChar:
member.func = function(buf,obj) { obj[this.name] = buf.ntou1(); }; break;
case JSROOT.IO.kUShort:
member.func = function(buf,obj) { obj[this.name] = buf.ntou2(); }; break;
case JSROOT.IO.kBits:
case JSROOT.IO.kUInt:
member.func = function(buf,obj) { obj[this.name] = buf.ntou4(); }; break;
case JSROOT.IO.kULong64:
case JSROOT.IO.kULong:
member.func = function(buf,obj) { obj[this.name] = buf.ntou8(); }; break;
case JSROOT.IO.kBool:
member.func = function(buf,obj) { obj[this.name] = buf.ntou1() != 0; }; break;
case JSROOT.IO.kStreamLoop:
case JSROOT.IO.kStreamer:
member.cntname = element.fCountName;
member.typename = element.fTypeName;
=======
case JSROOT.IO.kCharStar:
>>>>>>>
case JSROOT.IO.kCharStar: |
<<<<<<<
var sinceDate = new Date(data.user.created_at);
since = sinceDate.getFullYear();
var sinceMonth = sinceDate.getMonth();
=======
var github_user_orgs = function(username, callback) {
$.getJSON('https://api.github.com/users/' + username + '/orgs?callback=?', callback);
}
var run = function() {
var itemCount = 0,
maxItems = 5,
maxLanguages = 9;
var res = github_user(username, function(data) {
data = data.data;
var since = new Date(data.created_at);
since = since.getFullYear();
>>>>>>>
var github_user_orgs = function(username, callback) {
$.getJSON('https://api.github.com/users/' + username + '/orgs?callback=?', callback);
}
var run = function() {
var itemCount = 0,
maxItems = 5,
maxLanguages = 9;
var res = github_user(username, function(data) {
data = data.data;
var sinceDate = new Date(data.created_at);
since = sinceDate.getFullYear();
var sinceMonth = sinceDate.getMonth(); |
<<<<<<<
UI.DspUsd="Bytes Used";
UI.DspPct="Percent Used";
UI.DspLim="Limit";
=======
UI.Recmd="Recommended";
UI.SRecmd="<b>Recommended</b>";
>>>>>>>
UI.DspUsd="Bytes Used";
UI.DspPct="Percent Used";
UI.DspLim="Limit";
UI.Recmd="Recommended";
UI.SRecmd="<b>Recommended</b>"; |
<<<<<<<
linkedin: 'https://www.linkedin.com/sharing/share-offsite/?url=@u',
messenger: 'fb-messenger://share/?link=@u',
=======
linkedin: 'https://www.linkedin.com/shareArticle?url=@u',
>>>>>>>
linkedin: 'https://www.linkedin.com/shareArticle?url=@u',
messenger: 'fb-messenger://share/?link=@u', |
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount)}
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) }
];
<<<<<<<
var notAMinter = [
{ 'variable': 'isAccountMinter.minterAccount', 'expectedValue': false },
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 }
];
await checkVariables(token, notAMinter);
=======
>>>>>>>
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(0)}
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(0) }
];
<<<<<<<
];
await checkVariables(token, notAMinter);
=======
]
await checkVariables(token, afterPause);
>>>>>>>
];
await checkVariables(token, afterPause);
<<<<<<<
// make sure not a minter, and sender is not a masterMinter
var notAMinter = [
{ 'variable': 'isAccountMinter.minterAccount', 'expectedValue': false },
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
];
assert.isFalse(arbitraryAccount == masterMinterAccount)
await checkVariables(token, notAMinter);
=======
>>>>>>>
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': amount },
{ 'variable': 'isAccountBlacklisted.masterMinterAccount', 'expectedValue': true }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'isAccountBlacklisted.masterMinterAccount', 'expectedValue': true },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'isAccountBlacklisted.masterMinterAccount', 'expectedValue': true },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'isAccountBlacklisted.masterMinterAccount', 'expectedValue': true },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'isAccountBlacklisted.masterMinterAccount', 'expectedValue': true },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': amount },
{ 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'isAccountBlacklisted.minterAccount', 'expectedValue': true },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
{ 'variable': 'balances.minterAccount', 'expectedValue': amount },
{ 'variable': 'totalSupply', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
{ 'variable': 'balances.minterAccount', 'expectedValue': 0 }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(0) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(0) },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
{ 'variable': 'balances.minterAccount', 'expectedValue': amount },
{ 'variable': 'totalSupply', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
{ 'variable': 'balances.minterAccount', 'expectedValue': amount - burnAmount },
{ 'variable': 'totalSupply', 'expectedValue': amount - burnAmount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount - burnAmount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount - burnAmount) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount - burnAmount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount - burnAmount) },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
{ 'variable': 'balances.minterAccount', 'expectedValue': amount },
{ 'variable': 'totalSupply', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
{ 'variable': 'balances.minterAccount', 'expectedValue': amount },
{ 'variable': 'totalSupply', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
{ 'variable': 'balances.minterAccount', 'expectedValue': amount },
{ 'variable': 'totalSupply', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
];
<<<<<<<
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': 0 },
{ 'variable': 'balances.minterAccount', 'expectedValue': amount },
{ 'variable': 'totalSupply', 'expectedValue': amount }
];
=======
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
]
>>>>>>>
{ 'variable': 'minterAllowance.minterAccount', 'expectedValue': new BigNumber(0) },
{ 'variable': 'balances.minterAccount', 'expectedValue': new BigNumber(amount) },
{ 'variable': 'totalSupply', 'expectedValue': new BigNumber(amount) },
];
<<<<<<<
{ 'variable': 'roleAddressChanger', 'expectedValue': arbitraryAccount }
];
=======
{ 'variable': 'roleAddressChanger', 'expectedValue': arbitraryAccount },
{ 'variable': 'paused', 'expectedValue': true }
]
>>>>>>>
{ 'variable': 'roleAddressChanger', 'expectedValue': arbitraryAccount },
{ 'variable': 'paused', 'expectedValue': true }
];
<<<<<<<
{ 'variable': 'masterMinter', 'expectedValue': bigZero },
{ 'variable': 'pauser', 'expectedValue': smallZero }
];
=======
{ 'variable': 'masterMinter', 'expectedValue': "0x0000000000000000000000000000000000000000" },
{ 'variable': 'pauser', 'expectedValue': "0x0000000000000000000000000000000000000000" }
]
>>>>>>>
{ 'variable': 'masterMinter', 'expectedValue': "0x0000000000000000000000000000000000000000" },
{ 'variable': 'pauser', 'expectedValue': "0x0000000000000000000000000000000000000000" }
];
<<<<<<<
];
await checkVariables(token, []);
=======
]
await checkVariables(token, setup);
>>>>>>>
];
await checkVariables(token, setup);
<<<<<<<
var setup = [
{ 'variable': 'paused', 'expectedValue': true }
];
await checkVariables(token, setup);
=======
await checkVariables(token, []);
>>>>>>>
await checkVariables(token, []);
<<<<<<<
{ 'variable': 'masterMinter', 'expectedValue': arbitraryAccount2 },
{ 'variable': 'paused', 'expectedValue': true }
];
=======
{ 'variable': 'masterMinter', 'expectedValue': arbitraryAccount2 }
]
>>>>>>>
{ 'variable': 'masterMinter', 'expectedValue': arbitraryAccount2 }
]; |
<<<<<<<
name: name,
symbol: symbol,
currency: currency,
decimals: decimals,
bigZero: bigZero,
bigHundred: bigHundred,
debugLogging: debugLogging,
calculateFeeAmount: calculateFeeAmount,
checkTransferEventsWithFee: checkTransferEventsWithFee,
checkTransferEvents: checkTransferEvents,
checkVariables: checkVariables,
setMinter: setMinter,
mint: mint,
mintRaw: mintRaw,
mintToReserveAccount: mintToReserveAccount,
blacklist: blacklist,
unBlacklist: unBlacklist,
setLongDecimalFeesTransferWithFees: setLongDecimalFeesTransferWithFees,
sampleTransfer: sampleTransfer,
transferFromWithFees: transferFromWithFees,
sampleTransferFrom: sampleTransferFrom,
approve: approve,
redeem: redeem,
expectRevert: expectRevert,
expectJump: expectJump,
masterMinterRole: masterMinterRole,
blacklisterRole: blacklisterRole,
pauserRole: pauserRole,
roleAddressChangerRole: roleAddressChangerRole,
ownerAccount: ownerAccount,
arbitraryAccount: arbitraryAccount,
upgraderAccount: upgraderAccount,
tokenOwnerAccount: tokenOwnerAccount,
blacklisterAccount: blacklisterAccount,
arbitraryAccount2: arbitraryAccount2,
masterMinterAccount: masterMinterAccount,
minterAccount: minterAccount,
pauserAccount: pauserAccount,
blacklisterAccount: blacklisterAccount,
arbitraryAccountPrivateKey
=======
name: name,
symbol: symbol,
currency: currency,
decimals: decimals,
bigZero: bigZero,
bigHundred: bigHundred,
debugLogging: debugLogging,
calculateFeeAmount: calculateFeeAmount,
checkTransferEventsWithFee: checkTransferEventsWithFee,
checkTransferEvents: checkTransferEvents,
checkVariables: checkVariables,
setMinter: setMinter,
mint: mint,
mintRaw: mintRaw,
mintToReserveAccount: mintToReserveAccount,
blacklist: blacklist,
unBlacklist: unBlacklist,
setLongDecimalFeesTransferWithFees: setLongDecimalFeesTransferWithFees,
sampleTransfer: sampleTransfer,
transferFromWithFees: transferFromWithFees,
sampleTransferFrom: sampleTransferFrom,
approve: approve,
redeem: redeem,
expectRevert: expectRevert,
masterMinterRole: masterMinterRole,
blacklisterRole: blacklisterRole,
pauserRole: pauserRole,
roleAddressChangerRole: roleAddressChangerRole,
ownerAccount: ownerAccount,
arbitraryAccount: arbitraryAccount,
upgraderAccount: upgraderAccount,
tokenOwnerAccount: tokenOwnerAccount,
blacklisterAccount: blacklisterAccount,
arbitraryAccount2: arbitraryAccount2,
masterMinterAccount: masterMinterAccount,
minterAccount: minterAccount,
pauserAccount: pauserAccount,
blacklisterAccount: blacklisterAccount,
arbitraryAccountPrivateKey,
ownerAccountPrivateKey
>>>>>>>
name: name,
symbol: symbol,
currency: currency,
decimals: decimals,
bigZero: bigZero,
bigHundred: bigHundred,
debugLogging: debugLogging,
calculateFeeAmount: calculateFeeAmount,
checkTransferEventsWithFee: checkTransferEventsWithFee,
checkTransferEvents: checkTransferEvents,
checkVariables: checkVariables,
setMinter: setMinter,
mint: mint,
mintRaw: mintRaw,
mintToReserveAccount: mintToReserveAccount,
blacklist: blacklist,
unBlacklist: unBlacklist,
setLongDecimalFeesTransferWithFees: setLongDecimalFeesTransferWithFees,
sampleTransfer: sampleTransfer,
transferFromWithFees: transferFromWithFees,
sampleTransferFrom: sampleTransferFrom,
approve: approve,
redeem: redeem,
expectRevert: expectRevert,
expectJump: expectJump,
masterMinterRole: masterMinterRole,
blacklisterRole: blacklisterRole,
pauserRole: pauserRole,
roleAddressChangerRole: roleAddressChangerRole,
ownerAccount: ownerAccount,
arbitraryAccount: arbitraryAccount,
upgraderAccount: upgraderAccount,
tokenOwnerAccount: tokenOwnerAccount,
blacklisterAccount: blacklisterAccount,
arbitraryAccount2: arbitraryAccount2,
masterMinterAccount: masterMinterAccount,
minterAccount: minterAccount,
pauserAccount: pauserAccount,
blacklisterAccount: blacklisterAccount,
arbitraryAccountPrivateKey,
ownerAccountPrivateKey |
<<<<<<<
it('should attempt to unpause when already unpaused and fail', async function () {
assert.equal(await token.paused.call(), false);
try {
await token.unpause({ from: pauserAccount });
assert.fail();
} catch (e) {
checkFailureIsExpected(e);
}
})
=======
>>>>>>>
<<<<<<<
/* TODO: Update with global roleAddressChangerAccount
it('should fail to change the minter with a non-minterCertifier account', async function() {
try {
await token.updateMasterMinter(accounts[8]);
} catch(e) {
checkFailureIsExpected(e);
} finally {
let minter = await token.masterMinter();
assert.equal(masterMinterAccount, minter);
}
});
it('should change the masterMinter with a valid minterCertifier account and fail to finishMinting with old masterMinter', async function() {
await token.updateMasterMinter(accounts[8], {from: minterCertifier});
try {
await token.finishMinting({from: masterMinterAccount});
} catch(e) {
checkFailureIsExpected(e);
} finally {
await token.finishMinting({from: accounts[8]});
assert.equal(await token.mintingFinished(), true);
}
});
*/
it('should change the minter and mint as well as fail to mint with the old minter', async function () {
let update = await token.removeMinter(minterAccount, { from: masterMinterAccount });
=======
it('should fail to unblacklist when paused', async function() {
await mint(accounts[2], 1900);
await token.blacklist(accounts[2], {from: blacklisterAccount});
await token.unBlacklist(accounts[2], {from: blacklisterAccount});
await token.blacklist(accounts[2], {from: blacklisterAccount});
await token.pause({from: pauserAccount});
try {
await token.unBlacklist(accounts[2], {from: blacklisterAccount});
} catch(e) {
checkFailureIsExpected(e);
} finally {
let balance = await token.balanceOf(accounts[2]);
assert.isTrue(new BigNumber(balance).equals(new BigNumber(1900)));
}
});
/* TODO: Update with global roleAddressChangerAccount
it('should fail to change the minter with a non-minterCertifier account', async function() {
try {
await token.updateMasterMinter(accounts[8]);
} catch(e) {
checkFailureIsExpected(e);
} finally {
let minter = await token.masterMinter();
assert.equal(masterMinterAccount, minter);
}
});
it('should change the masterMinter with a valid minterCertifier account and fail to finishMinting with old masterMinter', async function() {
await token.updateMasterMinter(accounts[8], {from: minterCertifier});
try {
await token.finishMinting({from: masterMinterAccount});
} catch(e) {
checkFailureIsExpected(e);
} finally {
await token.finishMinting({from: accounts[8]});
assert.equal(await token.mintingFinished(), true);
}
});
*/
it('should change the minter and mint as well as fail to mint with the old minter', async function() {
let update = await token.removeMinter(minterAccount, {from: masterMinterAccount});
>>>>>>>
it('should fail to unblacklist when paused', async function () {
await mint(accounts[2], 1900);
await token.blacklist(accounts[2], { from: blacklisterAccount });
await token.unBlacklist(accounts[2], { from: blacklisterAccount });
await token.blacklist(accounts[2], { from: blacklisterAccount });
await token.pause({ from: pauserAccount });
try {
await token.unBlacklist(accounts[2], { from: blacklisterAccount });
} catch (e) {
checkFailureIsExpected(e);
} finally {
let balance = await token.balanceOf(accounts[2]);
assert.isTrue(new BigNumber(balance).equals(new BigNumber(1900)));
}
});
/* TODO: Update with global roleAddressChangerAccount
it('should fail to change the minter with a non-minterCertifier account', async function() {
try {
await token.updateMasterMinter(accounts[8]);
} catch(e) {
checkFailureIsExpected(e);
} finally {
let minter = await token.masterMinter();
assert.equal(masterMinterAccount, minter);
}
});
it('should change the masterMinter with a valid minterCertifier account and fail to finishMinting with old masterMinter', async function() {
await token.updateMasterMinter(accounts[8], {from: minterCertifier});
try {
await token.finishMinting({from: masterMinterAccount});
} catch(e) {
checkFailureIsExpected(e);
} finally {
await token.finishMinting({from: accounts[8]});
assert.equal(await token.mintingFinished(), true);
}
});
*/
it('should change the minter and mint as well as fail to mint with the old minter', async function () {
let update = await token.removeMinter(minterAccount, { from: masterMinterAccount });
<<<<<<<
try {
// upgrade to null
await token.upgrade("0x0", { from: upgraderAccount });
assert.fail();
} catch (e) {
checkFailureIsExpected(e);
}
=======
try {
// upgrade to null
await token.upgrade("0x0", {from: upgraderAccount});
assert.fail();
} catch(e) {
checkFailureIsExpected(e);
}
>>>>>>>
try {
// upgrade to null
await token.upgrade("0x0", { from: upgraderAccount });
assert.fail();
} catch (e) {
checkFailureIsExpected(e);
} |
<<<<<<<
var arbitraryAccountPrivateKey = "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1];
var proxyOwnerAccount = "0x22d491bde2303f2f43325b2108d26f1eaba1e32b"; // accounts[2]
=======
var upgraderAccount = "0x22d491bde2303f2f43325b2108d26f1eaba1e32b"; // accounts[2]
>>>>>>>
var arbitraryAccountPrivateKey = "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1"; // accounts[1];
var proxyOwnerAccount = "0x22d491bde2303f2f43325b2108d26f1eaba1e32b"; // accounts[2]
var upgraderAccount = proxyOwnerAccount; // accounts[2]
<<<<<<<
'tokenOwnerAccount': bigZero
=======
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'arbitraryAccount': bigZero
>>>>>>>
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'arbitraryAccount': bigZero
<<<<<<<
'tokenOwnerAccount': bigZero
=======
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'masterMinterAccount': bigZero
>>>>>>>
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'masterMinterAccount': bigZero
<<<<<<<
'tokenOwnerAccount': bigZero
=======
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'minterAccount': bigZero
>>>>>>>
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'minterAccount': bigZero
<<<<<<<
'tokenOwnerAccount': bigZero
=======
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'pauserAccount': bigZero
>>>>>>>
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'pauserAccount': bigZero
<<<<<<<
'tokenOwnerAccount': bigZero
=======
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'blacklisterAccount': bigZero
>>>>>>>
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero,
'blacklisterAccount': bigZero
<<<<<<<
'blacklisterAccount': bigZero
=======
'blacklisterAccount': bigZero,
'upgraderAccount': bigZero,
'tokenOwnerAccount': bigZero
},
'upgraderAccount': {
'arbitraryAccount': bigZero,
'masterMinterAccount': bigZero,
'minterAccount': bigZero,
'pauserAccount': bigZero,
'blacklisterAccount': bigZero,
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero
>>>>>>>
'blacklisterAccount': bigZero,
'upgraderAccount': bigZero,
'tokenOwnerAccount': bigZero
},
'upgraderAccount': {
'arbitraryAccount': bigZero,
'masterMinterAccount': bigZero,
'minterAccount': bigZero,
'pauserAccount': bigZero,
'blacklisterAccount': bigZero,
'tokenOwnerAccount': bigZero,
'upgraderAccount': bigZero
<<<<<<<
=======
let storage = EternalStorage.at(await token.getDataContractAddress());
let _priorContractAddress = "undefined";
if (_.has(token, 'priorContractAddress')) {
_priorContractAddress = await token.priorContractAddress.call();
}
>>>>>>>
<<<<<<<
=======
await token.allowance(arbitraryAccount, upgraderAccount),
await token.allowance(arbitraryAccount, arbitraryAccount),
>>>>>>>
await token.allowance(arbitraryAccount, upgraderAccount),
await token.allowance(arbitraryAccount, arbitraryAccount),
<<<<<<<
=======
await token.allowance(masterMinterAccount, upgraderAccount),
await token.allowance(masterMinterAccount, masterMinterAccount),
>>>>>>>
await token.allowance(masterMinterAccount, upgraderAccount),
await token.allowance(masterMinterAccount, masterMinterAccount),
<<<<<<<
=======
await token.allowance(minterAccount, upgraderAccount),
await token.allowance(minterAccount, minterAccount),
>>>>>>>
await token.allowance(minterAccount, upgraderAccount),
await token.allowance(minterAccount, minterAccount),
<<<<<<<
=======
await token.allowance(pauserAccount, upgraderAccount),
await token.allowance(pauserAccount, pauserAccount),
>>>>>>>
await token.allowance(pauserAccount, upgraderAccount),
await token.allowance(pauserAccount, pauserAccount),
<<<<<<<
=======
await token.allowance(blacklisterAccount, upgraderAccount),
await token.allowance(blacklisterAccount, blacklisterAccount),
>>>>>>>
await token.allowance(blacklisterAccount, upgraderAccount),
await token.allowance(blacklisterAccount, blacklisterAccount),
<<<<<<<
=======
await token.allowance(tokenOwnerAccount, upgraderAccount),
await token.allowance(tokenOwnerAccount, tokenOwnerAccount),
await token.allowance(upgraderAccount, arbitraryAccount),
await token.allowance(upgraderAccount, masterMinterAccount),
await token.allowance(upgraderAccount, minterAccount),
await token.allowance(upgraderAccount, pauserAccount),
await token.allowance(upgraderAccount, blacklisterAccount),
await token.allowance(upgraderAccount, tokenOwnerAccount),
await token.allowance(upgraderAccount, upgraderAccount),
>>>>>>>
await token.allowance(tokenOwnerAccount, upgraderAccount),
await token.allowance(tokenOwnerAccount, tokenOwnerAccount),
await token.allowance(upgraderAccount, arbitraryAccount),
await token.allowance(upgraderAccount, masterMinterAccount),
await token.allowance(upgraderAccount, minterAccount),
await token.allowance(upgraderAccount, pauserAccount),
await token.allowance(upgraderAccount, blacklisterAccount),
await token.allowance(upgraderAccount, tokenOwnerAccount),
await token.allowance(upgraderAccount, upgraderAccount),
<<<<<<<
=======
allowanceAtoU,
allowanceAtoA,
>>>>>>>
allowanceAtoU,
allowanceAtoA,
<<<<<<<
=======
allowanceMMtoU,
allowanceMMtoMM,
>>>>>>>
allowanceMMtoU,
allowanceMMtoMM,
<<<<<<<
=======
allowanceMtoU,
allowanceMtoM,
>>>>>>>
allowanceMtoU,
allowanceMtoM,
<<<<<<<
=======
allowancePtoU,
allowancePtoP,
>>>>>>>
allowancePtoU,
allowancePtoP,
<<<<<<<
=======
allowanceBtoU,
allowanceBtoB,
>>>>>>>
allowanceBtoU,
allowanceBtoB,
<<<<<<<
=======
allowanceRACtoU,
allowanceRACtoRAC,
allowanceUtoA,
allowanceUtoMM,
allowanceUtoM,
allowanceUtoP,
allowanceUtoB,
allowanceUtoRAC,
allowanceUtoU,
>>>>>>>
allowanceRACtoU,
allowanceRACtoRAC,
allowanceUtoA,
allowanceUtoMM,
allowanceUtoM,
allowanceUtoP,
allowanceUtoB,
allowanceUtoRAC,
allowanceUtoU,
<<<<<<<
'tokenOwnerAccount': allowanceAtoRAC
=======
'tokenOwnerAccount': allowanceAtoRAC,
'upgraderAccount': allowanceAtoU,
'arbitraryAccount': allowanceAtoA,
>>>>>>>
'tokenOwnerAccount': allowanceAtoRAC,
'upgraderAccount': allowanceAtoU,
'arbitraryAccount': allowanceAtoA,
<<<<<<<
'tokenOwnerAccount': allowanceMMtoRAC
=======
'tokenOwnerAccount': allowanceMMtoRAC,
'upgraderAccount': allowanceMMtoU,
'masterMinterAccount': allowanceMMtoMM,
>>>>>>>
'tokenOwnerAccount': allowanceMMtoRAC,
'upgraderAccount': allowanceMMtoU,
'masterMinterAccount': allowanceMMtoMM,
<<<<<<<
'tokenOwnerAccount': allowanceMtoRAC
=======
'tokenOwnerAccount': allowanceMtoRAC,
'upgraderAccount': allowanceMtoU,
'minterAccount': allowanceMtoM,
>>>>>>>
'tokenOwnerAccount': allowanceMtoRAC,
'upgraderAccount': allowanceMtoU,
'minterAccount': allowanceMtoM,
<<<<<<<
'tokenOwnerAccount': allowancePtoRAC
=======
'tokenOwnerAccount': allowancePtoRAC,
'upgraderAccount': allowancePtoU,
'pauserAccount': allowancePtoP,
>>>>>>>
'tokenOwnerAccount': allowancePtoRAC,
'upgraderAccount': allowancePtoU,
'pauserAccount': allowancePtoP,
<<<<<<<
'tokenOwnerAccount': allowanceBtoRAC
=======
'tokenOwnerAccount': allowanceBtoRAC,
'upgraderAccount': allowanceBtoU,
'blacklisterAccount': allowanceBtoB,
>>>>>>>
'tokenOwnerAccount': allowanceBtoRAC,
'upgraderAccount': allowanceBtoU,
'blacklisterAccount': allowanceBtoB,
<<<<<<<
'blacklisterAccount': allowanceRACtoB
=======
'blacklisterAccount': allowanceRACtoB,
'upgraderAccount': allowanceRACtoU,
'tokenOwnerAccount': allowanceRACtoRAC,
},
'upgraderAccount': {
'arbitraryAccount': allowanceUtoA,
'masterMinterAccount': allowanceUtoMM,
'minterAccount': allowanceUtoM,
'pauserAccount': allowanceUtoP,
'blacklisterAccount': allowanceUtoB,
'tokenOwnerAccount': allowanceUtoRAC,
'upgraderAccount': allowanceUtoU,
>>>>>>>
'blacklisterAccount': allowanceRACtoB,
'upgraderAccount': allowanceRACtoU,
'tokenOwnerAccount': allowanceRACtoRAC,
},
'upgraderAccount': {
'arbitraryAccount': allowanceUtoA,
'masterMinterAccount': allowanceUtoMM,
'minterAccount': allowanceUtoM,
'pauserAccount': allowanceUtoP,
'blacklisterAccount': allowanceUtoB,
'tokenOwnerAccount': allowanceUtoRAC,
'upgraderAccount': allowanceUtoU, |
<<<<<<<
contract('Legacy Tests', function (accounts) {
/* ownerAccount = accounts[0]
feeAccount = accounts[8];
masterMinterAccount = accounts[9];
minterAccount = accounts[7];
pauserAccount = accounts[6];
blacklisterAccount = accounts[4];
roleAddressChangerAccount = accounts[3];
upgraderAccount = accounts[2];
*/
=======
contract('FiatToken', function (accounts) {
>>>>>>>
contract('Legacy Tests', function (accounts) { |
<<<<<<<
const should = require('chai')
.use(require('chai-as-promised'))
.use(require('chai-bignumber')(BigNumber))
.should()
contract('FiatToken', function (accounts) {
=======
// set to true to enable verbose logging in the tests
var debugLogging = false;
>>>>>>>
const should = require('chai')
.use(require('chai-as-promised'))
.use(require('chai-bignumber')(BigNumber))
.should()
// set to true to enable verbose logging in the tests
var debugLogging = false; |
<<<<<<<
ipc.on('trayabout', event => {
if (event) {
about();
}
});
ipc.on('traychangeserver', event => {
if (event) {
addDomain();
}
});
module.exports = {addDomain, about};
=======
module.exports = {
addDomain,
about
};
>>>>>>>
ipc.on('trayabout', event => {
if (event) {
about();
}
});
ipc.on('traychangeserver', event => {
if (event) {
addDomain();
}
});
module.exports = {
addDomain,
about
}; |
<<<<<<<
import Detail from "./Detail";
=======
import SideMenu from "./SideMenu";
>>>>>>>
import SideMenu from "./SideMenu";
import Detail from "./Detail";
<<<<<<<
Navigation.registerComponent(
"democracy.Detail",
() => Detail,
client.store,
ApolloProvider,
{ client }
);
=======
Navigation.registerComponent(
"democracy.SideMenu",
() => SideMenu,
client.store,
ApolloProvider,
{ client }
);
>>>>>>>
Navigation.registerComponent(
"democracy.SideMenu",
() => SideMenu,
client.store,
ApolloProvider,
{ client }
);
Navigation.registerComponent(
"democracy.Detail",
() => Detail,
client.store,
ApolloProvider,
{ client }
); |
<<<<<<<
import Card from './components/card'
=======
import { Collapse, CollapseItem } from './components/collapse'
>>>>>>>
import Card from './components/card'
import { Collapse, CollapseItem } from './components/collapse'
<<<<<<<
Table,
Card
=======
Table,
Collapse,
CollapseItem
>>>>>>>
Table,
Card,
Collapse,
CollapseItem |
<<<<<<<
import { toggleGweiPopup } from 'ducks/ui';
import LoanWarningModal from '../LoanWarningModal';
=======
import Link from 'components/Link';
>>>>>>>
import LoanWarningModal from '../LoanWarningModal';
<<<<<<<
<NetworkInfo
gasPrice={gasInfo.gasPrice}
gasLimit={gasLimit}
ethRate={ethRate}
onEditButtonClick={showGweiPopup}
/>
<ButtonPrimary
disabled={!collateralAmount || !loanAmount || !currentWallet || hasError}
onClick={() => setIsLoanConfirmationModalOpen(true)}
>
=======
<NetworkInfo gasPrice={gasInfo.gasPrice} gasLimit={gasLimit} ethRate={ethRate} />
<ButtonPrimary disabled={!collateralAmount || !loanAmount || !currentWallet || hasError}>
>>>>>>>
<NetworkInfo gasPrice={gasInfo.gasPrice} gasLimit={gasLimit} ethRate={ethRate} />
<ButtonPrimary
disabled={!collateralAmount || !loanAmount || !currentWallet || hasError}
onClick={() => setIsLoanConfirmationModalOpen(true)}
> |
<<<<<<<
},
getSqsIntegrationRequestTemplates(http) {
const defaultRequestTemplates = this.getDefaultSqsRequestTemplates()
return Object.assign(defaultRequestTemplates, _.get(http, ['request', 'template']))
},
getDefaultSqsRequestTemplates() {
return {
'application/json': this.buildDefaultSqsRequestTemplate()
}
},
buildDefaultSqsRequestTemplate() {
return 'Action=SendMessage&MessageBody=$util.urlEncode($input.body)'
=======
},
getSQSIntegrationResponseTemplate(http, statusType) {
const template = _.get(http, ['response', 'template', statusType])
return Object.assign({}, template && { 'application/json': template })
>>>>>>>
},
getSqsIntegrationRequestTemplates(http) {
const defaultRequestTemplates = this.getDefaultSqsRequestTemplates()
return Object.assign(defaultRequestTemplates, _.get(http, ['request', 'template']))
},
getDefaultSqsRequestTemplates() {
return {
'application/json': this.buildDefaultSqsRequestTemplate()
}
},
buildDefaultSqsRequestTemplate() {
return 'Action=SendMessage&MessageBody=$util.urlEncode($input.body)'
},
getSQSIntegrationResponseTemplate(http, statusType) {
const template = _.get(http, ['response', 'template', statusType])
return Object.assign({}, template && { 'application/json': template }) |
<<<<<<<
var util = require('util');
var Q = require('q');
var hooks = require('hooks');
var Attribute = require('./Attribute');
var Table = require('./Table');
var Query = require('./Query');
var Scan = require('./Scan');
var errors = require('./errors');
var reservedKeywords = require('./reserved-keywords');
var deepSet = require('lodash').set;
var _filter = require('lodash').filter;
//var MAX_BATCH_READ_SIZE = 100;
var MAX_BATCH_WRITE_SIZE = 25;
var debug = require('debug')('dynamoose:model');
=======
const util = require('util');
const Q = require('q');
const hooks = require('hooks');
const Table = require('./Table');
const Query = require('./Query');
const Scan = require('./Scan');
const errors = require('./errors');
const reservedKeywords = require('./reserved-keywords');
const objectPath = require('object-path');
//const MAX_BATCH_READ_SIZE = 100;
const MAX_BATCH_WRITE_SIZE = 25;
const debug = require('debug')('dynamoose:model');
>>>>>>>
const util = require('util');
const Q = require('q');
const hooks = require('hooks');
const Attribute = require('./Attribute');
const Table = require('./Table');
const Query = require('./Query');
const Scan = require('./Scan');
const errors = require('./errors');
const reservedKeywords = require('./reserved-keywords');
const objectPath = require('object-path');
//const MAX_BATCH_READ_SIZE = 100;
const MAX_BATCH_WRITE_SIZE = 25;
const debug = require('debug')('dynamoose:model');
<<<<<<<
for (var putItem in updatePUT) {
var putAttr = schema.attributes[putItem];
if (putAttr || schema.options.saveUnknown) {
var val = updatePUT[putItem];
=======
for (const putItem in updatePUT) {
let putAttr = schema.attributes[putItem];
if (putAttr) {
let val = updatePUT[putItem];
>>>>>>>
for (const putItem in updatePUT) {
let putAttr = schema.attributes[putItem];
if (putAttr || schema.options.saveUnknown) {
let val = updatePUT[putItem];
<<<<<<<
for(var deleteItem in update.$DELETE) {
var deleteAttr = schema.attributes[deleteItem];
if(deleteAttr || schema.options.saveUnknown) {
var delVal = update.$DELETE[deleteItem];
=======
for(const deleteItem in update.$DELETE) {
let deleteAttr = schema.attributes[deleteItem];
if(deleteAttr) {
let delVal = update.$DELETE[deleteItem];
>>>>>>>
for(const deleteItem in update.$DELETE) {
let deleteAttr = schema.attributes[deleteItem];
if(deleteAttr || schema.options.saveUnknown) {
let delVal = update.$DELETE[deleteItem];
<<<<<<<
for(var addItem in update.$ADD) {
var addAttr = schema.attributes[addItem];
var addVal = update.$ADD[addItem];
try {
if (addAttr) {
operations.addAdd(addItem, addAttr.toDynamo(addVal));
} else if (schema.options.saveUnknown) {
operations.addAdd(addItem, Attribute.create(schema, addItem, addVal).toDynamo(addVal));
=======
for(const addItem in update.$ADD) {
let addAttr = schema.attributes[addItem];
if(addAttr) {
try {
operations.addAdd(addItem, addAttr.toDynamo(update.$ADD[addItem]));
} catch (err) {
deferred.reject(err);
return deferred.promise.nodeify(next);
>>>>>>>
for(const addItem in update.$ADD) {
let addAttr = schema.attributes[addItem];
let addVal = update.$ADD[addItem];
try {
if (addAttr) {
operations.addAdd(addItem, addAttr.toDynamo(addVal));
} else if (schema.options.saveUnknown) {
operations.addAdd(addItem, Attribute.create(schema, addItem, addVal).toDynamo(addVal)); |
<<<<<<<
it('Update with saveUnknown enabled', function (done) {
Cats.Cat1.create({id: 982, name: 'Oliver'}, function(err, old){
should.not.exist(err);
Cats.Cat1.update({id: old.id}, {otherProperty: 'Testing123'}, function(err, data){
should.not.exist(err);
should.exist(data);
data.should.have.property('otherProperty');
data.otherProperty.should.eql('Testing123');
done();
});
});
});
it('Update $ADD with saveUnknown enabled', function (done) {
Cats.Cat1.create({id: 986, name: 'Oliver', mathy: 1}, function(err, old){
should.not.exist(err);
old.should.have.property('mathy');
old.mathy.should.eql(1);
Cats.Cat1.update({id: old.id}, {$ADD: {mathy: 4}}, function(err, data){
should.not.exist(err);
should.exist(data);
data.should.have.property('mathy');
data.mathy.should.eql(5);
done();
});
});
});
it('Update $DELETE with saveUnknown enabled', function (done) {
Cats.Cat1.create({id: 984, name: 'Oliver'}, function(err, old){
should.not.exist(err);
Cats.Cat1.update({id: old.id}, {otherProperty: 'Testing123'}, function(err, data){
should.not.exist(err);
should.exist(data);
data.should.have.property('otherProperty');
data.otherProperty.should.eql('Testing123');
Cats.Cat1.update({id: old.id}, { $DELETE: {otherProperty: 'Testing123'} }, function(err, data) {
should.not.exist(err);
should.exist(data);
data.should.not.have.property('otherProperty');
done();
});
});
});
});
});
=======
it("Update returns should not return any values using 'none' option", function () {
return Cats.Cat.create({id: '680', name: 'Oliver'}, {overwrite: true}).then(function(old){
return Cats.Cat.update({id: old.id}, {name: 'Tom'}, {returnValues: 'NONE'}).then(function(data){
should.not.exist(data);
});
});
});
>>>>>>>
it('Update with saveUnknown enabled', function (done) {
Cats.Cat1.create({id: 982, name: 'Oliver'}, function(err, old){
should.not.exist(err);
Cats.Cat1.update({id: old.id}, {otherProperty: 'Testing123'}, function(err, data){
should.not.exist(err);
should.exist(data);
data.should.have.property('otherProperty');
data.otherProperty.should.eql('Testing123');
done();
});
});
});
it('Update $ADD with saveUnknown enabled', function (done) {
Cats.Cat1.create({id: 986, name: 'Oliver', mathy: 1}, function(err, old){
should.not.exist(err);
old.should.have.property('mathy');
old.mathy.should.eql(1);
Cats.Cat1.update({id: old.id}, {$ADD: {mathy: 4}}, function(err, data){
should.not.exist(err);
should.exist(data);
data.should.have.property('mathy');
data.mathy.should.eql(5);
done();
});
});
});
it('Update $DELETE with saveUnknown enabled', function (done) {
Cats.Cat1.create({id: 984, name: 'Oliver'}, function(err, old){
should.not.exist(err);
Cats.Cat1.update({id: old.id}, {otherProperty: 'Testing123'}, function(err, data){
should.not.exist(err);
should.exist(data);
data.should.have.property('otherProperty');
data.otherProperty.should.eql('Testing123');
Cats.Cat1.update({id: old.id}, { $DELETE: {otherProperty: 'Testing123'} }, function(err, data) {
should.not.exist(err);
should.exist(data);
data.should.not.have.property('otherProperty');
done();
});
});
});
});
it("Update returns should not return any values using 'none' option", function () {
return Cats.Cat.create({id: '680', name: 'Oliver'}, {overwrite: true}).then(function(old){
return Cats.Cat.update({id: old.id}, {name: 'Tom'}, {returnValues: 'NONE'}).then(function(data){
should.not.exist(data);
});
});
}); |
<<<<<<<
},
_styleForIndexMenu : function () {
var ret = 'overflow: hidden; direction: rtl; background: transparent';
if (process.platform === 'darwin') {
ret += '; margin-top: ' + (10 * window.devicePixelRatio) + 'px';
}
return ret;
=======
},
updateIndexers : function () {
var self = this;
self.set('updateLog', []);
self.$.updateProgress.indeterminate = true;
Chemr.Index.updateBuiltinIndexers(function (type, message) {
self.push('updateLog', { type: type, message: message });
}).
then(function () {
Chemr.Index.loadIndexers();
// reinitialize
self.loadedSettings();
}).
catch(function (e) {
self.push('updateLog', { type: 'error', message: 'Error on update indexers: ' + e });
alert('Error on updateBuiltinIndexers' + e);
}).
then(function () {
self.$.updateProgress.indeterminate = false;
});
>>>>>>>
},
_styleForIndexMenu : function () {
var ret = 'overflow: hidden; direction: rtl; background: transparent';
if (process.platform === 'darwin') {
ret += '; margin-top: ' + (10 * window.devicePixelRatio) + 'px';
}
return ret;
},
updateIndexers : function () {
var self = this;
self.set('updateLog', []);
self.$.updateProgress.indeterminate = true;
Chemr.Index.updateBuiltinIndexers(function (type, message) {
self.push('updateLog', { type: type, message: message });
}).
then(function () {
Chemr.Index.loadIndexers();
// reinitialize
self.loadedSettings();
}).
catch(function (e) {
self.push('updateLog', { type: 'error', message: 'Error on update indexers: ' + e });
alert('Error on updateBuiltinIndexers' + e);
}).
then(function () {
self.$.updateProgress.indeterminate = false;
}); |
<<<<<<<
const getValues = getFormValues('request');
export const getBodyType = state => getValues(state).bodyType;
export const getHeaders = state => getValues(state).headers;
=======
export const getUseFormData = state => state.request.useFormData;
>>>>>>>
export const getUseFormData = state => state.request.useFormData;
const getValues = getFormValues('request');
export const getBodyType = state => getValues(state).bodyType;
export const getHeaders = state => getValues(state).headers; |
<<<<<<<
test("#1964 - final `change` event is always fired, regardless of interim changes", 1, function () {
var model = new Backbone.Model();
model.on('change:property', function() {
model.set('property', 'bar');
});
model.on('change', function() {
ok(true);
});
model.set('property', 'foo');
});
=======
test("isValid", function() {
var model = new Backbone.Model({valid: true});
model.validate = function(attrs) {
if (!attrs.valid) return "invalid";
};
equal(model.isValid(), true);
equal(model.set({valid: false}, {validate:true}), false);
equal(model.isValid(), true);
model.set({valid:false});
equal(model.isValid(), false);
ok(!model.set('valid', false, {validate: true}));
});
test("#1179 - isValid returns true in the absence of validate.", 1, function() {
var model = new Backbone.Model();
model.validate = null;
ok(model.isValid());
});
test("#1961 - Creating a model with {validate:true} will call validate and use the error callback", function () {
var Model = Backbone.Model.extend({
validate: function (attrs) {
if (attrs.id === 1) return "This shouldn't happen";
}
});
var model = new Model({id: 1}, {
validate: true,
error: function (model, message) {
equal(message, "This shouldn't happen");
}
});
});
>>>>>>>
test("#1964 - final `change` event is always fired, regardless of interim changes", 1, function () {
var model = new Backbone.Model();
model.on('change:property', function() {
model.set('property', 'bar');
});
model.on('change', function() {
ok(true);
});
model.set('property', 'foo');
});
test("isValid", function() {
var model = new Backbone.Model({valid: true});
model.validate = function(attrs) {
if (!attrs.valid) return "invalid";
};
equal(model.isValid(), true);
equal(model.set({valid: false}, {validate:true}), false);
equal(model.isValid(), true);
model.set({valid:false});
equal(model.isValid(), false);
ok(!model.set('valid', false, {validate: true}));
});
test("#1179 - isValid returns true in the absence of validate.", 1, function() {
var model = new Backbone.Model();
model.validate = null;
ok(model.isValid());
});
test("#1961 - Creating a model with {validate:true} will call validate and use the error callback", function () {
var Model = Backbone.Model.extend({
validate: function (attrs) {
if (attrs.id === 1) return "This shouldn't happen";
}
});
var model = new Model({id: 1}, {
validate: true,
error: function (model, message) {
equal(message, "This shouldn't happen");
}
});
}); |
<<<<<<<
Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
// Some environments will throw when clearing an undefined interval.
if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
=======
// Add a cross-platform `removeEventListener` shim for older browsers.
var removeEventListener = window.removeEventListener || function (eventName, listener) {
return detachEvent('on' + eventName, listener);
};
if (this._hasPushState) {
removeEventListener('popstate', this.checkUrl, false);
} else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {
removeEventListener('hashchange', this.checkUrl, false);
}
clearInterval(this._checkUrlInterval);
>>>>>>>
// Add a cross-platform `removeEventListener` shim for older browsers.
var removeEventListener = window.removeEventListener || function (eventName, listener) {
return detachEvent('on' + eventName, listener);
};
if (this._hasPushState) {
removeEventListener('popstate', this.checkUrl, false);
} else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {
removeEventListener('hashchange', this.checkUrl, false);
}
// Some environments will throw when clearing an undefined interval.
if (this._checkUrlInterval) clearInterval(this._checkUrlInterval); |
<<<<<<<
if (options.at != null) {
this.models.splice(options.at, 0, model);
} else {
this.models.push(model);
}
model.bind('all', this._onModelEvent, this);
=======
model.bind('all', this._onModelEvent);
>>>>>>>
model.bind('all', this._onModelEvent, this); |
<<<<<<<
// Save a reference to the global object (`window` in the browser, `exports`
// on the server).
var root = this;
// Save the previous value of the `Backbone` variable, so that it can be
// restored later on, if `noConflict` is used.
=======
// Save the previous value of the `Backbone` variable.
>>>>>>>
// Save the previous value of the `Backbone` variable, so that it can be
// restored later on, if `noConflict` is used.
<<<<<<<
// Create local references to array methods we'll want to use later.
var array = [];
var push = array.push;
var slice = array.slice;
var splice = array.splice;
// The top-level namespace. All public Backbone classes and modules will
// be attached to this. Exported for both the browser and the server.
var Backbone;
if (typeof exports !== 'undefined') {
Backbone = exports;
} else {
Backbone = root.Backbone = {};
}
=======
>>>>>>>
// Create local references to array methods we'll want to use later.
var array = [];
var push = array.push;
var slice = array.slice;
var splice = array.splice;
<<<<<<<
// For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
// the `$` variable.
Backbone.$ = root.jQuery || root.Zepto || root.ender || root.$;
=======
>>>>>>>
// For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
// the `$` variable.
Backbone.$ = $;
<<<<<<<
}).call(this);
=======
// Helper function to escape a string for HTML rendering.
var escapeHTML = function(string) {
return string.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
};
return Backbone;
}));
>>>>>>>
return Backbone;
})); |
<<<<<<<
const polarisScssContent = `@import 'styles/foundation';
@import 'styles/shared';
=======
const polarisScssContent = `@import 'styles/public-api';
@import 'styles/global';
>>>>>>>
const polarisScssContent = `@import 'styles/public-api'; |
<<<<<<<
function embedFonts(node, done) {
var cssRules = webFontRule.readAll(document);
cssRules.embedAll(Object.keys(cssRules.rules())).then(function (cssText) {
var styleNode = document.createElement('style');
styleNode.type = 'text/css';
styleNode.appendChild(document.createTextNode(cssText));
node.appendChild(styleNode);
done();
});
}
function toImage(domNode, done) {
=======
function toImage(domNode, done, options) {
options = options || {};
>>>>>>>
function embedFonts(node, done) {
var cssRules = webFontRule.readAll(document);
cssRules.embedAll(Object.keys(cssRules.rules())).then(function (cssText) {
var styleNode = document.createElement('style');
styleNode.type = 'text/css';
styleNode.appendChild(document.createTextNode(cssText));
node.appendChild(styleNode);
done();
});
}
function toImage(domNode, done, options) {
options = options || {};
<<<<<<<
//embedFonts(clone, function () {
makeImage(clone, domNode.offsetWidth, domNode.offsetHeight, done);
//});
});
=======
makeImage(clone, domNode.scrollWidth, domNode.scrollHeight, done);
}, options.filter);
>>>>>>>
makeImage(clone, domNode.scrollWidth, domNode.scrollHeight, done);
}, options.filter);
<<<<<<<
done(new Blob([binaryArray], {
type: 'image/png'
}));
});
=======
done(new Blob([binaryArray], {type: 'image/png'}));
}, options);
>>>>>>>
done(new Blob([binaryArray], {type: 'image/png'}));
}, options); |
<<<<<<<
// http://docs.intercom.io/
=======
// Intercom
// --------
// [Documentation](http://docs.intercom.io/).
// http://docs.intercom.io/#IntercomJS
>>>>>>>
// http://docs.intercom.io/
// http://docs.intercom.io/#IntercomJS
<<<<<<<
name : 'Intercom',
// Whether Intercom has already been initialized or not. Since we initialize
// Intercom on `identify`, people can make multiple `identify` calls and we
// don't want that breaking anything.
initialized : false,
=======
// Whether Intercom has already been booted or not. Intercom becomes booted
// after Intercom('boot', ...) has been called on the first identify.
booted : false,
>>>>>>>
name : 'Intercom',
// Whether Intercom has already been booted or not. Intercom becomes booted
// after Intercom('boot', ...) has been called on the first identify.
booted : false,
<<<<<<<
// Intercom identifies when the script is loaded, so instead of initializing
// in `initialize` we initialize in `identify`.
=======
>>>>>>> |
<<<<<<<
require('./pingdom'),
=======
require('./preact'),
>>>>>>>
require('./pingdom'),
require('./preact'),
<<<<<<<
require.register("analytics/src/providers/pingdom.js", function(exports, require, module){
var date = require('load-date')
, Provider = require('../provider')
, load = require('load-script');
module.exports = Provider.extend({
name : 'Pingdom',
key : 'id',
defaults : {
id : null
},
initialize : function (options, ready) {
window._prum = [
['id', options.id],
['mark', 'firstbyte', date.getTime()]
];
// We've replaced the original snippet loader with our own load method.
load('//rum-static.pingdom.net/prum.min.js', ready);
}
});
});
=======
require.register("analytics/src/providers/preact.js", function(exports, require, module){
// http://www.preact.io/api/javascript
var Provider = require('../provider')
, isEmail = require('is-email')
, load = require('load-script');
module.exports = Provider.extend({
name : 'Preact',
key : 'projectCode',
defaults : {
projectCode : null
},
initialize : function (options, ready) {
var _lnq = window._lnq = window._lnq || [];
_lnq.push(["_setCode", options.projectCode]);
load('//d2bbvl6dq48fa6.cloudfront.net/js/ln-2.3.min.js');
ready();
},
identify : function (userId, traits) {
// Don't do anything if we just have traits, because Preact
// requires a `userId`.
if (!userId) return;
// If there wasn't already an email and the userId is one, use it.
if (!traits.email && isEmail(userId)) traits.email = userId;
// Swap the `created` trait to the `created_at` that Preact needs
// and convert it from milliseconds to seconds.
if (traits.created) {
traits.created_at = Math.floor(traits.created/1000);
delete traits.created;
}
window._lnq.push(['_setPersonData', {
name : traits.name,
email : traits.email,
uid : userId,
properties : traits
}]);
},
track : function (event, properties) {
properties || (properties = {});
var personEvent = {
name : event,
target_id : properties.target_id,
note : properties.note,
revenue : properties.revenue
}
window._lnq.push(['_logEvent', personEvent, properties]);
}
});
});
>>>>>>>
require.register("analytics/src/providers/pingdom.js", function(exports, require, module){
var date = require('load-date')
, Provider = require('../provider')
, load = require('load-script');
module.exports = Provider.extend({
name : 'Pingdom',
key : 'id',
defaults : {
id : null
},
initialize : function (options, ready) {
window._prum = [
['id', options.id],
['mark', 'firstbyte', date.getTime()]
];
// We've replaced the original snippet loader with our own load method.
load('//rum-static.pingdom.net/prum.min.js', ready);
}
});
});
require.register("analytics/src/providers/preact.js", function(exports, require, module){
// http://www.preact.io/api/javascript
var Provider = require('../provider')
, isEmail = require('is-email')
, load = require('load-script');
module.exports = Provider.extend({
name : 'Preact',
key : 'projectCode',
defaults : {
projectCode : null
},
initialize : function (options, ready) {
var _lnq = window._lnq = window._lnq || [];
_lnq.push(["_setCode", options.projectCode]);
load('//d2bbvl6dq48fa6.cloudfront.net/js/ln-2.3.min.js');
ready();
},
identify : function (userId, traits) {
// Don't do anything if we just have traits, because Preact
// requires a `userId`.
if (!userId) return;
// If there wasn't already an email and the userId is one, use it.
if (!traits.email && isEmail(userId)) traits.email = userId;
// Swap the `created` trait to the `created_at` that Preact needs
// and convert it from milliseconds to seconds.
if (traits.created) {
traits.created_at = Math.floor(traits.created/1000);
delete traits.created;
}
window._lnq.push(['_setPersonData', {
name : traits.name,
email : traits.email,
uid : userId,
properties : traits
}]);
},
track : function (event, properties) {
properties || (properties = {});
var personEvent = {
name : event,
target_id : properties.target_id,
note : properties.note,
revenue : properties.revenue
}
window._lnq.push(['_logEvent', personEvent, properties]);
}
});
}); |
<<<<<<<
var self = this;
each(links, function (el) {
bind(el, 'click', function (e) {
var ev = is.function(event) ? event(el) : event;
var props = is.function(properties) ? properties(el) : properties;
self.track(ev, props);
if (el.href && el.target !== '_blank' && !isMeta(e)) {
prevent(e);
self._callback(function () {
window.location.href = el.href;
});
=======
properties = clone(properties) || {};
// Call `track` on all of our enabled providers that support it.
each(this.providers, function (provider) {
if (provider.track && isEnabled(provider, options)) {
var args = [event, clone(properties), clone(options)];
if (provider.ready) {
provider.track.apply(provider, args);
} else {
provider.enqueue('track', args);
}
>>>>>>>
var self = this;
each(links, function (el) {
bind(el, 'click', function (e) {
var ev = is.function(event) ? event(el) : event;
var props = is.function(properties) ? properties(el) : properties;
self.track(ev, props);
if (el.href && el.target !== '_blank' && !isMeta(e)) {
prevent(e);
self._callback(function () {
window.location.href = el.href;
});
<<<<<<<
=======
function addTraits (userId, traits, tracker) {
// Move a `userId` into `traits`.
if (userId) traits.id = userId;
each(traits, function (key, value) {
// Woopra seems to only support strings as trait values.
if ('string' === type(value)) tracker.addVisitorProperty(key, value);
});
}
});
>>>>>>>
<<<<<<<
require.alias("analytics/lib/index.js", "analytics/index.js");if (typeof exports == "object") {
=======
require.alias("analytics/src/index.js", "analytics/index.js");
if (typeof exports == "object") {
>>>>>>>
require.alias("analytics/lib/index.js", "analytics/index.js");if (typeof exports == "object") { |
<<<<<<<
var url = '';
if (con.length < 4)
url = 'https://codeforces.com/contest/' + con + '/problem/' + index;
else
url = 'https://codeforces.com/problemset/gymProblem/' + con + '/' + index;
=======
var url = "";
if (con.length <= 4) url = "https://codeforces.com/contest/" + con + "/problem/" + index;
else url = "https://codeforces.com/problemset/gymProblem/" + con + "/" + index;
>>>>>>>
var url = '';
if (con.length <= 4)
url = 'https://codeforces.com/contest/' + con + '/problem/' + index;
else
url = 'https://codeforces.com/problemset/gymProblem/' + con + '/' + index; |
<<<<<<<
var self = this;
each(links, function (el) {
bind(el, 'click', function (e) {
var ev = is.function(event) ? event(el) : event;
var props = is.function(properties) ? properties(el) : properties;
self.track(ev, props);
if (el.href && el.target !== '_blank' && !isMeta(e)) {
prevent(e);
self._callback(function () {
window.location.href = el.href;
});
=======
properties = clone(properties) || {};
// Call `track` on all of our enabled providers that support it.
each(this.providers, function (provider) {
if (provider.track && isEnabled(provider, options)) {
var args = [event, clone(properties), clone(options)];
if (provider.ready) {
provider.track.apply(provider, args);
} else {
provider.enqueue('track', args);
}
>>>>>>>
var self = this;
each(links, function (el) {
bind(el, 'click', function (e) {
var ev = is.function(event) ? event(el) : event;
var props = is.function(properties) ? properties(el) : properties;
self.track(ev, props);
if (el.href && el.target !== '_blank' && !isMeta(e)) {
prevent(e);
self._callback(function () {
window.location.href = el.href;
});
<<<<<<<
require.register("analytics/lib/providers/bitdeli.js", function(exports, require, module){
// https://bitdeli.com/docs
// https://bitdeli.com/docs/javascript-api.html
var Provider = require('../provider')
, load = require('load-script');
module.exports = Provider.extend({
name : 'Bitdeli',
defaults : {
// BitDeli requires two options: `inputId` and `authToken`.
inputId : null,
authToken : null,
// Whether or not to track an initial pageview when the page first
// loads. You might not want this if you're using a single-page app.
initialPageview : true
},
initialize : function (options, ready) {
window._bdq = window._bdq || [];
window._bdq.push(["setAccount", options.inputId, options.authToken]);
if (options.initialPageview) this.pageview();
load('//d2flrkr957qc5j.cloudfront.net/bitdeli.min.js');
// Bitdeli just uses a queue, so it's ready right away.
ready();
},
// Bitdeli uses two separate methods: `identify` for storing the `userId`
// and `set` for storing `traits`.
identify : function (userId, traits) {
if (userId) window._bdq.push(['identify', userId]);
if (traits) window._bdq.push(['set', traits]);
},
track : function (event, properties) {
window._bdq.push(['track', event, properties]);
},
// If `url` is undefined, Bitdeli uses the current page URL instead.
pageview : function (url) {
window._bdq.push(['trackPageview', url]);
}
});
});
require.register("analytics/lib/providers/bugherd.js", function(exports, require, module){
=======
require.register("analytics/src/providers/bugherd.js", function(exports, require, module){
>>>>>>>
require.register("analytics/lib/providers/bugherd.js", function(exports, require, module){
<<<<<<<
require.register("analytics/lib/providers/index.js", function(exports, require, module){
module.exports = {
'AdRoll' : require('./adroll'),
'Amplitude' : require('./amplitude'),
'Bitdeli' : require('./bitdeli'),
'BugHerd' : require('./bugherd'),
'Chartbeat' : require('./chartbeat'),
'ClickTale' : require('./clicktale'),
'Clicky' : require('./clicky'),
'comScore' : require('./comscore'),
'CrazyEgg' : require('./crazyegg'),
'Customer.io' : require('./customerio'),
'Errorception' : require('./errorception'),
'FoxMetrics' : require('./foxmetrics'),
'Gauges' : require('./gauges'),
'Get Satisfaction' : require('./get-satisfaction'),
'Google Analytics' : require('./google-analytics'),
'GoSquared' : require('./gosquared'),
'Heap' : require('./heap'),
'HitTail' : require('./hittail'),
'HubSpot' : require('./hubspot'),
'Improvely' : require('./improvely'),
'Intercom' : require('./intercom'),
'Keen IO' : require('./keen-io'),
'KISSmetrics' : require('./kissmetrics'),
'Klaviyo' : require('./klaviyo'),
'LeadLander' : require('./leadlander'),
'LiveChat' : require('./livechat'),
'Lytics' : require('./lytics'),
'Mixpanel' : require('./mixpanel'),
'Olark' : require('./olark'),
'Optimizely' : require('./optimizely'),
'Perfect Audience' : require('./perfect-audience'),
'Pingdom' : require('./pingdom'),
'Preact' : require('./preact'),
'Qualaroo' : require('./qualaroo'),
'Quantcast' : require('./quantcast'),
'Sentry' : require('./sentry'),
'SnapEngage' : require('./snapengage'),
'USERcycle' : require('./usercycle'),
'userfox' : require('./userfox'),
'UserVoice' : require('./uservoice'),
'Vero' : require('./vero'),
'Visual Website Optimizer' : require('./visual-website-optimizer'),
'Woopra' : require('./woopra')
};
=======
require.register("analytics/src/providers/index.js", function(exports, require, module){
module.exports = [
require('./adroll'),
require('./amplitude'),
require('./bugherd'),
require('./chartbeat'),
require('./clicktale'),
require('./clicky'),
require('./comscore'),
require('./crazyegg'),
require('./customerio'),
require('./errorception'),
require('./foxmetrics'),
require('./gauges'),
require('./get-satisfaction'),
require('./google-analytics'),
require('./gosquared'),
require('./heap'),
require('./hittail'),
require('./hubspot'),
require('./improvely'),
require('./intercom'),
require('./keen-io'),
require('./kissmetrics'),
require('./klaviyo'),
require('./leadlander'),
require('./livechat'),
require('./lytics'),
require('./mixpanel'),
require('./olark'),
require('./optimizely'),
require('./perfect-audience'),
require('./pingdom'),
require('./preact'),
require('./qualaroo'),
require('./quantcast'),
require('./sentry'),
require('./snapengage'),
require('./usercycle'),
require('./userfox'),
require('./uservoice'),
require('./vero'),
require('./visual-website-optimizer'),
require('./woopra')
];
>>>>>>>
require.register("analytics/lib/providers/index.js", function(exports, require, module){
module.exports = {
'AdRoll' : require('./adroll'),
'Amplitude' : require('./amplitude'),
'BugHerd' : require('./bugherd'),
'Chartbeat' : require('./chartbeat'),
'ClickTale' : require('./clicktale'),
'Clicky' : require('./clicky'),
'comScore' : require('./comscore'),
'CrazyEgg' : require('./crazyegg'),
'Customer.io' : require('./customerio'),
'Errorception' : require('./errorception'),
'FoxMetrics' : require('./foxmetrics'),
'Gauges' : require('./gauges'),
'Get Satisfaction' : require('./get-satisfaction'),
'Google Analytics' : require('./google-analytics'),
'GoSquared' : require('./gosquared'),
'Heap' : require('./heap'),
'HitTail' : require('./hittail'),
'HubSpot' : require('./hubspot'),
'Improvely' : require('./improvely'),
'Intercom' : require('./intercom'),
'Keen IO' : require('./keen-io'),
'KISSmetrics' : require('./kissmetrics'),
'Klaviyo' : require('./klaviyo'),
'LeadLander' : require('./leadlander'),
'LiveChat' : require('./livechat'),
'Lytics' : require('./lytics'),
'Mixpanel' : require('./mixpanel'),
'Olark' : require('./olark'),
'Optimizely' : require('./optimizely'),
'Perfect Audience' : require('./perfect-audience'),
'Pingdom' : require('./pingdom'),
'Preact' : require('./preact'),
'Qualaroo' : require('./qualaroo'),
'Quantcast' : require('./quantcast'),
'Sentry' : require('./sentry'),
'SnapEngage' : require('./snapengage'),
'USERcycle' : require('./usercycle'),
'userfox' : require('./userfox'),
'UserVoice' : require('./uservoice'),
'Vero' : require('./vero'),
'Visual Website Optimizer' : require('./visual-website-optimizer'),
'Woopra' : require('./woopra')
}; |
<<<<<<<
import Badge from './components/Badge/Badge';
import Icon from './components/Icon/Icon';
import CaretIcon from './components/Icon/CaretIcon/CaretIcon';
import CheckIcon from './components/Icon/CheckIcon/CheckIcon';
import CrossIcon from './components/Icon/CrossIcon/CrossIcon';
import EditIcon from './components/Icon/EditIcon/EditIcon';
import EligibilityIcon from './components/Icon/EligibilityIcon/EligibilityIcon';
import InfoIcon from './components/Icon/InfoIcon/InfoIcon';
import MinusIcon from './components/Icon/MinusIcon/MinusIcon';
import PlusIcon from './components/Icon/PlusIcon/PlusIcon';
import ResizeIcon from './components/Icon/ResizeIcon/ResizeIcon';
import SearchIcon from './components/Icon/SearchIcon/SearchIcon';
import WarningIcon from './components/Icon/WarningIcon/WarningIcon';
=======
import Switch from './components/Switch/Switch';
>>>>>>>
import Switch from './components/Switch/Switch';
import Badge from './components/Badge/Badge';
import Icon from './components/Icon/Icon';
import CaretIcon from './components/Icon/CaretIcon/CaretIcon';
import CheckIcon from './components/Icon/CheckIcon/CheckIcon';
import CrossIcon from './components/Icon/CrossIcon/CrossIcon';
import EditIcon from './components/Icon/EditIcon/EditIcon';
import EligibilityIcon from './components/Icon/EligibilityIcon/EligibilityIcon';
import InfoIcon from './components/Icon/InfoIcon/InfoIcon';
import MinusIcon from './components/Icon/MinusIcon/MinusIcon';
import PlusIcon from './components/Icon/PlusIcon/PlusIcon';
import ResizeIcon from './components/Icon/ResizeIcon/ResizeIcon';
import SearchIcon from './components/Icon/SearchIcon/SearchIcon';
import WarningIcon from './components/Icon/WarningIcon/WarningIcon';
<<<<<<<
Badge,
Icon,
CaretIcon,
CheckIcon,
CrossIcon,
EditIcon,
EligibilityIcon,
InfoIcon,
MinusIcon,
PlusIcon,
ResizeIcon,
SearchIcon,
WarningIcon
=======
Switch
>>>>>>>
Switch
Badge,
Icon,
CaretIcon,
CheckIcon,
CrossIcon,
EditIcon,
EligibilityIcon,
InfoIcon,
MinusIcon,
PlusIcon,
ResizeIcon,
SearchIcon,
WarningIcon |
<<<<<<<
console.log('Docgen parsing %s...', file);
var docs = reactDocgen.parse(fs.readFileSync(file), function (ast, recast) {
var definition;
recast.visit(ast, {
visitObjectExpression: function (path) {
_.forEach(path.get('properties').value, function (property) {
if (property.key.name === 'render') {
definition = path;
}
});
return false;
}
});
return definition;
});
=======
var docs = reactDocgen.parse(
fs.readFileSync(file),
// Resolver
function (ast, recast) {
var definition;
recast.visit(ast, {
visitObjectExpression: function (path) {
_.forEach(path.get('properties').value, function (property) {
if (property.key.name === 'render') {
definition = path;
}
});
return false;
}
});
return definition;
},
// Handlers, a series of functions through which the documentation is
// built up.
reactDocgen.defaultHandlers.concat(function (/* documentation, definition */) {
// TODO: determine composition from the `import` statements See
// existing handlers for examples:
// https://github.com/reactjs/react-docgen/blob/dca8ec9d57b4833f7ddb3164bedf4d74578eee1e/src/handlers/propTypeCompositionHandler.js
})
);
>>>>>>>
console.log('Docgen parsing %s...', file);
var docs = reactDocgen.parse(
fs.readFileSync(file),
// Resolver
function (ast, recast) {
var definition;
recast.visit(ast, {
visitObjectExpression: function (path) {
_.forEach(path.get('properties').value, function (property) {
if (property.key.name === 'render') {
definition = path;
}
});
return false;
}
});
return definition;
},
// Handlers, a series of functions through which the documentation is
// built up.
reactDocgen.defaultHandlers.concat(function (/* documentation, definition */) {
// TODO: determine composition from the `import` statements See
// existing handlers for examples:
// https://github.com/reactjs/react-docgen/blob/dca8ec9d57b4833f7ddb3164bedf4d74578eee1e/src/handlers/propTypeCompositionHandler.js
})
); |
<<<<<<<
import Banner from './components/Banner/Banner';
=======
import Badge from './components/Badge/Badge';
>>>>>>>
import Badge from './components/Badge/Badge';
import Banner from './components/Banner/Banner';
<<<<<<<
Banner,
=======
Badge,
>>>>>>>
Badge,
Banner, |
<<<<<<<
import Bars from './components/Bars/Bars';
=======
import Breadcrumb from './components/Breadcrumb/Breadcrumb';
>>>>>>>
import Bars from './components/Bars/Bars';
import Breadcrumb from './components/Breadcrumb/Breadcrumb';
<<<<<<<
import SettingsIcon from './components/Icon/SettingsIcon/SettingsIcon';
import ShoppingCartIcon from './components/Icon/ShoppingCartIcon/ShoppingCartIcon';
=======
import SeparatorIcon from './components/Icon/SeparatorIcon/SeparatorIcon';
import SplitHorizontal from './components/SplitHorizontal/SplitHorizontal';
>>>>>>>
import SeparatorIcon from './components/Icon/SeparatorIcon/SeparatorIcon';
import SettingsIcon from './components/Icon/SettingsIcon/SettingsIcon';
import ShoppingCartIcon from './components/Icon/ShoppingCartIcon/ShoppingCartIcon';
import SplitHorizontal from './components/SplitHorizontal/SplitHorizontal';
<<<<<<<
Bars,
=======
Breadcrumb,
>>>>>>>
Bars,
Breadcrumb,
<<<<<<<
SettingsIcon,
ShoppingCartIcon,
=======
SeparatorIcon,
SingleSelect,
SingleSelectDumb,
>>>>>>>
SeparatorIcon,
SettingsIcon,
ShoppingCartIcon,
Sidebar,
<<<<<<<
SingleSelect,
SingleSelectDumb,
=======
SplitHorizontal,
>>>>>>>
SidebarDumb,
SingleSelect,
SingleSelect,
SingleSelectDumb,
SingleSelectDumb,
SplitHorizontal, |
<<<<<<<
Dialog,
=======
DropMenu,
>>>>>>>
Dialog,
DropMenu, |
<<<<<<<
=======
import { default as TextFieldDumb } from './components/TextField/TextField'
import { default as TextFieldValidatedDumb } from './components/TextFieldValidated/TextFieldValidated';
>>>>>>>
import { default as TextFieldDumb } from './components/TextField/TextField'
import { default as TextFieldValidatedDumb } from './components/TextFieldValidated/TextFieldValidated';
<<<<<<<
=======
const TextField = buildHybridComponent(TextFieldDumb);
const TextFieldValidated = buildHybridComponent(TextFieldValidatedDumb);
>>>>>>>
const TextField = buildHybridComponent(TextFieldDumb);
const TextFieldValidated = buildHybridComponent(TextFieldValidatedDumb);
<<<<<<<
ValidatedTextField,
=======
TextFieldDumb,
TextFieldValidated,
TextFieldValidatedDumb,
>>>>>>>
TextFieldDumb,
TextFieldValidated,
TextFieldValidatedDumb, |
<<<<<<<
event._start = $.fullCalendar.moment(event.start);
event._end = $.fullCalendar.moment(event.end);
calendar.fullCalendar('updateEvent', event);
=======
event._start = jQuery.fullCalendar.moment(event.start);
event._end = jQuery.fullCalendar.moment(event.end);
scope.calendar.fullCalendar('updateEvent', event);
>>>>>>>
event._start = jQuery.fullCalendar.moment(event.start);
event._end = jQuery.fullCalendar.moment(event.end);
calendar.fullCalendar('updateEvent', event); |
<<<<<<<
import rocketGroupTests from './rocket-group/rocket-group-tests';
=======
import rocketNodeAPITests from './rocket-node/rocket-node-api-tests';
import rocketNodeContractTests from './rocket-node/rocket-node-contract-tests';
>>>>>>>
import rocketGroupTests from './rocket-group/rocket-group-tests';
import rocketNodeAPITests from './rocket-node/rocket-node-api-tests';
import rocketNodeContractTests from './rocket-node/rocket-node-contract-tests';
<<<<<<<
rocketGroupTests();
=======
rocketNodeAPITests();
rocketNodeContractTests();
>>>>>>>
rocketGroupTests();
rocketNodeAPITests();
rocketNodeContractTests(); |
<<<<<<<
// Register staking durations
const registerStakingDurations = async function() {
let minipoolSettingsInstance = await contracts.rocketMinipoolSettings.deployed();
for (let duration in stakingDurations) {
// Log it
console.log('\x1b[31m%s\x1b[0m:', ' Register staking duration');
console.log(' '+duration+': '+stakingDurations[duration]);
await minipoolSettingsInstance.addMinipoolStakingDuration(duration, stakingDurations[duration]);
}
}
=======
// Register uniswap contracts
const addUniswap = async function() {
if (network != 'live') {
// Load contract data
const FactoryABI = loadABI('./contracts/contract/uniswap/compiled/factory.abi');
const FactoryBytecode = config.fs.readFileSync('./contracts/contract/uniswap/compiled/factory.bin');
const ExchangeABI = loadABI('./contracts/contract/uniswap/compiled/exchange.abi');
const ExchangeBytecode = config.fs.readFileSync('./contracts/contract/uniswap/compiled/exchange.bin');
// Get RP token contract addresses
let rplAddress = contracts.rocketPoolToken.address;
let rethAddress = contracts.rocketETHToken.address;
// Initialise contracts
let ExchangeContract = new $web3.eth.Contract(ExchangeABI);
let FactoryContract = new $web3.eth.Contract(FactoryABI);
// Deploy contracts
let exchange = await ExchangeContract.deploy({data: ExchangeBytecode}).send({from: accounts[0], gas: 8000000});
let factory = await FactoryContract.deploy({data: FactoryBytecode}).send({from: accounts[0], gas: 8000000});
// Initialise factory
await factory.methods.initializeFactory(exchange.options.address).send({from: accounts[0], gas: 8000000});
// Create token exchanges
await factory.methods.createExchange(rplAddress).send({from: accounts[0], gas: 8000000});
await factory.methods.createExchange(rethAddress).send({from: accounts[0], gas: 8000000});
// Get exchange addresses
let rplExchangeAddress = await factory.methods.getExchange(rplAddress).call();
let rethExchangeAddress = await factory.methods.getExchange(rethAddress).call();
// Log
console.log('\x1b[31m%s\x1b[0m:', ' Uniswap factory address:');
console.log(' ' + factory.options.address);
console.log('\x1b[31m%s\x1b[0m:', ' Uniswap RPL exchange address:');
console.log(' ' + rplExchangeAddress);
console.log('\x1b[31m%s\x1b[0m:', ' Uniswap rETH exchange address:');
console.log(' ' + rethExchangeAddress);
}
};
>>>>>>>
// Register staking durations
const registerStakingDurations = async function() {
let minipoolSettingsInstance = await contracts.rocketMinipoolSettings.deployed();
for (let duration in stakingDurations) {
// Log it
console.log('\x1b[31m%s\x1b[0m:', ' Register staking duration');
console.log(' '+duration+': '+stakingDurations[duration]);
await minipoolSettingsInstance.addMinipoolStakingDuration(duration, stakingDurations[duration]);
}
}
// Register uniswap contracts
const addUniswap = async function() {
if (network != 'live') {
// Load contract data
const FactoryABI = loadABI('./contracts/contract/uniswap/compiled/factory.abi');
const FactoryBytecode = config.fs.readFileSync('./contracts/contract/uniswap/compiled/factory.bin');
const ExchangeABI = loadABI('./contracts/contract/uniswap/compiled/exchange.abi');
const ExchangeBytecode = config.fs.readFileSync('./contracts/contract/uniswap/compiled/exchange.bin');
// Get RP token contract addresses
let rplAddress = contracts.rocketPoolToken.address;
let rethAddress = contracts.rocketETHToken.address;
// Initialise contracts
let ExchangeContract = new $web3.eth.Contract(ExchangeABI);
let FactoryContract = new $web3.eth.Contract(FactoryABI);
// Deploy contracts
let exchange = await ExchangeContract.deploy({data: ExchangeBytecode}).send({from: accounts[0], gas: 8000000});
let factory = await FactoryContract.deploy({data: FactoryBytecode}).send({from: accounts[0], gas: 8000000});
// Initialise factory
await factory.methods.initializeFactory(exchange.options.address).send({from: accounts[0], gas: 8000000});
// Create token exchanges
await factory.methods.createExchange(rplAddress).send({from: accounts[0], gas: 8000000});
await factory.methods.createExchange(rethAddress).send({from: accounts[0], gas: 8000000});
// Get exchange addresses
let rplExchangeAddress = await factory.methods.getExchange(rplAddress).call();
let rethExchangeAddress = await factory.methods.getExchange(rethAddress).call();
// Log
console.log('\x1b[31m%s\x1b[0m:', ' Uniswap factory address:');
console.log(' ' + factory.options.address);
console.log('\x1b[31m%s\x1b[0m:', ' Uniswap RPL exchange address:');
console.log(' ' + rplExchangeAddress);
console.log('\x1b[31m%s\x1b[0m:', ' Uniswap rETH exchange address:');
console.log(' ' + rethExchangeAddress);
}
};
<<<<<<<
console.log('\x1b[34m%s\x1b[0m', ' Register Staking Durations');
console.log('\x1b[34m%s\x1b[0m', ' ******************************************');
await registerStakingDurations();
console.log('\n');
=======
console.log('\x1b[34m%s\x1b[0m', ' Deploy Uniswap contracts');
console.log('\x1b[34m%s\x1b[0m', ' ******************************************');
await addUniswap();
console.log('\n');
>>>>>>>
console.log('\x1b[34m%s\x1b[0m', ' Register Staking Durations');
console.log('\x1b[34m%s\x1b[0m', ' ******************************************');
await registerStakingDurations();
console.log('\x1b[34m%s\x1b[0m', ' Deploy Uniswap contracts');
console.log('\x1b[34m%s\x1b[0m', ' ******************************************');
await addUniswap();
console.log('\n'); |
<<<<<<<
export const RocketUpgrade = artifacts.require('./contract/RocketUpgrade');
/*
export const AddressListStorage = artifacts.require('./contract/AddressListStorage');
export const BoolListStorage = artifacts.require('./contract/BoolListStorage');
export const BytesListStorage = artifacts.require('./contract/BytesListStorage');
export const IntListStorage = artifacts.require('./contract/IntListStorage');
export const StringListStorage = artifacts.require('./contract/StringListStorage');
export const UintListStorage = artifacts.require('./contract/UintListStorage');
*/
=======
export const RocketPIP = artifacts.require('./contract/RocketPIP');
>>>>>>>
export const RocketPIP = artifacts.require('./contract/RocketPIP');
/*
export const AddressListStorage = artifacts.require('./contract/AddressListStorage');
export const BoolListStorage = artifacts.require('./contract/BoolListStorage');
export const BytesListStorage = artifacts.require('./contract/BytesListStorage');
export const IntListStorage = artifacts.require('./contract/IntListStorage');
export const StringListStorage = artifacts.require('./contract/StringListStorage');
export const UintListStorage = artifacts.require('./contract/UintListStorage');
*/ |
<<<<<<<
if (isDragging) {return;}
=======
>>>>>>>
if (isDragging) {return;}
<<<<<<<
/*
for (var i = 0; i < word.parentsL.length; i++) {
var p = word.parentsL[i];
for (var l = 0; l < p.lines.length; l++) {
p.lines[l].stroke( {color: "#00ff00"} );
}
}
for (var i = 0; i < word.parentsR.length; i++) {
var p = word.parentsR[i];
for (var l = 0; l < p.lines.length; l++) {
p.lines[l].stroke( {color: "#00ff00"} );
}
}
*/
=======
>>>>>>>
<<<<<<<
leftHandle.draggable(function(x, y) {
=======
leftHandle.draggable(function(x, y) {
rowOffsetWord = word;
>>>>>>>
leftHandle.draggable(function(x, y) {
rowOffsetWord = word; |
<<<<<<<
nEl.style.margin = '0px';
nEl.style.padding = '0px';
nEl.style.border = '0px none';
=======
nEl.style.border = 'none';
nEl.setAttribute('SCROLLING','NO');
>>>>>>>
nEl.style.margin = '0px';
nEl.style.padding = '0px';
nEl.style.border = 'none';
nEl.setAttribute('SCROLLING','NO'); |
<<<<<<<
inverted: (opts.inverted || opts.invertMouse) ? true : false,
=======
animating: false,
inverted: (opts.inverted || opts.invertMouse) ? true : false,
>>>>>>>
animating: false,
inverted: (opts.inverted || opts.invertMouse) ? true : false,
<<<<<<<
canvasWidth < this.state.originalsize.width) {
var newWidth = containerWidth;
var newHeight = containerWidth / aspectRatio;
=======
canvasWidth < this.state.originalSize.width) {
newWidth = containerWidth;
newHeight = containerWidth / aspectRatio;
>>>>>>>
canvasWidth < this.state.originalsize.width) {
newWidth = containerWidth;
newHeight = containerWidth / aspectRatio;
<<<<<<<
canvasHeight < this.state.originalsize.height)) {
var newHeight = containerHeight;
var newWidth = containerHeight * aspectRatio;
=======
canvasHeight < this.state.originalSize.height)) {
newHeight = containerHeight;
newWidth = containerHeight * aspectRatio;
>>>>>>>
canvasHeight < this.state.originalsize.height)) {
newHeight = containerHeight;
newWidth = containerHeight * aspectRatio;
<<<<<<<
if (this.state.inverted) {
this.state.lon -= x;
this.state.lat += y;
} else {
this.state.lon += x;
this.state.lat -= y;
}
=======
if (PROJECTION_LITTLE_PLANET != this.state.projection) {
this.state.cache.lat = this.state.lat;
this.state.cache.lon = this.state.lon;
}
if (this.state.inverted) {
this.state.lon -= x;
this.state.lat += y;
} else {
this.state.lon += x;
this.state.lat -= y;
}
>>>>>>>
if (this.state.inverted) {
this.state.lon -= x;
this.state.lat += y;
} else {
this.state.lon += x;
this.state.lat -= y;
}
if (PROJECTION_LITTLE_PLANET != this.state.projection) {
this.state.cache.lat = this.state.lat;
this.state.cache.lon = this.state.lon;
} |
<<<<<<<
$log.log(chalk.green(`Copied ${public.length} public files.`));
return public;
=======
console.log(chalk.green(`Copied ${publicFiles.length} public files.`));
return publicFiles;
>>>>>>>
$log.log(chalk.green(`Copied ${publicFiles.length} public files.`));
return publicFiles;
<<<<<<<
if (err) throw err;
$log.log(`file ${root}${path.sep}sass${path.sep}${item.name} written`);
=======
if (err) {throw err;}
console.log(`file ${root}${path.sep}sass${path.sep}${item.name} written`);
>>>>>>>
if (err) {throw err;}
$log.log(`file ${root}${path.sep}sass${path.sep}${item.name} written`);
<<<<<<<
if (err) throw err;
$log.log(`file ${root}${path.sep}stylus${path.sep}${item.name} written`);
=======
if (err) {throw err;}
console.log(`file ${root}${path.sep}stylus${path.sep}${item.name} written`);
>>>>>>>
if (err) {throw err;}
$log.log(`file ${root}${path.sep}stylus${path.sep}${item.name} written`);
<<<<<<<
fse.writeFile(`${destination}`, page.content, (err) => {
if (err) throw err;
$log.log(`file ${destination} written`);
});
=======
var writeFile = $q.nfbind(fse.writeFile);
promiseArray.push(writeFile(`${destination}`, page.content)
.then((result) => {
console.log(`file ${destination} written`);
})
.catch(error => console.log(error)));
>>>>>>>
var writeFile = $q.nfbind(fse.writeFile);
promiseArray.push(writeFile(`${destination}`, page.content)
.then((result) => {
$log.log(`file ${destination} written`);
})
.catch(error => $log.error(error))); |
<<<<<<<
test('Badge#stats', function (t) {
Badge.stats(function(err, data) {
t.notOk(err, "shouldn't have errors");
t.equal(data.totalBadges, 2, "count of badges");
t.equal(data.totalPerIssuer.length, 2, "count of issuers");
})
t.end();
})
=======
test('Badge.confirmRecipient: new assertions should fail at the moment', function (t) {
const assertion = { recipient: { identity: "[email protected]" } };
const expect = false;
var value;
try { value = Badge.confirmRecipient(assertion, 'whatever') }
catch (e) { t.fail('should not have thrown') }
t.same(value, expect, 'got expected value');
t.end();
});
>>>>>>>
test('Badge#stats', function (t) {
Badge.stats(function(err, data) {
t.notOk(err, "shouldn't have errors");
t.equal(data.totalBadges, 2, "count of badges");
t.equal(data.totalPerIssuer.length, 2, "count of issuers");
})
t.end();
})
test('Badge.confirmRecipient: new assertions should fail at the moment', function (t) {
const assertion = { recipient: { identity: "[email protected]" } };
const expect = false;
var value;
try { value = Badge.confirmRecipient(assertion, 'whatever') }
catch (e) { t.fail('should not have thrown') }
t.same(value, expect, 'got expected value');
t.end();
}); |
<<<<<<<
resolve: {
alias: {
// makes handlerbars globally accessible to backbone
handlebars: 'handlebars/dist/handlebars.min.js',
jquery: path.join(__dirname, 'node_modules/jquery/dist/jquery'),
}
},
// TODO
// plugins: {}
}
=======
plugins: [
new webpack.DefinePlugin({
// Swaps out checks for NODE_ENV with the env. This is used by various
// libs to enable dev-only features. These checks then become something
// like `if ('production' == 'production')`. Minification will then strip
// the dev-only code from the bundle
'process.env': {
NODE_ENV: JSON.stringify(webpackENV)
},
})
]
}
>>>>>>>
resolve: {
alias: {
// makes handlerbars globally accessible to backbone
handlebars: 'handlebars/dist/handlebars.min.js',
jquery: path.join(__dirname, 'node_modules/jquery/dist/jquery'),
}
},
plugins: [
new webpack.DefinePlugin({
// Swaps out checks for NODE_ENV with the env. This is used by various
// libs to enable dev-only features. These checks then become something
// like `if ('production' == 'production')`. Minification will then strip
// the dev-only code from the bundle
'process.env': {
NODE_ENV: JSON.stringify(webpackENV)
},
})
]
} |
<<<<<<<
// old Firefox use predefined numeric enum.
(goog.global.hasOwnProperty('IDBRequest') &&
=======
// old Firefox uses a predefined numeric enum.
(goog.global.IDBRequest &&
>>>>>>>
// old Firefox uses a predefined numeric enum.
(goog.global.hasOwnProperty('IDBRequest') &&
<<<<<<<
// old chrome use predefined enum, it can be string or numeric. ?
(goog.global.hasOwnProperty('webkitIDBRequest') &&
=======
// old chrome uses a predefined enum, it can be string or numeric. ?
(goog.global.webkitIDBRequest &&
>>>>>>>
// old chrome uses a predefined enum, it can be string or numeric. ?
(goog.global.hasOwnProperty('webkitIDBRequest') && |
<<<<<<<
import vsPagination from './vsPagination'
=======
import vsList from './vsList'
import vsAvatar from './vsAvatar'
>>>>>>>
import vsList from './vsList'
import vsAvatar from './vsAvatar'
import vsPagination from './vsPagination'
<<<<<<<
vsPagination,
=======
vsAvatar,
>>>>>>>
vsAvatar,
vsPagination, |
<<<<<<<
// TODO: Need a new OAUTH2 authorize command for FusionTables
=======
RS.registerCommand(module, "load-language", Packages.com.google.refine.extension.gdata.commands.LoadLanguageCommand());
>>>>>>>
// TODO: Need a new OAUTH2 authorize command for FusionTables
RS.registerCommand(module, "load-language", Packages.com.google.refine.extension.gdata.commands.LoadLanguageCommand()); |
<<<<<<<
}, TypeError);
// attempt to overflow buffers, similar to previous bug in array buffers
assert.throws(function() {
var buf = new Buffer(8);
buf.readFloatLE(0xffffffff);
}, /Trying to access beyond buffer length/);
assert.throws(function() {
var buf = new Buffer(8);
buf.writeFloatLE(0.0, 0xffffffff);
}, /Trying to access beyond buffer length/);
assert.throws(function() {
var buf = new SlowBuffer(8);
buf.readFloatLE(0xffffffff);
}, /Trying to read beyond buffer length/);
assert.throws(function() {
var buf = new SlowBuffer(8);
buf.writeFloatLE(0.0, 0xffffffff);
}, /Trying to write beyond buffer length/);
// ensure negative values can't get past offset
assert.throws(function() {
var buf = new Buffer(8);
buf.readFloatLE(-1);
}, /offset is not uint/);
assert.throws(function() {
var buf = new Buffer(8);
buf.writeFloatLE(0.0, -1);
}, /offset is not uint/);
assert.throws(function() {
var buf = new SlowBuffer(8);
buf.readFloatLE(-1);
}, /offset is not uint/);
assert.throws(function() {
var buf = new SlowBuffer(8);
buf.writeFloatLE(0.0, -1);
}, /offset is not uint/);
=======
}, TypeError);
// SlowBuffer sanity checks.
assert.throws(function() {
var len = 0xfffff;
var sbuf = new SlowBuffer(len);
var buf = new Buffer(sbuf, len, 0);
SlowBuffer.makeFastBuffer(sbuf, buf, -len, len); // Should throw.
for (var i = 0; i < len; ++i) buf[i] = 0x42; // Try to force segfault.
}, RangeError);
assert.throws(function() {
var len = 0xfffff;
var sbuf = new SlowBuffer(len);
var buf = new Buffer(sbuf, len, -len); // Should throw.
for (var i = 0; i < len; ++i) buf[i] = 0x42; // Try to force segfault.
}, RangeError);
assert.throws(function() {
var len = 0xfffff;
var sbuf = new SlowBuffer(len);
sbuf = sbuf.slice(-len); // Should throw.
for (var i = 0; i < len; ++i) sbuf[i] = 0x42; // Try to force segfault.
}, RangeError);
assert.throws(function() {
var sbuf = new SlowBuffer(1);
var buf = new Buffer(sbuf, 1, 0);
buf.length = 0xffffffff;
buf.slice(0xffffff0, 0xffffffe); // Should throw.
}, Error);
assert.throws(function() {
var sbuf = new SlowBuffer(8);
var buf = new Buffer(sbuf, 8, 0);
buf.slice(-8); // Should throw. Throws Error instead of RangeError
// for the sake of v0.8 compatibility.
}, Error);
assert.throws(function() {
var sbuf = new SlowBuffer(16);
var buf = new Buffer(sbuf, 8, 8);
buf.slice(-8); // Should throw. Throws Error instead of RangeError
// for the sake of v0.8 compatibility.
}, Error);
>>>>>>>
}, TypeError);
// attempt to overflow buffers, similar to previous bug in array buffers
assert.throws(function() {
var buf = new Buffer(8);
buf.readFloatLE(0xffffffff);
}, /Trying to access beyond buffer length/);
assert.throws(function() {
var buf = new Buffer(8);
buf.writeFloatLE(0.0, 0xffffffff);
}, /Trying to access beyond buffer length/);
assert.throws(function() {
var buf = new SlowBuffer(8);
buf.readFloatLE(0xffffffff);
}, /Trying to read beyond buffer length/);
assert.throws(function() {
var buf = new SlowBuffer(8);
buf.writeFloatLE(0.0, 0xffffffff);
}, /Trying to write beyond buffer length/);
// ensure negative values can't get past offset
assert.throws(function() {
var buf = new Buffer(8);
buf.readFloatLE(-1);
}, /offset is not uint/);
assert.throws(function() {
var buf = new Buffer(8);
buf.writeFloatLE(0.0, -1);
}, /offset is not uint/);
assert.throws(function() {
var buf = new SlowBuffer(8);
buf.readFloatLE(-1);
}, /offset is not uint/);
assert.throws(function() {
var buf = new SlowBuffer(8);
buf.writeFloatLE(0.0, -1);
}, /offset is not uint/);
// SlowBuffer sanity checks.
assert.throws(function() {
var len = 0xfffff;
var sbuf = new SlowBuffer(len);
var buf = new Buffer(sbuf, len, 0);
SlowBuffer.makeFastBuffer(sbuf, buf, -len, len); // Should throw.
for (var i = 0; i < len; ++i) buf[i] = 0x42; // Try to force segfault.
}, RangeError);
assert.throws(function() {
var len = 0xfffff;
var sbuf = new SlowBuffer(len);
var buf = new Buffer(sbuf, len, -len); // Should throw.
for (var i = 0; i < len; ++i) buf[i] = 0x42; // Try to force segfault.
}, RangeError);
assert.throws(function() {
var len = 0xfffff;
var sbuf = new SlowBuffer(len);
sbuf = sbuf.slice(-len); // Should throw.
for (var i = 0; i < len; ++i) sbuf[i] = 0x42; // Try to force segfault.
}, RangeError);
assert.throws(function() {
var sbuf = new SlowBuffer(1);
var buf = new Buffer(sbuf, 1, 0);
buf.length = 0xffffffff;
buf.slice(0xffffff0, 0xffffffe); // Should throw.
}, Error);
assert.throws(function() {
var sbuf = new SlowBuffer(8);
var buf = new Buffer(sbuf, 8, 0);
buf.slice(-8); // Should throw. Throws Error instead of RangeError
// for the sake of v0.8 compatibility.
}, Error);
assert.throws(function() {
var sbuf = new SlowBuffer(16);
var buf = new Buffer(sbuf, 8, 8);
buf.slice(-8); // Should throw. Throws Error instead of RangeError
// for the sake of v0.8 compatibility.
}, Error); |
<<<<<<<
assert.equal(0xe6, b[19]);
// Test custom decode
function demoDecode(str) {
return str + str;
}
assert.deepEqual(
qs.parse('a=a&b=b&c=c', null, null, { decodeURIComponent: demoDecode }),
{ aa: 'aa', bb: 'bb', cc: 'cc' });
// Test custom encode
function demoEncode(str) {
return str[0];
}
var obj = { aa: 'aa', bb: 'bb', cc: 'cc' };
assert.equal(
qs.stringify(obj, null, null, { encodeURIComponent: demoEncode }),
'a=a&b=b&c=c');
=======
assert.equal(0xe6, b[19]);
// test overriding .unescape
var prevUnescape = qs.unescape;
qs.unescape = function (str) {
return str.replace(/o/g, '_');
};
assert.deepEqual(qs.parse('foo=bor'), {f__: 'b_r'});
qs.unescape = prevUnescape;
>>>>>>>
assert.equal(0xe6, b[19]);
// Test custom decode
function demoDecode(str) {
return str + str;
}
assert.deepEqual(
qs.parse('a=a&b=b&c=c', null, null, { decodeURIComponent: demoDecode }),
{ aa: 'aa', bb: 'bb', cc: 'cc' });
// Test custom encode
function demoEncode(str) {
return str[0];
}
var obj = { aa: 'aa', bb: 'bb', cc: 'cc' };
assert.equal(
qs.stringify(obj, null, null, { encodeURIComponent: demoEncode }),
'a=a&b=b&c=c');
// test overriding .unescape
var prevUnescape = qs.unescape;
qs.unescape = function (str) {
return str.replace(/o/g, '_');
};
assert.deepEqual(qs.parse('foo=bor'), {f__: 'b_r'});
qs.unescape = prevUnescape; |
<<<<<<<
var crypto= require("crypto");
=======
var dns = require('dns');
>>>>>>>
var crypto= require("crypto");
var dns = require('dns');
<<<<<<<
if (this.forceClose) this.forceClose(e);
=======
self.destroy(e);
>>>>>>>
if (this.forceClose) this.forceClose(e);
self.destroy(e);
<<<<<<<
if (self.secure && bytesRead == 0 && secureBytesRead > 0){
// Deal with SSL handshake
if (self.server) {
self._checkForSecureHandshake();
} else {
if (self.secureEstablised) {
self.flush();
} else {
self._checkForSecureHandshake();
}
}
} else if (bytesRead === 0) {
=======
if (bytesRead === 0) {
// EOF
>>>>>>>
if (self.secure && bytesRead == 0 && secureBytesRead > 0){
// Deal with SSL handshake
if (self.server) {
self._checkForSecureHandshake();
} else {
if (self.secureEstablised) {
self.flush();
} else {
self._checkForSecureHandshake();
}
}
} else if (bytesRead === 0) {
<<<<<<<
if (!this.writable) {
if (this.secure) return false;
else throw new Error('Stream is not writable');
}
=======
if (!this.writable) throw new Error('Stream is not writable');
if (data.length == 0) return true;
>>>>>>>
if (!this.writable) {
if (this.secure) return false;
else throw new Error('Stream is not writable');
}
if (data.length == 0) return true; |
<<<<<<<
(util.isFunction(list.listener) && list.listener === listener)) {
this._events[type] = undefined;
=======
(typeof list.listener === 'function' && list.listener === listener)) {
delete this._events[type];
>>>>>>>
(util.isFunction(list.listener) && list.listener === listener)) {
delete this._events[type]; |
<<<<<<<
assert.ok(os.hostname().length > 0);
assert.ok(os.loadavg().length > 0);
assert.ok(os.uptime() > 0);
assert.ok(os.freemem() > 0);
assert.ok(os.totalmem() > 0);
assert.ok(os.cpus().length > 0);
assert.ok(os.type().length > 0);
assert.ok(os.release().length > 0);
var interfaces = os.getNetworkInterfaces();
console.error(interfaces);
switch (process.platform) {
case 'linux':
assert.equal('127.0.0.1', interfaces.lo.ip);
break;
}
=======
var hostname = os.hostname()
console.log("hostname = %s", hostname);
assert.ok(hostname.length > 0);
var uptime = os.uptime();
console.log("uptime = %d", uptime);
assert.ok(uptime > 0);
var cpus = os.cpus();
console.log("cpus = ", cpus);
assert.ok(cpus.length > 0);
var type = os.type();
console.log("type = ", type);
assert.ok(type.length > 0);
var release = os.release();
console.log("release = ", release);
assert.ok(release.length > 0);
if (process.platform != 'sunos') {
// not implemeneted yet
assert.ok(os.loadavg().length > 0);
assert.ok(os.freemem() > 0);
assert.ok(os.totalmem() > 0);
}
>>>>>>>
var hostname = os.hostname()
console.log("hostname = %s", hostname);
assert.ok(hostname.length > 0);
var uptime = os.uptime();
console.log("uptime = %d", uptime);
assert.ok(uptime > 0);
var cpus = os.cpus();
console.log("cpus = ", cpus);
assert.ok(cpus.length > 0);
var type = os.type();
console.log("type = ", type);
assert.ok(type.length > 0);
var release = os.release();
console.log("release = ", release);
assert.ok(release.length > 0);
if (process.platform != 'sunos') {
// not implemeneted yet
assert.ok(os.loadavg().length > 0);
assert.ok(os.freemem() > 0);
assert.ok(os.totalmem() > 0);
}
var interfaces = os.getNetworkInterfaces();
console.error(interfaces);
switch (process.platform) {
case 'linux':
assert.equal('127.0.0.1', interfaces.lo.ip);
break;
} |
<<<<<<<
var index = stack.lastIndexOf(this);
if (index !== -1)
stack.splice(index);
else
stack.length = 0;
_domain_flag[0] = stack.length;
=======
stack.splice(index);
>>>>>>>
stack.splice(index);
_domain_flag[0] = stack.length; |
<<<<<<<
EventEmitter.prototype.setMaxListeners = function(n) {
if (!util.isNumber(n) || n < 0 || isNaN(n))
=======
var defaultMaxListeners = 10;
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
if (typeof n !== 'number' || n < 0 || isNaN(n))
>>>>>>>
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
if (!util.isNumber(n) || n < 0 || isNaN(n))
<<<<<<<
EventEmitter.prototype.once = function(type, listener) {
if (!util.isFunction(listener))
=======
EventEmitter.prototype.once = function once(type, listener) {
if (typeof listener !== 'function')
>>>>>>>
EventEmitter.prototype.once = function once(type, listener) {
if (!util.isFunction(listener)) |
<<<<<<<
data = hot.getData().map(function(d) { return d.join(",") }).join("\r\n")
$('#right-panel').removeClass("hidden")
$('#message-panel').html("<div class=\"validation-load\"><p><span class=\"glyphicon glyphicon-refresh spinning\"></span></p><p>Loading validation results...</p></div>");
=======
data = $.csv.fromArrays(hot.getData());
>>>>>>>
data = $.csv.fromArrays(hot.getData());
$('#right-panel').removeClass("hidden")
$('#message-panel').html("<div class=\"validation-load\"><p><span class=\"glyphicon glyphicon-refresh spinning\"></span></p><p>Loading validation results...</p></div>"); |
<<<<<<<
}
function importExcel() {
Dialog.showOpenDialog({ filters: [
{ name: 'text', extensions: ['xlsx', 'xls'] }
]}, function (fileNames) {
if (fileNames === undefined) return;
var fileName = fileNames[0];
var workbook = XLSX.readFile(fileName);
var first_sheet_name = workbook.SheetNames[0];
var worksheet = workbook.Sheets[first_sheet_name];
popup = new BrowserWindow({width: 300, height: 150, 'always-on-top': true});
popup.loadUrl('file://' + __dirname + '/select_worksheet.html');
popup.webContents.on('did-finish-load', function() {
popup.webContents.send('loadSheets', workbook.SheetNames);
ipc.on('worksheetSelected', function(e, sheet_name) {
data = XLSX.utils.sheet_to_csv(workbook.Sheets[sheet_name]);
popup.close();
createWindow(data);
});
ipc.on('worksheetCanceled', function() {
popup.close();
});
});
popup.on('closed', function() {
popup = null;
});
});
=======
}
function validateFile() {
window = BrowserWindow.getFocusedWindow();
window.webContents.send('validate');
>>>>>>>
}
function importExcel() {
Dialog.showOpenDialog({ filters: [
{ name: 'text', extensions: ['xlsx', 'xls'] }
]}, function (fileNames) {
if (fileNames === undefined) return;
var fileName = fileNames[0];
var workbook = XLSX.readFile(fileName);
var first_sheet_name = workbook.SheetNames[0];
var worksheet = workbook.Sheets[first_sheet_name];
popup = new BrowserWindow({width: 300, height: 150, 'always-on-top': true});
popup.loadUrl('file://' + __dirname + '/select_worksheet.html');
popup.webContents.on('did-finish-load', function() {
popup.webContents.send('loadSheets', workbook.SheetNames);
ipc.on('worksheetSelected', function(e, sheet_name) {
data = XLSX.utils.sheet_to_csv(workbook.Sheets[sheet_name]);
popup.close();
createWindow(data);
});
ipc.on('worksheetCanceled', function() {
popup.close();
});
});
popup.on('closed', function() {
popup = null;
});
});
function validateFile() {
window = BrowserWindow.getFocusedWindow();
window.webContents.send('validate'); |
<<<<<<<
}
function importExcel() {
Dialog.showOpenDialog({ filters: [
{ name: 'text', extensions: ['xlsx', 'xls'] }
]}, function (fileNames) {
if (fileNames === undefined) return;
var fileName = fileNames[0];
var workbook = XLSX.readFile(fileName);
var first_sheet_name = workbook.SheetNames[0];
var worksheet = workbook.Sheets[first_sheet_name];
popup = new BrowserWindow({width: 300, height: 150, 'always-on-top': true});
popup.loadUrl('file://' + __dirname + '/select_worksheet.html');
popup.webContents.on('did-finish-load', function() {
popup.webContents.send('loadSheets', workbook.SheetNames);
ipc.on('worksheetSelected', function(e, sheet_name) {
data = XLSX.utils.sheet_to_csv(workbook.Sheets[sheet_name]);
popup.close();
createWindow(data);
});
ipc.on('worksheetCanceled', function() {
popup.close();
});
});
popup.on('closed', function() {
popup = null;
});
});
=======
}
function validateFile() {
window = BrowserWindow.getFocusedWindow();
window.webContents.send('validate');
>>>>>>>
}
function importExcel() {
Dialog.showOpenDialog({ filters: [
{ name: 'text', extensions: ['xlsx', 'xls'] }
]}, function (fileNames) {
if (fileNames === undefined) return;
var fileName = fileNames[0];
var workbook = XLSX.readFile(fileName);
var first_sheet_name = workbook.SheetNames[0];
var worksheet = workbook.Sheets[first_sheet_name];
popup = new BrowserWindow({width: 300, height: 150, 'always-on-top': true});
popup.loadUrl('file://' + __dirname + '/select_worksheet.html');
popup.webContents.on('did-finish-load', function() {
popup.webContents.send('loadSheets', workbook.SheetNames);
ipc.on('worksheetSelected', function(e, sheet_name) {
data = XLSX.utils.sheet_to_csv(workbook.Sheets[sheet_name]);
popup.close();
createWindow(data);
});
ipc.on('worksheetCanceled', function() {
popup.close();
});
});
popup.on('closed', function() {
popup = null;
});
});
function validateFile() {
window = BrowserWindow.getFocusedWindow();
window.webContents.send('validate'); |
<<<<<<<
import modularScale from './helpers/modularScale'
=======
import rem from './helpers/rem'
>>>>>>>
import modularScale from './helpers/modularScale'
import rem from './helpers/rem' |
<<<<<<<
rem,
=======
placeholder,
>>>>>>>
placeholder,
rem,
<<<<<<<
rem,
=======
placeholder,
>>>>>>>
placeholder,
rem, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.