Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
UPDATING Allow "beforeChange" event handlers to influence a change
function filterChange(doc, change, update) { var obj = { canceled: false, from: change.from, to: change.to, text: change.text, origin: change.origin, cancel: function () { return obj.canceled = true; } }; if (update) { obj.update = function (from, to, text, origin) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_beforeChange () {\n // nop\n }", "_beforeChange () {\n // nop\n }", "afterValidChange() { }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when p...
[ "0.79979867", "0.79979867", "0.7394063", "0.71244186", "0.712134", "0.696543", "0.69208336", "0.6911699", "0.68549484", "0.6852987", "0.6852832", "0.6847706", "0.6826507", "0.68111897", "0.6745635", "0.6742414", "0.6727392", "0.6717367", "0.6686759", "0.66838634", "0.66737986...
0.0
-1
Apply a change to a document, and add it to the document's history, and propagating it to all linked documents.
function makeChange(doc, change, ignoreReadOnly) { if (doc.cm) { if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) } if (doc.cm.state.suppressEdits) { return } } if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { cha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "apply(doc) {\n if (this.length != doc.length)\n throw new RangeError(\"Applying change set to a document with the wrong length\");\n iterChanges(this, (fromA, toA, fromB, _toB, text) => doc = doc.replace(fromB, fromB + (toA - fromA), text), false);\n return doc;\n }", "function...
[ "0.63611466", "0.6288531", "0.6288531", "0.6288531", "0.6288531", "0.6288531", "0.6288531", "0.6288531", "0.6288531", "0.6288531", "0.6288531", "0.6288531", "0.6286658", "0.6273469", "0.6273469", "0.6273469", "0.6273469", "0.6273469", "0.6273469", "0.6273469", "0.6273469", ...
0.0
-1
Revert a change stored in a document's history.
function makeChangeFromHistory(doc, type, allowSelectionOnly) { var suppress = doc.cm && doc.cm.state.suppressEdits; if (suppress && !allowSelectionOnly) { return } var hist = doc.history, event, selAfter = doc.sel; var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.und...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function undo() {\n var doc = app.activeDocument;\n var states = doc.historyStates;\n \n var curr = 0;\n for (var i=0; i<states.length; i++) {\n if (states[i] == doc.activeHistoryState) {\n curr = i;\n }\n }\n \n var prev ...
[ "0.66680455", "0.66616225", "0.6657286", "0.6404642", "0.6340545", "0.63315004", "0.62797564", "0.62797564", "0.62788147", "0.62651217", "0.6206819", "0.6140144", "0.6129406", "0.6101191", "0.6099247", "0.60932523", "0.6078618", "0.5995395", "0.59712195", "0.59365827", "0.593...
0.0
-1
Subviews need their line numbers shifted when text is added above or below them in the parent document.
function shiftDoc(doc, distance) { if (distance == 0) { return } doc.first += distance; doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range( Pos(range.anchor.line + distance, range.anchor.ch), Pos(range.head.line + distance, range.head.ch) ); }), doc.sel.primIndex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bn(e,t,a,n){null==t&&(t=e.doc.first),null==a&&(a=e.doc.first+e.doc.size),n||(n=0);var r=e.display;if(n&&a<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)// Change after\n Jo&&pe(e.doc,t)<r.viewTo&&vn(e);else if(a<=r.viewFrom)// C...
[ "0.59886837", "0.5932061", "0.5651753", "0.56376565", "0.55780476", "0.55274785", "0.55163205", "0.55099046", "0.5506641", "0.54507947", "0.5449167", "0.5448703", "0.54459953", "0.54459953", "0.54459953", "0.54459953", "0.54459953", "0.54459953", "0.54459953", "0.54459953", "...
0.0
-1
More lowerlevel change function, handling only a single document (not linked ones).
function makeChangeSingleDoc(doc, change, selAfter, spans) { if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) } if (change.to.line < doc.first) { shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); return }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change(docId, doc) {\n const cleanedDoc = this._getCleanedObject(doc);\n let storedDoc = this.store[docId];\n deepExtend(storedDoc, cleanedDoc);\n\n let changedData = {};\n _.each(cleanedDoc, (value, key) => {\n changedData[key] = storedDoc[key];\n });\n\n ...
[ "0.70032954", "0.6605747", "0.6573152", "0.65437555", "0.6486668", "0.6486668", "0.64346707", "0.64346707", "0.64346707", "0.64346707", "0.64346707", "0.6405342", "0.6405342", "0.6405342", "0.6405342", "0.6405342", "0.6405342", "0.6403209", "0.63989764", "0.6398355", "0.63615...
0.6453599
17
Handle the interaction of a change to a document with the editor that this document is part of.
function makeChangeSingleDocInEditor(cm, change, spans) { var doc = cm.doc, display = cm.display, from = change.from, to = change.to; var recomputeMaxLength = false, checkWidthStart = from.line; if (!cm.options.lineWrapping) { checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); doc.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _onCurrentDocumentChange() {\n var doc = DocumentManager.getCurrentDocument(),\n container = _editorHolder.get(0);\n \n var perfTimerName = PerfUtils.markStart(\"EditorManager._onCurrentDocumentChange():\\t\" + (!doc || doc.file.fullPath));\n\n // Remove scroller-sha...
[ "0.6989578", "0.68647164", "0.6661219", "0.6592309", "0.65232587", "0.63881063", "0.63272256", "0.63092566", "0.6279335", "0.62503177", "0.61630493", "0.61265033", "0.61171705", "0.61171705", "0.6100543", "0.6096026", "0.60762805", "0.60762805", "0.6036763", "0.6016115", "0.6...
0.59413064
59
Rebasing/resetting history to deal with externallysourced changes
function rebaseHistSelSingle(pos, from, to, diff) { if (to < pos.line) { pos.line += diff; } else if (from < pos.line) { pos.line = from; pos.ch = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetHistory() {\n // TODO: clean out localStorage\n ExCommandHistory.resetHistory();\n }", "function clearChangeHistory() {\n changeHistory = [];\n historyPosition = 0;\n }", "function setHistory() {\n // clear undo history\n $('#undoHistoryList')\n .empty()...
[ "0.7398873", "0.73758394", "0.7114035", "0.69220054", "0.6904946", "0.68740624", "0.68633354", "0.68047863", "0.67265755", "0.6599614", "0.6581044", "0.6556663", "0.6539293", "0.6528778", "0.6519331", "0.648415", "0.64797103", "0.646039", "0.6439766", "0.64363205", "0.6433971...
0.0
-1
Tries to rebase an array of history events given a change in the document. If the change touches the same lines as the event, the event, and everything 'behind' it, is discarded. If the change is before the event, the event's positions are updated. Uses a copyonwrite scheme for the positions, to avoid having to realloc...
function rebaseHistArray(array, from, to, diff) { for (var i = 0; i < array.length; ++i) { var sub = array[i], ok = true; if (sub.ranges) { if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } for (var j = 0; j < sub.ranges.length; j++) { rebaseHistSelSingle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n for (var j = 0; j < sub.changes.length; ++j) {\n var cur = sub.changes[j];\n if (!sub.copied) { cur.from = copyPos(cur.from); cur.to = copyPos(cur.to); }\n ...
[ "0.6718455", "0.6718455", "0.6718455", "0.6718455", "0.6492295", "0.648774", "0.6472811", "0.6472811", "0.6472811", "0.6472811", "0.6472811", "0.6472811", "0.6472811", "0.64685804", "0.64341486", "0.64341486", "0.6425354", "0.6421519", "0.63940966", "0.63940966", "0.63940966"...
0.64719915
29
Utility for applying a change to a line by handle or number, returning the number and optionally registering the line as changed.
function changeLine(doc, handle, changeType, op) { var no = handle, line = handle; if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); } else { no = lineNo(handle); } if (no == null) { return null } if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); } r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeLine(doc, handle, changeType, op) {\n\t var no = handle, line = handle;\n\t if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n\t else no = lineNo(handle);\n\t if (no == null) return null;\n\t if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType)...
[ "0.73571676", "0.73571676", "0.73571676", "0.73494065", "0.73494065", "0.73494065", "0.73494065", "0.73494065", "0.73494065", "0.73494065", "0.73469555", "0.7316735", "0.73150647", "0.7235541", "0.7235541", "0.7227161", "0.7227161", "0.7227161", "0.7227161", "0.7227161", "0.7...
0.7342512
23
The document is represented as a BTree consisting of leaves, with chunk of lines in them, and branches, with up to ten leaves or other branch nodes below them. The top node is always a branch node, and is the document object itself (meaning it has additional methods and properties). All nodes have parent links. The tre...
function LeafChunk(lines) { this.lines = lines; this.parent = null; var height = 0; for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; height += lines[i].height; } this.height = height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BTree(){\n\tthis.root = null;\n\tthis.length = 0;\n}", "function documentFragment(children, height, depth, maxFontSize) {\n this.children = children || [];\n this.height = height || 0;\n this.depth = depth || 0;\n this.maxFontSize = maxFontSize || 0;\n}", "function documentFragment(childre...
[ "0.5686588", "0.545292", "0.545292", "0.5316049", "0.5282906", "0.52820325", "0.5277185", "0.5250241", "0.52339", "0.51990473", "0.51844394", "0.5180048", "0.51776135", "0.51741374", "0.51716566", "0.51716566", "0.5167105", "0.5155398", "0.5155398", "0.51544017", "0.51374495"...
0.5140878
27
Create a marker, wire it up to the right lines, and
function markText(doc, from, to, options, type) { // Shared markers (across linked documents) are handled separately // (markTextShared will call out to this again, once per // document). if (options && options.shared) { return markTextShared(doc, from, to, options, type) } // Ensure we are in an op...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawMarker(lineWidth, lineHeightPerc, offset, markerLength, horiz) {\n var start, end;\n var height = em.height();\n if (horiz) {\n start = { x: offset, y: height};\n end = { x: offset, y: height - (markerLength*lineHeightPerc)};\n...
[ "0.70629317", "0.6923921", "0.6829593", "0.6760992", "0.6707142", "0.6680169", "0.6593751", "0.65839785", "0.65754306", "0.6537855", "0.645969", "0.6453781", "0.6453521", "0.6445277", "0.6431482", "0.6415655", "0.63720506", "0.6368411", "0.6367104", "0.63644373", "0.6347738",...
0.0
-1
These must be handled carefully, because naively registering a handler for each editor will cause the editors to never be garbage collected.
function forEachCodeMirror(f) { if (!document.getElementsByClassName) { return } var byClass = document.getElementsByClassName("CodeMirror"), editors = []; for (var i = 0; i < byClass.length; i++) { var cm = byClass[i].CodeMirror; if (cm) { editors.push(cm); } } if (editors.length) { edi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _registerHandlers(editor) {\n $(editor).on(\"keyEvent\", _cursorHandler);\n $(editor.document).one(\"change\", _handler);\n editor.document.addRef();\n }", "getEditorListeners() {\n return {\n focusout: 'onEditorFocusOut',\n focusin: 'onEditorFocusIn',\n start: ...
[ "0.7412128", "0.6621844", "0.6621844", "0.6262634", "0.6257714", "0.607542", "0.6045522", "0.60446435", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", "0.597748", ...
0.0
-1
Called when the window resizes
function onResize(cm) { var d = cm.display; // Might be a text scaling operation, clear size caches. d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; d.scrollbarsClipped = false; cm.setSize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onWindowResize() {\n updateSizes();\n }", "function windowResized() {\n resize();\n redraw();\n}", "onWindowResize() {\n\t\tthis.windowHeight = this.getWindowHeight();\n\t\tthis.updatePosition();\n\t}", "function onWindowResize() {\n\n\t\t\t}", "function windowResized() {\n resizeCanvas...
[ "0.87504816", "0.8489634", "0.84696436", "0.8312124", "0.7998738", "0.79904795", "0.7962713", "0.7941597", "0.79165184", "0.79024243", "0.7881844", "0.7881551", "0.78685206", "0.78685206", "0.7828244", "0.78222525", "0.78173137", "0.7804665", "0.7797177", "0.778925", "0.77879...
0.0
-1
This is a kludge to keep keymaps mostly working as raw objects (backwards compatibility) while at the same time support features like normalization and multistroke key bindings. It compiles a new normalized keymap, and then updates the old object to reflect this.
function normalizeKeyMap(keymap) { var copy = {}; for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) { var value = keymap[keyname]; if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue } if (value == "...") { delete keymap[keyname]; continue } var keys = map(k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeKeyMap(keymap) {\n\t\t var copy = {};\n\t\t for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n\t\t var value = keymap[keyname];\n\t\t if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n\t\t if (value == \"...\") { delete keymap[keyname]; co...
[ "0.68514186", "0.66198206", "0.6603239", "0.6603239", "0.6602559", "0.65583634", "0.65583634", "0.65583634", "0.65583634", "0.65583634", "0.65583634", "0.65583634", "0.65583634", "0.65583634", "0.65583634", "0.65583634", "0.58321124", "0.55477774", "0.55415845", "0.5539959", ...
0.6629671
16
Modifier key presses don't count as 'real' key presses for the purpose of keymap fallthrough.
function isModifierKey(value) { var name = typeof value == "string" ? value : keyNames[value.keyCode]; return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function usualKeys(e) {\n\t\t\tview.put(String.fromCharCode(e.which));\n\t\t\treturn false;\n\t\t}", "function bufferModifier(e) { return e.shiftKey*1 + e.ctrlKey*2 + e.altKey*4 }", "function keyName(event, noShift) {\n\t\t if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n\t\t var ...
[ "0.71554196", "0.6904054", "0.68411905", "0.6807457", "0.67904764", "0.67508173", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564", "0.6713564",...
0.64971703
60
Look up the name of a key as indicated by an event object.
function keyName(event, noShift) { if (presto && event.keyCode == 34 && event["char"]) { return false } var name = keyNames[event.keyCode]; if (name == null || event.altGraphKey) { return false } // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause, // so we'll use event.code when available (Chrome ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventName(event_id) {\n for(var i in event_reference) {\n var obj = event_reference[i];\n if(obj.id === event_id)\n return obj.name;\n }\n return undefined;\n}", "function grabKey(obj, key) {\n return obj[key];\n}", "function getKey(object, key) {\n return obje...
[ "0.68437785", "0.66774225", "0.6616543", "0.63617873", "0.6232344", "0.58947927", "0.58873767", "0.582189", "0.5820872", "0.57668227", "0.57626027", "0.5733329", "0.57292217", "0.571779", "0.571779", "0.571779", "0.571779", "0.57143486", "0.57070446", "0.57045966", "0.5690433...
0.0
-1
Helper for deleting text near the selection(s), used to implement backspace, delete, and similar functionality.
function deleteNearSelection(cm, compute) { var ranges = cm.doc.sel.ranges, kill = []; // Build up a set of ranges to kill first, merging overlapping // ranges. for (var i = 0; i < ranges.length; i++) { var toKill = compute(ranges[i]); while (kill.length && cmp(toKill.from, lst(kill).to) <= ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeTextSelections() {\n if (document.selection) document.selection.empty();\n else if (window.getSelection) window.getSelection().removeAllRanges();\n}", "function removeTextSelection() {\n\n if (window.getSelection) {\n\n window.getSelection().removeAllRanges();\n\n } else if (document.se...
[ "0.74456984", "0.7390331", "0.7098297", "0.7048888", "0.6970701", "0.69376636", "0.69182247", "0.6821997", "0.68106675", "0.6800755", "0.6720468", "0.6719371", "0.6719371", "0.6719371", "0.6719371", "0.6719371", "0.6719371", "0.6719371", "0.6719371", "0.6719371", "0.66853714"...
0.57738036
92
Run a handler that was bound to a key.
function doHandleBinding(cm, bound, dropShift) { if (typeof bound == "string") { bound = commands[bound]; if (!bound) { return false } } // Ensure previous input has been read, so that the handler sees a // consistent view of the document cm.display.input.ensurePolled(); var prevShif...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getBindingHandler (/* key */) {}", "function receive(key, handler) {\n pxsim.board().bus.listen(key, 0x1, handler);\n }", "function bind(key, action) {\r\n bindings[key] = action; \r\n\r\n}", "function listen(key, callback) {\n handlers[key] = callback;\n}", "function handleCb(key, ...
[ "0.66893464", "0.6387576", "0.6263076", "0.6140119", "0.6125587", "0.5889015", "0.5853597", "0.5827518", "0.5789461", "0.5789461", "0.5789461", "0.5789461", "0.5789461", "0.57228875", "0.5662782", "0.5644284", "0.5632373", "0.5600212", "0.5537149", "0.55028874", "0.5479583", ...
0.0
-1
Handle a key from the keydown event.
function handleKeyBinding(cm, e) { var name = keyName(e, true); if (!name) { return false } if (e.shiftKey && !cm.state.keySeq) { // First try to resolve full name (including 'Shift-'). Failing // that, see if there is a cursor-motion command (starting with // 'go') bound to the keyname w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HandleKeyDown(event) {}", "function keydown_handler(event)\n{\n\tif (event.defaultPrevented) return;\n\tif (game.handle_key(event.code, true)) return;\n\n\t// cancel the default action to avoid it being handled twice\n\tevent.preventDefault();\n}", "function keyDownHandler(event) {\n keyHandler(true, event)...
[ "0.775545", "0.7531992", "0.7253767", "0.71955645", "0.71929777", "0.71917444", "0.7183162", "0.715556", "0.7124231", "0.7111242", "0.7088713", "0.7051842", "0.7051158", "0.7048878", "0.7048878", "0.70424455", "0.70308423", "0.7003227", "0.6974658", "0.6955478", "0.695327", ...
0.0
-1
Handle a key from the keypress event
function handleCharBinding(cm, e, ch) { return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HandleKeyDown(event) {}", "function handleKeyPress({ key }) {\n dispatch(playerTyped(key.toLowerCase()));\n }", "handleInput(keycode) {\n if (keycode !== undefined && player.moves === true) {\n key = keycode;\n }\n }", "handleKeyPress(kEvent) {\n switch (kEvent.keyCod...
[ "0.7767834", "0.765871", "0.758574", "0.74911857", "0.741585", "0.7402115", "0.7374124", "0.737354", "0.73173136", "0.72986954", "0.7289434", "0.7274268", "0.7264864", "0.72491187", "0.72488683", "0.7228675", "0.7217789", "0.7216279", "0.7157265", "0.71438694", "0.71438676", ...
0.0
-1
A mouse down can be a single click, double click, triple click, start of selection drag, start of text drag, new cursor (ctrlclick), rectangle drag (altdrag), or xwin middleclickpaste. Or it might be a click on something we should not interfere with, such as a scrollbar or widget.
function onMouseDown(e) { var cm = this, display = cm.display; if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return } display.input.ensurePolled(); display.shift = e.shiftKey; if (eventInWidget(display, e)) { if (!webkit) { // Briefly turn off dr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n display.input.ensurePolled();\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefl...
[ "0.7091867", "0.7091867", "0.7091618", "0.7091618", "0.7091618", "0.7091618", "0.7091618", "0.7091618", "0.7091618", "0.7091618", "0.7091618", "0.7091199", "0.70880425", "0.7081969", "0.70559573", "0.70553166", "0.70553166", "0.70397806", "0.7016578", "0.6998851", "0.6998704"...
0.7023528
27
Start a text drag. When it ends, see if any dragging actually happen, and treat as a click if it didn't.
function leftButtonStartDrag(cm, event, pos, behavior) { var display = cm.display, moved = false; var dragEnd = operation(cm, function (e) { if (webkit) { display.scroller.draggable = false; } cm.state.draggingText = false; off(display.wrapper.ownerDocument, "mouseup", dragEnd); off(disp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startDragText(evt)\r\n{\r\n\r\n if(ActiveElem&&!DraggingObj) //---prevents dragging conflicts on other draggable elements---\r\n {\r\n if(evt.target.parentNode.getAttribute(\"id\")==\"activeText\")\r\n {\r\n if(evt.target.parentNode.parentNode.getAttribute(\"class\")==\"drag...
[ "0.66870064", "0.64880925", "0.64526504", "0.643963", "0.63796633", "0.6295826", "0.62258095", "0.6052833", "0.6033996", "0.6015346", "0.60106355", "0.60037816", "0.59898204", "0.5974962", "0.5962932", "0.5919407", "0.5909692", "0.58979154", "0.58868265", "0.5882919", "0.5857...
0.0
-1
Normal selection, as opposed to text dragging.
function leftButtonSelect(cm, event, start, behavior) { var display = cm.display, doc = cm.doc; e_preventDefault(event); var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; if (behavior.addNew && !behavior.extend) { ourIndex = doc.sel.contains(start); if (ourIndex > -1) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unselectText_() {\n try {\n this.win.getSelection().removeAllRanges();\n } catch (e) {\n // Selection API not supported.\n }\n }", "clearSelection() {\n this._clearSelection();\n }", "cut() {\n if (this.owner.isReadOnlyMode || this.selection.isEmpty) {\n return;\...
[ "0.7486875", "0.72677946", "0.7257403", "0.72473305", "0.72473305", "0.72473305", "0.71620464", "0.71620464", "0.71315503", "0.7116692", "0.7113116", "0.70956546", "0.7062658", "0.7048435", "0.7040968", "0.7010727", "0.7001272", "0.69776547", "0.6956012", "0.6949947", "0.6938...
0.0
-1
Used when mouseselecting to adjust the anchor to the proper side of a bidi jump depending on the visual position of the head.
function bidiSimplify(cm, range) { var anchor = range.anchor; var head = range.head; var anchorLine = getLine(cm.doc, anchor.line); if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range } var order = getOrder(anchorLine); if (!order) { return range } var index = getBidiP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLabelAnchor(d) {\r\n if (d.target.x >= (d.source.x + 20)) return \"start\";\r\n if (d.target.x <= (d.source.x - 20)) return \"end\";\r\n return \"middle\";\r\n }", "function updateAnchorPos() {\n if (!labelSim.selection) return;\n\n labelSim.selection.each(function(d) {\n v...
[ "0.6865997", "0.65352046", "0.63302565", "0.6309565", "0.6135887", "0.6132395", "0.6033308", "0.6033308", "0.6033308", "0.5898258", "0.5860216", "0.5860216", "0.5860216", "0.5844974", "0.5740096", "0.5736967", "0.5736967", "0.5736967", "0.5736967", "0.569803", "0.56956744", ...
0.0
-1
Determines whether an event happened in the gutter, and fires the handlers for the corresponding event.
function gutterEvent(cm, e, type, prevent) { var mX, mY; if (e.touches) { mX = e.touches[0].clientX; mY = e.touches[0].clientY; } else { try { mX = e.clientX; mY = e.clientY; } catch(e$1) { return false } } if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gutterEvent(cm, e, type, prevent, signalfn) {\n try { var mX = e.clientX, mY = e.clientY; }\n catch(e) { return false; }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false;\n if (prevent) e_preventDefault(e);\n\n var display = cm.display;\n var lineBox...
[ "0.6422186", "0.6422186", "0.6422186", "0.6422186", "0.6422186", "0.6422186", "0.6422186", "0.6414585", "0.6379669", "0.63603884", "0.63506794", "0.63389903", "0.63349676", "0.63349676", "0.63349676", "0.63349676", "0.63349676", "0.63349676", "0.63208854", "0.63208854", "0.63...
0.63234776
23
CONTEXT MENU HANDLING To make the context menu work, we need to briefly unhide the textarea (making it as unobtrusive as possible) to let the rightclick take effect on it.
function onContextMenu(cm, e) { if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return } if (signalDOMEvent(cm, e, "contextmenu")) { return } if (!captureRightClick) { cm.display.input.onContextMenu(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rightClickHandler(ev, textarea, screenElement, selectionService, shouldSelectWord) {\n moveTextAreaUnderMouseCursor(ev, textarea, screenElement);\n if (shouldSelectWord) {\n selectionService.rightClickSelect(ev);\n }\n // Get textarea ready to copy from the context menu\n textarea.va...
[ "0.68549496", "0.66134685", "0.66105276", "0.65586615", "0.65378284", "0.65269154", "0.6480186", "0.64347166", "0.635688", "0.6342562", "0.63181025", "0.63181025", "0.63043785", "0.6293949", "0.6293949", "0.62910026", "0.6225243", "0.6213995", "0.62080663", "0.6180426", "0.61...
0.5824024
74
A CodeMirror instance represents an editor. This is the object that user code is usually dealing with.
function CodeMirror(place, options) { var this$1 = this; if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) } this.options = options = options ? copyObj(options) : {}; // Determine effective options based on given values and defaults. copyObj(defaults, options, false); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CodeMirror(place, options) {\n if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);\n\n this.options = options = options || {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n setGuttersForLineNumbers(options);...
[ "0.76397574", "0.75973415", "0.7584642", "0.7584642", "0.75527847", "0.75521165", "0.75487804", "0.7531102", "0.75298876", "0.7528814", "0.7528267", "0.7528267", "0.75014883", "0.74978673", "0.7479799", "0.7479799", "0.7479799", "0.7479799", "0.7479799", "0.7479799", "0.74789...
0.74789435
25
Attach the necessary event handlers when initializing the editor
function registerEventHandlers(cm) { var d = cm.display; on(d.scroller, "mousedown", operation(cm, onMouseDown)); // Older IE's will not fire a second mousedown for a double click if (ie && ie_version < 11) { on(d.scroller, "dblclick", operation(cm, function (e) { if (signalDOMEvent(cm, e)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n\n\t\t// Bind the editor elements to variables\n\t\tbindElements();\n\n\t\t// Create event listeners for keyup, mouseup, etc.\n\t\tcreateEventBindings();\n\t}", "initEventListners() {\n this.engine.getSession().selection.on('changeCursor', () => this.updateCursorLabels());\n\n th...
[ "0.80966556", "0.77389115", "0.75494534", "0.72982234", "0.7282955", "0.723292", "0.7122359", "0.71221983", "0.71001315", "0.7071713", "0.7025846", "0.6915193", "0.6894815", "0.68728834", "0.685716", "0.68458426", "0.68189013", "0.6798981", "0.6797055", "0.6743994", "0.672856...
0.0
-1
Indent the given line. The how parameter can be "smart", "add"/null, "subtract", or "prev". When aggressive is false (typically set to true for forced singleline indents), empty lines are not indented, and places where the mode returns Pass are left alone.
function indentLine(cm, n, how, aggressive) { var doc = cm.doc, state; if (how == null) { how = "add"; } if (how == "smart") { // Fall back to "prev" when the mode doesn't have an indentation // method. if (!doc.mode.indent) { how = "prev"; } else { state = getContextBefore(cm, n).st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function indentLine(cm, n, how, aggressive) {\n\t var doc = cm.doc, state;\n\t if (how == null) how = \"add\";\n\t if (how == \"smart\") {\n\t // Fall back to \"prev\" when the mode doesn't have an indentation\n\t // method.\n\t if (!doc.mode.indent) how = \"prev\";\n\t else state = ge...
[ "0.7560999", "0.7560999", "0.75511813", "0.75368756", "0.7525595", "0.74956495", "0.74829096", "0.74829096", "0.7468585", "0.74491745", "0.74491745", "0.74491745", "0.74491745", "0.7437678", "0.7415526", "0.7408092", "0.7408092", "0.7408092", "0.7408092", "0.7408092", "0.7408...
0.7505184
21
The publicly visible API. Note that methodOp(f) means 'wrap f in an operation, performed on its `this` parameter'. This is not the complete set of editor methods. Most of the methods defined on the Doc type are also injected into CodeMirror.prototype, for backwards compatibility and convenience.
function addEditorMethods(CodeMirror) { var optionHandlers = CodeMirror.optionHandlers; var helpers = CodeMirror.helpers = {}; CodeMirror.prototype = { constructor: CodeMirror, focus: function(){window.focus(); this.display.input.focus();}, setOption: function(option, value) { v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEditorMethods(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n var helpers = CodeMirror.helpers = {};\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){window.focus(); this.display.input.focus();},\n\n setOption: function(option, valu...
[ "0.66755027", "0.66755027", "0.66755027", "0.66755027", "0.66755027", "0.66755027", "0.66755027", "0.66755027", "0.66755027", "0.6658413", "0.6635639", "0.6635639", "0.66199344", "0.6608263", "0.6597126", "0.6597126", "0.615284", "0.61331004", "0.61331004", "0.61331004", "0.6...
0.66199344
16
Used for horizontal relative motion. Dir is 1 or 1 (left or right), unit can be "char", "column" (like char, but doesn't cross line boundaries), "word" (across next word), or "group" (to the start of next group of word or nonwordnonwhitespace chars). The visually param controls whether, in righttoleft text, direction 1...
function findPosH(doc, pos, dir, unit, visually) { var oldPos = pos; var origDir = dir; var lineObj = getLine(doc, pos.line); var lineDir = visually && doc.direction == "rtl" ? -dir : dir; function findNextLine() { var l = pos.line + lineDir; if (l < doc.first || l >= doc.first + doc.siz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPosH(doc, pos, dir, unit, visually) {\r\n var line = pos.line, ch = pos.ch, origDir = dir;\r\n var lineObj = getLine(doc, line);\r\n var possible = true;\r\n function findNextLine() {\r\n var l = line + dir;\r\n if (l < doc.first || l >= doc.first + doc.size) return (possible = f...
[ "0.61296076", "0.6125485", "0.6125485", "0.6125485", "0.6125485", "0.6125485", "0.6125485", "0.6122467", "0.60935616", "0.60555094", "0.60536236", "0.60270697", "0.60214835", "0.60214835", "0.60214835", "0.59962684", "0.59857744", "0.59748083", "0.59748083", "0.59748083", "0....
0.5998135
16
For relative vertical movement. Dir may be 1 or 1. Unit can be "page" or "line". The resulting position will have a hitSide=true property if it reached the end of the document.
function findPosV(cm, pos, dir, unit) { var doc = cm.doc, x = pos.left, y; if (unit == "page") { var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3); y = (dir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == \"page\") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, win(cm).innerHeight || doc(cm).documentElement.clientHeight);\n var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n ...
[ "0.69151056", "0.69151056", "0.6821693", "0.6810372", "0.6810372", "0.6810372", "0.6810372", "0.6810372", "0.6810372", "0.6810372", "0.6810372", "0.6810372", "0.6810372", "0.6810372", "0.68065315", "0.68065315", "0.67795277", "0.67302203", "0.67302203", "0.67302203", "0.67302...
0.6870279
15
Selectall will be greyed out if there's nothing to select, so this adds a zerowidth space so that we can later check whether it got selected.
function prepareSelectAllHack() { if (te.selectionStart != null) { var selected = cm.somethingSelected(); var extval = "\u200b" + (selected ? te.value : ""); te.value = "\u21da"; // Used to catch context-menu undo te.value = extval; input.prevInput = selected ? "" : "\u200b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectAll()\r\n\t\t{\r\n\t\t\tthis.focus();\r\n\t\t\tthis.select();\r\n\t\t}", "function show_select_all(){\r\n var th = getPatternResult(PATTERN['select_all']).snapshotItem(0);\r\n if (th == null) \r\n return;\r\n th.innerHTML = '<input type=\"checkbox\"/>';\r\n th.setAttribute('titl...
[ "0.7960442", "0.684858", "0.68469757", "0.68469757", "0.68469757", "0.68469757", "0.68469757", "0.6834171", "0.6793573", "0.6772544", "0.67601126", "0.67601126", "0.67601126", "0.67488813", "0.67488813", "0.674015", "0.674015", "0.67336243", "0.67294997", "0.6716153", "0.6716...
0.67056537
46
This is a crude lookahead trick to try and notice that we're parsing the argument patterns for a fatarrow function before we actually hit the arrow token. It only works if the arrow is on the same line as the arguments and there's no strange noise (comments) in between. Fallback is to only notice when we hit the arrow,...
function findFatArrow(stream, state) { if (state.fatArrowAt) state.fatArrowAt = null; var arrow = stream.string.indexOf("=>", stream.start); if (arrow < 0) return; if (isTS) { // Try to skip TypeScript return type declarations after the arguments var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFatArrow(stream, state) {\n if (state.fatArrowAt) state.fatArrowAt = null;\n var arrow = stream.string.indexOf(\"=>\", stream.start);\n if (arrow < 0) return;\n\n if (isTS) { // Try to skip TypeScript return type declarations after the arguments\n var m = /:\\s*(?:\\w+(?:<[^>]*>|\\[\\...
[ "0.65002364", "0.65002364", "0.65002364", "0.65002364", "0.65002364", "0.65002364", "0.65002364", "0.6379487", "0.5909741", "0.58358055", "0.5675954", "0.5675954", "0.5675954", "0.5672122", "0.56436837", "0.5634487", "0.5597511", "0.5436599", "0.5396029", "0.53609353", "0.520...
0.64995736
15
Variables: xSrc, ySrc : coordinates in source image xDst, yDst : coordinates in destination (projected) image uSrc, vSrc : uniform coordinates in source image uDst, vDst : uniform coordinates in destination image wSrc, hSrc : width and height of source image wDst, hDst : width and height of destination image Assumption...
function JSPanoViewer(opts) { var debug = false; // Set to true to enable some debug information // Private variables (non-changeable after initialization) var containerId; // id of pano container var container; // pano container var imageUrl; // url of source image var image; // source image var s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "project(ax, ay, az, angles){\r\n var x = ax - this.camera_p.x;\r\n var y = ay - this.camera_p.y;\r\n var z = az - this.camera_p.z;\r\n \r\n var dx = angles.cy*(angles.sz*y + angles.cz*x) - angles.sy*z;\r\n var dy = angles.sx*(angles.cy*z + angles.sy*(angles.sz*y + angles.cz*x)) + angles.cx*(angle...
[ "0.61471117", "0.6036922", "0.5688516", "0.5638165", "0.5613809", "0.55740416", "0.5479777", "0.53457654", "0.5290381", "0.5269545", "0.5267563", "0.5235603", "0.5201322", "0.5181598", "0.5171746", "0.51491964", "0.5145085", "0.511403", "0.50903916", "0.50893575", "0.50868213...
0.0
-1
Low Level Functions TODO
static get(path, successHandler, failureHandler) { // returns URL Storage.get(path).then((url) => { log&&console.log("Storage successfully retrieved file! URL = " + url); if (successHandler) { successHandler(url); } }).catch((error) => { err&&console.err...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "private public function m246() {}", "static private internal function m121() {}", "private internal function m248() {}", "function miFuncion (){}", "function FunctionUtils() {}", "transient protected internal function m189() {}", "static final private intern...
[ "0.6780673", "0.67056334", "0.6682646", "0.6682084", "0.6577993", "0.64812523", "0.64528537", "0.6422087", "0.6412744", "0.6412744", "0.6412744", "0.63291126", "0.6301539", "0.6300643", "0.62916064", "0.626478", "0.626478", "0.6158779", "0.6103225", "0.6051021", "0.6028055", ...
0.0
-1
... more overloads ...
function createElement(tagName) { return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "function oi(){}", "transient protected internal function m189() {}", "apply () {}", "function es1(params) {\n \n}", "transient private protected internal function m182() {}", "obtain(){}", "private internal function m248() {}", "function ba(){}", "function ...
[ "0.59703475", "0.56033206", "0.5592253", "0.558463", "0.55371785", "0.553448", "0.5449269", "0.54484195", "0.53812164", "0.53812164", "0.53812164", "0.53812164", "0.53737336", "0.536679", "0.53559905", "0.5351454", "0.53463596", "0.5333846", "0.5321548", "0.53132546", "0.5313...
0.0
-1
fetching email ids from db
function empDataCollection() { client.query('SELECT * from employees', (err, res) => { if (err) { errorLog(err, 'data fetching issue', 'Pending') } else { console.log('fetching email ids') res.rows.map(item => { //email validation ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchEmailsFromDatabase(callback) {\n const emails = [\n {\n author: 'Bobby Bob',\n subject: 'Hey Friend!',\n body: `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercita...
[ "0.687989", "0.6711965", "0.6588783", "0.646086", "0.6425887", "0.6421459", "0.6415822", "0.63674015", "0.633978", "0.63247657", "0.6318787", "0.6252117", "0.6244056", "0.6229757", "0.62080944", "0.6198618", "0.6193193", "0.6189425", "0.61688787", "0.6145366", "0.6138443", ...
0.63529164
8
fetching data from errorlog table for rerun the scheduler
function errorDataCollection() { let today = new Date() let pendingSchedule = [''] let currentTime = new Date() let timePeriod = new Date(currentTime.setMinutes(currentTime.getMinutes() - 8)); client.query(`SELECT * from schedule_error WHERE error_area != 'email validation' AND status != 'Suc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "refreshAnomalyTable() {\n const { anomalyIds, exploreDimensions } = this.currentModel;\n if (anomalyIds && anomalyIds.length) {\n get(this, 'loadAnomalyData').perform(anomalyIds, exploreDimensions);\n }\n }", "function get_data_from_log_table(func)\n{\n\tif(typeof static_local_db=='undef...
[ "0.625712", "0.56987184", "0.55910146", "0.54449993", "0.54331005", "0.54055744", "0.5359964", "0.53308415", "0.52409154", "0.522169", "0.52164537", "0.5203963", "0.51914084", "0.5180849", "0.51371044", "0.51195794", "0.5112088", "0.5087484", "0.5078544", "0.5068073", "0.5056...
0.7026856
0
insering error to db
function errorLog(error, area, status) { var today = new Date(); client.query( `INSERT INTO schedule_error(message, datetime,error_area,status)VALUES('${error}','${today}','${area}','${status}')`, (err, res) => { if (err) { console.log(err) } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function errorDB(tx, err) {\n\t\tif (err && err.message) {\n\t\t alert(\"Error processing SQL: \" + err.message);\n\t\t} else {\n\t\t alert(\"Error processing SQL: \" + tx);\n\t\t}\n\t}", "function showError() {\n console.log(\"error in writing data to the database\")\n}", "function dbErrorHandler(err...
[ "0.70000505", "0.66978574", "0.6451408", "0.6393154", "0.6319233", "0.6264156", "0.6204822", "0.61405236", "0.6096386", "0.6084221", "0.60840803", "0.59512264", "0.59374774", "0.5872387", "0.5869617", "0.58605194", "0.5832813", "0.5815779", "0.58133054", "0.5811347", "0.58071...
0.6570999
2
updating db status after rescheduling the cron
function update(row, status) { let errorId = parseInt(row.errorId) client.query( `UPDATE schedule_error SET status = '${status}' WHERE "errorId"= '${errorId}'`, (err, res) => { console.log(`UPDATE schedule_error SET status = '${status}' WHERE "errorId"= '${errorId}'`); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cron() {\n console.log(`Updating db - ${new Date()}`);\n updateDb(payload)()\n .then((res) => console.log('sucess!'))\n .catch((err) => console.error(err));\n }", "changeStatus(req, res, taskDB) {\n\n taskDB.status = 'On Hold';\n taskDB.total_time = 0;\n taskDB....
[ "0.74272317", "0.69068563", "0.6885459", "0.63597184", "0.63363063", "0.63096744", "0.6302215", "0.6151328", "0.6123157", "0.60297394", "0.59153324", "0.5911979", "0.59087694", "0.58488804", "0.5837589", "0.58220947", "0.58122486", "0.5798191", "0.5788578", "0.5756711", "0.57...
0.55259514
41
TODO add mousedragged panning system
function draw() { background(0, 0, 0, 0.031); translate(posX ? posX : 0, posY ? posY : 0) stroke(78, 255, 255) rect(0.9 * width, 0, 10, accumulator); // fill(0,255,0,0.05) // fft.smooth(); // fft.log // noise.start(); spectrum = fft.analyze(); chunkSize = Math.floor(spectrum.length / population); re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mouseDrag(prev, pt) {}", "mouseDrag(prev, pt) {}", "onDrag(mousePosition) {\n }", "function mouseDragged(){\r\n inputForMDragging(mouseX, mouseY);\r\n\r\n\r\n}", "function MouseDownHandler(e) {\n pan_context = true;\n pan_dx = e.x;\n pan_dy = e.y;\n}", "function drag(e, selected) {\r\n\r\n ...
[ "0.7735252", "0.7735252", "0.73893714", "0.7227028", "0.7152726", "0.70997655", "0.7056806", "0.6971906", "0.6926726", "0.69207484", "0.691976", "0.6884179", "0.6860881", "0.68426406", "0.6799577", "0.6771831", "0.67569953", "0.6738576", "0.67344797", "0.6700918", "0.6698888"...
0.0
-1
make a function that returns it to use later in the gridlines
function make_xAxis(){ return xAxis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addGridLines () {\n }", "function makeGrid() {\n\n\n}", "function FunctionNumberLineGrid(options) {\n let grid,\n lineInterval,\n strokeWidth,\n stroke,\n group,\n where;\n\n grid = this;\n\n init(options);\n\n return grid;\n\n /* INITIALIZE */\n function init(options) {\n\n _required(...
[ "0.6213417", "0.59470516", "0.57941544", "0.559212", "0.55903167", "0.5544916", "0.548228", "0.54819", "0.5469781", "0.5462998", "0.5451679", "0.5450763", "0.54480135", "0.5445739", "0.54091287", "0.54035133", "0.54035133", "0.54035133", "0.54035133", "0.54035133", "0.5401679...
0.0
-1
Change to color to match the result
function markerSize(earthquake_size) { return 200; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorForCurrent(){\n\n}", "function changeColorFaded() {\n\n temp = 330;\n cont1 = 0;\n cont2 = 125;\n cont3 = 254;\n\n function cycler(cont) {\n if(cont >= 255) \n op = 'decr';\n else\n op = 'incr';\n\n switch(op) {\n case 'decr':\n ...
[ "0.7579182", "0.7420032", "0.71965784", "0.7143855", "0.7115005", "0.7096492", "0.7084842", "0.70112765", "0.69973755", "0.6982523", "0.69674814", "0.69609386", "0.695327", "0.6947832", "0.69305116", "0.6929169", "0.6917636", "0.6910333", "0.68937707", "0.6892108", "0.6875651...
0.0
-1
Define a function we want to run once for each feature in the features array Give each feature a popup describing the place and time of the earthquake
function onEachFeature(feature, layer) { console.log("I'm in onEachFeature") layer.bindPopup("<h3>" + feature.properties.YEAR_MONTH + "</h3><hr><p>" + feature.properties.NARRATIVE + "</p>"); var two_coords =[] two_coords.push(feature.properties.Longitude); t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onEachFeature(feature, layer) {\n // Give each feature a popup describing the place and time of the earthquake\n layer.bindPopup(`<h3> ${feature.properties.place} </h3> <hr> <p> ${Date(feature.properties.time)} </p>`);\n }", "function onEachFeature(feature, layer) {\n // does this feat...
[ "0.7831195", "0.764172", "0.7465871", "0.7382966", "0.7374346", "0.737402", "0.7373242", "0.7370269", "0.73434675", "0.7341874", "0.7341864", "0.7328692", "0.72994506", "0.72984785", "0.72964346", "0.72964346", "0.72964346", "0.72761595", "0.72721845", "0.725579", "0.72524047...
0.6347618
100
welcome to experience this demo, and fork to modify it. ^_^ concent build a ctx for every instance, it supplies state, sync, dispatch and etc ... you can use them in any of components bellow more details see doc: and your can copy left side bar other file's content to experience like registerhookcomp.js ... visit more ...
function changeGreeting(greeting) { return { greeting }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function App() {\n \n \n return (\n <div className=\"App\">\n <div className=\"count\">\n \n {/* <HookuseState/>\n <HookuseState2/>\n <UseStateArray/>\n <HookMouse/> */}\n {/* <MouseContainer/> */}\n <firstName.Provider value = {{name:\"pavan \" ,lastname:\"kmar\" , number:861545}}>\n ...
[ "0.65954447", "0.6262957", "0.62339205", "0.6203804", "0.6031257", "0.59684414", "0.5920189", "0.5849903", "0.58327913", "0.58259284", "0.5818412", "0.5815311", "0.5801055", "0.5776937", "0.5754485", "0.5722362", "0.5694953", "0.56917197", "0.5671994", "0.5655382", "0.5648013...
0.0
-1
show loadig mask on modal before form submission;
function maskModal($maskTarget) { var padding = $maskTarget.height() - 80; if (padding > 0) { padding = Math.floor(padding / 2); } $maskTarget.append("<div class='modal-mask'><div class='circle-loader'></div></div>"); //check scrollbar ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadSubmitForm() {\n $(\".modal\").css(\"display\", \"block\");\n}", "function showPopupFormular() {\r\n $(\"#\" + global.Element.PopupFormular).modal(\"show\");\r\n }", "function showLoadingGifOnFormSubmit(){\r\n\t$(\"form\").on('submit',function(){$(\".se-pre-con\").show();});\r\n}", ...
[ "0.73136425", "0.7036392", "0.6976032", "0.67675775", "0.6669644", "0.6627278", "0.66062284", "0.6520373", "0.6496843", "0.6449265", "0.64232475", "0.6415154", "0.63968897", "0.63818896", "0.637293", "0.63629764", "0.63433206", "0.6342307", "0.63421863", "0.62763625", "0.6270...
0.6713065
4
remove loadig mask from modal
function unmaskModal() { var $maskTarget = $(".modal-body"); $maskTarget.closest('.modal-dialog').find('[type="submit"]').removeAttr('disabled'); $(".modal-mask").remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeModal() {\n $(\".mask\").removeClass(\"active-modal\");\n}", "_remove() {\n this.backdrop.remove();\n this.modal.remove();\n Utils.removeClass(document.body, 'modal-mode');\n }", "function removeModal() {\n modal.innerHTML = \"\";\n removeClass(modal...
[ "0.71414036", "0.6967064", "0.6928043", "0.6900116", "0.6839112", "0.682834", "0.67987084", "0.67844504", "0.67694855", "0.6729312", "0.66909117", "0.6657209", "0.6653627", "0.6600607", "0.65530455", "0.6522409", "0.64977694", "0.6493927", "0.6480022", "0.64788026", "0.646669...
0.77769476
0
colse ajax modal and show success check mark
function closeAjaxModal(success) { if (success) { toastmessage(showSuccessToast) $(".modal-mask").html("<div class='circle-done'><i class='fa fa-check'></i></div>"); setTimeout(function () { $(".modal-mask").find('.circle-done').addClass('ok'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajax_success() {\n console.log('Update Status worked');\n // TODO: \n // improve loading time of ajax request because modal is loading to slow\n $(\".modal\").addClass(\"is-active\"); \n}", "function successModal(message1,message2) {\n $(\"#modalsave\").hide();\n $(\"#sure .mo...
[ "0.7221789", "0.7013255", "0.68668854", "0.68075836", "0.67512566", "0.6748442", "0.6672075", "0.66658974", "0.6620404", "0.6616794", "0.6615691", "0.66063505", "0.6568175", "0.6550736", "0.65324014", "0.649554", "0.64890504", "0.6488747", "0.6460605", "0.64553523", "0.639360...
0.6455422
19
abort ajax request on modal close. console.log(dialogFx);
function CloseFxDialog(e) { $('#app-ajax-modal .modal-dynamic-content').html(''); // console.log('modal close events',e); // $(this).find(".modal-dialog").removeClass("modal-lg").addClass("mini-modal"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abort() {\n if ( this.xhr ) {\n this.xhr.abort();\n }\n }", "abort () {\n this.request.abort();\n }", "abort() {\n if (this.xhr) {\n this.xhr.abort();\n }\n }", "close() {\n window.http.xmlHtpRequest.abort();\n }", "cancel() {\n $('...
[ "0.69036615", "0.6819364", "0.6784362", "0.67662436", "0.671851", "0.6714289", "0.6650974", "0.66455555", "0.6547914", "0.64068896", "0.6378657", "0.6334685", "0.6310845", "0.6302307", "0.6302307", "0.62889886", "0.62829703", "0.6265919", "0.6260881", "0.6260623", "0.62488747...
0.70408756
0
function to be called when above animation needed
function fadeinup() { var time = 0; $(".radio_select" ).addClass("hide").each(function( index ) { setTimeout(function(){ openAnimate(".radio_select:eq( "+index+" )",'fadeInUp'); },time+=200); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animcompleted() {\n\t\t\t\t\t\t}", "function initAnimation() {\n}", "onAnimationEnd() {\n\n }", "function checkAnimation() {\n chartBarCheckAnimation();\n portfolioCheckAnimation();\n //contactBackgrounCheck();\n }", "if (m_bInitialAnim) { return; }", "updateAnimation() {\n ...
[ "0.6965173", "0.6893152", "0.6892171", "0.6869036", "0.68424535", "0.6834406", "0.68333143", "0.68333143", "0.6763035", "0.65878785", "0.65238184", "0.64966154", "0.64811736", "0.6477121", "0.646685", "0.6462727", "0.64462996", "0.63869977", "0.6381941", "0.6381366", "0.63803...
0.0
-1
IN: Min (int) y Max (int) OUT: Valor aleatorio (int)
function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min + 1) ) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "limits() {\n var keys = Object.keys(this.data);\n var min = parseInt(this.data[keys[0]]); // ignoring case of empty list for conciseness\n var max = parseInt(this.data[keys[0]]);\n var i;\n for (i = 1; i < keys.length; i++) {\n var value = parseInt(this.data[keys[i]]);...
[ "0.67397434", "0.658559", "0.64779675", "0.63878226", "0.63664895", "0.63454515", "0.6339881", "0.63163865", "0.6304568", "0.62992996", "0.6296427", "0.62957144", "0.62934166", "0.6291427", "0.62857276", "0.61903274", "0.61647516", "0.6160126", "0.61532164", "0.61035377", "0....
0.0
-1
Clase cadena que contiene un numero aleatorio de simbolos
function Cadena(){ this.Caracteres = []; this.longitud = getRndInteger(5,35); this.velocidad = getRndInteger(2,10); this.rellenarCadena = function(x, y){ var first = (Math.random()>0.75) ? true : false; for(var i=0;i<this.longitud;i++){ var Caracter = new Simbolo(x,y,this.velocidad,first); Caracter.Simb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generarAleatorio(valor)\r\n{\r\n return numIdentificacion = Math.floor(Math.random() * ((valor+1) - 0) + 0); \r\n}", "function soma(nnumero){\r\n let cont = 0;\r\n for (let num of numeros){\r\n cont = cont +num\r\n }\r\n return soma \r\n }", "function sequencia1(num)...
[ "0.64673537", "0.63441026", "0.63142586", "0.62975824", "0.6282687", "0.62693846", "0.6196332", "0.6183926", "0.6175108", "0.61521196", "0.61468077", "0.60744035", "0.60362285", "0.60308456", "0.6003629", "0.60004634", "0.59629554", "0.58911943", "0.58869135", "0.58610123", "...
0.0
-1
Funcion encargada de animar esperando al refresco de la pantalla
function Animar(){ FPS = (FPS > 59) ? 0 : FPS += 1; ctx.clearRect(0,0,ancho,alto); cadenas.forEach(function(cad){ cad.Representar(); }); requestAnimFrame(Animar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animacaoJogo(){\n __life.step();\n __life.desenhaGrid(window.ctx);\n window.idTimeoutJogo = setTimeout(animacaoJogo, 10);\n }", "function animacion(algo){\n\tvar contenido = document.getElementById(\"esfera\");\n\t$(\"#esfera\").addClass('esfera');\n\t$(\"#direccion\").addClass...
[ "0.6773356", "0.67409164", "0.66439044", "0.65856576", "0.65445185", "0.6470602", "0.64201653", "0.63934785", "0.63816625", "0.63495076", "0.6347462", "0.634076", "0.629086", "0.6290574", "0.62838614", "0.62724656", "0.6258089", "0.62214375", "0.62159", "0.62074697", "0.62071...
0.59244645
60
Import an existing client VPN endpoint.
static fromEndpointAttributes(scope, id, attrs) { class Import extends core_1.Resource { constructor() { super(...arguments); this.endpointId = attrs.endpointId; this.connections = new connections_1.Connections({ securityGroups: attrs.securityGroups })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function connect() {\n\tlet endpoint = document.getElementById('endpoint').value;\n\tif (!window.substrate || global.endpoint != endpoint) {\n\t\tconst provider = new api.WsProvider(endpoint);\n\t\tlog.innerHTML = 'Connecting to Endpoint...';\n\t\twindow.substrate = await api.ApiPromise.create({ provider });...
[ "0.48225453", "0.4765728", "0.47521713", "0.4705232", "0.46199226", "0.4579531", "0.4577182", "0.44900233", "0.44326177", "0.44282335", "0.44114634", "0.44019303", "0.43894327", "0.4327132", "0.427638", "0.42644092", "0.42630386", "0.42555544", "0.42428967", "0.42097768", "0....
0.46052915
5
Adds an authorization rule to this endpoint.
addAuthorizationRule(id, props) { return new client_vpn_authorization_rule_1.ClientVpnAuthorizationRule(this, id, { ...props, clientVpnEndoint: this, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function internal_initialiseAclRule(access) {\n let newRule = createThing();\n newRule = setIri(newRule, rdf.type, acl.Authorization);\n if (access.read) {\n newRule = addIri(newRule, acl.mode, internal_accessModeIriStrings.read);\n }\n if (access.append && !access.write) {\n newRule = addIri(newRule, a...
[ "0.53518724", "0.530408", "0.5295703", "0.5171888", "0.4973788", "0.4855524", "0.46431932", "0.45918423", "0.4578135", "0.45691445", "0.45688903", "0.45602107", "0.44586676", "0.44305253", "0.4387325", "0.4367352", "0.4365117", "0.43496346", "0.4349448", "0.433964", "0.433628...
0.6404505
0
Adds a route to this endpoint.
addRoute(id, props) { return new client_vpn_route_1.ClientVpnRoute(this, id, { ...props, clientVpnEndoint: this, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addRoute(route, fn) {\n this.routes.push({\n params: this._getParams(route),\n pattern: this._getPattern(route),\n route,\n fn\n })\n }", "addRoute(method, route, ...handlers) {\n this.routes.add({\n method,\n route,\n handlers\n });\n }", "addRoute...
[ "0.7348392", "0.73283225", "0.7174983", "0.70851684", "0.6981869", "0.64044505", "0.6316121", "0.6303698", "0.62048244", "0.61579347", "0.60936403", "0.6076617", "0.60673183", "0.5975605", "0.5882683", "0.5813818", "0.57438993", "0.5739003", "0.5731479", "0.56811005", "0.5663...
0.590955
14
Code was taken from
function link(scope, element, attrs, ngModel){ ngModel.$parsers.push(function(value) { return '' + value; }); ngModel.$formatters.push(function(value) { return parseFloat(value, 10); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "static private internal function m121() {}", "transient protected internal function m189() {}", "static final private internal function m106() {}", "transient private protected internal ...
[ "0.6637666", "0.6245441", "0.6194101", "0.5991553", "0.5879009", "0.57580876", "0.57424504", "0.5728488", "0.5648674", "0.5533786", "0.53940654", "0.53386253", "0.52824235", "0.5281371", "0.5260329", "0.52568775", "0.5213232", "0.5184796", "0.5178606", "0.5166621", "0.5117431...
0.0
-1
function hosinting > se puede llamar a la funcion desde cualquier lugar
function saludar() { console.log("HOLA MUNDO"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onloevha() {\n}", "function hoge() {}", "function Ha(){}", "function wa(){}", "function lalalala() {\n\n}", "function Xh(){}", "function hc(){}", "function fuctionPanier(){\n\n}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function iniciar() {\n ...
[ "0.68201166", "0.6808166", "0.67719495", "0.6608295", "0.64503205", "0.6399824", "0.63191307", "0.62855446", "0.61775273", "0.61775273", "0.61775273", "0.612758", "0.60673636", "0.60551196", "0.6034784", "0.6012645", "0.60060745", "0.59636414", "0.596215", "0.59451497", "0.59...
0.5649616
56
needed for every function in this file
function check_page_status() { return page_ready; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "function Utils() {}", "function Utils() {}", "function Utils(){}", "private public function m246() {}", "function __func(){}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function FunctionUtils() {}", "private interna...
[ "0.7540967", "0.6896817", "0.6896817", "0.6857529", "0.6823426", "0.6699541", "0.66894835", "0.66894835", "0.66894835", "0.6665797", "0.66367316", "0.66357386", "0.6635374", "0.6614718", "0.6574803", "0.6531108", "0.6523745", "0.6486448", "0.6481003", "0.6474403", "0.6447882"...
0.0
-1
Dynamically create questions for form
function createForm(){ $("#startQuest").append("<div class=\"row\"><div class=\"col-md-6\"><h2>About You</h2</div></div>"); //About you header //Create name and image inputs textboxBank.forEach(function(value, index){ var rowInput = $('<div>').addClass("row"); //Create Row var colInput = $('<div>').addClass("c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildQuestions() {\n var questionHTML = \"\";\n for (var i = 0; i < game.questions.length; i++) {\n questionHTML = questionHTML + formTemplate(game.questions[i]);\n }\n $(\"#questions\").append(questionHTML);\n }", "function createQuestion(questions) {\n for (var i = 0; i < ...
[ "0.75608057", "0.7535552", "0.7459917", "0.7376936", "0.73558605", "0.732428", "0.73031706", "0.72831917", "0.72679275", "0.7236456", "0.7175217", "0.71306336", "0.71182334", "0.7112259", "0.71099806", "0.7098095", "0.70945364", "0.70871824", "0.70802903", "0.70771414", "0.70...
0.0
-1
function starts here with Element, url and display, these are passed in by other piece of code to allow for reuse of code
function fetchOffer(element, url, method) { //fetch the URL, then return the response as text, then log the data and display the element and data and if theres an error comes up then display the error fetch(url) .then ( function(response) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPage(page,el){if(page===undefined){handleComing();return}fetch(page).then(function(res){return res.text()}).then(function(data){return displayFetch(el,data)});// give clicked element and the data from the server to display.\n}// if it does give the data to the function below for display.", "function ...
[ "0.6249263", "0.60308814", "0.5956144", "0.5953142", "0.59246266", "0.5875343", "0.58489054", "0.582305", "0.57936525", "0.5746954", "0.5739765", "0.57296485", "0.57270056", "0.57013005", "0.5690718", "0.56743723", "0.56682044", "0.5653042", "0.5653042", "0.5652667", "0.56065...
0.0
-1
constructor arguments: cl:: object of type [CL11](cl11.html) handle:: OpenCL handle
function CLWrapper(cl, handle, releaseFunction) { assert(cl instanceof CL11, "Argument 'cl' is not a CL11 instance."); assert(ref.getType(handle) === ref.types.void, "Argument 'handle' is not a pointer."); assert(!ref.isNull(handle), "Handle is null."); Disposable.call(this, releaseFunction); // #...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(options) {\n super();\n this._kernel = new KernelConnector(options);\n this._context = new ContextConnector(options);\n }", "function gen_op_ldl_kernel()\n{\n gen_opc_ptr.push({func:op_ldl_kernel});\n}", "function createLContext(lView,nodeIndex,_native2){return{lView:lVie...
[ "0.5168888", "0.51356775", "0.50367385", "0.49625137", "0.4949822", "0.4907119", "0.48962805", "0.48678347", "0.48567903", "0.4853583", "0.48302686", "0.48228937", "0.48228937", "0.48228937", "0.48228937", "0.48228937", "0.48228937", "0.481383", "0.480489", "0.4803235", "0.47...
0.81737417
0
On inital load, fetch data
componentWillMount() { const {fetchCatFactsAndPics, catFactsAndPicsProps} = this.props; fetchCatFactsAndPics(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n fetchData();\n}", "initialFetch() {\n this.fetchData({type: \"INITIAL_TABLE_DATA_FETCH\"})\n }", "fetchData() {\n this.initLoading();\n let qs = this.setAndGetQuerySetFromSandBox(this.view, this.qs_url);\n this.data.instance = qs.cache...
[ "0.8595201", "0.76764184", "0.75965047", "0.75965047", "0.75288916", "0.74673873", "0.7390784", "0.73400784", "0.7329104", "0.726089", "0.72332233", "0.72240025", "0.7186323", "0.7104218", "0.70820445", "0.7066101", "0.6984008", "0.69422996", "0.68664616", "0.68631786", "0.68...
0.0
-1
this is simply a shortcut for the eyes and fingers
function $(id) { return document.getElementById(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function servostart(e) {\n\tx_finger_bak = e.changedTouches[0].screenX\n\ty_finger_bak = e.changedTouches[0].screenY\n\treturn false\n}", "function drawFace() {\n // eyes\n leftEye = draw(\"O\", 300, 140);\n rightEye = draw(\"O\", 400, 140);\n blink(leftEye, \"^\", 200);\n blink(rightEye, \"^\", 200);\n\n ...
[ "0.6300379", "0.6289942", "0.6143357", "0.6110359", "0.60592806", "0.60223633", "0.59375006", "0.5894093", "0.5888623", "0.58865297", "0.58089197", "0.57427055", "0.5659047", "0.56529963", "0.56498903", "0.5630506", "0.5618757", "0.56185204", "0.5575314", "0.55681705", "0.555...
0.0
-1
Unify messaging method And eliminate callbacks (a message is replied with another message instead)
function messaging( message, callback ) { chrome.runtime.sendMessage( message, callback ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendMessage (_connection, _message) { methodNotDefined() }", "function onMessage(event) {\n const { id, ...data } = event.data;\n const onSuccess = callbacks[id];\n delete callbacks[id];\n onSuccess(data);\n }", "onMessagesRemoved() {}", "deleteMessageCallBack(message){\n ...
[ "0.6653445", "0.661786", "0.65832067", "0.6271684", "0.62485707", "0.616913", "0.61296", "0.6111585", "0.60993516", "0.6089836", "0.607648", "0.60564375", "0.60214627", "0.6006649", "0.59896284", "0.5984158", "0.5975027", "0.59736884", "0.5957051", "0.59212697", "0.5899306", ...
0.0
-1
GUID get globally unique id taken from stack overflow overkill but what the heck
function guid() { function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guid() {return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();}", "function _guid() {\n function S4() {\n return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\n }\n\n return (S4() + S4() + \"-\" + S4() + \"-\" + S4() + \"-\" + S4() + \"-\" ...
[ "0.84004", "0.81764644", "0.8162497", "0.8102747", "0.8102747", "0.8102747", "0.8102747", "0.8099086", "0.80888516", "0.80447716", "0.80329", "0.80313355", "0.8023454", "0.799118", "0.7988847", "0.7988721", "0.7988093", "0.7987416", "0.79869384", "0.7984767", "0.7982642", "...
0.7879503
38
convenience for creating DOM elements
function $t (tag) { tag = tag || 'div'; return $('<'+tag+'/>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createElements() {\n var nodeNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n nodeNames[_i] = arguments[_i];\n }\n return nodeNames.map(function (name) { return document.createElement(name); });\n }", "function create(element) { return document.cr...
[ "0.7755558", "0.7419851", "0.7339416", "0.73245627", "0.72975487", "0.72562987", "0.7250714", "0.7225091", "0.72154486", "0.7203097", "0.7178776", "0.7178776", "0.7178776", "0.7178776", "0.7178776", "0.7178776", "0.7178776", "0.71544677", "0.714577", "0.714333", "0.7142153", ...
0.0
-1
The dummy class constructor
function Class() { // All construction is actually done in the init method if ( !initializing && this.init ) this.init.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "function DummyClass() {\r\n // All construction is actually done in the construct method\r\n if ( !init && this.construct )\r\n this.construct.apply(this, arguments);\r\n }", "constructor(){}", "constructor(){}", "constructor(){}", "construc...
[ "0.83117235", "0.8150335", "0.8125716", "0.8125716", "0.8125716", "0.8125716", "0.8125716", "0.8125716", "0.8125716", "0.81216276", "0.81216276", "0.81216276", "0.80153376", "0.80066764", "0.7822476", "0.7822476", "0.7822476", "0.7822476", "0.7822476", "0.7822476", "0.7822476...
0.0
-1
Closes the milestone by number
closeMilestone(number) { return this.patch(`milestones/${number}`, { state: 'closed' }).then( ({ code, body }) => { if (code !== 200) return Promise.reject(body); else return body; } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function close(n){\n\t\treturn barsAgo(CLOSE,n);\n\t}", "_close() {\n set(this, 'isOpen', false);\n set(this, 'isToStep', false);\n\n let action = get(this, 'attrs.closeAction');\n let vals = get(this, '_dates');\n let isRange = get(this, 'range');\n\n if (action) {\n action(isRange ? vals...
[ "0.61144936", "0.5881121", "0.5792084", "0.5696418", "0.567205", "0.5663822", "0.55725956", "0.5498331", "0.53649366", "0.53035235", "0.5291249", "0.5291249", "0.5208043", "0.52034384", "0.520063", "0.51972425", "0.5183096", "0.51806325", "0.5175055", "0.51574785", "0.5107038...
0.81170195
0
Add "name id : lambda node" to G.functions
function setUp(program) { const ids = []; const push_vals = []; for (const identId of Object.keys(program.identifiers)) { const identifier = getIdentifier(program, identId); if (identifier.scope !== null || !identifier.value) { continue; } ids.push(identifier.id); push_vals.push(extractFragmen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _gX(fn, lambda){\n return lambda+\"*(\"+fn+\")+x\";\n }", "function _exec_funcdef(ast, context, debug) {\n var FRecord = new ObjectClass.SFunction();\n FRecord.closure_active_record = context;\n var funcName = \"\";\n for (var item in ast.sons) {\n if (ast.sons[i...
[ "0.66948587", "0.61025375", "0.59935665", "0.59694844", "0.58709174", "0.58472437", "0.58472437", "0.58472437", "0.58358914", "0.58179855", "0.57676876", "0.5713963", "0.5679388", "0.5679388", "0.5672613", "0.5656917", "0.5623293", "0.56213665", "0.5603906", "0.56018776", "0....
0.0
-1
Evaluate expression precursor (takes care of let bindings)
function evaluateStep(node, callback) { if (G.continue) { const boundIds = getIdentifiersScopedToNode(G.program, node.id).filter(id => id.value != null); if (boundIds.length > 0) { const binding_names = []; const boundExprs = []; for (var i = 0; i < boundIds.length; i++) { binding_names.push(boundIds...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "evaluate(expr) {\n const result = compile(this.get_('eval.env'), expr).flatMap((f) => f());\n if (fail.match(result)) throw result.get();\n else return result.get();\n }", "operator(ctx, expr) {\n const ast = expr.ast, fn = ctx.functions;\n return _ => interpret(ast, fn, _);\n }", "function pa...
[ "0.61201286", "0.6109549", "0.58949345", "0.5878548", "0.5868856", "0.5862156", "0.5853399", "0.5846044", "0.5846044", "0.5824166", "0.57821757", "0.5733217", "0.57074213", "0.56627035", "0.56627035", "0.5581029", "0.55312055", "0.5501942", "0.5488177", "0.5457945", "0.543778...
0.0
-1
For evaluating a list of arguments
function eval_star(exps, pos, callback) { if (pos === exps.length) { return call(callback, []); } else { return call(evaluateStep, exps[pos], function (x) { return call(eval_star, exps, pos+=1, function (y) { return call(callback, [x].concat(y)); }); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sum(list){\n var l = arguments.length;\n var sum = 0;\n for (var i = 0; i < l; i++){\n sum = sum + arguments[i];\n }\n console.log(\"Exploring arguments in JavaScript------\");\n console.log(\"Sum: \", sum);\n}", "function parseArgumentList() {\n var token, expr, args = [];\n\n wh...
[ "0.633214", "0.6068839", "0.6052271", "0.5942134", "0.5892068", "0.5872663", "0.5854768", "0.5847211", "0.5841843", "0.58242476", "0.58242476", "0.58151037", "0.58042556", "0.5801591", "0.5801591", "0.5801591", "0.57891035", "0.57891035", "0.57837", "0.5780412", "0.57629204",...
0.0
-1
For evaluating case statement's cases
function evaluate_cases(exps, callback, elseExp, pos) { if (pos === exps.length) { return call(evaluateStep, getNode(G.program, elseExp.expression), callback); } else { const cs = getNode(G.program, exps[pos]); return call(evaluateStep, getNode(G.program, cs.condition), function (condition) { const cond ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function evaluateCaseClause({ node, evaluate, environment, statementTraversalStack }, switchExpression) {\n const expressionResult = evaluate.expression(node.expression, environment, statementTraversalStack);\n // Stop immediately if the expression doesn't match the switch expression\n if (expressionResul...
[ "0.7166076", "0.68776727", "0.6639018", "0.6639018", "0.66252387", "0.66252387", "0.66252387", "0.66252387", "0.6625037", "0.6598244", "0.65829885", "0.6570482", "0.6569818", "0.6552599", "0.6552599", "0.6552599", "0.6552599", "0.65211713", "0.6513756", "0.651139", "0.650248"...
0.65555906
13
Evaluation continue and speed methods
function stopEval() { G.continue = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculate() {\r\n\teval();\r\n\tstopAll();\r\n}", "step()\n {\n if (this.halted)\n {\n return false;\n }\n\n let instruction = this._read(this.pointer);\n let startingPoint = this.pointer;\n\n let opCode = this._opCode(instruction);\n if (op...
[ "0.64004916", "0.5890402", "0.5782383", "0.5757836", "0.57486874", "0.5722435", "0.5712351", "0.5686748", "0.56770235", "0.56695014", "0.56613064", "0.5655313", "0.5645503", "0.5611494", "0.5603561", "0.55956364", "0.5540564", "0.5498653", "0.54841673", "0.54639125", "0.54459...
0.578478
2
Hack for replacing response body vars with dynamic URI params
function parseUriVars(uriVars, reqUrl, respBody) { var k = null; for (var k in uriVars) { if (uriVars.hasOwnProperty(k)) { var replacementValue = reqUrl.split('/').filter(el => {return !!el})[k]; respBody = respBody.replace(URL_VAR_REGEX, replacementValue); } } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rewriteURIForGET(chosenURI, body) {\n // Implement the standard HTTP GET serialization, plus 'extensions'. Note\n // the extra level of JSON serialization!\n var queryParams = [];\n var addQueryParam = function (key, value) {\n queryParams.push(key + \"=\" + encodeURIComponent(value));\...
[ "0.5775589", "0.5758471", "0.5758471", "0.57027376", "0.56722003", "0.56715554", "0.56715554", "0.5544978", "0.55126494", "0.5461489", "0.53812575", "0.53673273", "0.53009576", "0.53003883", "0.527321", "0.52616066", "0.5228786", "0.5202805", "0.5154325", "0.5144916", "0.5087...
0.67443967
0
Allows a user to start an application. Takes tokens from user and sets apply stage end time.
apply(listing, tokens, data = '', opts) { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(), account = this.requireAccount(opts); return yield deployed.methods.apply(listing, tokens, data).send({ from: account }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startApp() {\n\tinquirer\n\t\t.prompt([\n\t\t\t{\n\t\t\t\tname: 'startApp',\n\t\t\t\ttype: 'confirm',\n\t\t\t\tmessage: 'Would you like to assemble a team?',\n\t\t\t},\n\t\t])\n\t\t.then((res, err) => {\n\t\t\tif (err) console.error(err);\n\t\t\tif (res.startApp) {\n\t\t\t\taddManager();\n\t\t\t} else {\n...
[ "0.5705647", "0.5705638", "0.56621903", "0.56415176", "0.5572144", "0.53576237", "0.533769", "0.5332166", "0.52593726", "0.52576435", "0.5240772", "0.5219025", "0.51860857", "0.5110994", "0.51070863", "0.5083727", "0.50498295", "0.5037655", "0.5034069", "0.5033402", "0.502464...
0.0
-1
Returns a bool that indicates if `apply` was called for a given listing hash
appWasMade(listing) { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(); return deployed.methods.appWasMade(listing).call(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isApply(m) {\n return isFunctor(m) && isFunction(m.ap)\n}", "function isBindCallApply(func, environment) {\n switch (func) {\n case Function.prototype.bind:\n case Function.prototype.call:\n case Function.prototype.apply:\n return true;\n }\n if (environment != ...
[ "0.5276118", "0.52356726", "0.52291125", "0.5064019", "0.50615746", "0.4994776", "0.49335325", "0.49187532", "0.4884205", "0.48785177", "0.48162445", "0.48162445", "0.48073068", "0.4801175", "0.47908694", "0.47611004", "0.4759886", "0.47545362", "0.47419408", "0.47417414", "0...
0.0
-1
Starts a poll for a listingHash which is either in the apply stage or already in the whitelist. Tokens are taken from the challenger and the applicant's deposits are locked.
challenge(listing, data = '', opts) { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(), account = this.requireAccount(opts); return yield deployed.methods.challenge(listing, data).send({ from: account }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "polling() {\n const hourInSec = PASConfig.pollingTimeDevelop || 3200; // Use develop value if available for this RI\n const hourInMS = hourInSec * 1000;\n const fiveMin = hourInMS / 12;\n\n // Poll every 5 minutes in the first half hour\n let numPolls = 1;\n let context = this;\n let polling =...
[ "0.5411924", "0.52926207", "0.5135856", "0.5104827", "0.5075564", "0.5017226", "0.49952075", "0.49858502", "0.4978382", "0.4871183", "0.48711342", "0.4826024", "0.47945887", "0.47945887", "0.47902086", "0.47778672", "0.47672728", "0.47649515", "0.4747191", "0.47253856", "0.47...
0.0
-1
Return a challenge corresponding to the given challegeID.
challenges(challengeID) { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(); return yield deployed.methods.challenges(challengeID).call(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChallenge(challengeId) {\n return wordChallenges.findOne({ _id: challengeId });\n }", "getChallengeID() {\r\n let matches = this._challengeURLMatches();\r\n return matches[1];\r\n }", "function _getChallengeById(req, res, next) {\n var json = {};\n var query = { \"_id\": new Object...
[ "0.6971245", "0.62784463", "0.58492416", "0.55079806", "0.54730904", "0.5441973", "0.5395898", "0.51554036", "0.5043459", "0.5019115", "0.4908836", "0.48976633", "0.48744273", "0.4806224", "0.4806224", "0.48039496", "0.48034048", "0.4802444", "0.4792775", "0.47824928", "0.475...
0.6414845
1
Pepare the deploy options, passing them along with the instantiated web3 and optional contract options to the super class' _deploy method.
deploy(web3, params, opts) { const _super = name => super[name]; return __awaiter(this, void 0, void 0, function* () { const dp = { abi: Registry_json_1.default.abi, bytecode: Registry_json_1.default.bytecode, args: [ params...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deploy(web3, params, opts) {\n const _super = name => super[name];\n return __awaiter(this, void 0, void 0, function* () {\n const dp = {\n abi: Parameterizer_json_1.default.abi,\n bytecode: Parameterizer_json_1.default.bytecode,\n args: [\n ...
[ "0.7261169", "0.6316964", "0.57954097", "0.55136895", "0.5453097", "0.5438545", "0.5392325", "0.53471273", "0.5239186", "0.5185985", "0.5051503", "0.5004959", "0.4959975", "0.49317", "0.49084374", "0.4884491", "0.4848416", "0.48382464", "0.48246276", "0.4811499", "0.47355208"...
0.6881086
1
Allows the owner of a listingHash to remove the listingHash from the whitelist Returns all tokens to the owner of the listingHash
exit(listing, opts) { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(), account = this.requireAccount(opts); return yield deployed.methods.exit(listing).send({ from: account }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearTokenList() {\n const tokenList = STATE.get('TokenList');\n if (tokenList) {\n Object.keys(tokenList).forEach(k => {\n const tokenObj = STATE.get('TokenList', k);\n Token.setBonus(tokenObj, 0);\n });\n }\n }", "removeFromWh...
[ "0.58116317", "0.56265426", "0.5623505", "0.54492575", "0.53926015", "0.5390373", "0.53650695", "0.53305995", "0.5243471", "0.52257824", "0.5115779", "0.5111097", "0.509937", "0.5066188", "0.50565386", "0.5055926", "0.50168896", "0.50134844", "0.50092185", "0.49956807", "0.49...
0.0
-1
Return a bool indicating if this listing has been whitelisted
isWhitelisted(listing) { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(); return yield deployed.methods.isWhitelisted(listing).call(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isBlacklisted() {\n\t var blacklist = this.opts.blacklist;\n\t return blacklist && blacklist.indexOf(this.node.type) > -1;\n\t}", "function isBlacklisted() {\n\t var blacklist = this.opts.blacklist;\n\t return blacklist && blacklist.indexOf(this.node.type) > -1;\n\t}", "function isBlacklisted() {\...
[ "0.6541155", "0.6541155", "0.6449632", "0.6285243", "0.5984127", "0.59645337", "0.591445", "0.59121346", "0.580228", "0.57853556", "0.5738085", "0.5717761", "0.56691015", "0.5668057", "0.5640495", "0.5622889", "0.559966", "0.55952406", "0.5587593", "0.5568334", "0.5550307", ...
0.6948313
0
Return a listing corresponding to the given listing hash.
listings(listing) { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(); return yield deployed.methods.listings(listing).call(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async getListing(id) {\n let res = await this.request(`listings/${id}`);\n return res.listing;\n }", "listing_get(id) {\n return this._get(`listing/${id}`);\n }", "static async getListing(listing_id) {\n let res = await this.request(`api/listings/${listing_id}`);\n return res;\n ...
[ "0.5939349", "0.58070993", "0.5639183", "0.5626736", "0.5582744", "0.55319446", "0.547254", "0.54663557", "0.5300959", "0.52984", "0.526791", "0.52489066", "0.51860386", "0.51660913", "0.5164093", "0.5157202", "0.5100387", "0.5090333", "0.5074413", "0.5040025", "0.5034525", ...
0.45078295
85
Return the name passed to this contract instance at deploy time
name() { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(); return yield deployed.methods.name().call(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deploySingle(contractName){\n return `\n const A = artifacts.require(\"${contractName}\");\n module.exports = function(deployer) { deployer.deploy(A) };\n `;\n}", "function getAssetName(assetAddr){\n return tokenContract.methods.getContractName(assetAddr).call();\n }", "function getName() ...
[ "0.63645667", "0.60966045", "0.5953498", "0.59323144", "0.58770484", "0.57235014", "0.566225", "0.5619028", "0.56117105", "0.55981636", "0.5573826", "0.5566985", "0.55458844", "0.55158335", "0.5502829", "0.55023736", "0.54788876", "0.54555434", "0.54370517", "0.5435066", "0.5...
0.616771
1
Return the address of the parameterizer referenced by this contract instance
parameterizer() { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(); return yield deployed.methods.parameterizer().call(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get address () {\n return this.contractAddress\n }", "function nameAddr() {\n return wrap('name-addr', and(opt(displayName), angleAddr)());\n }", "function nameAddr() {\n return wrap('name-addr', and(opt(displayName), angleAddr)());\n }", "function nameAddr() {\n return wra...
[ "0.52728605", "0.5252432", "0.5252432", "0.5252432", "0.5252432", "0.515658", "0.5100179", "0.507445", "0.5065813", "0.5043498", "0.5039015", "0.50276905", "0.47889346", "0.47812968", "0.4757697", "0.47184244", "0.47033963", "0.47015712", "0.4657827", "0.46570027", "0.4640416...
0.42445526
76
Return the address of the token referenced by this contract instance
token() { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(); return yield deployed.methods.token().call(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTokenAddress(tokenName) {\n\t\n\tvar result = null;\n\n\tif (tokenName == \"TEST\") {\n\t\tresult = \"0x875664e580eea9d5313f056d0c2a43af431c660f\";\n\t} else if (tokenName == \"DAI\") {\n\t\tresult = \"0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359\";\n\t}\n\n\treturn result;\n}", "function getToken() {\...
[ "0.65727425", "0.64078283", "0.629507", "0.61594784", "0.6152112", "0.60370374", "0.6021377", "0.59762293", "0.5931954", "0.592103", "0.58387554", "0.58381087", "0.5817307", "0.5764241", "0.5761903", "0.5722279", "0.56745714", "0.5674456", "0.56385756", "0.56327605", "0.56102...
0.503679
79
Updates a listingHash's status from 'application' to 'listing' or resolves a challenge if one exists. Delegates to `whitelistApplication` or `resolveChallenge`
updateStatus(listing, opts) { return __awaiter(this, void 0, void 0, function* () { const account = this.requireAccount(opts), deployed = this.requireDeployed(); return yield deployed.methods.updateStatus(listing).send({ from: account }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "appWasMade(listing) {\n return __awaiter(this, void 0, void 0, function* () {\n const deployed = this.requireDeployed();\n return deployed.methods.appWasMade(listing).call();\n });\n }", "function handleUpdateListing(e) {\n //e.preventDefault();\n\n // get new data from m...
[ "0.5223855", "0.4951868", "0.48654446", "0.4864351", "0.4799458", "0.47674277", "0.46703455", "0.4588139", "0.45853782", "0.45470458", "0.45210463", "0.44564027", "0.44555843", "0.44072017", "0.4376598", "0.43688685", "0.43531272", "0.432941", "0.43260267", "0.43152893", "0.4...
0.62385035
0
Return the address of the plcrvoting referenced by this contract instance
voting() { return __awaiter(this, void 0, void 0, function* () { const deployed = this.requireDeployed(); return yield deployed.methods.voting().call(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAddress() {\n let encodable = [\n me.record ? me.record.id : this.pubkey,\n bin(this.box.publicKey),\n PK.usedBanks\n ]\n return base58.encode(r(encodable))\n }", "get address () {\n return this.contractAddress\n }", "get address() {\n\t\treturn this.__address;\n\t}", "get...
[ "0.62185663", "0.61201245", "0.602159", "0.5961195", "0.5926115", "0.59094363", "0.5832323", "0.5807537", "0.57356143", "0.56750107", "0.5613339", "0.56107175", "0.5578925", "0.5457772", "0.5455659", "0.5455659", "0.54519016", "0.54519016", "0.54519016", "0.53830427", "0.5363...
0.0
-1
end: imprimir correu start: imprimir any
function any(){ today = new Date(); start = new Date(today.getFullYear(),00,01); document.write(today.getFullYear()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostraNotas(){}", "onAny() {}", "function any() {\n }", "doneIf(start, end, ids) {\n return ids.length === 1;\n }", "function aclaracion(i) { //Saca un mensaje de aclaraci?n de la respuesta\n\tif ((pulsado!=0) & (acla[i]!=\"\")) {alert(acla[i]);}\n}", "function tes...
[ "0.59841377", "0.5569984", "0.5488535", "0.53245795", "0.5274336", "0.51943105", "0.51943105", "0.519286", "0.5180364", "0.516617", "0.51426905", "0.51320547", "0.513153", "0.5120919", "0.5098592", "0.50934374", "0.50877506", "0.5072636", "0.5018478", "0.50133914", "0.5005626...
0.0
-1
end: imprimir any start: mostrar i ocultar divs
function mostrarOcultar(id) { var elemento = document.getElementById(id); var enlace = document.getElementById('meta'); if(elemento.style.display == "" || elemento.style.display == "none") { elemento.style.display = "block"; enlace.innerHTML = 'Contenido de metadatos <button type="button" class="close" onClick...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostrarDiv(idmuestra,idoculta){\n\tvar ident=\"#\"+idmuestra;\n\tvar identOculta=\"#\"+idoculta;\n\t$(identOculta).hide();\n\t$(ident).show();\r\n}", "function displayElements() {\n $(\"body\").append($(\"<button id='start'>Start</button>\"));\n $(\"#start\").click(function () {\n ...
[ "0.6120295", "0.5963741", "0.5862363", "0.5861383", "0.5830938", "0.5813858", "0.58057344", "0.5784806", "0.57847667", "0.57563806", "0.5690682", "0.5689795", "0.56868", "0.5672368", "0.5640133", "0.56222546", "0.5621443", "0.5618863", "0.5616946", "0.5613145", "0.56024504", ...
0.0
-1
end: mostrar i ocultar divs
function disabledChecbox(){ var element = document.getElementById('noticia'); var element2 = document.getElementById('seccions'); if(element.checked){ element2.style.display='none'; return false; }else{ element2.style.display='block'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostrarDiv(idmuestra,idoculta){\n\tvar ident=\"#\"+idmuestra;\n\tvar identOculta=\"#\"+idoculta;\n\t$(identOculta).hide();\n\t$(ident).show();\r\n}", "function displayDOM(){\r\n\t\tvar str = '';\r\n\t\tcontainer.getChildren().each(function(item){\r\n\t\t\tstr += '<div style=\"' + item.style.cssText + '\...
[ "0.67785376", "0.65896064", "0.65088654", "0.6403261", "0.6289337", "0.62873626", "0.626295", "0.6211447", "0.62088764", "0.6185049", "0.6176599", "0.61536396", "0.6144058", "0.6119681", "0.6098986", "0.606385", "0.60301894", "0.6028177", "0.6028177", "0.60181767", "0.6016511...
0.0
-1
==================================================================================================================================================== VIEW INVENTORY FUNCTION ===================================================================================================================================================...
function viewInventory() { var query = "SELECT item_id, product_name, department_name, price, stock_quantity FROM products"; connection.query(query, function (err, res) { var t = new Table(); t.push( ["ID", " Name", "Price", "In Stock"] ); for (var i = 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function itemInventoryTable() { }", "function inventoryMenu() {\n $scope.menuTitle = createText(\"Inventory\", [20, 10]);\n\n var datas = CharServ.getAllDatas();\n\n var i = 30;\n _.forIn(datas.inventory, function(value) {\n if (value.quantity > 0) {\n createItem(value, i);\n i += ...
[ "0.69774467", "0.6840686", "0.6809285", "0.67614305", "0.6634676", "0.66144264", "0.65712404", "0.64476293", "0.6440312", "0.6438192", "0.6428924", "0.64040977", "0.6378214", "0.6331662", "0.63025576", "0.62754565", "0.6212317", "0.61818695", "0.61768633", "0.6151363", "0.614...
0.6215763
16
==================================================================================================================================================== PURCHSE QUESTIONS FUNCTION ================================================================================================================================================...
function purchaseQuestions() { inquirer .prompt([ { type: "input", name: "id", message: "Enter the ID of the product you would like to purchase." }, { type: "input", name: "amount", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteQs() {\n return db.Question.remove({})\n}", "function deleteUsed (){\n\tif(Questions.length > 0) {\n\t\tQuestions.splice(Questions.indexOf(question),1);\n\t} else {\n\t\tdocument.getElementById('answerT').style.display=\"none\";\n\t\tdocument.getElementById('answerF').style.display=\"none\";\n\t\...
[ "0.6742662", "0.6623651", "0.64511627", "0.62269586", "0.61851627", "0.6184869", "0.61477876", "0.61279154", "0.61273134", "0.6112415", "0.6048065", "0.6027864", "0.59538245", "0.59505713", "0.59446764", "0.59431803", "0.59361166", "0.592414", "0.59151703", "0.5908261", "0.58...
0.0
-1
==================================================================================================================================================== ITEM PURCHASE FUNCTION ====================================================================================================================================================
function itemPurchase() { connection.query("SELECT * FROM products WHERE ?", { item_id: productId }, function (err, res) { console.log(lineBreak); if (res[0].stock_quantity < quantity) { console.log("Insufficient quantity. There are "+ res[0].stock_quantity +" "+ res[0].product_name + "(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {\n return\n}", "async purchaseItem(itemId) {\n const purchase_result = await this.__re...
[ "0.778736", "0.778736", "0.778736", "0.778736", "0.778736", "0.778736", "0.7162589", "0.646271", "0.6375092", "0.6323577", "0.6308525", "0.6232949", "0.61997014", "0.60794747", "0.60682166", "0.60376316", "0.60256445", "0.5989342", "0.59829056", "0.59819", "0.5978416", "0.5...
0.0
-1
==================================================================================================================================================== RECALCULATE INVENTORY FUNCTION ============================================================================================================================================...
function calculateInventory() { // var query = "UPDATE products SET stock_quantity = quantity WHERE item_id = productId"; var query = "UPDATE products SET stock_quantity = stock_quantity-" + quantity + " WHERE item_id = " + productId; connection.query(query, function (err, res) { }) setTimeout(viewI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkout(Inventory) {\n let total = 0;\n this.items.forEach(i => {\n let [ sku, name, quantity, price ] = Inventory.get(i[0]);\n console.log(`${name} ${i[1]} x ${price} = ${i[1] * price}`);\n total += i[1] * price;\n\n // update Inventory state\n ...
[ "0.66921705", "0.63994807", "0.6345309", "0.6334346", "0.63101435", "0.6300602", "0.6288587", "0.62541956", "0.6223666", "0.6151304", "0.60939634", "0.6023022", "0.59956044", "0.5950191", "0.59009093", "0.58965343", "0.58905244", "0.5884783", "0.58498657", "0.58396703", "0.58...
0.57477957
30
Do not override these
async attack (action_) { _attack (action_); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "transient private protected internal function m182() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "transient final protected internal function m174() {}", "transient private internal function m185() {}", "private i...
[ "0.68481994", "0.6811481", "0.67693365", "0.66646963", "0.6609396", "0.6497686", "0.63607806", "0.6226011", "0.6152291", "0.6143716", "0.61403376", "0.60844713", "0.6052514", "0.6048533", "0.60242015", "0.6005584", "0.599231", "0.59667456", "0.5966392", "0.5966392", "0.590876...
0.0
-1
Reset the mook model's resources for use
startTurn () { this.resetResources (); this._startTurn (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n BaseAPI.reset.call(_self);\n\n // Data Model\n _self.cmi = new CMI(_self);\n _self.adl = new ADL(_self);\n }", "function reset() {\n BaseAPI.reset.call(_self);\n\n // Data Model\n _self.cmi = new CMI(_self);\n }", "resetResources()\n {\n t...
[ "0.74161077", "0.7365143", "0.7055081", "0.70172304", "0.6884132", "0.68580866", "0.67824113", "0.6743249", "0.6684327", "0.6573121", "0.6547111", "0.65466857", "0.65466857", "0.6514078", "0.65129024", "0.6496836", "0.6470842", "0.6457946", "0.6452422", "0.643962", "0.6421307...
0.0
-1
Can the token do something to increase its movement range?
get canZoom () { return this.zoomsRemaining > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n this.vel.add(this.acc);\n this.pos.add(this.vel);\n this.lifespan -= 2;\n\n this.vel.limit(5);\n }", "move() {\n this.x = this.x - 7\n }", "move(){\n if(this.counter <= 80){\n this.height = (this.counter*this.mworld.sqsize)/80;\n this.counter += ...
[ "0.6102732", "0.5807488", "0.57916284", "0.5774277", "0.57652086", "0.57527107", "0.5745585", "0.57452047", "0.57203805", "0.5718107", "0.5667535", "0.5655507", "0.56264305", "0.562299", "0.5622085", "0.5621657", "0.5596414", "0.55859965", "0.55736107", "0.55712384", "0.55573...
0.0
-1
todo: Advanced weapon selection
get meleWeapon () { return this.hasMele ? this.meleWeapons[0] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equipWeapon(selection){\n\tplayer.weapon = armory[wList[selection]].weapon;\n}", "function selectItem(num){\n if (inventstage.split(\"_\")[0] !== \"toolbelt\") {\n if (num == 0) { selected = slot1.textContent.split(\":\")[0] }\n if (num == 1) { selected = slot2.textContent.split(\":\")[...
[ "0.77129143", "0.6950002", "0.67625266", "0.6728606", "0.6725735", "0.6708103", "0.6697753", "0.66797227", "0.6649426", "0.66385984", "0.6531744", "0.652346", "0.6503461", "0.6501489", "0.64737064", "0.6449697", "0.6446425", "0.6440887", "0.6417962", "0.6379309", "0.6359034",...
0.587757
78