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
Creates an instance of the DefaultLoader. The name of the underlying native loader plugin used to load text.
function FuseAureliaLoader() { _classCallCheck(this, FuseAureliaLoader); var _this = _possibleConstructorReturn(this, _Loader.call(this)); _this.textPluginName = 'text'; _this.loaderPlugins = Object.create(null); _this.moduleRegistry = Object.create(null); _this.useTemplateLoader(new _textTe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LocalLoader() { }", "initLoader(loaderName) {\n loaderName = true;\n }", "function defaultLoader() {\n H.events.dispatch(\"error\", {\n \"msg\": \"loader/loaderSync has not been configured.\"\n });\n return null;\n}", "function PluginLoader()\n{\n this._isIE = null;\n this....
[ "0.6542073", "0.63252306", "0.6155259", "0.5918532", "0.5566025", "0.5540094", "0.5523345", "0.5523345", "0.5523345", "0.54904604", "0.5484643", "0.5484643", "0.5484643", "0.5484643", "0.5467891", "0.5467891", "0.54387397", "0.533061", "0.53264225", "0.5325682", "0.5266383", ...
0.4982402
39
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n ...
[ "0.527866", "0.52612406", "0.51951283", "0.518796", "0.51302594", "0.5044646", "0.48934332", "0.4857401", "0.484017", "0.48302925", "0.482028", "0.4812441", "0.4808473", "0.47852293", "0.47828078", "0.47574478", "0.47493434", "0.4739314", "0.47239366", "0.4703992", "0.4703992...
0.0
-1
Try/catch helper to minimize deoptimizations. Returns a completion record like context.tryEntries[i].completion. This interface could have been (and was previously) designed to take a closure to be invoked without arguments, but in all the cases we care about we already have an existing method we want to call, so there...
function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tryCatch(fn, obj, arg) { // 59\n try { // 60\n return { type: \"normal\", arg: fn.call(obj, arg) }; ...
[ "0.5071568", "0.5061275", "0.4849881", "0.47927505", "0.47927505", "0.47927505", "0.47927505", "0.47927505", "0.47831497", "0.47831497", "0.47063333", "0.46893752", "0.46678346", "0.4655878", "0.46554154", "0.46554154", "0.46554154", "0.46371436", "0.46213374", "0.46146342", ...
0.0
-1
Dummy constructor functions that we use as the .constructor and .constructor.prototype properties for functions that return Generator objects. For full spec compliance, you may wish to configure your minifier not to mangle the names of these two functions.
function Generator() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tempCtor() {}", "function temporaryConstructor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function HelperConstructor() {}", "function DummyClass() {\r\n // ...
[ "0.7218366", "0.70249206", "0.69523525", "0.69523525", "0.69523525", "0.69523525", "0.69523525", "0.69523525", "0.6760518", "0.65990555", "0.6572468", "0.6572468", "0.6572468", "0.64856845", "0.644338", "0.6399951", "0.63927424", "0.6376415", "0.6376415", "0.6337515", "0.6277...
0.0
-1
Helper for defining the .next, .throw, and .return methods of the Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function(method) { prototype[method] = function(arg) { return this._invoke(method, arg); }; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineIteratorMethods(prototype){[\"next\",\"throw\",\"return\"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg);};});}", "function defineIteratorMethods(prototype){[\"next\",\"throw\",\"return\"].forEach(function(method){prototype[method]=function(arg){return th...
[ "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.71796995", "0.6995674", "0.6995674", "0.6973852", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", ...
0.0
-1
Return a string as "" if undefined
function text0(t){ if(t!=undefined && t.length!=undefined) return t; else return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function String$empty() {\n return '';\n }", "function String$empty() {\n return '';\n }", "function defaultString(value){\n\tif (!(value) || value == \"undefined\") {\n\t\treturn \"\";\n\t} \n\treturn value;\t\n}", "function _nullCoerce() {\n ...
[ "0.76884234", "0.737703", "0.737703", "0.73487496", "0.7116591", "0.69041556", "0.6903906", "0.68849623", "0.68665075", "0.6849313", "0.67688394", "0.67657316", "0.6723922", "0.6723922", "0.6617632", "0.6596092", "0.6596092", "0.6584421", "0.6584421", "0.65658474", "0.6508093...
0.62126267
36
Extract XML from a string
function string2xml(txt){ if (window.DOMParser){ parser=new DOMParser(); return parser.parseFromString(txt,"text/xml"); } else { // Internet Explorer xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async=false; xmlDoc.loadXML(txt); return xmlDoc; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseXmlString(str)\n{\n\tif (!str)\n\t\treturn null;\n\n\tvar parser = new DOMParser();\n\tvar dom = parser.parseFromString(str, \"text/xml\");\n\tif (dom.documentElement.nodeName === \"parsererror\")\n\t\treturn undefined;\n\n\treturn dom;\n}", "function xmlParse(str) {\n if (typeof ActiveXObject != ...
[ "0.65475", "0.64442295", "0.6390108", "0.63166445", "0.6019271", "0.6019271", "0.5932779", "0.588254", "0.5860697", "0.5846781", "0.58400106", "0.58024496", "0.57854074", "0.57619023", "0.5733347", "0.57297844", "0.57187873", "0.55843866", "0.5569096", "0.5542005", "0.5487158...
0.6470154
1
const url = "http:localhost:3000/"; empty email & password
async function testLogin() { try { driver.get(url + "login"); driver.findElement(By.id("normal_login_email")).sendKeys(""); driver.findElement(By.id("normal_login_password")).sendKeys(""); driver.findElement(By.className("login-form-button")).click(); setTimeout(async () => { const a = aw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(user, url){//url for password reset\n this.to = user.email;\n this.firstName = user.name.split(' ')[0]; \n this.url = url;\n this.from = `Joseph Wimalasuriya 👻 <${process.env.EMAIL_FROM}>`;\n }", "emailUrl (baseUrl,username){\n browser.get(baseUrl + username + \"/_se...
[ "0.608535", "0.6019824", "0.5877053", "0.58494705", "0.58214897", "0.5678482", "0.5618781", "0.56127286", "0.55512255", "0.5464522", "0.54482114", "0.5427585", "0.54255277", "0.5419925", "0.5395762", "0.53914464", "0.5390861", "0.5386061", "0.53791356", "0.5362236", "0.533829...
0.0
-1
incorrect email & password
async function testLogin1() { try { driver.get(url + "login"); driver.findElement(By.id("normal_login_email")).sendKeys("12345@gmail.com"); driver.findElement(By.id("normal_login_password")).sendKeys("abc888888888"); driver.findElement(By.className("login-form-button")).click(); } catch (err) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function error(){\n return \"Invaild e-mail or password!\";\n }", "function handleRecoverPassword(){\n if(emailValid()){\n console.log(`send me my password to: ${email}`)\n setEmail('')\n }else{\n console.log('invalid')\n }\n }", "function vali...
[ "0.7246435", "0.6829324", "0.682296", "0.660607", "0.6554339", "0.655054", "0.65418553", "0.6535222", "0.6527247", "0.6507466", "0.6480792", "0.647122", "0.64024746", "0.6345461", "0.63171315", "0.6314648", "0.62883943", "0.6254302", "0.6252727", "0.62395704", "0.62265015", ...
0.0
-1
correct email & password
async function testLogin2() { try { driver.get(url + "login"); driver .findElement(By.id("normal_login_email")) .sendKeys("abc888@gmail.com"); driver.findElement(By.id("normal_login_password")).sendKeys("abc888"); driver.findElement(By.className("login-form-button")).click(); } catch (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleRecoverPassword(){\n if(emailValid()){\n console.log(`send me my password to: ${email}`)\n setEmail('')\n }else{\n console.log('invalid')\n }\n }", "function fixEmail() {\n var decision = Browser.msgBox(\"WARNING\", \"Are you sure you wan...
[ "0.69363123", "0.6887896", "0.6843431", "0.65083116", "0.65059584", "0.6496943", "0.64844275", "0.6482547", "0.6435437", "0.6409922", "0.64084536", "0.63846445", "0.6354864", "0.6302953", "0.6286257", "0.62448907", "0.62359786", "0.61888665", "0.6188254", "0.6170463", "0.6161...
0.0
-1
Reference for box type (e.g. SKU or description)
getReference() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get type() {\n return typeof this._content == \"number\" ? exports.BlockType.Text :\n Array.isArray(this._content) ? this._content : this._content.type;\n }", "getType(){\n return \"Square\";\n }", "function getBlock(type) {\n switch (type) {\n case 'Radio':\n case 'Bool':\n ...
[ "0.62278664", "0.6143823", "0.61225855", "0.59410375", "0.59393823", "0.5914142", "0.5852843", "0.582413", "0.5725587", "0.5720874", "0.56968355", "0.5680796", "0.5680796", "0.5680796", "0.56688243", "0.564862", "0.563966", "0.5583724", "0.5571146", "0.55680734", "0.5565702",...
0.0
-1
Outer width in mm
getOuterWidth() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWidth() {\n return Math.round(obj.width * scale);\n }", "getWidthUnit(){return this.__widthUnit}", "getInnerWidth() {\n mustInherit();\n }", "getPictureWidth() {\n const mwm = (this.camera.MatrixWidth / 10000); /* Matrix Width in meters */\n const { altitude } = this.mission;\...
[ "0.7092086", "0.7010623", "0.67779326", "0.6768356", "0.67501664", "0.6730846", "0.6710201", "0.6699483", "0.666454", "0.66532904", "0.6565102", "0.65552497", "0.65552497", "0.6461429", "0.64580005", "0.64422476", "0.6437272", "0.64337164", "0.64259595", "0.64259595", "0.6403...
0.68736744
2
Outer length in mm
getOuterLength() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "lengthSq() {\n return this.w * this.w + this.xyz.clone().lengthSq();\n }", "length() {\n return Math.sqrt(this.w * this.w + this.xyz.clone().lengthSq() );\n }", "getPictureWidth() {\n const mwm = (this.camera.MatrixWidth / 10000); /* Matrix Width in meters */\n const { altitude } = this.mission...
[ "0.6579067", "0.6408338", "0.6282983", "0.625458", "0.61553556", "0.6122219", "0.602042", "0.602042", "0.5974171", "0.59614027", "0.5954632", "0.5927671", "0.5917606", "0.5872624", "0.58679175", "0.58454126", "0.5838271", "0.58140904", "0.5800109", "0.57900447", "0.5770162", ...
0.62420255
4
Outer depth in mm
getOuterDepth() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDepth(mag) {\n return (mag/10) \n }", "function _depth() { \n\t\t\t\t\treturn Math.max( Math.min( _pointA.z, _pointB.z ), 0.0001 ); \n\t\t\t\t}", "get Depth() {}", "get depth() {}", "getInnerDepth() {\n mustInherit();\n }", "depth() {\n return 0;\n }", "computeMaxDepth() {\n ...
[ "0.70453376", "0.6977591", "0.6672398", "0.659132", "0.6397629", "0.63793814", "0.63748723", "0.6357365", "0.61617774", "0.61584806", "0.6149495", "0.6092562", "0.6067058", "0.60467494", "0.5952057", "0.5902736", "0.5902736", "0.5902736", "0.5902736", "0.5902736", "0.5902736"...
0.63906366
5
Empty weight in g
getEmptyWeight() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get weights() { return this.w; }", "function Weight() {\n\tthis.value = Math.random() * .2 - .1;\n\tthis.gradient = 0;\n}", "get weight() {}", "get weighting() { return this._weighting; }", "set weight(value) {}", "countWeights() {\n throw new Error('Unimplemented.');\n }", "function desirableWeigh...
[ "0.66362786", "0.65051657", "0.6379043", "0.63547117", "0.60776156", "0.6066616", "0.59922487", "0.59713954", "0.5887605", "0.5861206", "0.5820973", "0.57785285", "0.5735205", "0.5735205", "0.5666869", "0.5666869", "0.55926895", "0.5547955", "0.5538137", "0.55301785", "0.5526...
0.76582706
0
Inner width in mm
getInnerWidth() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getWidthUnit(){return this.__widthUnit}", "function getWidth() {\n return Math.round(obj.width * scale);\n }", "getOuterWidth() {\n mustInherit();\n }", "function currentWidth(){\n var widthPerMin = 41/(24*60);\n var currentDay = moment().day();\n if(currentDay < 7)\n ...
[ "0.71577454", "0.71162516", "0.6757734", "0.67464036", "0.6691984", "0.6663913", "0.6650815", "0.66479796", "0.6621035", "0.660719", "0.65977895", "0.6577248", "0.6563518", "0.6560085", "0.6555368", "0.6555368", "0.65507513", "0.6543067", "0.6541954", "0.6538459", "0.6520852"...
0.70616734
2
Inner length in mm
getInnerLength() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "heightToCM(){\n return this.height * 2.54; \n }", "function computeTimeUnitSize(duration){\n\treturn $(\"#diagram\").width()/duration ;\n}", "lengthSq() {\n return this.w * this.w + this.xyz.clone().lengthSq();\n }", "getOuterLength() {\n mustInherit();\n }", "function len(feet, inches...
[ "0.66730547", "0.6512021", "0.64492995", "0.6371724", "0.63370806", "0.6333692", "0.62921405", "0.62853295", "0.6249162", "0.62102234", "0.61507595", "0.6150456", "0.6150456", "0.61270136", "0.6075085", "0.60734886", "0.6064577", "0.6064577", "0.6059837", "0.60574347", "0.604...
0.6572922
1
Inner depth in mm
getInnerDepth() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get depth() {}", "get Depth() {}", "function getDepth(mag) {\n return (mag/10) \n }", "computeMaxDepth() {\n let d = 0;\n for (const child of this.components) {\n d = Math.max(d + 1, child.children.computeMaxDepth());\n }\n return d;\n }", "function _depth() { \n\t\t\t\t\treturn Math....
[ "0.7624701", "0.75333595", "0.7405723", "0.71288085", "0.70297664", "0.6967101", "0.6833227", "0.6822744", "0.65926105", "0.6571445", "0.6480202", "0.64434993", "0.64434993", "0.63490593", "0.63350344", "0.63004833", "0.6264385", "0.62560457", "0.6216885", "0.6191826", "0.618...
0.7190306
3
Total inner volume of packing in mm^3
getInnerVolume() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTotalVolume() {\n return this.height * this.width * this.length;\n }", "getTotalVolume() {\n return this.height * this.width * this.length;\n }", "getVolume() {\n const volume = Math.pow(this.length, 3);\n return +volume.toFixed(3);\n }", "getVolumeUtilisation() {\n ...
[ "0.7715467", "0.7715467", "0.7579748", "0.74674207", "0.74098486", "0.7195796", "0.70795625", "0.7061448", "0.70477617", "0.7046902", "0.70221907", "0.7008587", "0.6810208", "0.6736979", "0.65598583", "0.6489772", "0.64349073", "0.642167", "0.642167", "0.63921595", "0.6377790...
0.5545242
59
Max weight the packaging can hold in g
getMaxWeight() { mustInherit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHighestWeight(){\n maxWeight = 1;\n\n linkWeightMap.forEach(function(d){\n if(d > maxWeight)\n maxWeight = d;\n });\n\n return maxWeight;\n}", "function desirableWeight() {\n var desirableWeight = userInfo[\"desirable-weight\"];\n var weight = userInfo[\"weight\"];\n var step1 = ...
[ "0.71948147", "0.66494745", "0.65678364", "0.63743794", "0.6325384", "0.6319217", "0.62928843", "0.6084406", "0.60569614", "0.60402507", "0.6016911", "0.59957266", "0.5992119", "0.597225", "0.5970047", "0.596481", "0.5954523", "0.59522086", "0.59449285", "0.59439915", "0.5931...
0.69374865
1
Run command or app and WAIT until it finished. While waiting, this script cannot process new input and run others commands
async function runCommandHandler(command) { try { console.log(await runCommand(command)); } catch (e) { console.error(`Error: ${e.message}`); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function waitForCommandInput() {\n /**\n * Print menu & request input.\n */\n function getCommandInput() {\n prompt.get(['command'], function (err, input) {\n if (err) {\n console.log(err);\n return 1;\n }\n\n console.log();\n ...
[ "0.69205993", "0.62402123", "0.6059751", "0.5982935", "0.5947179", "0.59402996", "0.587957", "0.5789105", "0.5787899", "0.57580256", "0.57580256", "0.57580256", "0.57580256", "0.57580256", "0.5668054", "0.5659519", "0.56531173", "0.56531173", "0.5651149", "0.5650241", "0.5644...
0.0
-1
Run app or command, but DON't wait until it finished. The app output will be in same console, so potentially can generate some mess
function runCommandWithoutWaitingHandler(command, args = []) { try { const childProcess = spawn(command, args); childProcess.stdout.on('data', data => { console.log(`stdout: ${data}`); }); childProcess.stderr.on('data', data => { console.error(`stderr: ${data}`); }); childProces...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runLocalApp(port, options) {\n const { command } = options;\n /* istanbul ignore next */\n if (!command)\n return;\n const label = chalk.grey(options.label || 'app');\n return new Promise((resolve, reject) => {\n var _a, _b;\n try {\n const childProcess = she...
[ "0.6670146", "0.63676924", "0.6229795", "0.6204516", "0.6190291", "0.6175149", "0.6093462", "0.6093462", "0.6093462", "0.6093462", "0.6093462", "0.6068826", "0.60625434", "0.6052244", "0.60070455", "0.5995669", "0.5965964", "0.59624916", "0.5934666", "0.59250027", "0.59205884...
0.0
-1
Displays table of faculty users
function viewFaculty() { highlightCurrent('#viewFaculty'); $('#mytable').bootstrapTable('destroy'); $('#mytable').bootstrapTable({ url: baseURL + 'api/users/readFaculty.php', pagination: true, search: true, showButtonText: true, showSearchClearButton: true, buttonsClass: "ucf", columns...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayUsers(users = []) {\n\n var userCount = users.length;\n\n for (var i = 0; i < userCount; i++) {\n\n var user = users[i];\n\n var userRow = createUserRow(user);\n\n if (user !== null) {\n tableBody.append(userRow);\n }\n }\n}", "function renderUsers(users) {\r\n\tvar body = doc...
[ "0.6822647", "0.65625274", "0.64036196", "0.6329884", "0.6309466", "0.6295634", "0.6264153", "0.62542564", "0.62435865", "0.61530834", "0.61070764", "0.60975736", "0.60942715", "0.6061517", "0.60541964", "0.6011879", "0.6010335", "0.59755385", "0.5961298", "0.5943502", "0.593...
0.62065786
9
Displays table of students who have not taken exam
function viewNotTakenExam() { highlightCurrent('#viewNotTakenExam'); $('#mytable').bootstrapTable('destroy'); $('#mytable').bootstrapTable({ url: baseURL + 'api/users/readNotTakenExam.php', pagination: true, search: true, showButtonText: true, showSearchClearButton: true, buttonsClass: "uc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasOnlyStudents() {}", "function hideStudents() {\n for (let i = 0; i < students.length; i++) {\n students[i].style.display = 'none';\n }\n}", "function noResults() {\r\n // Get students ul and remove students if no match found\r\n const ul = document.querySelector('.student-list');\r\n...
[ "0.6052018", "0.5766289", "0.5701835", "0.5616322", "0.56024605", "0.5593164", "0.5545896", "0.5538471", "0.55125475", "0.54600674", "0.5454386", "0.54072183", "0.5399993", "0.537125", "0.5368964", "0.5312058", "0.5309269", "0.53086215", "0.52958196", "0.5293138", "0.5289294"...
0.5105755
31
Used when displaying students who have taken exam to show links for answer and time logs
function deleteUserFormatter(value, row, index) { return [ '<a href="javascript:void(0)" onclick="deleteUser(\'' + row.id + '\');" title="Delete User">', '<i class="fa fa-trash fa-2x ucf-colors-selected"></i>', '</a> ' ].join('') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAbsenceDetails(nr) {\nif (nr != undefined) {\nelementToCheck = nr;\t\n} else {\nelementToCheck = activeElement;\n}\ncontent = \"Abwesenheit\";\nactiveDataSet = studentList.find(dataset => dataset.absenceId == elementToCheck);\n//console.log(activeDataSet);\nif (activeDataSet['ende'] != activeDataSet['...
[ "0.56121784", "0.55771226", "0.5531409", "0.5525864", "0.54792386", "0.5478827", "0.54045963", "0.5393816", "0.53929514", "0.53826094", "0.53681827", "0.5339943", "0.5332711", "0.532865", "0.52932", "0.527741", "0.5274747", "0.52560097", "0.5255776", "0.5249104", "0.5248587",...
0.0
-1
Displays table of students who have taken exam and gotten score
function viewTakenExam() { highlightCurrent('#viewTakenExam'); $('#mytable').bootstrapTable('destroy'); $('#mytable').bootstrapTable({ url: baseURL + 'api/users/readTakenExam.php', pagination: true, search: true, showButtonText: true, showSearchClearButton: true, buttonsClass: "ucf", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderScoreTable() {\n var currScoreList = UserScoreHelper.getScores();\n // Clear the table \n scoreTableEl.innerHTML = \"\";\n if (currScoreList.length > 0) {\n // Update table with user scores\n for (var index = 0; index < currScoreList.length; index++) {\n var row ...
[ "0.6070307", "0.60455674", "0.5981045", "0.5968265", "0.5938836", "0.5921643", "0.5915903", "0.5908307", "0.5901442", "0.5880422", "0.5879626", "0.5867868", "0.58676696", "0.5852028", "0.5844362", "0.5822221", "0.5815565", "0.5804962", "0.5804044", "0.57966375", "0.57965684",...
0.0
-1
Used when displaying students who have taken exam to show links for answer and time logs
function viewScoreFormatter(value, row, index) { return [ '<a href="javascript:void(0)" onclick="showScoreTable(\'' + row.id + '\');" title="Answer Details">', '<i class="fa fa-check-square fa-2x ucf-colors-selected"></i>', '</a> ', '<a href="javascript:void(0)" onclick="showTimeTable(\'' + row.id + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAbsenceDetails(nr) {\nif (nr != undefined) {\nelementToCheck = nr;\t\n} else {\nelementToCheck = activeElement;\n}\ncontent = \"Abwesenheit\";\nactiveDataSet = studentList.find(dataset => dataset.absenceId == elementToCheck);\n//console.log(activeDataSet);\nif (activeDataSet['ende'] != activeDataSet['...
[ "0.56101745", "0.55769306", "0.5533211", "0.55255497", "0.54794246", "0.5478765", "0.540295", "0.53932476", "0.53912115", "0.5383416", "0.5368344", "0.53406394", "0.5335031", "0.53270173", "0.52924526", "0.52783", "0.5273482", "0.5254491", "0.52541196", "0.5249005", "0.524588...
0.0
-1
Used when displaying students who have taken exam to show answer table for that user
function showScoreTable(id) { $('#clrButton').css('display', 'block'); $('#detailtable').bootstrapTable('destroy'); $('#detailtable').bootstrapTable({ url: baseURL + 'api/results/readByKey.php?key=' + id, Striped: true, tableSm: true, columns: [{ field : 'id', title: 'ID', }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAnswers(){\t\n\t\tvar rightAnswers = 0;\n\t\tvar wrongAnswers = 0;\n\t\tvar userInput1 = $('#a1 input:checked').val();\n\t\tvar userInput2 = $('#a2 input:checked').val();\n\t\tvar userInput3 = $('#a3 input:checked').val();\n\t\tvar userInput4 = $('#a4 input:checked').val();\n\t\tvar userInput5 = $('#a...
[ "0.59104276", "0.590197", "0.5895059", "0.57925963", "0.5764439", "0.5708902", "0.57062334", "0.5676252", "0.567605", "0.56626326", "0.5660694", "0.5655947", "0.56482685", "0.5624674", "0.56226724", "0.56033754", "0.5600502", "0.5593046", "0.5591988", "0.5591", "0.5588687", ...
0.0
-1
Used when displaying students who have taken exam to show timelog table for that user
function showTimeTable(id) { $('#clrButton').css('display', 'block'); $('#detailtable').bootstrapTable('destroy'); $('#detailtable').bootstrapTable({ url: baseURL + 'api/timelog/readByKey.php?key=' + id, Striped: true, tableSm: true, columns: [{ field : 'id', title: 'ID', }, {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showUserGifts(){\r\n \r\n // get from database mission type assigned for this day and appends to HTML\r\n appendGifts(userGifts,'neutral')\r\n }", "function updateResultsHdrs(dateInfo) {\n var userMsg;\n \n if (...
[ "0.58583695", "0.5732366", "0.57255733", "0.54637855", "0.52712095", "0.52372104", "0.52216506", "0.51944023", "0.5191071", "0.516531", "0.5131335", "0.5127975", "0.5085845", "0.50857645", "0.5080348", "0.50790644", "0.5075201", "0.5073733", "0.50713944", "0.50704074", "0.503...
0.5091104
12
garante que o valor fornecido como argumento esteja dentro da gama de valores esperada.
set valorFace(novoValorface) { if ((novoValorface >= 1) && (novoValorface <= 6)) { return this._valorFace = novoValorface } else { return "Valor inválido para a face do dado" } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkArgs(o) {\n let count = 0;\n for (let key in o) {\n if (o[key] == true) count++;\n }\n if (count == 0) {\n confirm(\"Please select at least one parameter\");\n setOptions(o);\n } else return;\n}", "function imprimeArgumentos() {\n console.log(arguments);\n}", "function saludarArg...
[ "0.62486774", "0.60985136", "0.6087531", "0.5898541", "0.58918226", "0.5877578", "0.57816553", "0.5723362", "0.5722965", "0.5703619", "0.56968886", "0.5679531", "0.5675402", "0.5666764", "0.56407917", "0.5619447", "0.5619447", "0.561001", "0.5606852", "0.5591196", "0.55817884...
0.0
-1
retorna um number representando a quantidade de faces do dado
getQuantidadeFaces() { return Faces }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getClosetDepth() { return this.faces.get(FaceOrientation.BASE).depth(); }", "function len(feet, inches, eigths) {\n var l = (12 * (feet || 0)) + (inches || 0) + ((eigths || 0) / 8); \n return pixels(l);\n}", "getFaceTurnCount() {\n return this.current == null ?this.ftm : this.ftm + this.countFaceTurns...
[ "0.5910529", "0.58487403", "0.57976043", "0.5757204", "0.5726624", "0.5698074", "0.5674776", "0.5673694", "0.56653804", "0.5654842", "0.56387395", "0.56376046", "0.55530626", "0.55530626", "0.5549682", "0.5529705", "0.5519555", "0.5514205", "0.55127513", "0.5497527", "0.54926...
0.6200582
0
Lazy loads queries. Simple to use with infinite scroll. Loads result in decending order of creation date (or _id) may extend this in the future as need. Usage: Bind an instance of APILazy to the scope. Property exports: lazy.data = array of data; lazy.stopLoading = boolean indicating if it is either currently querying ...
function APILazy(query_obj, initial_id, s_call, e_call) { this.query_obj = query_obj .sort("-_id"); this.last_id = initial_id; this.success_callback = angular.isFunction(s_call) ? s_call : angular.noop; this.error_callback = angular.isFunction(e_call) ? e_call : angula...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetchData() {\n this.initLoading();\n\n this.setFilters(this.qs_url, this.generateBaseFilters());\n this.data.filters = this.getFilters(this.qs_url);\n\n let qs = this.setQuerySet(this.view, this.qs_url).filter(this.getFiltersPrepared(this.qs_url)).prefet...
[ "0.6080302", "0.5526544", "0.5449918", "0.54458183", "0.54458183", "0.5317702", "0.52776474", "0.51479936", "0.5062635", "0.50599736", "0.5033566", "0.5033566", "0.49833396", "0.4965042", "0.4958754", "0.4940883", "0.49134368", "0.4911669", "0.49067235", "0.49009195", "0.4884...
0.59364706
1
Set or clear the hashkey for an object.
function setHashKey(obj, h) { if (h) { obj.$$hashKey = h; } else { delete obj.$$hashKey; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHashKey(obj, h) {\n\t\tif (h) {\n\t\t\tobj.$$hashKey = h;\n\t\t} else {\n\t\t\tdelete obj.$$hashKey;\n\t\t}\n\t}", "function setHashKey(obj, h) {\n\t\tif (h) {\n\t\t\tobj.$$hashKey = h;\n\t\t} else {\n\t\t\tdelete obj.$$hashKey;\n\t\t}\n\t}", "function setHashKey(obj, h) {\n\t if (h) {\n\t obj....
[ "0.80996466", "0.80996466", "0.8055644", "0.8055644", "0.8040005", "0.80145353", "0.80145353", "0.80145353", "0.80145353", "0.80145353", "0.80145353", "0.80145353", "0.80145353", "0.78651947", "0.78651947", "0.7531371", "0.60596126", "0.60143936", "0.60143936", "0.6010173", "...
0.8001386
37
Creates a shallow copy of an object, an array or a primitive. Assumes that there are no proto properties for objects.
function shallowCopy(src, dst) { if (isArray(src)) { dst = dst || []; for (var i = 0, ii = src.length; i < ii; i++) { dst[i] = src[i]; } } else if (isObject(src)) { dst = dst || {}; for (var key in src) { if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) { dst[key] = s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shallowClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}", "function clone(obj) {\n if (!isObject(obj)) return obj;\n return isArray(obj) ? obj.slice() : extend({}, obj);\n }", "function clone(obj) {\n if (!isObject(obj)) return obj;\...
[ "0.6925085", "0.6882797", "0.6882797", "0.6882797", "0.6882797", "0.6882797", "0.6882797", "0.6882797", "0.6882797", "0.6882797", "0.68234456", "0.67633325", "0.6738668", "0.66559726", "0.66541636", "0.66271985", "0.6589848", "0.6589848", "0.6579737", "0.65710026", "0.6558162...
0.0
-1
We need our custom method because encodeURIComponent is too aggressive and doesn't follow with regards to the character set (pchar) allowed in path segments: segment = pchar
function encodeUriSegment(val) { return encodeUriQuery(val, true). replace(/%26/gi, '&'). replace(/%3D/gi, '='). replace(/%2B/gi, '+'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodePathSegment(segment) {\r\n return encodeURIComponent(segment).replace(/[!'()*]/g, function (c) {\r\n return '%' + c.charCodeAt(0).toString(16);\r\n });\r\n }", "function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,'&').replace(/%3D/gi,'=').repl...
[ "0.77599055", "0.7683471", "0.7683471", "0.7538316", "0.7466263", "0.74190605", "0.74190605", "0.74190605", "0.74190605", "0.74190605", "0.74190605", "0.74190605", "0.7407124", "0.74042463", "0.7397316", "0.73801553", "0.7368011", "0.7368011", "0.7349139", "0.7349139", "0.734...
0.7343318
51
This method is intended for encoding key or value parts of query component. We need a custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be encoded per query = ( pchar / "/" / "?" )
function encodeUriQuery(val, pctEncodeSpaces) { return encodeURIComponent(val). replace(/%40/gi, '@'). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). replace(/%3B/gi, ';'). replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encode(char) {\n if (char == \"(\") {\n return \"%28\";\n }\n else if (char == \")\") {\n return \"%29\";\n }\n else if (char == \"=\") {\n return \"%3D\";\n }\n else {\n return encodeURIComponent(char);\n }\n}", "function encodeUriQuery(s){return enco...
[ "0.71562696", "0.70924747", "0.70437676", "0.70437676", "0.7008803", "0.7008803", "0.7006764", "0.69240695", "0.69197106", "0.69197106", "0.69197106", "0.69197106", "0.69197106", "0.69197106", "0.69197106", "0.6915449", "0.6904992", "0.6896082", "0.68950313", "0.6870669", "0....
0.68589634
58
throw error if the argument is falsy.
function assertArg(arg, name, reason) { if (!arg) { throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); } return arg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function throwIfFalsy(value) {\n if (!value) {\n throw new Error('value must not be falsy');\n }\n return value;\n}", "function isFalsy(input){\n\n}", "function isFalsy(input){\n return 0;\n }", "function verify_required_arg(arg, errorMsg) {\n if ((_.isUndefined(arg) || _...
[ "0.7172773", "0.687895", "0.6663923", "0.65720487", "0.6550899", "0.6380554", "0.6136963", "0.61253303", "0.60794896", "0.6073735", "0.5982409", "0.5960948", "0.5944493", "0.5942149", "0.5941711", "0.59356165", "0.59329516", "0.5916647", "0.5893195", "0.5872222", "0.5865924",...
0.0
-1
Converts snake_case to camelCase. Also there is special case for Moz prefix starting with upper case letter.
function camelCase(name) { return name. replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }). replace(MOZ_HACK_REGEXP, 'Moz$1'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function snake_case(name) {\n\t\t\t\tvar regexp = /[A-Z]/g;\n\t\t\t\tvar separator = '-';\n\t\t\t\treturn name.replace(regexp, function(letter, pos) {\n\t\t\t\t\treturn (pos ? separator : '') + letter.toLowerCase();\n\t\t\t\t});\n\t\t\t}", "function snake_case(name){\n\t var regexp = /[A-Z]/g;\n\t var sepa...
[ "0.7714091", "0.7710414", "0.77022845", "0.76754946", "0.7601108", "0.757924", "0.757924", "0.755669", "0.755669", "0.755669", "0.755669", "0.755669", "0.755669", "0.755669", "0.755669", "0.755669", "0.755669", "0.75446856", "0.7523777", "0.7523777", "0.7523777", "0.7523777...
0.0
-1
Provider for private $$jqLite service
function $$jqLiteProvider() { this.$get = function $$jqLite() { return extend(JQLite, { hasClass: function(node, classes) { if (node.attr) node = node[0]; return jqLiteHasClass(node, classes); }, addClass: function(node, classes) { if (node.attr) node = node[0]; r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $$jqLiteProvider() {\n\t\tthis.$get = function $$jqLite() {\n\t\t\treturn extend(JQLite, {\n\t\t\t\thasClass: function(node, classes) {\n\t\t\t\t\tif (node.attr) node = node[0];\n\t\t\t\t\treturn jqLiteHasClass(node, classes);\n\t\t\t\t},\n\t\t\t\taddClass: function(node, classes) {\n\t\t\t\t\tif (node.at...
[ "0.7766932", "0.7652262", "0.7652262", "0.7559215", "0.7539176", "0.74515456", "0.74515456", "0.6145816", "0.6014965", "0.5985696", "0.59837425", "0.56979644", "0.56369364", "0.5543092", "0.5484032", "0.54460794", "0.54453903", "0.54295963", "0.5397168", "0.53922856", "0.5386...
0.73663604
30
HashMap which can use objects as keys
function HashMap(array, isolatedUid) { if (isolatedUid) { var uid = 0; this.nextUid = function() { return ++uid; }; } forEach(array, this.put, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function HashMap(obj)\n{\n this.length = 0;\n this.items = {};\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n this.items[p] = obj[p];\n this.length++;\n }\n }\n\n\t/**\n\tPut an item in the hash tablle\n\t**/\n HashMap.prototype.put = function(key, value...
[ "0.64886934", "0.6373294", "0.6243111", "0.6061329", "0.6061329", "0.6056442", "0.59866756", "0.5964041", "0.59105843", "0.5864004", "0.5854936", "0.5849777", "0.58458453", "0.57090086", "0.56927776", "0.567141", "0.5653496", "0.5610964", "0.5592916", "0.55725205", "0.5534121...
0.554264
45
Helper function to get first anchor from a NodeList (using `Arraysome()` instead of `angularforEach()` since it's more performant and working in all supported browsers.)
function getFirstAnchor(list) { var result = null; Array.prototype.some.call(list, function(element) { if (nodeName_(element) === 'a') { result = element; return true; } }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFirstAnchor(list){var result=null;Array.prototype.some.call(list,function(element){if(nodeName_(element)==='a'){result=element;return true;}});return result;}", "function getFirstAnchor(list){var result=null;Array.prototype.some.call(list,function(element){if(nodeName_(element)==='a'){result=element;...
[ "0.8074974", "0.8074974", "0.79875964", "0.79025406", "0.79025406", "0.7894008", "0.7780491", "0.7762461", "0.7762461", "0.7762461", "0.7762461", "0.7762461", "0.7762461", "0.7762461", "0.7762461", "0.7762461", "0.776087", "0.6406035", "0.6292099", "0.5941218", "0.5932468", ...
0.79404134
26
if any other type of options value besides an Object value is passed into the $animate.method() animation then this helper code will be run which will ignore it. While this patch is not the greatest solution to this, a lot of existing plugins depend on $animate to either call the callback (< 1.2) or return a promise th...
function prepareAnimateOptions(options) { return isObject(options) ? options : {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareAnimateOptions(options){return isObject(options)?options:{};}", "function prepareAnimateOptions(options){return isObject(options)?options:{};}", "function prepareAnimateOptions(options) {\n return isObject(options) ? options : {};\n }", "function prepareAnimateOptions(options) {\n...
[ "0.72095895", "0.72095895", "0.7097127", "0.702213", "0.702213", "0.70051366", "0.59957355", "0.5965593", "0.5466371", "0.5462958", "0.5460963", "0.54504734", "0.5422483", "0.5380346", "0.5377667", "0.5352834", "0.534169", "0.5335676", "0.5335676", "0.5335676", "0.53210515", ...
0.69853365
25
Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
function completeOutstandingRequest(fn) { try { fn.apply(null, sliceArgs(arguments, 1)); } finally { outstandingRequestCount--; if (outstandingRequestCount === 0) { while (outstandingRequestCallbacks.length) { try { outstandingRequestCallbacks.pop()(); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function completeOutstandingRequest(fn) {\n try {\n fn.apply(null, sliceArgs(arguments, 1));\n } finally {\n outstandingRequestCount--;\n if (outstandingRequestCount === 0) {\n while(outstandingRequestCallbacks.length) {\n try {\n outstandingRequestCallbacks.pop()();...
[ "0.7159645", "0.7159645", "0.7159645", "0.7159645", "0.7159645", "0.7159645", "0.7159645", "0.7159645", "0.7159645", "0.7159645", "0.7126252", "0.7126252", "0.7088254", "0.69648546", "0.69648546", "0.6795259", "0.6785734", "0.6785734", "0.5357326", "0.52063054", "0.51221895",...
0.7173945
20
makes the `entry` the freshEnd of the LRU linked list
function refresh(entry) { if (entry != freshEnd) { if (!staleEnd) { staleEnd = entry; } else if (staleEnd == entry) { staleEnd = entry.n; } link(entry.n, entry.p); link(entry, freshEnd); freshEnd = entry; freshEnd.n =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refresh(entry) { // 6153\n if (entry != freshEnd) { // 6154\n if (!staleEnd) { ...
[ "0.71337277", "0.7053727", "0.7050213", "0.70393115", "0.70393115", "0.70255274", "0.7007672", "0.7007672", "0.7007672", "0.7007672", "0.7007672", "0.7007672", "0.7007672", "0.7007672", "0.68700457", "0.68700457", "0.6222058", "0.6215561", "0.5898322", "0.5846858", "0.5846396...
0.7014544
29
bidirectionally links two entries of the LRU linked list
function link(nextEntry, prevEntry) { if (nextEntry != prevEntry) { if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function link(nextEntry,prevEntry){if(nextEntry!==prevEntry){if(nextEntry)nextEntry.p=prevEntry;//p stands for previous, 'prev' didn't minify\nif(prevEntry)prevEntry.n=nextEntry;//n stands for next, 'next' didn't minify\n}}", "function link(nextEntry, prevEntry) {\n\t if (nextEntry !== prevEntry) {\n\t ...
[ "0.6564833", "0.65521955", "0.65102094", "0.6485858", "0.6485449", "0.64773166", "0.64773166", "0.64773166", "0.64773166", "0.64773166", "0.64773166", "0.64773166", "0.64773166", "0.64638793", "0.64043784", "0.64043784", "0.6399113", "0.62930155", "0.5959393", "0.56078535", "...
0.6447052
36
This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest
function flushOnChangesQueue() { try { if (!(--onChangesTtl)) { // We have hit the TTL limit so reset everything onChangesQueue = undefined; throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\n', TTL); } // We must run this hook in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "$onChanges(change){}", "function rememberChangeHistoryAndInvokeOnChangesHook() {\n var simpleChangesStore = getSimpleChangesStore(this);\n var current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current;\n\n if (current) {\n var previ...
[ "0.66514355", "0.6629411", "0.64711004", "0.64095384", "0.6363313", "0.6363313", "0.6363313", "0.6363313", "0.6363313", "0.6363313", "0.622852", "0.6181225", "0.6181225", "0.6176537", "0.61595833", "0.61113364", "0.6068259", "0.60500216", "0.6046954", "0.6046954", "0.6046954"...
0.5999934
24
This is the function that is injected as `$transclude`. Note: all arguments are optional!
function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) { var transcludeControllers; // No scope passed in: if (!isScope(scope)) { slotName = futureParentElement; futureParentElement = cloneAttachFn; cloneAttachFn = scope...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "transclude (element) {\n if (this.dom_parser.elements.length === 0) { return; }\n const body = this.dom_parser.document.body.cloneNode(true);\n\n while (element.firstChild) {\n const child = element.removeChild(element.firstChild);\n let transcluder;\n if (chil...
[ "0.678941", "0.6067335", "0.5712613", "0.5516517", "0.54899067", "0.5466133", "0.53546095", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0.53239113", "0...
0.5008915
54
Depending upon the context in which a directive finds itself it might need to have a new isolated or child scope created. For instance: if the directive has been pulled into a template because another directive with a higher priority asked for element transclusion if the directive itself asks for transclusion but it is...
function markDirectiveScope(directives, isolateScope, newScope) { for (var j = 0, jj = directives.length; j < jj; j++) { directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope}); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function markDirectiveScope(directives, isolateScope, newScope) { // 8373\n for (var j = 0, jj = directives.length; j < jj; j++) { // 8374\n directives[j] = inherit(directives[j], {$$isolateScope:...
[ "0.68247783", "0.6678569", "0.6678569", "0.65664953", "0.65664953", "0.6523584", "0.57680047", "0.5705015", "0.5687778", "0.54711646", "0.5420667", "0.5418919", "0.5405146", "0.54000497", "0.53214085", "0.5305129", "0.52657515", "0.52651584", "0.5262802", "0.51999086", "0.519...
0.6426887
20
Sorting function for bound directives.
function byPriority(a, b) { var diff = b.priority - a.priority; if (diff !== 0) return diff; if (a.name !== b.name) return (a.name < b.name) ? -1 : 1; return a.index - b.index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get sortingOrder() {}", "sort() {\r\n\t\treturn this.data.sort((a,b) => {\r\n\t\t\tfor(var i=0; i < this.definition.length; i++) {\r\n\t\t\t\tconst [code, key] = this.definition[i];\r\n\t\t\t\tswitch(code) {\r\n\t\t\t\t\tcase 'asc':\r\n\t\t\t\t\tcase 'desc':\r\n\t\t\t\t\t\tif (a[key] > b[key])\r\n\t\t\t\t\t\t\tr...
[ "0.68072623", "0.6693703", "0.65714747", "0.65714747", "0.6565047", "0.6443474", "0.6425113", "0.64110106", "0.6385268", "0.6384523", "0.6344307", "0.63266206", "0.63036287", "0.62926674", "0.62613416", "0.62613416", "0.62593174", "0.6239815", "0.62019855", "0.6200376", "0.61...
0.0
-1
Set up $watches for isolate scope and controller bindings. This process only occurs for isolate scopes and new scopes with controllerAs.
function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) { var removeWatchCollection = []; var initialChanges = {}; var changes; forEach(bindings, function initializeBinding(definition, scopeName) { var attrName = definition.attrName, optional = defini...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addWatches() {\n scope.watcher = watchClass();\n }", "function configureWatchers() {\n var unwatch = scope.$watch('disabled', function (isDisabled) {\n if (scope.active && isDisabled) {\n tabsCtrl.next(scope);\n }\n });\n\n scope.$watch('ac...
[ "0.70716393", "0.663641", "0.64076275", "0.6359493", "0.6359493", "0.6359493", "0.6359493", "0.63455623", "0.63455623", "0.6259326", "0.61234754", "0.58771425", "0.58537793", "0.58415467", "0.58415025", "0.57979065", "0.5657267", "0.5647832", "0.56475717", "0.56475717", "0.56...
0.0
-1
Converts all accepted directives format into proper directive name.
function directiveNormalize(name) { return camelCase(name.replace(PREFIX_REGEXP, '')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function directiveNormalize(name){return camelCase(name.replace(PREFIX_REGEXP,''));}", "function directiveNormalize(name){return name.replace(PREFIX_REGEXP,'').replace(SPECIAL_CHARS_REGEXP,fnCamelCaseReplace);}", "function directiveNormalize(name){return name.replace(PREFIX_REGEXP,'').replace(SPECIAL_CHARS_REG...
[ "0.6846047", "0.68269444", "0.68100214", "0.67178917", "0.65807444", "0.65433955", "0.65433955", "0.6526205", "0.65044594", "0.6472985", "0.6459022", "0.6459022", "0.6459022", "0.6425821", "0.64138436", "0.6358559", "0.6358559", "0.6358559", "0.6358559", "0.6333173", "0.63331...
0.6499601
33
Makes the request. !!! ACCESSES CLOSURE VARS: $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests
function sendReq(config, reqData) { var deferred = $q.defer(), promise = deferred.promise, cache, cachedResp, reqHeaders = config.headers, url = buildUrl(config.url, config.paramSerializer(config.params)); $http.pendingRequests.push(config); promise.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_startRequest() {\n if (this._timeoutID !== undefined)\n clearTimeout(this._timeoutID);\n \n this._makeRequest()\n .then(({ request }) => {\n if (!this.isStarted)\n return;\n \n let delay = this._defaultTimeout;\n \n // Read ResponseHeader\n let cacheControl = ...
[ "0.6381797", "0.6297676", "0.60881376", "0.6082422", "0.6062736", "0.6052115", "0.6052115", "0.6052115", "0.60195273", "0.6002649", "0.59809446", "0.59783936", "0.59326667", "0.59326667", "0.59326667", "0.59326667", "0.59326667", "0.59271425", "0.59077907", "0.59077907", "0.5...
0.58721536
46
Callback registered to $httpBackend(): caches the response if desired resolves the raw $http promise calls $apply
function done(status, response, headersString, statusText) { if (cache) { if (isSuccess(status)) { cache.put(url, [status, response, parseHeaders(headersString), statusText]); } else { // remove promise from the cache cache.remove(url); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function done(status, response, headersString, statusText) { // 10571\n if (cache) { // 10572\n if (isSuccess(status)) { ...
[ "0.71073914", "0.6958274", "0.66502565", "0.6382597", "0.63252", "0.6320613", "0.6296229", "0.6281358", "0.6281358", "0.6281358", "0.6281358", "0.6281358", "0.6038933", "0.6038933", "0.6038933", "0.6038933", "0.6038933", "0.5976504", "0.59484917", "0.5925191", "0.5925191", ...
0.62438637
35
Resolves the raw $http promise.
function resolvePromise(response, status, headers, statusText) { //status: HTTP response status code, 0, -1 (aborted by timeout / promise) status = status >= -1 ? status : 0; (isSuccess(status) ? deferred.resolve : deferred.reject)({ data: response, status: status, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolvePromise(response, status, headers, statusText) {\n\t\t\t\t\t\t// normalize internal statuses to 0\n\t\t\t\t\t\tstatus = Math.max(status, 0);\n\n\t\t\t\t\t\t(isSuccess(status) ? deferred.resolve : deferred.reject)({\n\t\t\t\t\t\t\tdata: response,\n\t\t\t\t\t\t\tstatus: status,\n\t\t\t\t\t\t\theaders...
[ "0.6222225", "0.615738", "0.6097995", "0.60894793", "0.6073669", "0.6028588", "0.6026246", "0.59922177", "0.59922177", "0.59922177", "0.59922177", "0.59922177", "0.59922177", "0.59922177", "0.59922177", "0.59900814", "0.59900814", "0.59900814", "0.59900814", "0.59900814", "0....
0.5943121
36
TODO: this is the same as the constantWatchDelegate in parse.js
function constantWatchDelegate(scope, listener, objectEquality, constantInterp) { var unwatch; return unwatch = scope.$watch(function constantInterpolateWatch(scope) { unwatch(); return constantInterp(scope); }, listener, objectEquality); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initWatchVal() {} // 16439", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}...
[ "0.7015519", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "0.7009676", "...
0.59882176
57
return the server only (scheme://host:port)
function serverBase(url) { return url.substring(0, url.indexOf('/', url.indexOf('//') + 2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getServerUrl() {\n const {\n host,\n port\n } = this.serverConfig;\n return `//${host || 'localhost'}:${port}`;\n }", "get serverUrl() {\n return `http://${this.host}:${this.port}`;\n }", "function getSocketAddress(){\n if(location.port === '3000') {\n const host = location.ho...
[ "0.7348443", "0.71172404", "0.7038096", "0.6885798", "0.6820426", "0.6707075", "0.66239816", "0.65740424", "0.65101385", "0.65101385", "0.6495914", "0.64802015", "0.6466523", "0.6444576", "0.63525265", "0.62800515", "0.62800515", "0.62392193", "0.6237606", "0.6223628", "0.621...
0.61686623
56
In Windows, on an anchor node on documents loaded from the filesystem, the browser will return a pathname prefixed with the drive name ('/C:/path') when a pathname without a drive is set: a.setAttribute('href', '/foo') a.pathname === '/C:/foo' //true Inside of Angular, we're always using pathnames that do not include d...
function removeWindowsDriveName(path, url, base) { /* Matches paths for file protocol on windows, such as /C:/foo/bar, and captures only /foo/bar. */ var windowsFilePathExp = /^\/[A-Z]:(\/.*)/; var firstPathSegmentMatch; //Get the relative path from the input URL. if (u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPathname(url){\n var $anchor = $('<a></a>');\n $anchor.attr('href', url);\n return $anchor.prop('pathname');\n }", "function uriToFsPath(uri, keepDriveLetterCasing) {\n var value;\n if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n // unc path: file://share...
[ "0.63303757", "0.5657649", "0.56399095", "0.5571488", "0.55035555", "0.5488701", "0.54772496", "0.54768646", "0.5451669", "0.5425001", "0.5417213", "0.53954935", "0.5393001", "0.538108", "0.5378764", "0.53681004", "0.53199923", "0.5261052", "0.52440584", "0.52440584", "0.5237...
0.0
-1
Faster, more basic than angular.bind
function simpleBind(context, fn) { return function(value) { fn.call(context, value); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleBind(context,fn){return function(value){fn.call(context,value);};}", "function $bind(func, thisValue) {\n return function() {return func.apply(thisValue, arguments)}\n}", "function bind(value){var lView=getLView();return bindingUpdated(lView,lView[BINDING_INDEX]++,value)?value:NO_CHANGE;}", ...
[ "0.6775124", "0.6724796", "0.62795913", "0.62649524", "0.6179377", "0.61273736", "0.60670125", "0.60670125", "0.60618997", "0.60056996", "0.5995839", "0.59634364", "0.5918577", "0.59125096", "0.58677274", "0.5812696", "0.58043873", "0.574314", "0.5740524", "0.5738893", "0.572...
0.59807986
27
function used as an initial value for watchers. because it's unique we can easily tell it apart from other values
function initWatchVal() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initWatchVal() {} // 16439", "function initWatchVal(){}", "function initWatchVal(){}", "function analogueWatch(){\n \n\n \n}", "watch() {\n }", "isFirstChange() { return this.firstChange; }", "isFirstC...
[ "0.81336576", "0.7987343", "0.7987343", "0.6202974", "0.60983175", "0.59546864", "0.59546864", "0.59151256", "0.58454293", "0.57748675", "0.5755569", "0.5755569", "0.5755569", "0.5755569", "0.5755569", "0.5755569", "0.5755569", "0.5755569", "0.5755569", "0.5755569", "0.575556...
0.80344504
36
Helper functions for `filterFilter`
function createPredicateFn(expression, comparator, matchAgainstAnyProp) { var shouldMatchPrimitives = isObject(expression) && ('$' in expression); var predicateFn; if (comparator === true) { comparator = equals; } else if (!isFunction(comparator)) { comparator = function(actual, expected) { if (i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter() {\n\t}", "filter() {\n\t}", "function filter() {\n \n}", "function filterFunction() {\n \n}", "filtering(data, filters) { // eslint-disable-line\n /**\n * Inputs:\n * data: List of JSON objects to filter\n * example: data = [\n * {\n * ...
[ "0.7683927", "0.7683927", "0.7419144", "0.7203132", "0.6785491", "0.67786944", "0.6774108", "0.6726504", "0.6723168", "0.6675409", "0.66080153", "0.65757865", "0.64860916", "0.64860916", "0.6483775", "0.6483775", "0.6483775", "0.6483775", "0.6483775", "0.6483775", "0.6483775"...
0.0
-1
Used for easily differentiating between `null` and actual `object`
function getTypeForFilter(val) { return (val === null) ? 'null' : typeof val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isResNull(obj) {\n return obj.type == ResType.MISC && obj.content == ResType.miscTypes.NULL;\n}", "function isObject(o){ return typeof o === 'object' && o !== null; }", "function nOrU(obj){ return obj == null || obj == undefined }", "function i(t){return null!==t&&\"object\"==typeof t}", "functio...
[ "0.7207444", "0.71657306", "0.71586436", "0.7144079", "0.7064218", "0.7064218", "0.7064218", "0.7064218", "0.70635104", "0.703787", "0.7002241", "0.69887596", "0.6976452", "0.6891332", "0.6880794", "0.6849825", "0.6844689", "0.68445385", "0.68445385", "0.68440264", "0.6825665...
0.0
-1
Round the parsed number to the specified number of decimal places This function changed the parsedNumber inplace
function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) { var digits = parsedNumber.d; var fractionLen = digits.length - parsedNumber.i; // determine fractionSize if it is not specified; `+fractionSize` converts it to a number fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(mi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundNum(num){\n return Math.round(num * 10) / 10;\n }", "function roundNumber(v) {\n\treturn parseFloat(parseFloat(v).toFixed(2));\n}", "function roundNumber(parsedNumber,fractionSize,minFrac,maxFrac){var digits=parsedNumber.d;var fractionLen=digits.l...
[ "0.67974013", "0.66989106", "0.66507745", "0.66476995", "0.66258717", "0.6619844", "0.6590431", "0.6586292", "0.65827125", "0.65788805", "0.6537595", "0.653228", "0.6517625", "0.6502644", "0.6470818", "0.6466286", "0.6454938", "0.6448975", "0.6435309", "0.64146423", "0.641170...
0.6274346
50
1 2 3 4 5 6 7 8 9 10 11
function jsonStringToDate(string) { var match; if (match = string.match(R_ISO8601_STR)) { var date = new Date(0), tzHour = 0, tzMin = 0, dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear, timeSetter = match[8] ? date.setUTCHours : date.setHours; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "range(start, count) {\n\t return Array.apply(0, Array(count))\n\t .map((element, index) =>{\n\t return index + start;\n\t \t}\n\t\t);\n }", "function range(n, m){\n var tmp = [];\n for (i = n; i < m; i++){\n tmp.push(n);\n }\n return tmp;\n}", "range(_start, _end) {\n var resul...
[ "0.6412673", "0.6274146", "0.6237372", "0.60995954", "0.60658026", "0.60650635", "0.60522985", "0.6050822", "0.60398", "0.60053647", "0.6002661", "0.5985569", "0.5982486", "0.5982143", "0.59623766", "0.5949878", "0.5942199", "0.59351933", "0.59207106", "0.5917439", "0.5917169...
0.0
-1
since animations are detected from CSS classes, we need to flush all parent classbased animations so that the parent classes are all present for child animations to properly function (otherwise any CSS selectors may not work)
function examineParentAnimation(node, animationDetails) { // enter/leave/move always have priority if (animationDetails.structural || !hasAnimationClasses(animationDetails.options)) return; if (animationDetails.state === RUNNING_STATE) { animationDetails.runner.end(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearAnims(){\n document.querySelectorAll('.activated, .sequence').forEach( el => {\n el.classList.remove('activated', 'sequence');\n })\n }", "function resetAnimations() {\n animationEls = document.querySelectorAll('.js-animate.shown');\n for (var i = 0; i < animationEls.length; i++) {\n ...
[ "0.7276597", "0.6847355", "0.6560291", "0.64789283", "0.6431134", "0.63419926", "0.626006", "0.62471807", "0.6236975", "0.6159178", "0.6153979", "0.60913366", "0.6087481", "0.6020716", "0.5989465", "0.5987362", "0.5957859", "0.59303546", "0.59126073", "0.59096617", "0.5906418...
0.56077534
61
TODO(matsko): change to reference nodes
function getAnchorNodes(node) { var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']'; var items = node.hasAttribute(NG_ANIMATE_REF_ATTR) ? [node] : node.querySelectorAll(SELECTOR); var anchors = []; forEach(items, function(node) { v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function node(){}", "get node() { return this._node; }", "function Node(){}", "function Node() {}", "getNodes() {\n return this.target.assignedNodes(this.options);\n }", "constructor(nodes) {\n this.nodes = nodes\n }", "function NodeRef(node, type, text) {\n this.node = node;\n this.type = ty...
[ "0.66199833", "0.6273092", "0.61483604", "0.61361074", "0.6130364", "0.61164844", "0.60625446", "0.6038434", "0.6020035", "0.6006584", "0.6006584", "0.6006584", "0.59973246", "0.59862584", "0.5985708", "0.59555835", "0.5949035", "0.5940196", "0.5940196", "0.5940196", "0.59023...
0.0
-1
TAP EVENTS AND GHOST CLICKS Why tap events? Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're doubletapping, and then fire a click event. This delay sucks and makes mobile apps feel unresponsive. So we detect touchstart, touchmove, touchcancel and touchend ourselves and determine when t...
function hit(x1, y1, x2, y2) { return Math.abs(x1 - x2) < CLICKBUSTER_THRESHOLD && Math.abs(y1 - y2) < CLICKBUSTER_THRESHOLD; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onClick(event) {\n if (Date.now() - lastPreventedTime > PREVENT_DURATION) {\n return; // Too old.\n }\n\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n ...
[ "0.6388834", "0.63887924", "0.63812184", "0.63665843", "0.63515943", "0.63515943", "0.6349454", "0.6349454", "0.61960065", "0.61768955", "0.613956", "0.60155743", "0.5928694", "0.5851225", "0.5848998", "0.5831584", "0.58311546", "0.5817547", "0.5781555", "0.5781555", "0.57556...
0.0
-1
Checks a list of allowable regions against a click location. Returns true if the click should be allowed. Splices out the allowable region from the list after it has been used.
function checkAllowableRegions(touchCoordinates, x, y) { for (var i = 0; i < touchCoordinates.length; i += 2) { if (hit(touchCoordinates[i], touchCoordinates[i + 1], x, y)) { touchCoordinates.splice(i, i + 2); return true; // allowable region } } retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAllowableRegions(touchCoordinates, x, y) {\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (hit(touchCoordinates[i], touchCoordinates[i+1], x, y)) {\n touchCoordinates.splice(i, i + 2);\n return true; // allowable region\n }\n }\n return false; // No all...
[ "0.7172129", "0.716613", "0.716613", "0.716613", "0.716613", "0.7098247", "0.7098247", "0.5860332", "0.54755884", "0.5452438", "0.5442114", "0.54385376", "0.54334104", "0.54021597", "0.5362944", "0.5346568", "0.5315994", "0.5307606", "0.5306546", "0.5294208", "0.5279957", "...
0.71449983
5
Global click handler that prevents the click if it's in a bustable zone and preventGhostClick was called recently.
function onClick(event) { if (Date.now() - lastPreventedTime > PREVENT_DURATION) { return; // Too old. } var touches = event.touches && event.touches.length ? event.touches : [event]; var x = touches[0].clientX; var y = touches[0].clientY; // Work around deskto...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preventGhostClick(x, y) {\n if (!touchCoordinates) {\n $rootElement[0].addEventListener('click', onClick, true);\n $rootElement[0].addEventListener('touchstart', onTouchStart, true);\n touchCoordinates = [];\n }\n\n ...
[ "0.73478", "0.73478", "0.7347256", "0.7300218", "0.7300218", "0.7300218", "0.7300218", "0.7300218", "0.7221152", "0.65963066", "0.6553105", "0.6524485", "0.6498743", "0.64817595", "0.6480612", "0.6468255", "0.6468255", "0.6467821", "0.64113516", "0.6381518", "0.6345601", "0...
0.64001596
19
Global touchstart handler that creates an allowable region for a click event. This allowable region can be removed by preventGhostClick if we want to bust it.
function onTouchStart(event) { var touches = event.touches && event.touches.length ? event.touches : [event]; var x = touches[0].clientX; var y = touches[0].clientY; touchCoordinates.push(x, y); $timeout(function() { // Remove the allowable region. for (var i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preventGhostClick(x, y) {\n if (!touchCoordinates) {\n $rootElement[0].addEventListener('click', onClick, true);\n $rootElement[0].addEventListener('touchstart', onTouchStart, true);\n touchCoordinates = [];\n }\n\n lastPreventedTime = Date.now();\n\n ...
[ "0.6798322", "0.677365", "0.677365", "0.6706802", "0.6706802", "0.6706802", "0.6706802", "0.6706802", "0.6563468", "0.6549607", "0.6542408", "0.65337837", "0.65337837", "0.65337837", "0.65337837", "0.6296588", "0.62336236", "0.61802274", "0.61802274", "0.6155774", "0.6122053"...
0.65789163
8
On the first call, attaches some event handlers. Then whenever it gets called, it creates a zone around the touchstart where clicks will get busted.
function preventGhostClick(x, y) { if (!touchCoordinates) { $rootElement[0].addEventListener('click', onClick, true); $rootElement[0].addEventListener('touchstart', onTouchStart, true); touchCoordinates = []; } lastPreventedTime = Date.now(); checkAllowabl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n document.addEventListener(\"touchstart\", touchHandler, true);\n document.addEventListener(\"touchmove\", touchHandler, true);\n document.addEventListener(\"touchend\", touchHandler, true);\n document.addEventListener(\"touchcancel\", touchHandler, true);\n }", ...
[ "0.6721086", "0.66993153", "0.64145917", "0.63741803", "0.6339568", "0.63016623", "0.627593", "0.6262629", "0.62365746", "0.62236446", "0.6200184", "0.61970556", "0.6183574", "0.6171448", "0.61657757", "0.6165187", "0.61530447", "0.6147171", "0.6140859", "0.6123443", "0.61027...
0.0
-1
like _.indexBy when you know that your index values will be unique, or you want lastonein to win
function indexBy(array, propName) { var result = {}; forEach(array, function(item) { result[item[propName]] = item; }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onlyUnique(value, index, self) {\n return self.indexOf(value) === index;\n }", "onlyUnique(value, index, self) {\r\n return self.indexOf(value) === index; \r\n }", "function makeIndex(a, b) {\n let index = Object.create(null);\n\n ((a || []).concat(b ||[])).forEach(function(a) {\n index[a] =...
[ "0.56644523", "0.5603295", "0.5581381", "0.55462104", "0.5529172", "0.547712", "0.54611886", "0.5445555", "0.5402955", "0.53769135", "0.53650635", "0.53463954", "0.5329929", "0.5325894", "0.5314388", "0.5276721", "0.525718", "0.5250147", "0.52394223", "0.523288", "0.52271163"...
0.0
-1
extracted from underscore.js Return a copy of the object only containing the whitelisted properties.
function pick(obj) { var copy = {}; var keys = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1)); forEach(keys, function(key) { if (key in obj) copy[key] = obj[key]; }); return copy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copy(obj, exclude) {\n var newObj = {};\n $.each(obj, function(key, value) {\n if ($.inArray(key, exclude) === -1) {\n // exclude array doesnt contain key so\n // we need to add it to our newObj\n newObj[key] = value;\n }\n });\n return newObj;\n}...
[ "0.61777925", "0.6115211", "0.60742235", "0.6065222", "0.59896004", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.59632075", "0.5946799", "0.5946799", ...
0.0
-1
extracted from underscore.js Return a copy of the object omitting the blacklisted properties.
function omit(obj) { var copy = {}; var keys = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1)); for (var key in obj) { if (indexOf(keys, key) == -1) copy[key] = obj[key]; } return copy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copy(obj, exclude) {\n var newObj = {};\n $.each(obj, function(key, value) {\n if ($.inArray(key, exclude) === -1) {\n // exclude array doesnt contain key so\n // we need to add it to our newObj\n newObj[key] = value;\n }\n });\n return newObj;\n}...
[ "0.6473454", "0.6243247", "0.5993544", "0.5979618", "0.5927921", "0.5903837", "0.586694", "0.58561397", "0.58508164", "0.58476645", "0.5813823", "0.5811763", "0.5811041", "0.5811041", "0.57224035", "0.57224035", "0.57090896", "0.57090896", "0.57090896", "0.5705768", "0.569534...
0.5688911
21
plan is all that's required
function isResolve(value) { return isObject(value) && value.then && value.$$promises; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_plan( ) {\n\n\t\t// initialize, or we will have problems planning multiple times\n\t\tObject.keys( this.stages ).forEach( s => { this.stages[s].next = []; } );\n\n\t\t// build out \"plan\". note we are pushing onto the * prereq's * next array\n\t\tObject.keys( this.stages ).forEach( s => {\n\t\t\tif( this.stages...
[ "0.6775683", "0.6596631", "0.6396235", "0.62408274", "0.5932487", "0.5850713", "0.5849055", "0.5830911", "0.57806814", "0.5780187", "0.5769255", "0.5763793", "0.57437354", "0.56904185", "0.56315607", "0.56311274", "0.561285", "0.55772996", "0.555105", "0.5523135", "0.5500208"...
0.0
-1
Split into static segments separated by path parameter placeholders. The number of segments is always 1 more than the number of parameters.
function matchDetails(m, isSearch) { var id, regexp, segment, type, cfg, arrayMode; id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null cfg = config.params[id]; segment = pattern.substring(last, m.index); regexp = isSearch ? m[4] : m[4] ||...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $$route$recognizer$$StaticSegment(string) { this.string = string; }", "function $$route$recognizer$$StaticSegment(string) { this.string = string; }", "function $$route$recognizer$$StaticSegment(string) { this.string = string; }", "function $$route$recognizer$$StaticSegment(string) { this.string = st...
[ "0.555547", "0.555547", "0.555547", "0.555547", "0.54235095", "0.5254827", "0.52054834", "0.516155", "0.51597726", "0.5154381", "0.5143667", "0.51289546", "0.5120334", "0.5102536", "0.5102536", "0.5102536", "0.5102536", "0.5102536", "0.50962883", "0.5081762", "0.5077474", "...
0.0
-1
Wrap nonarray value as array
function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayWrap(val) {\n return _.isArray(val) ? val : (isDefined(val) ? [val] : []);\n }", "function arrayWrap(val) {\n return isArray(val) ? val : (isDefined(val) ? [val] : []);\n }", "function arrayWrap(val) {\n\t return predicates_1.isArray(val)...
[ "0.77192384", "0.76270837", "0.75723267", "0.75723267", "0.7554663", "0.7554663", "0.75508195", "0.747994", "0.747994", "0.7457606", "0.71685237", "0.7148838", "0.7065602", "0.6958656", "0.6958656", "0.6869584", "0.68252397", "0.6766194", "0.67249966", "0.66873527", "0.661320...
0.7781231
18
Unwrap array value for "auto" mode. Return undefined for empty array.
function arrayUnwrap(val) { switch(val.length) { case 0: return undefined; case 1: return mode === "auto" ? val[0] : val; default: return val; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayUnwrap(val) {\n switch(val.length) {\n case 0: return undefined;\n case 1: return mode === \"auto\" ? val[0] : val;\n default: return val;\n }\n }", "function arrayUnwrap(val) {\n switch(val.length) {\n case 0: return undefined;\n case 1: return ...
[ "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.87155336", "0.8686914", "0.8686914", ...
0.87254673
0
Wraps type (.is/.encode/.decode) functions to operate on each value of an array
function arrayHandler(callback, allTruthyMode) { return function handleArray(val) { val = arrayWrap(val); var result = map(val, callback); if (allTruthyMode === true) return filter(result, falsey).length === 0; return arrayUnwrap(result); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleArray (val) {\n\t\tvar self = this;\n\t\treturn val.map(function (m) {\n\t\t\treturn self.cast(m);\n\t\t});\n\t}", "function forEachType(array, type, fn, thisArg) {\n array.forEach(function (value) {\n if (value instanceof type) {\n fn.call(thisArg, value);\n }\n });...
[ "0.6362277", "0.61982536", "0.5944448", "0.5944448", "0.5895186", "0.58848447", "0.58508056", "0.58508056", "0.5708453", "0.5635075", "0.56344354", "0.5589951", "0.5579362", "0.55663633", "0.55500406", "0.55388385", "0.5481845", "0.54738003", "0.54528856", "0.5444366", "0.544...
0.0
-1
Wraps type (.equals) functions to operate on each value of an array
function arrayEqualsHandler(callback) { return function handleArray(val1, val2) { var left = arrayWrap(val1), right = arrayWrap(val2); if (left.length !== right.length) return false; for (var i = 0; i < left.length; i++) { if (!callback(left[i], right[i])) return false;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayEqualsHandler(callback) {\n\t return function handleArray(val1, val2) {\n\t var left = arrayWrap(val1), right = arrayWrap(val2);\n\t if (left.length !== right.length) return false;\n\t for (var i = 0; i < left.length; i++) {\n\t if (!callback(left[i], right[i])) ret...
[ "0.65492845", "0.65492845", "0.6536716", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587", "0.65311587",...
0.6572565
0
`flushTypeQueue()` waits until `$urlMatcherFactory` is injected before invoking the queued `definitionFn`s
function flushTypeQueue() { while(typeQueue.length) { var type = typeQueue.shift(); if (type.pattern) throw new Error("You cannot override a type's .pattern at runtime."); angular.extend($types[type.name], injector.invoke(type.def)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushTypeQueue() {\n\t while(typeQueue.length) {\n\t var type = typeQueue.shift();\n\t if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n\t angular.extend($types[type.name], injector.invoke(type.def));\n\t }\n\t }", "function flushTypeQueue(...
[ "0.680272", "0.680272", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.6773441", "0.67564297", "0...
0.67488533
21
array config: param name (param[]) overrides default settings. explicit config overrides param name.
function getArrayMode() { var arrayDefaults = { array: (location === "search" ? "auto" : false) }; var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {}; return extend(arrayDefaults, arrayParamNomenclature, config).array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArrayMode() {\n\t var arrayDefaults = { array: (location === \"search\" ? \"auto\" : false) };\n\t var arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n\t return extend(arrayDefaults, arrayParamNomenclature, config).array;\n\t }", "function getArrayMode() {\n\t ...
[ "0.63017124", "0.63017124", "0.62138784", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574", "0.61632574"...
0.6189371
3
returns false, true, or the squash value to indicate the "default parameter url squash policy".
function getSquashPolicy(config, isOptional) { var squash = config.squash; if (!isOptional || squash === false) return false; if (!isDefined(squash) || squash == null) return defaultSquashPolicy; if (squash === true || isString(squash)) return squash; throw new Error("Invalid squ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSquashPolicy(config, isOptional) {\n\t var squash = config.squash;\n\t if (!isOptional || squash === false)\n\t return false;\n\t if (!predicates_1.isDefined(squash) || squash == null)\n\t return urlMatcherConfig_1.matcherConfig.defaultSquashPolicy();\n\t if (squash === true |...
[ "0.7491433", "0.7254034", "0.7254034", "0.7237181", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", "0.72049975", ...
0.71952134
22
[Internal] Get the default value of a parameter, which may be an injectable function.
function $$getDefaultValue() { if (!injector) throw new Error("Injectable functions cannot be called at configuration time"); var defaultValue = injector.invoke(config.$$fn); if (defaultValue !== null && defaultValue !== undefined && !self.type.is(defaultValue)) throw new Error("Defaul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $$getDefaultValue() {\n if (!injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n var defaultValue = injector.invoke(config.$$fn);\n if (defaultValue !== null && defaultValue !== undefined && !self.type.is(defaultValue))\n throw new Error(\"De...
[ "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.7800003", "0.77837276", "0.7736508", "0.77205086", "0.75418746", "0.7512533", "0.7512533", ...
0.77487004
16
[Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the default value, which may be the result of an injectable function.
function $value(value) { function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; } function $replace(value) { var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; }); return replacement.length ? replacement[0] : val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get(key, default_value) {\n // get sets the default value if key is not found\n const val = this._get(key);\n if (val === undefined) {\n this.set(key, default_value);\n return default_value;\n } else {\n return this.decode(val);\n }\n }", "fu...
[ "0.6742883", "0.6609838", "0.61787677", "0.6120768", "0.6120049", "0.6120049", "0.6114009", "0.6112803", "0.6110313", "0.6100529", "0.6100529", "0.6100529", "0.6053176", "0.6053176", "0.6053176", "0.6053176", "0.6053176", "0.6053176", "0.6053176", "0.6053176", "0.6053176", ...
0.53717333
97
Returns a string that is a prefix of all strings matching the RegExp
function regExpPrefix(re) { var prefix = /^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(re.source); return (prefix != null) ? prefix[1].replace(/\\(.)/g, "$1") : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function regExpPrefix(re) {\n var prefix = /^\\^((?:\\\\[^a-zA-Z0-9]|[^\\\\\\[\\]\\^$*+?.()|{}]+)*)/.exec(re.source);\n return (prefix != null) ? prefix[1].replace(/\\\\(.)/g, \"$1\") : '';\n }", "function regExpPrefix(re) {\n var prefix = /^\\^((?:\\\\[^a-zA-Z0-9]|[^\\\\\\[\\]\\^$*+?.()|{}]+)*)/.exec(...
[ "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.7314573", "0.72977245", "0.72977245", ...
0.7280135
21
Interpolates matched values into a String.replace()style pattern
function interpolate(pattern, match) { return pattern.replace(/\$(\$|\d{1,2})/, function (m, what) { return match[what === '$' ? 0 : Number(what)]; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replacer(match, p1, p2, p3, offset, string){\n // p1 is nondigits, p2 digits, and p3 non-alphanumerics\n return [p1, p2, p3].join(' - ');\n}", "function replacer(match, p1, p2, p3, offset, string) {\n // p1 is nondigits, p2 digits, and p3 non-alphanumerics\n return [p1, p2, p3].join(' - ');\n}", "...
[ "0.6653262", "0.66018146", "0.6524723", "0.6517827", "0.6517827", "0.65100974", "0.64718235", "0.64557344", "0.6391604", "0.63568276", "0.63568276", "0.63335526", "0.6329891", "0.63048214", "0.63048214", "0.6227043", "0.62213075", "0.6167596", "0.6167596", "0.6167596", "0.616...
0.6159512
37
TODO: Optimize groups of rules with nonempty prefix into some sort of decision tree
function update(evt) { if (evt && evt.defaultPrevented) return; var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl; lastPushedUrl = undefined; // TODO: Re-implement this in 1.0 for https://github.com/angular-ui/ui-router/issues/1573 //if (ignoreUpdate) return t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processRule ( rule , returnObj ) {\n // some additional properties\n //var selector_arr = rule.selector.split( \" \" );\n rule.name = getSelectorName( rule.selector );//selector_arr.pop();\n // give a shorter unique id to it\n //var cssString = ruleToCSSString( rule );\n // \"-\" causes ...
[ "0.5730491", "0.5643694", "0.5642104", "0.5623241", "0.5623241", "0.5518166", "0.5371532", "0.5254762", "0.5253165", "0.5227837", "0.5227837", "0.5223675", "0.520918", "0.51946497", "0.5175023", "0.5145094", "0.5109946", "0.5072813", "0.50580895", "0.50543267", "0.5037683", ...
0.0
-1
TODO: Reimplement this in 1.0 for if (ignoreUpdate) return true;
function check(rule) { var handled = rule($injector, $location); if (!handled) return false; if (isString(handled)) $location.replace().url(handled); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shouldUpdate(_changedProperties){return!0}", "shouldUpdate(e){return!0}", "static postUpdate() {\n return false;\n }", "checkUpdate() {\n if (this.updating === true) return false\n this.hasChanged = false\n const _entityList = this.entity_items.getEntitieslist()\n if (th...
[ "0.7105626", "0.7050719", "0.69493055", "0.682208", "0.682208", "0.67618763", "0.67406535", "0.66837424", "0.66770184", "0.66511285", "0.66488194", "0.66349554", "0.66027045", "0.65562", "0.651765", "0.651765", "0.651765", "0.6485472", "0.6485472", "0.64641124", "0.64309895",...
0.0
-1
Checks text to see if it looks like a glob.
function isGlob (text) { return text.indexOf('*') > -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isGlob (text) {\n\t return text.indexOf('*') > -1;\n\t }", "function isGlob (text) {\n\t return text.indexOf('*') > -1;\n\t }", "function isGlob (text) {\n return text.indexOf('*') > -1;\n }", "function isGlob (text) {\n return text.indexOf('*') > -1;\n }", "function isGlob (text) ...
[ "0.8552022", "0.8552022", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "0.8545122", "...
0.8545789
2
Returns true if glob matches current $state name.
function doesStateMatchGlob (glob) { var globSegments = glob.split('.'), segments = $state.$current.name.split('.'); //match single stars for (var i = 0, l = globSegments.length; i < l; i++) { if (globSegments[i] === '*') { segments[i] = '*'; } } //mat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doesStateMatchGlob (glob) {\n var globSegments = glob.split('.'),\n segments = $state.$current.name.split('.');\n\n //match greedy starts\n if (globSegments[0] === '**') {\n segments = segments.slice(segments.indexOf(globSegments[1]));\n segments.unshift('**');\n }\n //ma...
[ "0.8139529", "0.813723", "0.813723", "0.813723", "0.8132876", "0.81316024", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0.8119199", "0....
0.8124761
6
Handles the case where a state which is the target of a transition is not found, and the user can optionally retry or defer the transition
function handleRedirect(redirect, state, params, options) { /** * @ngdoc event * @name ui.router.state.$state#$stateNotFound * @eventOf ui.router.state.$state * @eventType broadcast on root scope * @description * Fired when a requested state **cannot be foun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleRedirect(redirect, state, params, options) {\n\n var evt = $rootScope.$broadcast('$stateNotFound', redirect, state, params),\n retryTransition;\n\n if (evt.defaultPrevented) {\n $urlRouter.update();\n return Trans...
[ "0.649119", "0.64288294", "0.62691057", "0.62201154", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", "0.6141503", ...
0.6146717
4
Return true if there are no differences in nonsearch (path/object) params, false if there are differences
function nonSearchParamsEqual(fromAndToState, fromParams, toParams) { // Identify whether all the parameters that differ between `fromParams` and `toParams` were search params. function notSearchParam(key) { return fromAndToState.params[key].location != "search"; } var nonQuery...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nonSearchParamsEqual(fromAndToState, fromParams, toParams) {\n\t // Identify whether all the parameters that differ between `fromParams` and `toParams` were search params.\n\t function notSearchParam(key) {\n\t return fromAndToState.params[key].location != \"search\";\n\t }\n\t ...
[ "0.67805964", "0.67467237", "0.6649275", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6638825", "0.6429205", "0.634342", "0.63095033", "0.6238424", ...
0.6690745
2
Identify whether all the parameters that differ between `fromParams` and `toParams` were search params.
function notSearchParam(key) { return fromAndToState.params[key].location != "search"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nonSearchParamsEqual(fromAndToState, fromParams, toParams) {\n\t // Identify whether all the parameters that differ between `fromParams` and `toParams` were search params.\n\t function notSearchParam(key) {\n\t return fromAndToState.params[key].location != \"search\";\n\t }\n\t ...
[ "0.81149995", "0.8104819", "0.8103427", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.80860364", "0.801133", "0.64896494", "0.6423284", "...
0.63960177
20
Returns a set of DOM manipulation functions based on which Angular version it should use
function getRenderer(attrs, scope) { var statics = function() { return { enter: function (element, target, cb) { target.after(element); cb(); }, leave: function (element, cb) { element.remove(); cb(); } }; }; if ($animate) { return { enter: functi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static injectViewPortUtils() {\n let viewPortUtilsContainer = document.createElement('div');\n let xxsView = document.createElement('div');\n let xsView = document.createElement('div');\n let smView = document.createElement('div');\n let mdView = document.createElement('div');\n ...
[ "0.59978056", "0.5370687", "0.5291513", "0.5291513", "0.52856857", "0.5279941", "0.5279941", "0.5279941", "0.5279941", "0.5261177", "0.525406", "0.52253544", "0.52253544", "0.51772356", "0.51582706", "0.5156552", "0.5156552", "0.5156552", "0.5156552", "0.5156552", "0.5156552"...
0.48108473
68
Shared uiview code for both directives: Given scope, element, and its attributes, return the view's name
function getUiViewName(scope, attrs, element, $interpolate) { var name = $interpolate(attrs.uiView || attrs.name || '')(scope); var inherited = element.inheritedData('$uiView'); return name.indexOf('@') >= 0 ? name : (name + '@' + (inherited ? inherited.state.name : '')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUiViewName(scope, attrs, element, $interpolate) {\n\t\tvar name = $interpolate(attrs.uiView || attrs.name || '')(scope);\n\t\tvar inherited = element.inheritedData('$uiView');\n\t\treturn name.indexOf('@') >= 0 ? name : (name + '@' + (inherited ? inherited.state.name : ''));\n\t}", "function getUiV...
[ "0.7417891", "0.7377648", "0.7344593", "0.73376596", "0.73376596", "0.73376596", "0.73376596", "0.73376596", "0.73376596", "0.73376596", "0.73376596", "0.73376596", "0.73376596", "0.73153275", "0.72885394", "0.7270483", "0.7270483", "0.7270483", "0.7270483", "0.7270483", "0.7...
0.73495334
2
Returns the depth of the deepest subtree under this node
function countSubTreeDepth(scope) { var thisLevelDepth = 0, childNodes = scope.childNodes(), childNode, childDepth, i; if (!childNodes || childNodes.length === 0) { return 0; } for (i = childNodes.length - 1; i >...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDepth(node) {\n let d = 0;\n while (node.left != null) {\n node = node.left;\n d++;\n }\n return d;\n}", "maxDepth () {\n\t\tif (this.root === null) return 0;\n\n\t\tconst longest = (node) => {\n\t\t\tif (node.left === null && node.right === null) return 1;\n\t\t\tif (node.left === null) re...
[ "0.7437807", "0.73663795", "0.7221193", "0.71556044", "0.7095053", "0.7024685", "0.6994082", "0.6993805", "0.69005626", "0.6878678", "0.6865977", "0.68440974", "0.67443234", "0.66910386", "0.6656479", "0.65265745", "0.65050614", "0.6483216", "0.64689547", "0.6435029", "0.6384...
0.6762553
12
TODO: optimize this loop
function findFirstParentElementWithAttribute(attributeName, childObj) { // undefined if the mouse leaves the browser window if (childObj === undefined) { return null; } var testObj = childObj.parentNode, count = 1, // check for setAttribute due to exception thrown by Firefox when a nod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function loop_each_mobile(mobile, count, mobiles){\n\n //Shortlisted model best price\n var shortlisted_model_best_price;\n\n //Index of the shortlisted model inside the variants array\n var shortlisted_model_index = 0;\n\n //Index of the ...
[ "0.52356696", "0.5107719", "0.5054479", "0.5040774", "0.49819672", "0.49806416", "0.49708715", "0.49524462", "0.49427602", "0.49246532", "0.49150208", "0.48983902", "0.48669282", "0.48460576", "0.4840135", "0.48325846", "0.47954804", "0.47863492", "0.47842684", "0.4769622", "...
0.0
-1
TODO: merge in a single function detect supported CSS property
function detectTransformProperty() { var transformProperty = 'transform', safariPropertyHack = 'webkitTransform'; if (typeof document.body.style[transformProperty] !== 'undefined') { ['webkit', 'moz', 'o', 'ms'].every(function (prefix) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getsupportedprop(proparray){\n var root=document.documentElement //reference root element of document\n for (var i=0; i<proparray.length; i++){ //loop through possible properties\n if (proparray[i] in root.style){ //if property exists on element (value will be string, empty string if not set)...
[ "0.74161464", "0.7402455", "0.7323505", "0.7323505", "0.7323505", "0.7178649", "0.71709555", "0.71709555", "0.7052388", "0.6960331", "0.66900355", "0.6477672", "0.6383238", "0.6381317", "0.6374921", "0.63383347", "0.6274924", "0.6226914", "0.61520463", "0.61465746", "0.611605...
0.6328783
16
Detect support of translate3d
function detect3dSupport() { var el = document.createElement('p'), has3d, transforms = { 'webkitTransform': '-webkit-transform', 'msTransform': '-ms-transform', 'transform': 'transform' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function support3d() {\n \t\t\tvar el = document.createElement('p'),\n \t\t\t\thas3d,\n \t\t\t\ttransforms = {\n \t\t\t\t\t'webkitTransform':'-webkit-transform',\n \t\t\t\t\t'OTransform':'-o-transform',\n \t\t\t\t\t'msTransform':'-ms-transform',\n \t\t\t\t\t'MozTransform':'-moz-transform',\n \t\t\t\t\t'transform':...
[ "0.79246575", "0.791739", "0.7851457", "0.7851457", "0.7851457", "0.78462875", "0.78462875", "0.78462875", "0.78462875", "0.78462875", "0.782492", "0.7668006", "0.76585275", "0.76585275", "0.76101035", "0.76101035", "0.75682825", "0.7524417", "0.7524417", "0.7522251", "0.7499...
0.796588
0
port of webkit cubic bezier handling by
function cubicBezierAtTime(t,p1x,p1y,p2x,p2y,duration) { var ax = 0,bx = 0,cx = 0,ay = 0,by = 0,cy = 0; function sampleCurveX(t) {return ((ax * t + bx) * t + cx) * t;} function sampleCurveY(t) {return ((ay * t + by) * t + cy) * t;} function...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bezier(u, p0, p1, p2, p3) {\n\n return Math.pow(u, 3) * (p3 + 3 * (p1 - p2) - p0)\n + 3 * Math.pow(u, 2) * (p0 - 2 * p1 + p2)\n + 3 * u * (p1 - p0) + p0;\n}", "function bezier(u, p0, p1, p2, p3) {\n\n return Math.pow(u, 3) * (p3 + 3 * (p1 - p2) - p0)\n + 3 * Math.pow(u, 2) * (...
[ "0.7434528", "0.73906165", "0.7286761", "0.72729313", "0.72659224", "0.72434634", "0.71712834", "0.71361804", "0.71361804", "0.7048622", "0.70382494", "0.70382494", "0.70382494", "0.70382494", "0.70382494", "0.69458205", "0.69004536", "0.678628", "0.6750835", "0.6660342", "0....
0.6876951
17