Dataset Viewer
Auto-converted to Parquet Duplicate
code
string
label
int64
NP.VAT = function(percentage, decimals, includedVAT) { var num = this; var type = typeof(decimals); if (type === 'boolean') { var tmp = includedVAT; includedVAT = decimals; decimals = tmp; type = typeof(decimals); } if (type === 'undefined') decimals = 2; return !percentage || !num ? num.round(decimals) : in...
0
updateView : function() { var x = parseInt(pointX.val()) * prop + imgc.offset().left; var y = parseInt(pointY.val()) * prop + imgc.offset().top; var w = offsetX.val() * prop; var h = offsetY.val() * prop; rhandlec.data({x: x, y: y, w: w, h: h}) .width(Math.round(w)) .height(Math.round(h)) .offset({left: Math.ro...
0
function mxShapeBasicRectCallout(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5}mxUtils.extend(mxShapeBasicRectCallout,mxActor);mxShapeBasicRectCallout.prototype.customProperties=[{name:"dx",dispName:"Callout Position",type:"float",min:0,defVal:30},{n...
0
Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var D=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?...
0
"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(l*Math.tan(v),.5*p);b.translate(h,q);b.begin();b.moveTo(.5*l,0);b.lineTo(l,v);b.lineTo(l,p-v);b.lineTo(.5*l,p);b.lineTo(0,p-v);b.lineTo(0,v);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,v);b.lineTo(.5*l,2*v);b.lineTo(l,v);b.moveTo(.5*l,2*v);b.lineT...
0
"keys",Ea,"values",Qa,"cells",aa.getSelectionCells()))}finally{aa.getModel().endUpdate()}}function T(pa,ra,ua){var Ga=mxUtils.getOffset(m,!0),Ea=mxUtils.getOffset(pa,!0);ra.style.position="absolute";ra.style.left=Ea.x-Ga.x+"px";ra.style.top=Ea.y-Ga.y+"px";ra.style.width=pa.offsetWidth+"px";ra.style.height=pa.offsetHeig...
1
g=this.isHorizontal()?this.horizontalLayout(this.node,f,b):this.verticalLayout(this.node,null,f,b);if(null!=g){var k=d=0;0>g.x&&(d=Math.abs(f-g.x));0>g.y&&(k=Math.abs(b-g.y));0==d&&0==k||this.moveNode(this.node,d,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(this.node)}null!=this...
0
0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*...
1
this.random.bytes = (length = 1) => { return new Promise(async (resolve, reject) => { if(length == null) { length = 1; } if(isNaN(parseInt(length))) { length = 0; } else { length = parseInt(length); } resolve(await _openpgp.crypto.random.getRandomBytes(length).catch((err) => { reject(err); })); }); }
0
function endpointWithDefaults(defaults, route, options) { return parse(merge(defaults, route, options)); }
0
tag: function (cb) { var cmd = ['git', 'tag', 'v' + this._version].join(' ') this._exec(cmd, cb) },
1
Toolbar.prototype.addTableDropDown=function(){var a=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(f){this.editorUi.menus.addInsertTableCellItem(f)}));a.style.position="relative";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.width="30px";a.in...
0
body: this.createShortCutList(), footer: body, callback: function ($node) { $node.find('.modal-body').css({ 'max-height': 300, 'overflow': 'scroll' }); } }).render().appendTo($container); };
0
e.view.validate());N=H;O=B}));var Q=e.labelLinkClicked;e.labelLinkClicked=function(B,H,g){var x=H.getAttribute("href");if(null==x||!e.isCustomLink(x)||!mxEvent.isTouchEvent(g)&&mxEvent.isPopupTrigger(g))Q.apply(this,arguments);else{if(!e.isEnabled()||null!=B&&e.isCellLocked(B.cell))e.customLinkClicked(x),e.getRubberban...
1
{ headers: Object.assign({}, request.headers) }, options, opts ]) this.log.trace({ busboyOptions }, 'Providing options to busboy') const bb = busboy(busboyOptions) request.on('close', cleanup) request.on('error', cleanup) bb .on('field', onField) .on('file', onFile) .on('close', cleanup) .on('error', onEnd)...
0
"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var F=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,W,U,X,Z){null!=T.handJiggle&&T.handJiggle.passThrough||F.apply(this,arguments)};var M=mxShape.prototype.paint;mxShape.prototype.paint=function(T){v...
1
t.getStatus()&&300>=t.getStatus()?(this.updateDiagram(t.getText()),I()):this.handleError({message:mxResources.get("error")+" "+t.getStatus()}))}),mxUtils.bind(this,function(t){this.handleError(t)}))}),I=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(B,y)});this.editor.addListener("pageSelected"...
0
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.protot...
0
typeof ia.getAttribute&&null!=ia.getAttribute("title")&&sa.push({img:ia.getAttribute("img"),libs:ia.getAttribute("libs"),clibs:ia.getAttribute("clibs"),title:ia.getAttribute("title")}),ia=ia.nextSibling;C(sa)}});var ua=function(ia,ra,aa){ma.style.display="";Ha.stop();V=!1;if(U)U=!1;else if(ra)ea.innerHTML=ra;else{aa=aa...
0
PrintDialog.previewEnabled&&(ba=mxUtils.button(mxResources.get("preview"),function(){m.hideDialog();O(!1)}),ba.className="geBtn",z.appendChild(ba));ba=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){m.hideDialog();O(!0)});ba.className="geBtn gePrimaryBtn";z.appendChild(ba);m.editor.ca...
1
return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n...
1
!0;f=0;for(e=a.length;f<e;f++)if(c&&void 0!==c[a[f]]||!c&&b.test(a[f]))a.splice(f,1),e--,f--;return a}function p(a,b){var c;if(A(b)){var e=0;for(c=b.length;e<c;e++)if(!p(a,b[e]))return!1;return!0}var f=E(b);e=0;for(c=a.length;e<c;e++)if("RegExp"===f){if("string"===typeof a[e]&&a[e].match(b))return!0}else if(a[e]===b)re...
0
function plusFn(l, r) { if (typeof l === 'undefined') return r; if (typeof r === 'undefined') return l; return l + r; }
1
Context.prototype.inspect = function() { return JSON.stringify(this, function(key, val) { if ('_runnable' == key) return; if ('test' == key) return; return val; }, 2); };
0
A,B,m+p/2,x+v/2);s=this.scale;m=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,m,x,p,v)}};e.prototype.paintTableForeground=function(c,m,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxU...
0
function copyElement(source) { if (!isObject(source)) { return source; } var index = stackSource.indexOf(source); if (index !== -1) { return stackDest[index]; } if (isWindow(source) || isScope(source)) { throw ngMinErr( "cpws", "Can't copy! Making copies of Window or Scope instances is not supported." ); }...
0
function(){g({message:JSON.parse(n.result).Message})},n.readAsText(L.response))}catch(y){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(M){g(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline...
1
e.addListener(mxEvent.SIZE,f);e.container.addEventListener("scroll",d);e.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(y){E=y;R.style.bac...
1
arguments);if(null!=this.div)for(var S=this.div.getElementsByTagName("a"),U=0;U<S.length;U++)null!=S[U].getAttribute("href")&&null==S[U].getAttribute("target")&&S[U].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(S){return S.sourceState};this.getCursorForMouseEvent=function(S){var U=null...
1
}function X(e) { e._closedPromise = new Promise((t, r) => { e._closedPromise_resolve = t, e._closedPromise_reject = r, e._closedPromiseState = "pending"; }); }function Z(e, t) {
0
hide : typeof(opts.hide) == 'function' ? opts.hide : function() { } }); });
1
getReq(options) { options = options || {}; options.role = options.role || 'admin'; const req = { ...(options.role === 'anon' ? {} : { user: { title: 'System Task', role: options.role } }), res: {}, t(key, options = {}) { return self.apos.i18n.i18next.t(key, { ...options, lng: req.locale }); }, data: {}...
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=""};
1
App.prototype.loadTemplate=function(b,e,f,c,m){var n=!1,v=b,d=null!=c?c:b,g=/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d);c=/\.png$/i.test(d)||/\.pdf$/i.test(d);this.editor.isCorsEnabledForUrl(v)||(n=c||g,v="t="+(new Date).getTime(),v=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+v+(n?"&base64=1":""));t...
0
try{p.pasteXml(M,!0)}finally{q.getModel().endUpdate()}}else mxClipboard.paste(q)}),G=!0)}catch(M){}G||mxClipboard.paste(q)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function M(W){if(null!=W){for(var d=!0,f=0;f<W.length&&d;f++)d=d&&q.model.isEdge(W[f]);var k=q.view.translate;f=q.vie...
1
jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); };
0
W.formatElt.style.width)}function e(W,d){function f(z,C){var F=W.menus.get(z);z=k.addMenu(C,mxUtils.bind(this,function(){F.funct.apply(this,arguments)}));z.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:so...
1
l||500)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({m...
0
F.freehand){var ma=F.freehand.createStyle;F.freehand.createStyle=function(ia){return ma.apply(this,arguments)+"sketch=0;"}}C.editor.addListener("statusChanged",mxUtils.bind(this,function(){C.setStatusText(C.editor.getStatus())}));C.setStatusText(C.editor.getStatus());var aa=C.menus.get("viewZoom");if(null!=aa){var S=fu...
1
updateDroppable = function(target) { var limit = 100, next; if (!target) { tree.find('div.'+uploadable).find(selNavdir+':not(.elfinder-ro,.elfinder-na)').addClass('native-droppable'); target = tree.find('div.'+pastable).find(selNavdir+':not(.'+droppable+',.elfinder-ro,.elfinder-na)'); } if (target.length > limit...
1
g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,Q,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e....
1
Signature.prototype.toDER = function toDER(enc) { var r = this.r.toArray(); var s = this.s.toArray(); if (r[0] & 0x80) r = [ 0 ].concat(r); if (s[0] & 0x80) s = [ 0 ].concat(s); r = rmPadding(r); s = rmPadding(s); while (!s[0] && !(s[1] & 0x80)) { s = s.slice(1); } var arr = [ 0x02 ]; constructLength(arr, ...
0
updateCurrentState: function(me) { var tmp = me.sourceState; if (tmp == null || graph.getLinkForCell(tmp.cell) == null) { var cell = graph.getCellAt(me.getGraphX(), me.getGraphY(), null, null, null, function(state, x, y) { return graph.getLinkForCell(state.cell) == null; ...
0
comments: concatComments(comments), groupName: grabSemantic(mailbox.groupName) }; } function grabSemantic(n) { return n !== null && n !== undefined ? n.semantic : null; } function simplifyResult(result) { var i; if (result && result.addresses) { for (i = 0; i < result.addresses.length; i += 1) { delete resul...
0
J))}}finally{m.getModel().endUpdate()}}else{J=m.model.getParent(H);var D=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(y=m.layoutManager.getLayout(J));if(null!=y&&y.constructor==mxStackLayout)x=J.getIndex(H),37==g||38==g?m.model.add(J,H,Math.max(0,x-...
1
"remote",R.etag,"rev",f.desc.headRevisionId,"response",[R],"file",[f]),q(Q,R)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(R){x(R)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(E){f.saveLevel=9;if(E||null==W)U(E);else{var J=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){J=!1;q...
1
this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):R.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var ba=this.graph.getCellStyle(T);if(null!=ba&&"rack"==ba.childLayout){var ia=new mxStackLayout(this.graph,!1);ia.gridSize=null!=ba.rackUnitSize?par...
1
mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==K&&(K=b.shapeForegroundColor);return K};this.createStyle=function(K){var I=";fillColor=none;";B&&(I=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+K+I};this.stopDrawing=function(){if(0<l.length){if(B){for(var K=[],I=...
1
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){v...
0
var close = function(snippet) { var rect = snippet.getBoundingClientRect(); if (rect.width - (e.clientX - rect.left) < 40 && e.clientY - rect.top < 40) { snippet.innerHTML = ''; snippet.remove(); } }
0
function(c,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?c.lineTo(y,0):Y&&!N?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,J...
0
parseArguments: function() { var args = []; if (this.peekToken().text !== ')') { do { args.push(this.filterChain()); } while (this.expect(',')); } return args; },
1
k&&k()};EditorUi.prototype.alert=function(d,f,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,k,u,z,C){d=null!=d?d:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=Math.min(...
1
J.substring(0,17)&&(N[R].setAttribute("href",this.updateCustomLink(u,J)),Q=!0);Q&&this.labelChanged(E,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,E){if("data:action/json,"==E.substring(0,17))try{var J=JSON.parse(E.substring(17));null!=J.actions&&(this.updateCustomLinkActions(u,J.actions),E="data:action/j...
1
li.onclick = function() { getRecent() }
0
k(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellG...
0
arguments)};mxCellRenderer.registerShape("process",fa);mxCellRenderer.registerShape("process2",fa);mxUtils.extend(ha,mxRectangleShape);ha.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ha.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerSha...
0
c("iTotalRecords","recordsTotal");c=c("iTotalDisplayRecords","recordsFiltered");if(e!==q){if(1*e<a.iDraw)return;a.iDraw=1*e}d||(d=[]);Ka(a);a._iRecordsTotal=parseInt(h,10);a._iRecordsDisplay=parseInt(c,10);e=0;for(h=d.length;e<h;e++)ia(a,d[e]);a.aiDisplay=a.aiDisplayMaster.slice();ja(a,!0);a._bInitComplete||Pa(a,b);V(a...
0
function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); this._options = options; this._ended = false; this._ending = false; this._redirectCount = 0; this._redirects = []; this._requestBodyLength = 0; this._requestBodyBuffers = []; if (responseCallback) { ...
0
},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,...
1
null==Q&&(Q=this.getCurrentRoot(),null==Q&&(Q=this.getModel().getRoot()));if(null!=Q)for(var x=this.model.getChildCount(Q)-1;0<=x;x--){var z=this.model.getChildAt(Q,x),u=this.getScaledCellAt(E,L,z,d,f,g);if(null!=u)return u;if(this.isCellVisible(z)&&(f&&this.model.isEdge(z)||d&&this.model.isVertex(z))&&(u=this.view.get...
1
mxArchiMate3Node.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConst...
0
var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var...
1
mxConnectionHandler.prototype.redrawIcons=function(a,b){null!=a&&null!=a[0]&&null!=b&&(b=this.getIconPosition(a[0],b),a[0].bounds.x=b.x,a[0].bounds.y=b.y,a[0].redraw())};
0
exports.removeDuplicates = function (array, keyFieldName) { if (keyFieldName) return exports.mapToObjArray( exports.objArrayToSet(array, keyFieldName), keyFieldName ); else return Object.keys(exports.arrayToSet(array)); };
0
expression: function() { return this.assignment(); },
1
function(ba){var ia=ba.addTolerance,ra=!0;null!=this.style&&(ra="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ba.handJiggle&&ba.handJiggle.constructor==q&&!this.outline){ba.save();var ta=this.fill,ma=this.stroke;this.stroke=this.fill=null;var pa=this.configurePointerEvents,za=ba.setSt...
1
mxOutline.prototype.updateSvg=function(){null==this.svg&&(this.svg=this.createSvg(),this.addGestureListeners(this.svg),this.container.appendChild(this.svg));var a=this.getViewBox();this.svg.setAttribute("viewBox",Math.round(a.x)+" "+Math.round(a.y)+" "+Math.round(a.width)+" "+Math.round(a.height));a=this.source.backgro...
0
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefine...
1
0>ra&&(ra=U.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(U.fill||"");l.setStrokeWidth(ra);l.setDashed(!1);this._drawToContext(N,X,U);l.setDashed(qa);l.setStrokeWidth(ba);l.setStrokeColor(Z);l.setStrokeAlpha(ia)};A._drawToContext=function(N,X,U){N.begin();for(var Z=0;Z<X.ops.length;Z++){var ba=X.o...
1
w: $image.outerWidth(true), h: $image.outerHeight(true) }; $selection.css({ display: 'block', left: pos.left, top: pos.top, width: imageSize.w, height: imageSize.h }).data('target', $image); var sizingText = imageSize.w + 'x' + imageSize.h; $selection.find('.note-control-selection-info').text(sizingText); ...
0
Menus.prototype.addPopupMenuStyleItems = function(menu, cell, evt) { if (this.editorUi.editor.graph.getSelectionCount() == 1) { this.addMenuItems(menu, ['-', 'setAsDefaultStyle'], null, evt); } else if (this.editorUi.editor.graph.isSelectionEmpty()) { this.addMenuItems(menu, ['-', 'clearDefaultStyle'], null, evt); } };
1
`}},Symbol.toStringTag,{value:"Module"}));var xgt=function(){var i=function(it,et,st,pt){for(st=st||{},pt=it.length;pt--;st[it[pt]]=et);return st},a=[1,2],f=[1,5],p=[6,9,11,17,18,20,22,23,26,27,28],v=[1,15],m=[1,16],b=[1,17],E=[1,18],C=[1,19],D=[1,23],N=[1,24],B=[1,27],j=[4,6,9,11,17,18,20,22,23,26,27,28],R={trace:func...
1
return V};EditorUi.prototype.getXmlFileData=function(c,e,k,n){c=null!=c?c:!0;e=null!=e?e:!1;k=null!=k?k:!Editor.defaultCompressed;var p=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(G){var C=G.getElementsByTagName("mxGraphModel");C=0<C.length?C[0]:null;null==C&&k?(C=mxUtil...
1
Reference.prototype.resolve = function() { var reference = this; while (reference.parent) { reference = reference.getParent(); } return reference.pointer; };
0
k?"&mime="+k:"")+(null!=p?"&format="+p:"")+(null!=q?"&base64="+q:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,l=Math.ceil(k/1024),p=Array(l),q=0;q<l;++q){for(var x=1024*q,y=Math.min(x+1024,k),A=Array(y-x),B=0;...
0
writeFile: function (dist, content, encoding, callback) { dist = path.resolve(dist); if (typeof encoding === 'function') { callback = encoding; encoding = 'utf-8'; } fsPath.mkdir(path.dirname(dist), function (err) { if (err) { callback(err); } else { fs.writeFile(dist, content, { encoding: encoding }, callb...
0
function bootstrap(element, modules, config) { if (!isObject(config)) config = {}; var defaultConfig = { strictDi: false }; config = extend(defaultConfig, config); var doBootstrap = function() { element = jqLite(element); if (element.injector()) { var tag = (element[0] === window.document) ? 'document' : startingTag(el...
1
function make_object_interpreter(object, arity, login, fallback) { return function(user_command, terminal) { if (user_command === '') { return; } var command; try { command = get_processed_command(user_command); } catch (e) { if (is_function(settings.exception)) { settings.exception(e, self); } else { self....
0
var go = function(){ var html = [], dirs = false, ltmb = [], atmb = {}, last = buffer._last || cwd.find('[id]:last'), top = !last.length, place = buffer._place || (list ? cwd.children('table').children('tbody') : cwd), chk, files, locks; top && (wrapper._top = 0); if (!!wrapper._mousedown && wrapper._top != wrapper.scr...
1
else{var va=function(wa){qa&&b.sidebar.currentElt==da&&ia(wa,mxEvent.getClientX(ma),mxEvent.getClientY(ma));qa=!1;la.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=da;qa=!0;la.src="/images/aui-wait.gif";ka.isExt?L(ka,va,function(){k(mxResources.get("cantLoadPrev"));qa=!1;la.src="/images/ico...
1
this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(T,Q){var W=1;if(null!=this.shape.state){var Z=this.shape.state.cell.id;if(null!=Z)for(var ba=0;ba<Z.length;ba++)W=(W<<5)-W+Z.charCodeAt(ba)<...
1
"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var d=this.getCellGeometry(E);null!=d&&d.relative;)E=this.getModel().getParent(E),d=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.i...
0
Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(...
0
this.get("insert"),fa=ca.funct;ca.funct=function(J,Z){"1"==urlParams.sketch?(C.menus.addMenuItems(J,["toggleShapes"],Z),C.menus.addSubmenu("table",J,Z),J.addSeparator(Z),C.insertTemplateEnabled&&!C.isOffline()&&C.menus.addMenuItems(J,["insertTemplate"],Z),C.menus.addMenuItems(J,["insertImage","insertLink","-"],Z),C.men...
1
ma.x=Math.round(A.snap(ma.x));ma.y=Math.round(A.snap(ma.y));"auto"==E&&(ma.width=Math.round(A.snap(ma.width)));"auto"==H&&(ma.height=Math.round(A.snap(ma.height)))}};if("["==O.charAt(0)){var va=p;A.view.validate();this.executeLayoutList(JSON.parse(O),function(){ya();va()});p=null}else if("circle"==O){var ra=new mxCircl...
1
e.destroy()});var u=mxUtils.getOffset(a);e.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(e,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==e||null==e.div||null==e.div.parentNode;n.preventDefault()}))}};Toolbar.pr...
0
function is_path(url) { return url.match(/^\.{1,2}\//) || url.match(/^\//) || !(url.match(/\//) || url.match(/^[^:]+:/)); }
0
!q,null!=F&&q&&(t.shadowVisible=F),this.editor.graph.model.execute(t))});d=new BackgroundImageDialog(this,d,g,n,q);this.showDialog(d.container,400,q?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,n,q,t){d=new LibraryDialog(this,d,g,n,q,t);this.showDialog(d.container,640,440,!0,!1,mxUtils.bin...
1
0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(b.setShadow(!1),ab.apply(this,[b,h,q,l,p]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||...
0
mxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots){var d=a.roots;c=[];for(var e=0;e<d.length;e++)c[e]=a.vertexMapper.get(d[e])}a.visit(function(f,g,k,l,m){l=null!=f&&f.swimlaneIndex==g.swimlaneIndex&&g.isAncestor(f);m=null!=f&&n...
0
(function(h){(function(y){(function(z){(function(B){var m=function(){function g(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}g.prototype.addGeometry=function(b){b=new h.mxgraph.io.vsdx.mxVsdxGeometry(b,this.par...
0
BlockHash.prototype.digest = function digest(enc) { this.update(this._pad()); assert(this.pending === null); return this._digest(enc); };
0
A){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=A))};Editor.mermaidToDrawio=function(l,A,N){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(l,A,N)};Editor.configure=function(l){if(null!=l){Editor.config=l;Editor.configVersion=l.version;l.debug&&(urlParams.test="1");null!=l.defaultFonts&...
1
Da.substring(0,1).toUpperCase()+Da.substring(1));18<Da.length&&(Da=Da.substring(0,18)+"&hellip;");return Da+(null!=va?" ("+va.length+")":"")}function ma(Da,va,Ma){mxEvent.addListener(va,"click",function(){Ha!=va&&(null!=Ha&&(Ha.style.backgroundColor=""),Ha=va,Ha.style.backgroundColor=u,ha.scrollTop=0,ha.innerText="",y=...
1
const convict = function convict(def, opts) { const rv = { getArgs: function() { return opts && opts.args || process.argv.slice(2) }, getEnv: function() { return opts && opts.env || process.env }, getProperties: function() { return cloneDeep(this._instance) }, toString: function() { const clone = cloneDeep(...
0
mxShapeMockupFormsCheckbox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(.8*b,.2*c);a.lineTo(.4*b,.8*c);a.lineTo(.25*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupFormsCheckbox.prototype.cst.CHECKBOX,mxShapeMockupFormsCheckbox);funct...
0
this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(K);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&u(d)&&this.setTabCon...
1
l?E=new mxHierarchicalLayout(u,mxConstants.DIRECTION_WEST):"circle"==l?E=new mxCircleLayout(u):(E=new mxFastOrganicLayout(u,!1),E.forceConstant=80);if(null!=E){var R=function(k,n){u.getModel().beginUpdate();try{null!=k&&k(),E.execute(u.getDefaultParent(),K)}catch(p){throw p;}finally{k=new mxMorphing(u),k.addListener(mx...
1
async function pipe(input, target, options) { input = toStream(input); try { if (input[_reader.externalBuffer]) { const writer = getWriter(target); for (let i = 0; i < input[_reader.externalBuffer].length; i++) { await writer.ready; await writer.write(input[_reader.externalBuffer][i]); } writer.releaseLock(); ...
0
End of preview. Expand in Data Studio

JavaScript Vulnerability Detection Dataset

A cleaned, leakage-controlled dataset of JavaScript functions labelled vulnerable or safe, built for an MSc project comparing fine-tuned code language models (CodeBERT, GraphCodeBERT, UniXcoder) on function-level vulnerability detection.

Companion model: sijjeel/js-vuln-unixcoder

Files

File Rows Vulnerable Purpose
balanced10k_train.csv 6,990 49.9% Training
balanced10k_val.csv 1,498 49.9% Validation
balanced10k_test.csv 1,499 50.0% In-distribution test

Columns: code (the function source) and label (1 = vulnerable, 0 = safe).

Construction

Primary source. Derived from CVEfixes (Bhandari et al., 2021), which links CVE records to fixing commits and extracts before-fix and after-fix function versions. The raw JavaScript portion held 19,422 functions at roughly a 9:1 safe-to-vulnerable ratio.

Cleaning. Removed label conflicts (identical code carrying both labels, caused by fixes that did not alter the method body), cross-split leakage, trivial snippets, exact duplicates, minified one-liners and extreme-length entries. 19,198 functions remained at natural prevalence (approximately 9% vulnerable).

Balancing. A second openly licensed source (Guo and Khan, 2024, MIT) contributed 17,307 unique functions after whitespace-normalised de-duplication. 149 overlapped with validation or test entries and were removed. That source was 75% cross-site scripting (CWE-79), which was capped during sampling to preserve vulnerability-type diversity. The balanced splits blend both sources and were verified to have zero overlap with the natural-prevalence test set.

External test set. 432 JavaScript functions from CrossVul (Nikitopoulos et al., 2021), held out entirely and never used for training, validation or threshold calibration.

Intended use

Research on function-level vulnerability detection in JavaScript, and in particular on cross-dataset generalisation. Not suitable for production security screening.

Limitations

  • Function-level labelling. The entire pre-fix function is labelled vulnerable, so benign lines carry a positive label. This limitation is inherent to the CVEfixes construction and is documented by its authors and by later audits (Croft et al., 2023).
  • Formatting skew. Much of the source data is minified, which is not representative of hand-written code.
  • Vulnerability-type skew. Cross-site scripting is over-represented even after capping.
  • Does not generalise across datasets. Models trained on these splits reach AUC-ROC around 0.92 in-distribution but approximately 0.50 on the CrossVul external set. This distribution shift is the central finding of the associated project, not a defect to be worked around silently.

Licensing

Derived from openly licensed sources. Guo and Khan (2024) is MIT-licensed. Verify the licences of CVEfixes and CrossVul against their upstream repositories and update the license field above to match the most restrictive applicable terms.

References

Bhandari, G., Naseer, A. and Moonen, L. (2021) 'CVEfixes: automated collection of vulnerabilities and their fixes from open-source software', Proceedings of the 17th International Conference on Predictive Models and Data Analytics in Software Engineering.

Croft, R., Babar, M.A. and Kholoosi, M.M. (2023) 'Data quality for software vulnerability datasets', Proceedings of the 45th International Conference on Software Engineering.

Guo, Y. and Khan, Z.A. (2024) JavaScript vulnerability dataset. Zenodo.

Nikitopoulos, G. et al. (2021) 'CrossVul: a cross-language vulnerability dataset with commit data', Proceedings of the 29th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering.

Downloads last month
31