code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
module.exports = function(options) {
return new OAuthServer(options);
}; | Base | 1 |
function openChannel(self, type, opts, cb) {
// ask the client to open a channel for some purpose
// (e.g. a forwarded TCP connection)
var localChan = nextChannel(self);
var initWindow = Channel.MAX_WINDOW;
var maxPacket = Channel.PACKET_SIZE;
var ret = true;
if (localChan === false)
return cb(new Error('No free channels available'));
if (typeof opts === 'function') {
cb = opts;
opts = {};
}
self._channels[localChan] = true;
var sshstream = self._sshstream;
sshstream.once('CHANNEL_OPEN_CONFIRMATION:' + localChan, function(info) {
sshstream.removeAllListeners('CHANNEL_OPEN_FAILURE:' + localChan);
var chaninfo = {
type: type,
incoming: {
id: localChan,
window: initWindow,
packetSize: maxPacket,
state: 'open'
},
outgoing: {
id: info.sender,
window: info.window,
packetSize: info.packetSize,
state: 'open'
}
};
cb(undefined, new Channel(chaninfo, self, { server: true }));
}).once('CHANNEL_OPEN_FAILURE:' + localChan, function(info) {
sshstream.removeAllListeners('CHANNEL_OPEN_CONFIRMATION:' + localChan);
delete self._channels[localChan];
var err = new Error('(SSH) Channel open failure: ' + info.description);
err.reason = info.reason;
err.lang = info.lang;
cb(err);
});
if (type === 'forwarded-tcpip')
ret = sshstream.forwardedTcpip(localChan, initWindow, maxPacket, opts);
else if (type === 'x11')
ret = sshstream.x11(localChan, initWindow, maxPacket, opts);
else if (type === '[email protected]') {
ret = sshstream.openssh_forwardedStreamLocal(localChan,
initWindow,
maxPacket,
opts);
}
return ret;
} | Base | 1 |
$scope.refresh = function(requisition) {
RequisitionsService.startTiming();
RequisitionsService.updateDeployedStatsForRequisition(requisition).then(
function() { // success
growl.success('The deployed statistics for ' + requisition.foreignSource + ' has been updated.');
},
$scope.errorHandler
);
}; | Base | 1 |
function(ql) {
var mimes = ['image/jpeg', 'image/png', 'image/gif', 'image/svg+xml'],
preview = ql.preview;
// what kind of images we can display
$.each(navigator.mimeTypes, function(i, o) {
var mime = o.type;
if (mime.indexOf('image/') === 0 && $.inArray(mime, mimes)) {
mimes.push(mime);
}
});
preview.bind('update', function(e) {
var file = e.file,
img;
if ($.inArray(file.mime, mimes) !== -1) {
// this is our file - stop event propagation
e.stopImmediatePropagation();
img = $('<img/>')
.hide()
.appendTo(preview)
.load(function() {
// timeout - because of strange safari bug -
// sometimes cant get image height 0_o
setTimeout(function() {
var prop = (img.width()/img.height()).toFixed(2);
preview.bind('changesize', function() {
var pw = parseInt(preview.width()),
ph = parseInt(preview.height()),
w, h;
if (prop < (pw/ph).toFixed(2)) {
h = ph;
w = Math.floor(h * prop);
} else {
w = pw;
h = Math.floor(w/prop);
}
img.width(w).height(h).css('margin-top', h < ph ? Math.floor((ph - h)/2) : 0);
})
.trigger('changesize');
// hide info/icon
ql.hideinfo();
//show image
img.fadeIn(100);
}, 1)
})
.attr('src', ql.fm.openUrl(file.hash));
}
});
}, | Base | 1 |
S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});Za.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Pa);this.graph.mathEnabled&&this.addMathCss(Pa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Pa,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Pa))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Pa,L),this.loadFonts(z)}catch(M){null!= | Base | 1 |
"25px";btn.className="geColorBtn";return btn}function Y(Aa,ta,ka,oa,sa,ya,wa){if(0<sa){var ua=Array(sa);ta=null!=ta?ta.split(","):[];for(var xa=0;xa<sa;xa++)ua[xa]=null!=ta[xa]?ta[xa]:null!=oa?oa:"";aa.push({name:Aa,values:ua,type:ka,defVal:oa,parentRow:ya,flipBkg:wa,size:sa})}return document.createElement("div")}function ba(Aa,ta,ka){var oa=document.createElement("input");oa.type="checkbox";oa.checked="1"==ta;mxEvent.addListener(oa,"change",function(){T(Aa,oa.checked?"1":"0",ka)});return oa}function ea(Aa, | Class | 2 |
K&&(K=b.shapeForegroundColor);return K};this.createStyle=function(K){var F=";fillColor=none;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+K+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var K=[],F=0;F<v.length;F++)null!=v[F]&&K.push([v[F].x,v[F].y]);K=PerfectFreehand.getStroke(K,I);v=[];for(F=0;F<K.length;F++)v.push({x:K[F][0],y:K[F][1]});v.push(null)}K=v[0].x;var H=v[0].x,S=v[0].y,V=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(K=Math.max(K,v[F].x),H=Math.min(H,v[F].x),S=Math.max(S, | Class | 2 |
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))}; | Base | 1 |
mxClient.IS_IOS?(M.style.padding="0px 10px 20px 10px",M.style.top="6px"):mxClient.IS_FF&&(n.style.paddingTop="0px",n.style.marginTop="-2px");if(null!=A)for(m=0;m<A.length;m++)mxUtils.br(n),mxUtils.write(n,A[m]);if(null!=x&&null==b[x]){y.style.visibility="hidden";mxUtils.setOpacity(n,10);var K=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});K.spin(M);var B=window.setTimeout(function(){null==
b[x]&&(K.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(F,G){null!=b[x]&&G.getProperty("client")==b[x]&&(window.clearTimeout(B),mxUtils.setOpacity(n,100),y.style.visibility="",K.stop(),L(),"drive"==x&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else L();e.appendChild(M)}l=null!=l?l:2;var u=document.createElement("div");u.style.textAlign="center";u.style.whiteSpace="nowrap";u.style.paddingTop="0px";u.style.paddingBottom="20px";var t=document.createElement("div"); | Class | 2 |
function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,E,J){var T=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(T/u,T/E))};Editor.prototype.exportToCanvas=function(u,E,J,T,N,Q,R,Y,ba,ea,Z,fa,aa,va,ja,Ba,Ha,ra){try{Q=null!=Q?Q:!0;R=null!=R?R:!0;fa=null!=fa?fa:this.graph;aa=null!=aa?aa:0;var Ca=ba?null:fa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ba&&(Ca=Ba?this.graph.defaultPageBackgroundColor:"#ffffff"); | Base | 1 |
"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ra);mxUtils.extend(ab,mxRectangleShape);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.isHtmlAllowed=function(){return!1};ab.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",ab); | Class | 2 |
var T=document.createElement("tbody"),N=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(R){var Y=new Date(R.modifiedDate),ba=null;if(0<=Y.getTime()){var ea=function(fa){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(fa),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var ja=function(Ha){null!=Ha&&(Ha=Ba(Editor.parseDiagramNode(Ha)));return Ha},Ba=function(Ha){var ra=Ha.getAttribute("background"); | Class | 2 |
"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(E))});this.editor.graph.mathEnabled&&this.editor.addMathCss(F);var J=mxUtils.bind(this,function(E){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(E,N,this.thumbImageCache)):N(E)});n?this.embedFonts(F,J):(this.editor.addFontCss(F),J(F))}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(c,e,g,k,m,q,v){return this.addCheckbox(c,g,k,m,q,v,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,k,m,q,v,
x){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();A.id=v;null!=x&&A.setAttribute("name",x);g&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);k&&A.setAttribute("disabled","disabled");q&&(c.appendChild(A),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return A};EditorUi.prototype.addEditButton=function(c, | Base | 1 |
mxResources.get("ok"),aa,ha,function(ra){var ia=null!=ra&&0<ra.length;return ia&&x?(aa(ra),!1):ia},null,null,null,la,v?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function C(ha){Ga.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";m&&(Ka.style.display=ha);for(var qa=O.querySelectorAll(".geTempDlgLinkToDiagram"),aa=0;aa<qa.length;aa++)qa[aa].style.display=ha}function A(ha,qa,aa,ca,na){na||(da.innerHTML="",K(),T=ha,X=ca);var la=null;if(aa){la=document.createElement("table"); | Base | 1 |
Runnable.prototype.slow = function(ms){
if (0 === arguments.length) return this._slow;
if ('string' == typeof ms) ms = milliseconds(ms);
debug('timeout %d', ms);
this._slow = ms;
return this;
}; | Base | 1 |
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
var inspected = {},
seekingTransport = ( structure === transports );
function inspect( dataType ) {
var selected;
inspected[ dataType ] = true;
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
options.dataTypes.unshift( dataTypeOrTransport );
inspect( dataTypeOrTransport );
return false;
} else if ( seekingTransport ) {
return !( selected = dataTypeOrTransport );
}
});
return selected;
}
return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
} | Base | 1 |
l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ta);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Ea, | Class | 2 |
success:function(d,e,f){var l=a(this);a(".popup").dialog("destroy").remove();b.children("span").removeClass("fc_page_loader");!0===d.success?(return_success(f.process,d.message),l.slideUp(300,function(){l.remove()})):return_error(f.process,d.message)},error:function(b,c,d){a(".popup").dialog("destroy").remove();alert(c+": "+d)}})}});b.find(".fc_page_tree_options_open").add("#fc_add_page button:reset").on("click",function(b){b.preventDefault();var c=a(this);b=a("#fc_add_page");a(".page_tree_open_options").removeClass("page_tree_open_options"); | Base | 1 |
function initHtmlTabs() {
// jQuery UI initializations
initSideNav();
if (!main.tabsInited) {
main.tabsInited = true;
initHtmlButtons();
$('#events_threshold').on('click', function () {
main.socket.emit('eventsThreshold', false);
});
} else {
var $menu = $adminSideMenu;
var panelSelector = $menu.data('problem-link');
if (panelSelector) {
var $panel = $(panelSelector);
// Init source for iframe
if ($panel.length) {
var link = $panel.data('src');
if (link && link.indexOf('%') === -1) {
var $iframe = $panel.find('iframe');
if ($iframe.length && !$iframe.attr('src')) {
$iframe.attr('src', link);
$menu.data('problem-link', null);
}
}
}
}
// show current tab
main.currentHash = null;
main.navigateDo();
}
} | Base | 1 |
wp.updates.decrementCount = function( upgradeType ) {
var count,
pluginCount,
$adminBarUpdateCount = $( '#wp-admin-bar-updates .ab-label' ),
$dashboardNavMenuUpdateCount = $( 'a[href="update-core.php"] .update-plugins' ),
$pluginsMenuItem = $( '#menu-plugins' );
count = $adminBarUpdateCount.text();
count = parseInt( count, 10 ) - 1;
if ( count < 0 || isNaN( count ) ) {
return;
}
$( '#wp-admin-bar-updates .ab-item' ).removeAttr( 'title' );
$adminBarUpdateCount.text( count );
$dashboardNavMenuUpdateCount.each( function( index, elem ) {
elem.className = elem.className.replace( /count-\d+/, 'count-' + count );
} );
$dashboardNavMenuUpdateCount.removeAttr( 'title' );
$dashboardNavMenuUpdateCount.find( '.update-count' ).text( count );
if ( 'plugin' === upgradeType ) {
pluginCount = $pluginsMenuItem.find( '.plugin-count' ).eq(0).text();
pluginCount = parseInt( pluginCount, 10 ) - 1;
if ( pluginCount < 0 || isNaN( pluginCount ) ) {
return;
}
$pluginsMenuItem.find( '.plugin-count' ).text( pluginCount );
$pluginsMenuItem.find( '.update-plugins' ).each( function( index, elem ) {
elem.className = elem.className.replace( /count-\d+/, 'count-' + pluginCount );
} );
if (pluginCount > 0 ) {
$( '.subsubsub .upgrade .count' ).text( '(' + pluginCount + ')' );
} else {
$( '.subsubsub .upgrade' ).remove();
}
}
}; | Compound | 4 |
function getIconHtml(obj, classes) {
var icon;
var alt;
var isCommon = obj && obj.common;
if (isCommon.icon) {
if (!isCommon.icon.match(/^data:image\//)) {
if (isCommon.icon.indexOf('.') !== -1) {
var instance;
if (obj.type === 'instance') {
icon = '/adapter/' + obj.common.name + '/' + obj.common.icon;
} else if (obj._id.match(/^system\.adapter\./)) {
instance = obj._id.split('.', 3);
if (isCommon.icon[0] === '/') {
instance[2] += isCommon.icon;
} else {
instance[2] += '/' + isCommon.icon;
}
icon = '/adapter/' + instance[2];
} else {
instance = obj._id.split('.', 2);
if (isCommon.icon[0] === '/') {
instance[0] += isCommon.icon;
} else {
instance[0] += '/' + isCommon.icon;
}
icon = '/adapter/' + instance[0];
}
} else {
return '<i class="material-icons ' + (classes || 'treetable-icon') + '">' + isCommon.icon + '</i>';
}
} else {
icon = isCommon.icon;
}
alt = obj.type;
}
return {icon: icon, alt: alt};
} | Base | 1 |
function statCb (er, current) {
if (self.filter && !self.filter.call(who, who, current)) {
self._aborted = true
self.emit('end')
self.emit('close')
return
}
// if it's not there, great. We'll just create it.
// if it is there, then we'll need to change whatever differs
if (er || !current) {
return create(self)
}
self._old = current
var currentType = getType(current)
// if it's a type change, then we need to clobber or error.
// if it's not a type change, then let the impl take care of it.
if (currentType !== self.type) {
return rimraf(self._path, function (er) {
if (er) return self.error(er)
self._old = null
create(self)
})
}
// otherwise, just handle in the app-specific way
// this creates a fs.WriteStream, or mkdir's, or whatever
create(self)
} | Base | 1 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | Base | 1 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | Base | 1 |
title : $('input:checked', uitype).val(),
text : 'confirmReq',
accept : {
label : 'btnApply',
callback : function() {
save();
}
},
cancel : {
label : 'btnCancel',
callback : function(){}
}
});
return;
}
if (!((c >= 48 && c <= 57) || (c >= 96 && c <= 105))) {
e.preventDefault();
}
}) | Base | 1 |
!mxClient.IS_IE11)&&this.addMenuItems(Q,["toggleDarkMode"],W);Q.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(Q,W){B.menus.addMenuItems(Q,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var Q=this.get("insert"),W=Q.funct;Q.funct=function(V,X){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(V,["insertTemplate"],X),B.menus.addMenuItems(V,["insertImage",
"insertLink","-"],X),B.menus.addSubmenu("insertLayout",V,X,mxResources.get("layout")),B.menus.addSubmenu("insertAdvanced",V,X,mxResources.get("advanced"))):(W.apply(this,arguments),B.menus.addSubmenu("table",V,X))}})();var S="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),U=function(Q,W,V,X){Q.addItem(V,null,mxUtils.bind(this,function(){var p=new CreateGraphDialog(B,V,X);B.showDialog(p.container,620,420,!0,!1);p.init()}),W)};this.put("insertLayout", | Base | 1 |
App.prototype.updateUserElement = function()
{
appUpdateUserElement.apply(this, arguments);
if (this.userElement != null)
{
var elt = this.userElement;
elt.style.cssText = 'position:relative;margin-right:4px;cursor:pointer;display:' + elt.style.display;
elt.className = 'geToolbarButton';
elt.innerHTML = '';
elt.style.backgroundImage = 'url(' + Editor.userImage + ')';
elt.style.backgroundPosition = 'center center';
elt.style.backgroundRepeat = 'no-repeat';
elt.style.backgroundSize = '24px 24px';
elt.style.height = '24px';
elt.style.width = '24px';
elt.style.cssFloat = 'right';
elt.setAttribute('title', mxResources.get('changeUser'));
if (elt.style.display != 'none')
{
elt.style.display = 'inline-block';
var file = this.getCurrentFile();
if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
{
var icon = document.createElement('img');
icon.setAttribute('border', '0');
icon.style.position = 'absolute';
icon.style.left = '18px';
icon.style.top = '2px';
icon.style.width = '12px';
icon.style.height = '12px';
// icon.style.cursor = 'default';
var err = file.getRealtimeError();
var state = file.getRealtimeState();
var status = mxResources.get('realtimeCollaboration');
if (state == 1)
{
icon.src = Editor.syncImage;
status += ' (' + mxResources.get('online') + ')';
}
else
{
icon.src = Editor.syncProblemImage;
if (err != null && err.message != null)
{
status += ' (' + err.message + ')';
}
else
{
status += ' (' + mxResources.get('disconnected') + ')';
}
}
icon.setAttribute('title', status);
elt.style.paddingRight = '4px';
elt.appendChild(icon);
}
}
}
}; | Base | 1 |
function isAssignable(ast) {
return ast.type === AST.Identifier || ast.type === AST.MemberExpression;
} | Class | 2 |
exports.deepCopy = function(target, source) {
for (var name in source) {
var tval = target[name],
sval = source[name];
if (tval !== sval) {
if (shouldDeepCopy(sval)) {
if (Object.prototype.toString.call(sval) === '[object Date]') { // use this date test to handle crossing frame boundaries
target[name] = new Date(sval);
} else if (lang.isArray(sval)) {
target[name] = exports.deepCopyArray(sval);
} else {
if (tval && typeof tval === 'object') {
exports.deepCopy(tval, sval);
} else {
target[name] = exports.deepCopy({}, sval);
}
}
} else {
target[name] = sval;
}
}
}
return target;
}; | Base | 1 |
value = value.replace(/href=" *javascript\:(.*?)"/gi, function(m, $1) {
return 'removed=""';
}); | Base | 1 |
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){x=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))}; | Class | 2 |
(function(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery); | Base | 1 |
this.disableChatSoundUser = function(inst)
{
if (inst.find('> i').text() == 'volume_off') {
$.get(this.wwwDir+ 'user/setsettingajax/chat_message/1');
confLH.new_message_sound_user_enabled = 1;
inst.find('> i').text('volume_up');
} else {
$.get(this.wwwDir+ 'user/setsettingajax/chat_message/0');
confLH.new_message_sound_user_enabled = 0;
inst.find('> i').text('volume_off');
};
if (!!window.postMessage && parent) {
if (inst.find('> i').text() == 'volume_off') {
parent.postMessage("lhc_ch:s:0", '*');
} else {
parent.postMessage("lhc_ch:s:1", '*');
}
};
return false;
}; | Compound | 4 |
EditorUi.prototype.importZipFile=function(c,e,g){var k=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(q){if(mxUtils.isEmptyObject(q.files))g();else{var v=0,x,A=!1;q.forEach(function(z,L){z=L.name.toLowerCase();"diagram/diagram.xml"==z?(A=!0,L.async("string").then(function(M){0==M.indexOf("<mxfile ")?e(M):g()})):0==z.indexOf("versions/")&&(z=parseInt(z.substr(9)),z>v&&(v=z,x=L))});0<v?x.async("string").then(function(z){(new XMLHttpRequest).upload&&
k.isRemoteFileFormat(z,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(z,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):A||g()}},function(q){g(q)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,q,v,x,A,z,L,M){z=null!= | Base | 1 |
function createWebSocketUrl (options, request) {
const source = new URL(request.url, 'http://127.0.0.1')
const target = new URL(
options.rewritePrefix || options.prefix || source.pathname,
options.upstream
)
target.search = source.search
return target
} | Class | 2 |
this.convertImages(fa.getSvg(null,null,aa,va,null,R,null,null,null,ea,null,Ba,Ha,ra),mxUtils.bind(this,function(za){try{var Ga=new Image;Ga.onload=mxUtils.bind(this,function(){try{var Fa=function(){mxClient.IS_SF?window.setTimeout(function(){Aa.drawImage(Ga,0,0);u(Ea,za)},0):(Aa.drawImage(Ga,0,0),u(Ea,za))},Ea=document.createElement("canvas"),Da=parseInt(za.getAttribute("width")),La=parseInt(za.getAttribute("height"));Y=null!=Y?Y:1;null!=E&&(Y=Q?Math.min(1,Math.min(3*E/(4*La),E/Da)):E/Da);Y=this.getMaxCanvasScale(Da, | Base | 1 |
function(N,J){0<F.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+F.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var y=!1;EditorUi.prototype.initFormatWindow=function(){if(!y&&null!=this.formatWindow){y=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=
parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ca,ba,ja){var ia=E.menus.get(ca),ma=Q.addMenu(mxResources.get(ca), | Base | 1 |
S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Pa){null!=S&&S(Pa)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,F=0;8>F;F++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta=
va;va+=Ba;return sa.substring(ta,va)}function Z(sa){sa=P(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function oa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(P(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=S&&S();else if(P(u,4),"IHDR"!=P(u,4))null!=S&&S();else{P(u,17);S=u.substring(0,va);do{var Aa=Z(u);if("IDAT"== | Base | 1 |
q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(x,A,z){c1=x>>2;c2=(x&3)<<4|A>>4;c3=(A&15)<<2|z>>6;c4=z&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(x){if(10>x)return String.fromCharCode(48+x);x-=10;if(26>x)return String.fromCharCode(65+x);x-=26;if(26>x)return String.fromCharCode(97+x);x-=26;return 0==x?"-":1==x?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/": | Class | 2 |
function compileObjectNode(node, defs, args) {
if (!(node instanceof ObjectNode)) {
throw new TypeError('No valid ObjectNode')
}
var entries = [];
for (var key in node.properties) {
if (hasOwnProperty(node.properties, key)) {
if (!isSafeProperty(node.properties, key)) {
throw new Error('No access to property "' + key + '"');
}
entries.push(stringify(key) + ': ' + compile(node.properties[key], defs, args));
}
}
return '{' + entries.join(', ') + '}';
} | Class | 2 |
J&&E(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(T);if(J)try{var Q=document.createElement("canvas"),R=Q.getContext("2d");Q.height=N.height;Q.width=N.width;R.drawImage(N,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(T);J&&E(Editor.svgBrokenImage.src)};N.src=u}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,E,J,
T){null==T&&(T=this.createImageUrlConverter());var N=0,Q=J||{};J=mxUtils.bind(this,function(R,Y){R=u.getElementsByTagName(R);for(var ba=0;ba<R.length;ba++)mxUtils.bind(this,function(ea){try{if(null!=ea){var Z=T.convert(ea.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var fa=Q[Z];null==fa?(N++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(Q[Z]=aa,ea.setAttribute(Y,aa));N--;0==N&&E(u)})):ea.setAttribute(Y,fa)}else null!=Z&&ea.setAttribute(Y,Z)}}catch(aa){}})(R[ba])});J("image","xlink:href");
J("img","src");0==N&&E(u)};Editor.base64Encode=function(u){for(var E="",J=0,T=u.length,N,Q,R;J<T;){N=u.charCodeAt(J++)&255;if(J==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);E+="==";break}Q=u.charCodeAt(J++);if(J==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N& | Class | 2 |
La,"geMenuItem");null!=Ea?(La.style.backgroundImage="url("+Ea+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):wa||(La.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",La.style.backgroundPosition="right 6px center",La.style.backgroundRepeat="no-repeat",La.style.paddingRight="22px");return La}function X(za,wa,Ea,Da,La,Ya){var Ua=document.createElement("a");Ua.className=
"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ua.style.display="inline-block";Ua.style.boxSizing="border-box";Ua.style.height="30px";Ua.style.padding="6px";Ua.style.position="relative";Ua.style.verticalAlign="top";Ua.style.top="0px";"1"==urlParams.sketch&&(Ua.style.borderStyle="none",Ua.style.boxShadow="none",Ua.style.padding="6px",Ua.style.margin="0px");null!=U.statusContainer?V.insertBefore(Ua,U.statusContainer):V.appendChild(Ua);null!=Ya?(Ua.style.backgroundImage="url("+Ya+")",Ua.style.backgroundPosition=
"center center",Ua.style.backgroundRepeat="no-repeat",Ua.style.backgroundSize="24px 24px",Ua.style.width="34px"):mxUtils.write(Ua,za);mxEvent.addListener(Ua,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(eb){eb.preventDefault()}));mxEvent.addListener(Ua,"click",function(eb){"disabled"!=Ua.getAttribute("disabled")&&wa(eb);mxEvent.consume(eb)});null==Ea&&(Ua.style.marginRight="4px");null!=Da&&Ua.setAttribute("title",Da);null!=La&&(za=function(){La.isEnabled()?(Ua.removeAttribute("disabled"),
Ua.style.cursor="pointer"):(Ua.setAttribute("disabled","disabled"),Ua.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Ua}function ea(za,wa,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none"); | Class | 2 |
if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,E=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=c.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=E;this.stylesheet=J}return N};var v=this.clearDefaultStyle;this.clearDefaultStyle=function(){v.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var x=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return x.apply(this,arguments)}; | Class | 2 |
synchronize: function(requisition, errorHandler) {
/**
* @param {object} requisition The requisition object
* @param {string} rescanExisting true to perform a full scan, false to only add/remove nodes without scan, dbonly for all DB operations without scan
*/
var doSynchronize = function(requisition, rescanExisting) {
RequisitionsService.startTiming();
RequisitionsService.synchronizeRequisition(requisition.foreignSource, rescanExisting).then(
function() { // success
growl.success('The import operation has been started for ' + requisition.foreignSource + ' (rescanExisting? ' + rescanExisting + ')<br/>Use <b>refresh</b> to update the deployed statistics');
requisition.setDeployed(true);
},
errorHandler
);
};
bootbox.prompt({
title: 'Synchronize Requisition ' + requisition.foreignSource,
message: '<p><b>Choose a scan option: </b></p>',
inputType: 'radio',
inputOptions: [
{
text: 'Scan all nodes',
value: 'true',
},
{
text: 'Scan added nodes only',
value: 'false',
},
{
text: 'No scanning',
value: 'dbonly',
}
],
buttons: {
confirm: {
label: 'Synchronize',
},
cancel: {
label: 'Cancel',
}
},
swapButtonOrder: 'true',
callback: function (result) {
if (result !== null) {
doSynchronize(requisition, result);
}
}
});
} | Base | 1 |
mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(;null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;"+(null!=this.cursor?"cursor:"+this.cursor+";":""),this.node.innerHTML=""}; | Base | 1 |
function usercheck_init_staff(i) {
var obj = document.getElementById('ajax_output_st');
obj.innerHTML = '';
document.getElementById('usr_err_check').value = '0';
if (i.value.length < 1)
return;
var err = new Array();
if (i.value.match(/[^A-Za-z0-9_]/))
err[err.length] = 'Username can only contain letters, numbers and underscores';
if (i.value.length < 3)
err[err.length] = 'Username Too Short';
if (err != '') {
obj.style.color = '#ff0000';
obj.innerHTML = err.join('<br />');
return;
}
ajax_call('Validator.php?u=' + i.value + 'stud', usercheck_callback_staff);
}
| Base | 1 |
(T=mxUtils.getTextContent(N[0]),T=Graph.decompress(T,null,J),0<T.length&&(u=mxUtils.parseXml(T),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(T=u.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)u=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||E||(N=null,"diagram"==u.nodeName?N=u:"mxfile"==
u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(N=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=N&&(u=Editor.parseDiagramNode(N,J)));null==u||"mxGraphModel"==u.nodeName||E&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,E){var J=mxUtils.trim(mxUtils.getTextContent(u)),T=null;0<J.length?(u=Graph.decompress(J,null,E),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(), | Class | 2 |
isValidIdentifierStart: function(ch) {
return ('a' <= ch && ch <= 'z' ||
'A' <= ch && ch <= 'Z' ||
'_' === ch || ch === '$');
}, | Class | 2 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | Class | 2 |
emailIconClassName: this.getMetadata().get(['clientDefs', 'Email', 'iconClass']) || ''
}, Dep.prototype.data.call(this));
},
setup: function () {
var data = this.model.get('data') || {};
this.emailId = data.emailId;
this.emailName = data.emailName;
if (
this.parentModel
&&
(this.model.get('parentType') == this.parentModel.name && this.model.get('parentId') == this.parentModel.id)
) {
if (this.model.get('post')) {
this.createField('post', null, null, 'views/stream/fields/post');
this.hasPost = true;
}
if ((this.model.get('attachmentsIds') || []).length) {
this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple');
this.hasAttachments = true;
}
}
this.messageData['email'] = '<a href="#Email/view/' + data.emailId + '">' + data.emailName + '</a>';
this.messageName = 'emailReceived';
if (data.isInitial) {
this.messageName += 'Initial';
}
if (data.personEntityId) {
this.messageName += 'From';
this.messageData['from'] = '<a href="#'+data.personEntityType+'/view/' + data.personEntityId + '">' + data.personEntityName + '</a>';
}
if (this.model.get('parentType') === data.personEntityType && this.model.get('parentId') == data.personEntityId) {
this.isThis = true;
}
if (this.isThis) {
this.messageName += 'This';
}
this.createMessage();
},
});
}); | Base | 1 |
function assertArgFn(arg, name, acceptArrayAnnotation) {
if (acceptArrayAnnotation && isArray(arg)) {
arg = arg[arg.length - 1];
}
assertArg(isFunction(arg), name, 'not a function, got ' +
(arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
return arg;
} | Class | 2 |
authHandler: function(methodsLeft, partial, cb) {
assert(calls++ === 0, makeMsg('authHandler called multiple times'));
assert(methodsLeft === null, makeMsg('expected null methodsLeft'));
assert(partial === null, makeMsg('expected null partial'));
return 'none';
} | Base | 1 |
function(u,E,J,T){for(var N=0;N<u.length;N++)this.highlightCell(u[N],E,J,T)};Graph.prototype.highlightCell=function(u,E,J,T,N){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;u=this.view.getState(u);var Q=null;null!=u&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+N),Q=new mxCellHighlight(this,E,N,!1),null!=T&&(Q.opacity=T),Q.highlight(u),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"), | Base | 1 |
return { type: AST.Literal, value: this.consume().value };
}, | Class | 2 |
client.send = function(options) {
// add host header if not set
if(options.request.getField('Host') === null) {
options.request.setField('Host', client.url.fullHost);
}
// set default dummy handlers
var opts = {};
opts.request = options.request;
opts.connected = options.connected || function() {};
opts.closed = options.close || function() {};
opts.headerReady = function(e) {
// read cookies
_readCookies(client, e.response);
if(options.headerReady) {
options.headerReady(e);
}
};
opts.bodyReady = options.bodyReady || function() {};
opts.error = options.error || function() {};
// create response
opts.response = http.createResponse();
opts.response.time = 0;
opts.response.flashApi = client.socketPool.flashApi;
opts.request.flashApi = client.socketPool.flashApi;
// create abort function
opts.request.abort = function() {
// set aborted, clear handlers
opts.request.aborted = true;
opts.connected = function() {};
opts.closed = function() {};
opts.headerReady = function() {};
opts.bodyReady = function() {};
opts.error = function() {};
};
// add cookies to request
_writeCookies(client, opts.request);
// queue request options if there are no idle sockets
if(client.idle.length === 0) {
client.requests.push(opts);
} else {
// use an idle socket, prefer an idle *connected* socket first
var socket = null;
var len = client.idle.length;
for(var i = 0; socket === null && i < len; ++i) {
socket = client.idle[i];
if(socket.isConnected()) {
client.idle.splice(i, 1);
} else {
socket = null;
}
}
// no connected socket available, get unconnected socket
if(socket === null) {
socket = client.idle.pop();
}
socket.options = opts;
_doRequest(client, socket);
}
}; | Base | 1 |
context.suite = function(title){
if (suites.length > 1) suites.shift();
var suite = Suite.create(suites[0], title);
suites.unshift(suite);
return suite;
}; | Base | 1 |
E=J}return E};Graph.prototype.getCellsById=function(u){var E=[];if(null!=u)for(var J=0;J<u.length;J++)if("*"==u[J]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[J]);null!=N&&E.push(N)}return E};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length|| | Base | 1 |
return P.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var E="1"==mxUtils.getValue(u.style,"enumerate",0);E&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT, | Base | 1 |
document.createElement("span");z.style["float"]="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-4px";z.appendChild(t);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(D){mxEvent.getSource(D)!=t&&(t.checked=!t.checked)});header=z}var L=localStorage.getItem(Editor.configurationKey);z=[[mxResources.get("reset"),function(D,G){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(D)?(localStorage.removeItem(Editor.settingsKey),
localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(P){c.handleError(P)}})},"Shift+Click to Reset Settings"]];var C=c.actions.get("plugins");null!=C&&"1"==urlParams.sketch&&z.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||z.push([mxResources.get("share"),function(D,G){if(0<G.value.length)try{var P=JSON.parse(G.value),K=window.location.protocol+"//"+window.location.host+ | Base | 1 |
authHandler = function authHandler(authsLeft, partial, cb) {
if (authPos === authsAllowed.length)
return false;
return authsAllowed[authPos++];
}; | Base | 1 |
(ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function K(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Ea.spin(aa),U=!1,W=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){A(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=u&&(u.click(),u=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia= | Class | 2 |
function(){function P(){d(I,X,function(){k(X);I.editComment(I.content,function(){p(X)},function(Q){l(X);P();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}P()},I.isResolved),J(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);I.deleteComment(function(P){if(!0===P){P=X.querySelector(".geCommentTxt");P.innerHTML="";mxUtils.write(P,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(P= | Base | 1 |
function pd(a){return a%100===11?!0:a%10===1?!1:!0}function qd(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return b?"mínúta":"mínútu";case"mm":return pd(a)?e+(b||d?"mínútur":"mínútum"):b?e+"mínúta":e+"mínútu";case"hh":return pd(a)?e+(b||d?"klukkustundir":"klukkustundum"):e+"klukkustund";case"d":return b?"dagur":d?"dag":"degi";case"dd":return pd(a)?b?e+"dagar":e+(d?"daga":"dögum"):b?e+"dagur":e+(d?"dag":"degi");case"M":return b?"mánuður":d?"mánuð":"mánuði";case"MM":return pd(a)?b?e+"mánuðir":e+(d?"mánuði":"mánuðum"):b?e+"mánuður":e+(d?"mánuð":"mánuði");case"y":return b||d?"ár":"ári";case"yy":return pd(a)?e+(b||d?"ár":"árum"):e+(b||d?"ár":"ári")}} | Base | 1 |
'binary-': function(left, right, context) {
return function(scope, locals, assign, inputs) {
var lhs = left(scope, locals, assign, inputs);
var rhs = right(scope, locals, assign, inputs);
var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);
return context ? {value: arg} : arg;
};
}, | Class | 2 |
EditorUi.prototype.updateCssForMarker=function(b,e,k,n,D){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerHTML="";"flexArrow"==k?b.className=null!=n&&n!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(n,D),null!=k?(n=document.createElement("img"),n.style.position="absolute",n.style.marginTop="0.5px",n.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(n.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
(n.style.filter="invert(100%)"),b.appendChild(n)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))}; | Base | 1 |
"click": function() {
var data = {
id: record.data.id,
name: record.data.text,
description: record.data.description
}
var panel = new pimcore.object.classificationstore.storeConfiguration(data, this.applyConfig.bind(this));
panel.show();
}.bind(this) | Base | 1 |
e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,
function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,k,m,q,v,x,A,z,L){m=null!=m?m:!0;q=null!=q?q:!1;var M=this.editor.graph;if(e||!c&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var n=null!=M.themes&&"darkTheme"==M.defaultThemeName;z=!1;if(n||null!=this.pages&&this.currentPage!=this.pages[0]){var y=M.getGlobalVariable;M=this.createTemporaryGraph(n?M.getDefaultStylesheet():M.getStylesheet()); | Base | 1 |
EditorUi.prototype.updateCssForMarker=function(a,b,f,d,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerHTML="";"flexArrow"==f?a.className=null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(d,g),null!=f?(d=document.createElement("img"),d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
(d.style.filter="invert(100%)"),a.appendChild(d)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))}; | Base | 1 |
Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}}; | Base | 1 |
(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,E,J,T,N,Q,R,Y,ba,ea,Z,fa,aa,va){var ja=null,Ba=null,Ha=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ja=this.stylesheet,Ba=this.shapeForegroundColor,Ha=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var ra=L.apply(this,arguments),Ca=this.getCustomFonts();if(Z&&0<Ca.length){var za=ra.ownerDocument,Ga=null!=za.createElementNS?za.createElementNS(mxConstants.NS_SVG,"style"):za.createElement("style");null!=za.setAttributeNS?Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Na="",Fa="",Ea=0;Ea<Ca.length;Ea++){var Da=Ca[Ea].name,La=Ca[Ea].url;Graph.isCssFontUrl(La)?
Na+="@import url("+La+");\n":Fa+='@font-face {\nfont-family: "'+Da+'";\nsrc: url("'+La+'");\n}\n'}Ga.appendChild(za.createTextNode(Na+Fa));ra.getElementsByTagName("defs")[0].appendChild(Ga)}null!=ja&&(this.shapeBackgroundColor=Ha,this.shapeForegroundColor=Ba,this.stylesheet=ja,this.refresh());return ra};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=C.apply(this,arguments);if(this.mathEnabled){var E=u.drawText;u.drawText=function(J,T){if(null!=J.text&& | Base | 1 |
function F(){}; | Base | 1 |
rcube_webmail.prototype.managesieve_setget = function()
{
var id = this.filtersets_list.get_single_selection(),
script = this.env.filtersets[id];
location.href = this.env.comm_path+'&_action=plugin.managesieve-action&_act=setget&_set='+urlencode(script);
}; | Compound | 4 |
F.substring(0,11)){var J=F.indexOf(",");0<J&&(F=F.substring(0,J)+";base64,"+F.substring(J+1))}c(F,null,0,0,G,N);v.scrollTop=v.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";d.appendChild(m);this.saveBtnClickHandler=function(F,G,N,J){b.saveLibrary(F,G,N,J)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=M&&(M(),M=null);this.saveBtnClickHandler(q.value,k,u,t)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";d.appendChild(m); | Base | 1 |
function sendPublishRequest(session, callback) {
const publishRequest = new PublishRequest({});
session.performMessageTransaction(publishRequest, function(err, response) {
callback(err, response);
});
} | Base | 1 |
Runner.prototype.grep = function(re, invert){
debug('grep %s', re);
this._grep = re;
this._invert = invert;
this.total = this.grepTotal(this.suite);
return this;
}; | Base | 1 |
Editor.createRoughCanvas=function(u){var E=rough.canvas({getContext:function(){return u}});E.draw=function(J){var T=J.sets||[];J=J.options||this.getDefaultOptions();for(var N=0;N<T.length;N++){var Q=T[N];switch(Q.type){case "path":null!=J.stroke&&this._drawToContext(u,Q,J);break;case "fillPath":this._drawToContext(u,Q,J);break;case "fillSketch":this.fillSketch(u,Q,J)}}};E.fillSketch=function(J,T,N){var Q=u.state.strokeColor,R=u.state.strokeWidth,Y=u.state.strokeAlpha,ba=u.state.dashed,ea=N.fillWeight;
0>ea&&(ea=N.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(N.fill||"");u.setStrokeWidth(ea);u.setDashed(!1);this._drawToContext(J,T,N);u.setDashed(ba);u.setStrokeWidth(R);u.setStrokeColor(Q);u.setStrokeAlpha(Y)};E._drawToContext=function(J,T,N){J.begin();for(var Q=0;Q<T.ops.length;Q++){var R=T.ops[Q],Y=R.data;switch(R.op){case "move":J.moveTo(Y[0],Y[1]);break;case "bcurveTo":J.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":J.lineTo(Y[0],Y[1])}}J.end();"fillPath"===
T.type&&N.filled?J.fill():J.stroke()};return E};(function(){function u(Q,R,Y){this.canvas=Q;this.rc=R;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect= | Class | 2 |
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))}; | Base | 1 |
function isElement(node) {
return !!(node &&
(node.nodeName // We are a direct element.
|| (node.prop && node.attr && node.find))); // We have an on and find method part of jQuery API.
} | Class | 2 |
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!= | Base | 1 |
Ya.height,Ua.y-Ya.y-Ya.height);La=mxEvent.isShiftDown(eb.getEvent());null!=Ea&&La&&(Da=Math.min(Da,Ea.height-Graph.minTableRowHeight))};za.execute=function(Ya){if(0!=Da)T.setTableRowHeight(this.state.cell,Da,!La);else if(!M.blockDelayedSelection){var Ua=T.getCellAt(Ya.getGraphX(),Ya.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Ua,Ya)}Da=0};za.reset=function(){Da=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Ta){var za=T.view.getState(Ma[Ta]),wa=T.getCellGeometry(Ma[Ta]), | Class | 2 |
beginningOfLine: function(){
isatty && process.stdout.write('\u001b[0G');
}, | Base | 1 |
this.editorUi.editor.graph,X=U.getSelectionCell();P.call(this,M,X,null,W);this.addMenuItems(M,["editTooltip"],W);U.model.isVertex(X)&&this.addMenuItems(M,["editGeometry"],W);this.addMenuItems(M,["-","edit"],W)})));this.addPopupMenuCellEditItems=function(M,W,U,X){M.addSeparator();this.addSubmenu("editCell",M,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(M,W){var U=C.getCurrentFile();C.menus.addMenuItems(M,["new"],W);C.menus.addSubmenu("openFrom",M,W);isLocalStorage&& | Base | 1 |
normalize : function(data) {
var filter = function(file) {
if (file && file.hash && file.name && file.mime) {
if (file.mime == 'application/x-empty') {
file.mime = 'text/plain';
}
return file;
}
return null;
};
if (data.files) {
data.files = $.map(data.files, filter);
}
if (data.tree) {
data.tree = $.map(data.tree, filter);
}
if (data.added) {
data.added = $.map(data.added, filter);
}
if (data.changed) {
data.changed = $.map(data.changed, filter);
}
if (data.api) {
data.init = true;
}
return data;
}, | Base | 1 |
this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))}; | Base | 1 |
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)} | Class | 2 |
module.exports = function newline(state, silent) {
var pmax, max, pos = state.pos;
if (state.src.charCodeAt(pos) !== 0x0A/* \n */) { return false; }
pmax = state.pending.length - 1;
max = state.posMax;
// ' \n' -> hardbreak
// Lookup in pending chars is bad practice! Don't copy to other rules!
// Pending string is stored in concat mode, indexed lookups will cause
// convertion to flat mode.
if (!silent) {
if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
state.pending = state.pending.replace(/ +$/, '');
state.push('hardbreak', 'br', 0);
} else {
state.pending = state.pending.slice(0, -1);
state.push('softbreak', 'br', 0);
}
} else {
state.push('softbreak', 'br', 0);
}
}
pos++;
// skip heading spaces for next line
while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }
state.pos = pos;
return true;
}; | Class | 2 |
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)} | Class | 2 |
[];for(G=0;G<d.length;G++)C.push(d[G]);d=C;this.confirmImageResize(function(K){L=K;P()},A)}else P()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
null,p=function(q,x){if(q||g)mxSettings.setResizeImages(q?x:null),mxSettings.save();k();d(x)};null==l||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){p(q,!0)},function(q){p(q,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
!0,!0):p(!1,l)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,g,k)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){g(l)};l.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE", | Class | 2 |
mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a;var b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if("fill"==this.overflow||
"width"==this.overflow)null!=b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+mxUtils.htmlEntities(b)+";");null!=c&&(d+="border:1px solid "+mxUtils.htmlEntities(c)+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+'">'+a+"</div>"}this.node.innerHTML=
a;a=this.node.getElementsByTagName("div");0<a.length&&(b=this.textDirection,b==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=this.getAutoDirection()),b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?a[a.length-1].setAttribute("dir",b):a[a.length-1].removeAttribute("dir"))}}; | Base | 1 |
hostVerifier: function(hash) {
assert(hash === MD5_HOST_FINGERPRINT,
makeMsg('Host fingerprint mismatch'));
return (verified = true);
} | Base | 1 |
$scope.refresh = function() {
growl.success('Retrieving node ' + $scope.foreignId + ' from requisition ' + $scope.foreignSource + '...');
RequisitionsService.getNode($scope.foreignSource, $scope.foreignId).then(
function(node) { // success
$scope.node = node;
},
$scope.errorHandler
);
}; | Base | 1 |
var A=g.addClickHandler;g.addClickHandler=function(D,G,P){var K=G;G=function(F,H){if(null==H){var S=mxEvent.getSource(F);"a"==S.nodeName.toLowerCase()&&(H=S.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(H)&&mxEvent.consume(F);null!=K&&K(F,H)};A.call(this,D,G,P)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems; | Base | 1 |
function searchUsers(a){$("#fc_list_overview li").removeClass("fc_activeSearch").slideDown(0);0<a.length?($("#fc_list_overview li:containsi("+a+")").not(".fc_no_search").addClass("fc_activeSearch"),$("#fc_list_overview").hasClass("fc_settings_list")&&$(".fc_list_forms:containsi("+a+")").each(function(){var a=$(this).prop("id");$("input[value*="+a.substr(8)+"]").closest("li").addClass("fc_activeSearch")}),$("#fc_list_overview li").not(".fc_activeSearch").slideUp(300),1==$("#fc_list_overview li.fc_activeSearch").size()&&
$("#fc_list_overview li.fc_activeSearch").click()):$("#fc_list_overview li").not("fc_no_search").slideDown(300)}function confirm_link(a,b,c){var e="HTML";"undefined"!=typeof c&&(e="JSON");dialog_confirm(a,"Confirmation",b,!1,"GET",e,!1,function(){location.reload(!0)})} | Base | 1 |
$scope.reset = function() {
bootbox.confirm('Are you sure you want to reset the foreign source definition to the default ?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteForeignSourceDefinition($scope.foreignSource).then(
function() { // success
growl.success('The foreign source definition for ' + $scope.foreignSource + 'has been reseted.');
$scope.initialize();
},
$scope.errorHandler
);
}
});
}; | Base | 1 |
EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,k,m){k=null!=k?k:c.name;g=null!=g?g:mxUtils.bind(this,function(v){this.handleError(v)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var v=this.isRemoteVisioFormat(k);try{var x="UNKNOWN-VISIO",A=k.lastIndexOf(".");if(0<=A&&A<k.length)x=k.substring(A+1).toUpperCase();else{var z=k.lastIndexOf("/");0<= | Base | 1 |
DotObject.prototype.dot = function (obj, tgt, path) {
tgt = tgt || {}
path = path || []
var isArray = Array.isArray(obj)
Object.keys(obj).forEach(function (key) {
var index = isArray && this.useBrackets ? '[' + key + ']' : key
if (
(
isArrayOrObject(obj[key]) &&
(
(isObject(obj[key]) && !isEmptyObject(obj[key])) ||
(Array.isArray(obj[key]) && (!this.keepArray && (obj[key].length !== 0)))
)
)
) {
if (isArray && this.useBrackets) {
var previousKey = path[path.length - 1] || ''
return this.dot(obj[key], tgt, path.slice(0, -1).concat(previousKey + index))
} else {
return this.dot(obj[key], tgt, path.concat(index))
}
} else {
if (isArray && this.useBrackets) {
tgt[path.join(this.separator).concat('[' + key + ']')] = obj[key]
} else {
tgt[path.concat(index).join(this.separator)] = obj[key]
}
}
}.bind(this))
return tgt
} | Class | 2 |
App.prototype.updateButtonContainer = function()
{
appUpdateButtonContainer.apply(this, arguments);
if (this.shareButton != null)
{
var elt = this.shareButton;
elt.style.cssText = 'display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;';
elt.className = 'geToolbarButton';
elt.innerHTML = '';
elt.style.backgroundImage = 'url(' + Editor.shareImage + ')';
elt.style.backgroundPosition = 'center center';
elt.style.backgroundRepeat = 'no-repeat';
elt.style.backgroundSize = '24px 24px';
elt.style.height = '24px';
elt.style.width = '24px';
// Share button hidden via CSS to enable notifications button
if (urlParams['sketch'] == '1')
{
this.shareButton.style.display = 'none';
}
}
if (this.buttonContainer != null)
{
this.buttonContainer.style.marginTop = '-2px';
this.buttonContainer.style.paddingTop = '4px';
}
}; | Base | 1 |
clear_table() {
var dataLength = this.data.length;
for (var i=0; i<dataLength; i++) {
this.delete_row_index(i);
}
} | Base | 1 |
Context.prototype.timeout = function(ms){
this.runnable().timeout(ms);
return this;
}; | Base | 1 |
function createDialog(id, title, legend, content, positionClass) {
if (!positionClass)
positionClass = "left";
var newDialog = createElement("div", id, ["dialog", positionClass]);
newDialog.setStyle({"display": "none"});
if (positionClass == "none") {
var bgDiv = $("bgDialogDiv");
if (bgDiv) {
bgDiv.show();
}
else {
bgDiv = createElement("div", "bgDialogDiv", ["bgDialog"]);
document.body.appendChild(bgDiv);
//bgDiv.observe("click", disposeDialog);
}
}
var subdiv = createElement("div", null, null, null, null, newDialog);
if (title && title.length > 0) {
var titleh3 = createElement("h3", null, null, null, null, subdiv);
titleh3.appendChild(document.createTextNode(title));
}
if (legend) {
if (Object.isElement(legend))
subdiv.appendChild(legend);
else if (legend.length > 0) {
var legendP = createElement("p", null, null, null, null, subdiv);
legendP.appendChild(document.createTextNode(legend));
}
}
if (content)
subdiv.appendChild(content);
createElement("hr", null, null, null, null, subdiv);
return newDialog;
} | Base | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.