query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
here is the function CtoA that define tha boat from down land back to top land
function CtoA(peopleId){//final steps move C to A var peopleA=document.getElementById("A").getElementsByTagName("div"); var boats=document.getElementsByName("boat"); var tempId;//same as A to C if(peopleId > 10){ tempId = peopleId - 10 -1; } else tempId = peopleId - 1; if(tempId >= 0) peopleA[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CtoAh(){\n\tvar boats=document.getElementsByName(\"boat\");\n\tif(s == 0){\n\tCtoA(A);\n\tCtoA(B);\n\ts = s - 1;//go done\t\n\t}\n\tif(s > 0) {\n\ts = s - 25;//by 25 units per s (speed)\n\tfor(var i=0,len=boats.length;i<len;i++){//moving each part of the boat\n\t boats[i].style.top = s;\n\t}\n\t}\n}"...
[ "0.6679481", "0.64109737", "0.63523173", "0.5658285", "0.5612169", "0.55515414", "0.5550396", "0.5520808", "0.551144", "0.54963565", "0.543724", "0.5418423", "0.53212994", "0.5314857", "0.5308928", "0.5292896", "0.5283806", "0.52834946", "0.52807814", "0.5280485", "0.52746326...
0.65465945
1
there are two function that give a movement to the boat form A to B and B to A. (by time) boat movement function A to C
function AtoCh(){ var boats=document.getElementsByName("boat"); if(s == 300){ AtoC(A); AtoC(B); s = s + 1;//go up } if(s < 300) { s = s + 25; //by 25 unit per s speed for(var i=0,len=boats.length;i<len;i++){//moving each part of the boat boats[i].style.top = s; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function move(){\n if(onboatA==1 || onboatA==4 || onboatA==7 ||\n\t onboatA==11 || onboatA==14 || onboatA==17 ||\n\t onboatB==1 || onboatB==4 || onboatB==7 ||\n\t onboatB==11 || onboatB==14 || onboatB==17\n\t )//only professer, employer and police are above to move the boat,otherwise tha alert come out.\...
[ "0.70701617", "0.7013554", "0.68630433", "0.68068594", "0.6723139", "0.6680332", "0.66150945", "0.6463161", "0.6440823", "0.6430079", "0.64186275", "0.64143616", "0.64020115", "0.63872427", "0.6346076", "0.6320129", "0.6318141", "0.6311946", "0.63057125", "0.6287498", "0.6279...
0.7104322
0
boat movement function C to A
function CtoAh(){ var boats=document.getElementsByName("boat"); if(s == 0){ CtoA(A); CtoA(B); s = s - 1;//go done } if(s > 0) { s = s - 25;//by 25 units per s (speed) for(var i=0,len=boats.length;i<len;i++){//moving each part of the boat boats[i].style.top = s; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AtoCh(){\n\tvar boats=document.getElementsByName(\"boat\");\n\tif(s == 300){\n\tAtoC(A);\n\tAtoC(B);\n\ts = s + 1;//go up\n\t}\n\tif(s < 300) {\n\ts = s + 25; //by 25 unit per s speed\n\tfor(var i=0,len=boats.length;i<len;i++){//moving each part of the boat\n\t boats[i].style.top = s;\n\t}\n\t}\n}", ...
[ "0.70441365", "0.6894487", "0.6857263", "0.66743404", "0.6662775", "0.66202986", "0.65502495", "0.65005875", "0.6457195", "0.6449429", "0.63670105", "0.63474494", "0.63166916", "0.62911713", "0.62882483", "0.6280855", "0.62286276", "0.62006176", "0.6164451", "0.6120686", "0.6...
0.69577223
1
Gather basic project information.
gatherProjectInfo() { const generatorTitle = `${_consts.GENERATOR_NAME} v${_package.version}`; this.log( _yosay( `AWS Microservice Generator.\n${_chalk.red(generatorTitle)} ` ) ); this.config.set('_projectType', _consts.SUB_GEN_MICROSERVICE); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "gatherProjectInfo() {\n const generatorTitle = `${_consts.GENERATOR_NAME} v${_package.version}`;\n this.log(_yosay(\n `Node.js Library Generator.\\n${_chalk.red(generatorTitle)} `\n ));\n return _prompts.getProjectInfo(this, true)\n .then(() => { return _prompts.g...
[ "0.72667223", "0.7204625", "0.6715697", "0.656859", "0.632897", "0.61759156", "0.6162575", "0.614777", "0.6033552", "0.6022335", "0.6021143", "0.59724855", "0.5936249", "0.5915998", "0.58715296", "0.5841183", "0.58324206", "0.5784223", "0.57820636", "0.57781285", "0.5771791",...
0.7239412
1
Adding Entries callback function for when the add budget form is being submitted
function onBudgetFormSubmit() { var entry = getBudgetFormData() if (entry !== null) { addBudgetEntry(entry) document.getElementById("addBudgetForm").reset() } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async addEntry() {\n\t\tconst { entryType, dateSelected, amount, notes } = this.state;\n\n\t\t//Tests that all entries have been compoleted adequetly\n\t\tif (\n\t\t\t(entryType === 'expense' || entryType === 'revenue') &&\n\t\t\tdateSelected !== '' &&\n\t\t\tamount.trim().length > 0\n\t\t) {\n\t\t\tthis.setState(...
[ "0.64628774", "0.64431804", "0.6417201", "0.63764817", "0.6246069", "0.61702", "0.6143801", "0.61208713", "0.6024408", "0.6013207", "0.60088265", "0.59920967", "0.59779483", "0.5940648", "0.5931906", "0.589128", "0.58812106", "0.5863514", "0.5806192", "0.5805493", "0.5787441"...
0.70872974
0
Rendering Entries Generates the budget view table when called.
function generateBudgetTable() { var entries = getBudgetEntries() var totalBudget = 0; var table = document.getElementById("budgetTable") var body = table.getElementsByTagName("tbody")[0] entries.forEach((entry) => { if (!entry) { return } var row = document.createElement("tr"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawTable(budget, taxes_paid=10489) {\n // Appending our general table elements\n var table =d3.select('#tax_table').append('table'),\n thead = table.append('thead'),\n tbody = table.append('tbody'),\n cols = ['Component/Program', 'Percent', 'Funds', 'Bill', 'Law'];\n\n // Bu...
[ "0.61037755", "0.6043499", "0.60309315", "0.5984119", "0.5982346", "0.59777516", "0.5961095", "0.5931341", "0.58829916", "0.58229566", "0.5821754", "0.57494354", "0.5749231", "0.5729891", "0.5727443", "0.5716619", "0.57088107", "0.5695629", "0.56800634", "0.5677092", "0.56482...
0.7032473
0
Reset the sessionStorage for budget entries
function resetBudgetEntry() { getStorage().removeItem(storageKey) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearBag() {\n\n\tlocalStorage.setItem('currentSessionBag', null);\n}", "sclear() {\n sessionStorage.clear()\n }", "reset() {\n console.log(\"session cleared\");\n localStorage.removeItem(this.getStorageKey());\n }", "function emptyBasket(){\n sessionStorage.clear();\n loadBas...
[ "0.7201443", "0.7120589", "0.7047211", "0.70312995", "0.70312995", "0.6908601", "0.6888625", "0.6868517", "0.6661197", "0.66034037", "0.65886956", "0.65802944", "0.65679675", "0.6565166", "0.6554957", "0.6544875", "0.64939404", "0.6489132", "0.64377046", "0.64093816", "0.6374...
0.76740277
0
var solstice=CarMaker.factory('convertible'); var cherokee=CarMaker.factory('suv'); corolla.drive() > 'Vroom, I have 4 doors' solstice.drive() > 'Vroom, I have 2 doors' cherokee.drive() > 'Vroom, I have 17 doors' parent constructor
function CarMaker(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CarMaker() {}", "function VehicleFactory() {}", "function VehicleFactory() {}", "function VehicleFactory() {}", "function VehicleFactory(){}", "function vehicleConstructor(name, wheels, numberPassengers){\n\n\tvar vehicle = {};\n\n\tvehicle.name = name || \"unicycle\";\n\tvehicle.wheels = wheels...
[ "0.70630485", "0.6929078", "0.6929078", "0.6929078", "0.6872755", "0.68387884", "0.67606115", "0.6727211", "0.6727211", "0.6598254", "0.6573406", "0.65710485", "0.65674794", "0.6406365", "0.6368308", "0.6322091", "0.63175404", "0.63175404", "0.62975794", "0.62925583", "0.6269...
0.7064442
0
close menu when click out of them (Mobile)
function closeMenuOutMenuClick(e){ if(!$(e.target).closest('.menu-wrap').length && !$(e.target).closest('.fa-compass').length && $(window).width()<991){ menuWrap.slideUp(100); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeMenuEvent() {\n // Vars\n var firstLevelMenuItem = '#tablet-mobile-menu ul.menu li a';\n var page = jQuery(\"body, html\");\n\n jQuery('#menu-btn-toggle').removeClass('open');\n jQuery(firstLevelMenuItem).parent().removeClass('active-open');\n\n //TODO Change the skin position only when present...
[ "0.78292364", "0.77767193", "0.7765043", "0.77223027", "0.76768863", "0.76022774", "0.75686663", "0.75585747", "0.7554386", "0.75271565", "0.74960446", "0.74931246", "0.74869835", "0.7485595", "0.7477648", "0.7465951", "0.7437053", "0.74011296", "0.7386653", "0.73365927", "0....
0.80412644
0
set height of history items line
function lineHeight(){ historyLine.each(function(index, element){ if(index == $('.line').length - 1){ return false; } else{ var thisBlock = $(this).closest('.history-item').height()/2; var nextBlock = $(this).closest('.history-item').next().height()/2; var h = thisBlock+nextBlock; $(this).he...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateWidgetHeight(line) {\n\t\t if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n\t\t line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;\n\t\t }", "function updateWidgetHeight(line) {\n\t if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n\t...
[ "0.71277124", "0.7053634", "0.7053634", "0.7053634", "0.69854635", "0.696246", "0.69336045", "0.69336045", "0.69336045", "0.69336045", "0.69336045", "0.69336045", "0.69336045", "0.692304", "0.6922223", "0.6922223", "0.69033116", "0.69033116", "0.69033116", "0.6787855", "0.678...
0.7622675
0
The cache set notification is sent from the server to the client to set the value of a cache item identified by the provided key. This is a intentionally notification and not a request because the server is not supposed to act differently if the cache set failed.
xcacheSet(params) { this.notify('xcache/set', params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async _set(key, value) {\r\n await super._set(key, value);\r\n this.localCache[key] = JSON.stringify(value);\r\n }", "async _set(key, value) {\r\n await super._set(key, value);\r\n this.localCache[key] = JSON.stringify(value);\r\n }", "_setCache(key, value) {\n this.fil...
[ "0.6537264", "0.6537264", "0.6441516", "0.6369039", "0.629083", "0.62414724", "0.610504", "0.6102849", "0.60593235", "0.6023201", "0.5938734", "0.5875977", "0.58626217", "0.5844027", "0.5800152", "0.5768205", "0.5753398", "0.5753398", "0.5753398", "0.5753398", "0.5753398", ...
0.67681074
0
The workspace/applyEdit request is sent from the server to the client to modify resource on the client side.
workspaceApplyEdit(params, childOf = new opentracing_1.Span()) { return this.request('workspace/applyEdit', params, childOf); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applyUsingWorkspaceEdit(workspaceEdit, fileUri) {\n switch (this.action) {\n case EditTypes.EDIT_INSERT:\n workspaceEdit.insert(fileUri, this.start, this.text);\n break;\n case EditTypes.EDIT_DELETE:\n workspaceEdit.delete(fileUri, new vscod...
[ "0.6222595", "0.61761844", "0.6000078", "0.584059", "0.5815449", "0.5719323", "0.5719323", "0.5719323", "0.5719323", "0.5719323", "0.5719323", "0.5719323", "0.56338286", "0.56338286", "0.56093985", "0.55567366", "0.54896504", "0.54378605", "0.5419934", "0.54116577", "0.541034...
0.7626924
0
name: player name token: game key onSuccess: function called if successful
function createGame(name, token, onSuccess) { console.log('create', name); var game = ref.child(token); gameKey = token; var epochs = {}; for (var i = 0; i < 6; i++) { epochs[i] = { title: '', color: '', } } var palette = { yes: '', no: '' } game.set({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joinGame(name, token, onSuccess, onFailure) {\r\n console.log('join', name);\r\n ref.once('value', function(snapshot) {\r\n var games = snapshot.val();\r\n if (_.has(games, token)) {\r\n gameKey = token;\r\n var players = ref.child(token).child('players');\r\n var playerRef = player...
[ "0.6750955", "0.64109194", "0.609499", "0.60843575", "0.6074944", "0.59852636", "0.5978711", "0.59177655", "0.5884178", "0.5883447", "0.58743036", "0.58613527", "0.58309484", "0.57870466", "0.57645106", "0.5752516", "0.5747545", "0.5740848", "0.57286644", "0.5726106", "0.5720...
0.67625904
0
name: player name token: game key onSuccess: function called if successful onFailure: function called if game does not exist
function joinGame(name, token, onSuccess, onFailure) { console.log('join', name); ref.once('value', function(snapshot) { var games = snapshot.val(); if (_.has(games, token)) { gameKey = token; var players = ref.child(token).child('players'); var playerRef = players.push() pla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createGame(name, token, onSuccess) {\r\n console.log('create', name);\r\n var game = ref.child(token);\r\n gameKey = token;\r\n var epochs = {};\r\n for (var i = 0; i < 6; i++) {\r\n epochs[i] = {\r\n title: '',\r\n color: '',\r\n }\r\n }\r\n var palette = {\r\n yes: '',\r\n n...
[ "0.72932434", "0.6766302", "0.6409716", "0.6379772", "0.63291144", "0.61413825", "0.61302364", "0.6071371", "0.6062597", "0.6048554", "0.60471255", "0.60200155", "0.60182405", "0.6016788", "0.6013893", "0.6011245", "0.60099024", "0.59956235", "0.59741926", "0.59699625", "0.59...
0.71619177
1
description: new big picture
function setBigPicture(description) { console.log("Set big picture", description); var game = ref.child(gameKey); game.update({ 'bigPicture': description }); switchLens(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateOtherPicture(title, date, size) {\n console.log(\"Create pictures using: \", title, date, size);\n}", "function newPicture() {\n setId(crypto.randomBytes(5).toString('hex'))\n }", "function New_Image_Display(n) {\n image_index += n;\n if (image_index > image_files_in_dir.lengt...
[ "0.7175288", "0.6940079", "0.664445", "0.64785415", "0.62897336", "0.62585765", "0.6218605", "0.62122124", "0.61913663", "0.61335826", "0.6128464", "0.61212206", "0.610513", "0.6093285", "0.60893303", "0.60669935", "0.6051121", "0.6035218", "0.6020759", "0.60113454", "0.60034...
0.74648196
0
i: which epoch (0 5) title: title of event color: 'black' or 'white'
function addEpoch(i, title, color) { console.log("Add epoch", i, "with description", title); var epoch = ref.child(gameKey).child('epochs/' + i); epoch.update({ title: title, color: color }); switchLens(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEvent(i, title, color) {\r\n console.log(\"Add event to epoch\", i, \"with description\", title);\r\n var epoch = ref.child(gameKey).child('epochs/' + i);\r\n var event = epoch.child('events').push();\r\n event.set({\r\n title: title,\r\n color: color\r\n });\r\n switchLens();\r\n return e...
[ "0.66386443", "0.62893975", "0.56477165", "0.5610624", "0.55496365", "0.5508868", "0.5480015", "0.5469271", "0.5358739", "0.5330426", "0.5270492", "0.5242105", "0.5224078", "0.52160895", "0.5181962", "0.5176819", "0.5149621", "0.51387924", "0.5114994", "0.51148635", "0.509777...
0.7054287
0
i: which epoch to add event under title: title of event color: 'black' or 'white'
function addEvent(i, title, color) { console.log("Add event to epoch", i, "with description", title); var epoch = ref.child(gameKey).child('epochs/' + i); var event = epoch.child('events').push(); event.set({ title: title, color: color }); switchLens(); return event.key(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEpoch(i, title, color) {\r\n console.log(\"Add epoch\", i, \"with description\", title);\r\n var epoch = ref.child(gameKey).child('epochs/' + i);\r\n epoch.update({\r\n title: title,\r\n color: color\r\n });\r\n switchLens();\r\n}", "function animateTitleColor(i) {\n $(\".title h1\")....
[ "0.76373297", "0.5975718", "0.5849516", "0.5720526", "0.5452651", "0.53934944", "0.5311032", "0.52177376", "0.5191658", "0.5187687", "0.5133756", "0.5129544", "0.51272106", "0.5117715", "0.51091", "0.5084397", "0.50840193", "0.5061114", "0.50592136", "0.5040172", "0.5039386",...
0.7321163
1
i: which epoch to add event under key: key of event to add scene question: guiding question of scene
function addScene(i, key, question) { console.log("Add scene to epoch", i, "and scene", key, "with question", question); var event = ref.child(gameKey).child('epochs/' + i + '/events/' + key); var scene = event.child('scenes').push(); scene.set({ question: question, answer: '' }); return sce...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEvent(i, title, color) {\r\n console.log(\"Add event to epoch\", i, \"with description\", title);\r\n var epoch = ref.child(gameKey).child('epochs/' + i);\r\n var event = epoch.child('events').push();\r\n event.set({\r\n title: title,\r\n color: color\r\n });\r\n switchLens();\r\n return e...
[ "0.69784343", "0.65750265", "0.6263964", "0.5762029", "0.53919536", "0.52673894", "0.4939706", "0.4930697", "0.49232718", "0.48514462", "0.4805775", "0.47859743", "0.47768462", "0.47285044", "0.47270823", "0.47101432", "0.4709693", "0.4684934", "0.4670871", "0.4667955", "0.46...
0.7961915
0
is not necessarily first. the pixel that sticks to the left side the most
function left_side_X(){ var imgd = ctx.getImageData(0,0, c.width,c.height); //var pix_array = imgd.data; //furthest right hand side value (makes the coding a little easier) var x_val = c.width; for(var y = 0; y < c.height; y++){ for(var x = 0; x < c.width; x++){ var index = (x + y * imgd.width...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get left () { return this.x - this.size / 2 }", "get left() {\n\t\treturn this.pos.x - this.size.x / 2;\n\t}", "function detectNextBlock_CornerDownLeft (x,y,h,w)\n {\n var mapCoordY = (y + h)/ h;\n var mapCoordX = (x -1) / w;\n \n mapCoordX = Math.floor(mapCoo...
[ "0.7088048", "0.70797855", "0.6987293", "0.6973365", "0.69697094", "0.6937109", "0.687124", "0.685741", "0.6849376", "0.68461555", "0.68307716", "0.6804411", "0.6782174", "0.67637527", "0.6759067", "0.6759034", "0.6758621", "0.67473406", "0.674524", "0.6745189", "0.67429256",...
0.71936715
0
Provides language name for Atom
getLanguageName() { return "YAML"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLanguage() {\n return 'en-us';\n}", "function languageName(fileTag) {\n if (fileTag === 'c')\n return 'c';\n else if (fileTag === 'cpp')\n return 'c++';\n else if (fileTag === 'objc')\n return 'objective-c';\n else if (fileTag === 'objcpp')\n return 'objecti...
[ "0.6723402", "0.6440709", "0.6437074", "0.6436719", "0.62981254", "0.6293077", "0.6107353", "0.60810983", "0.6056179", "0.6024208", "0.6010907", "0.59997725", "0.59997725", "0.5973849", "0.59714645", "0.59667593", "0.59142715", "0.5902552", "0.5876399", "0.5876399", "0.586334...
0.67647004
0
Provides language server name for languageclient
getServerName() { return "RedHat YAML Language Server"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getenginename()\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n return webphone_api.plhandler.Getenginename();\n else\n webphone_api.Log('ERROR, webphone_api: getenginename webphone_api.plhandler is not defined');\n}", "function getLangu...
[ "0.6138611", "0.60188293", "0.5953877", "0.58781683", "0.5874607", "0.5815939", "0.57823795", "0.57562214", "0.56620467", "0.56601304", "0.5641509", "0.564046", "0.56028146", "0.5599866", "0.55692905", "0.5558531", "0.55173934", "0.5509544", "0.5506876", "0.5490893", "0.54597...
0.7017006
0
Stuff related to changing layers and extends plugins can hook to this and run these functions
_changeLayer(layer) { //console.log("Layer is changed to layer", layer, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _updateLayers() {\n for(var i in map._layers) {\n\tif(map._layers[i]._latlng) {\n\t if(map._layers[i]._latlng.level) {\n\t if(map._layers[i]._latlng.level == map.getLevel()) {\n\t if(map._layers[i].setOpacity) {\n\t map._layers[i].setOpacity(1);\n\t } else if(map._layers[i]._cont...
[ "0.6840618", "0.6729742", "0.67242104", "0.6565887", "0.6539305", "0.64631206", "0.64358324", "0.64358324", "0.64219326", "0.6378242", "0.62901574", "0.62603164", "0.62188584", "0.6213704", "0.6213704", "0.6199243", "0.61535966", "0.6137377", "0.6128125", "0.6098827", "0.6055...
0.7304163
0
set xurrent route name
setCurrentRouteName(routeName){ currentRoute = routeName; currentPoiIndex = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prefixRouteNameArg(route, args) {\n var routeName = args[0];\n var owner = (0, _emberUtils.getOwner)(route);\n var prefix = owner.mountPoint;\n\n // only alter the routeName if it's actually referencing a route.\n if (owner.routable && typeof routeName === 'string') {\n if (resemblesUR...
[ "0.6112519", "0.6112519", "0.6112519", "0.58106905", "0.576783", "0.57395303", "0.5617414", "0.55800766", "0.5552069", "0.5547763", "0.5493918", "0.5491883", "0.5461574", "0.544188", "0.54057646", "0.5402941", "0.53772193", "0.53698015", "0.5322755", "0.52915955", "0.5282072"...
0.7306803
0
needs citi name for future use returns array of map entries with given keys routeName,PoiName,poiLocation,poiBriefDescription,poiDescription,poiImageUrl
getAllRoutesContentDoNotUse(cityName){ var routes = []; Database.routeDefs.forEach(rd => { // rd id a route definition array rd.forEach(poisInRoute => { poisInRoute.forEach(poiDef => { var indxRouteName = poiDef[0]; var ind...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItems(routeName, mileStart, mileEnd, countyLine, interChange, rrXing, bridge, stream, sign, culv) {\r\n getRoadStats(routeName);\r\n if (culv != null) {\r\n culverts = getCulverts(routeName, mileStart, mileEnd,culv);\r\n }\r\n if (countyLine != null) {\r\n county_lines = getCo...
[ "0.5782602", "0.5540308", "0.5483039", "0.53180224", "0.5235575", "0.5199553", "0.5130676", "0.51276845", "0.51218754", "0.5121474", "0.5120962", "0.506466", "0.5047713", "0.50235075", "0.5000232", "0.499345", "0.4967588", "0.49619353", "0.49503168", "0.4946935", "0.49287155"...
0.6570804
0
needs result of getAllRoutesContent as allRoutesContent returns array of Map entries for given key routeName = nameOfRoute
getRouteContent(allRoutesContent, nameOfRoute){ return this.getAllRoutesContent().filter(t=>t.routeName === nameOfRoute); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAllRoutesContentDoNotUse(cityName){\n var routes = [];\n Database.routeDefs.forEach(rd => {\n // rd id a route definition array\n rd.forEach(poisInRoute => {\n poisInRoute.forEach(poiDef => { \n var indxRouteName = poiDef[0];\n ...
[ "0.68350327", "0.6071005", "0.6065968", "0.599227", "0.5983", "0.57524157", "0.5701907", "0.5654969", "0.55938447", "0.5549907", "0.5534852", "0.5534852", "0.54872096", "0.5458203", "0.54489106", "0.54458624", "0.5443061", "0.5434892", "0.54264534", "0.5405849", "0.537762", ...
0.7756443
0
returns aviable route (names) for given cityName cityName is parameter for future use
getTourNames(cityName){ var result = []; Database.routeNames.forEach((rN)=>{ result.push(rN); }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetRoute(cityList) {\n // A -> B -> C -> D\n let distanceA = GetDistance(cityList[0], cityList[1]) + GetDistance(cityList[1], cityList[2]) + GetDistance(cityList[2], cityList[3]);\n // A -> C -> B -> D\n let distanceB = GetDistance(cityList[0], cityList[2]) + GetDistance(cityList[2], cityList[1]) + Ge...
[ "0.6911824", "0.65360916", "0.6406291", "0.63694614", "0.60815173", "0.58543634", "0.5822459", "0.5821852", "0.5739577", "0.57183355", "0.563976", "0.5629199", "0.562179", "0.56181616", "0.5600178", "0.55873", "0.5585622", "0.5495273", "0.5493342", "0.54847044", "0.54697657",...
0.6682019
1
component that renders a single room see ./rooms.jsx
render(){ return( <tr key={this.props.room.id}> <td>{this.props.room.id}</td> <td>{this.props.room.roomType}</td> <td>{this.props.room.price}</td> <td> <EditAndDeleteRoom room={this.props.room} roomId={this.props.room.id}/> </td> </tr> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n /*state.id is to verify if user has join the room chat*/\n /*sends the state room id to highlight the click room*/\n return (\n <div className=\"app\">\n <RoomList\n roomId={this.state.roomId}\n subscribeToRoom={this.subscribeToRoom}\n rooms={[...this.st...
[ "0.720651", "0.6748683", "0.672401", "0.6404008", "0.6372615", "0.62837934", "0.62631387", "0.62386346", "0.6222951", "0.62054443", "0.61993134", "0.6178214", "0.61760664", "0.6171534", "0.6168169", "0.61473876", "0.6143577", "0.61344254", "0.6132344", "0.6124203", "0.6113332...
0.73157597
0
Returns all messages that qualify for product average rating recalculation. Each message contains a type ("review_published", "review_unpublished" or "review_deleted") and a snapshot of the review at the time the event was triggered
function getRatingUpdateMessages(messages) { return messages.filter((message) => { const { value: { type, data: { review_snapshot: reviewSnapshot }, }, } = message; const isPublishedDelete = MESSAGE_TYPE.reviewDeleted === type && reviewSnapshot.state === "published...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateAverageUpdate(revieweeType, reviewed, rating, oldRating) {\n avgRatingFields = {};\n rating = parseFloat(rating);\n const ratingDiff = rating - oldRating;\n if (revieweeType == enums.InteractionType.EXECUTER) {\n const totalRating = reviewed.executerRating * reviewed.executerRatingCount;\n...
[ "0.597386", "0.5889899", "0.58331114", "0.56821525", "0.56366473", "0.5571375", "0.5494617", "0.5417749", "0.54158586", "0.53770596", "0.5314478", "0.5210072", "0.51927817", "0.5157624", "0.5152518", "0.51379615", "0.5119999", "0.5081937", "0.5059449", "0.5053497", "0.5036291...
0.66037965
0
Go to the current date set by the backend.
gotoDate (currentDate) { this.calendar.gotoDate(currentDate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCurrentDate () {\n const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };\n document.querySelector(\"#current-date\").innerHTML = new Date().toLocaleDateString('en-GB', options);\n}", "setCurrentDate(current) {\n self.datePicker.current = new Date(current);\n }...
[ "0.7601184", "0.7285187", "0.7156037", "0.6999792", "0.6750722", "0.67194813", "0.66687953", "0.6633097", "0.6555853", "0.652551", "0.6512528", "0.64933455", "0.64582163", "0.6446891", "0.6412348", "0.6370088", "0.6343132", "0.6343132", "0.6343132", "0.6343132", "0.63323", ...
0.7387368
1
This logic is associated to set the default subview, by day, month, week or list.
setDefaultSubview (defaultSubview) { switch (defaultSubview) { case 'day': this.calendar.changeView('timeGridDay'); break; case 'month': this.calendar.changeView('dayGridMonth'); break; case 'list': this.calendar.changeView('listWeek'); break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onChangeDefaultView(value) {this.props.setTempSettings(\"defaultView\", value)}", "onChangeCalendarView () {\n const currentView = this.calendar.currentData.currentViewType;\n const defaultViewParams = document.getElementsByName('calendar_default_subview');\n if (defaultViewParams && defaultViewParams.l...
[ "0.6494494", "0.63358873", "0.60992646", "0.60177046", "0.58888793", "0.5883399", "0.58061504", "0.5800397", "0.5800397", "0.5752471", "0.56750995", "0.5586881", "0.5585796", "0.5583855", "0.55721414", "0.5486798", "0.54782957", "0.54570884", "0.5449671", "0.54305667", "0.541...
0.7879183
0
Sets up white noise by giving 44100 random samples a second
function whiteNoise(amp) { //If statement used to prevent clipping if(amp > 1) amp = 1; return random(-amp, amp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function noiseAfterSong(songNum, songDuration) {\n for (var currX = songDuration; currX < width; currX++) { \n for (var currY = songNum*colHeight; currY < (songNum*colHeight)+colHeight; currY++) { \n var currIndex = (currX + currY * width) * 4;\n\n var r = pixels[currIndex + 0];\n var g = pixels...
[ "0.71403027", "0.69097465", "0.6880107", "0.67096573", "0.6636848", "0.66157407", "0.6588774", "0.6555024", "0.6442656", "0.63940734", "0.63307333", "0.6324123", "0.6287871", "0.62600327", "0.62484777", "0.62288684", "0.6212856", "0.62099856", "0.6196553", "0.6184766", "0.614...
0.72842896
0
Returns the current article element, which may not be the same as the autodetected one if the user has 'nudged' the selection around the page.
function getArticleElement() { return previewElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currentElement() {\n\tvar sel = window.getSelection();\n\tconsole.log(sel);\n\tvar\tnode = sel.anchorNode;\n\tif (!node) {\n\t\treturn null;\n\t}\n\tif (node.textContent !== \"\") {\n\t\tnode = sel.anchorNode.parentElement;\n\t}\n\n\t//Return jQuery object so it can be used with jQuery .after() \n\tvar jO...
[ "0.6136979", "0.6041077", "0.6040407", "0.58076227", "0.5684546", "0.5683951", "0.56828356", "0.561443", "0.55806845", "0.55806845", "0.55806845", "0.55806845", "0.55806845", "0.5564988", "0.5518126", "0.5518126", "0.5518126", "0.5518126", "0.5518126", "0.5518126", "0.5518126...
0.6591517
0
Creates the union of two rectangles, which is defined to be the smallest rectangle that contains both given rectangles.
function unionRectangles(rect1, rect2) { var rect = { top : (Math.min(rect1.top, rect2.top)), bottom : (Math.max(rect1.bottom, rect2.bottom)), left : (Math.min(rect1.left, rect2.left)), right : (Math.max(rect1.right, rect2.right)) } rect.width = rect.right - rect.left; rect.height = rect.bot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unionRectangles(rect1, rect2) {\n var rect = {\n top: (Math.min(rect1.top, rect2.top)),\n bottom: (Math.max(rect1.bottom, rect2.bottom)),\n left: (Math.min(rect1.left, rect2.left)),\n right: (Math.max(rect1.right, rect2.right))\n }\n rect.width = rect.right - rect.left;\n r...
[ "0.8605776", "0.81756973", "0.79170865", "0.7714175", "0.7081397", "0.70677733", "0.66561186", "0.6551184", "0.65197223", "0.6516731", "0.6502349", "0.6497995", "0.64967626", "0.6456294", "0.64061403", "0.62593997", "0.62593997", "0.62593997", "0.62593997", "0.62593997", "0.6...
0.85805416
1
Returns true if the rectangles match, false otherwise.
function rectanglesEqual(rect1, rect2) { if (!rect1 && !rect2) return true; if (!rect1) return false; if (!rect2) return false; if (rect1.top != rect2.top) return false; if (rect1.bottom != rect2.bottom) return false; if (rect1.left != rect2.left) return false; if (rect1.rig...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rectanglesEqual(rect1, rect2) {\n if (!rect1 && !rect2) return true;\n if (!rect1) return false;\n if (!rect2) return false;\n if (rect1.top != rect2.top) return false;\n if (rect1.bottom != rect2.bottom) return false;\n if (rect1.left != rect2.left) return false;\n if (rect1.right !=...
[ "0.7603364", "0.75526327", "0.7203455", "0.7064763", "0.7051789", "0.70383847", "0.7007024", "0.69179976", "0.67595214", "0.66907316", "0.66699004", "0.66675323", "0.66619825", "0.6634071", "0.6597306", "0.659709", "0.659709", "0.659709", "0.6580851", "0.65630895", "0.6557964...
0.7631682
0
If the user tripleclicks a paragraph, we will often get a selection that includes the next paragraph after the selected one, but only up to offset 0 in that paragraph. This causes the built in getBoundingClientRect to give a box that includes the whole trailing paragraph, even though none of it is actually selected. In...
function computeAlternateBoundingBox(range) { // If the end of selection isn't at offset 0 into an element node (rather than a text node), then we just return the // original matching rectangle. if ((range.endOffset !== 0) && (range.endContainer.nodeType !== Node.ELEMENT_NODE)) { var rect = range.getBoun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeAlternateBoundingBox(range) {\n \n // If the end of selection isn't at offset 0 into an element node (rather than a text node), then we just return the\n // original matching rectangle.\n if ((range.endOffset !== 0) && (range.endContainer.nodeType !== Node.ELEMENT_NODE)) {\n var re...
[ "0.6780668", "0.6425497", "0.6180351", "0.6087173", "0.6059487", "0.6006887", "0.5974199", "0.5974199", "0.59557265", "0.5940626", "0.5851335", "0.5818735", "0.581418", "0.5777229", "0.5757917", "0.5754865", "0.5723864", "0.5719173", "0.57063216", "0.5683104", "0.5640805", ...
0.6513106
1
Return a new instance of stats with same options as this one.
newInstance() { return new Stats(this.options) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initStats() {\n var stats = new Stats();\n stats.setMode(0); // 0: fps, 1: ms\n $('#stats').append(stats.domElement);\n return stats;\n}", "init(opts) {\n this._id = undefined;\n this.stats = undefined;\n _.extend(this, opts);\n }", "function jStat()\n\t\t\t{\n\t\t\t\treturn new jStat._i...
[ "0.544683", "0.5374438", "0.53616524", "0.53428215", "0.52652204", "0.5247967", "0.5209371", "0.519142", "0.5188304", "0.5177851", "0.5158621", "0.51482505", "0.5147932", "0.5147932", "0.51384944", "0.50736606", "0.5064322", "0.50490195", "0.50372165", "0.50214726", "0.501694...
0.7750249
0
TODO(daneroo) refactor some more put the aggregation and data production into lib, but not the table stuff TODO(daneroo) in the unlikely event that more than one value is present for the same stamp, we might want to ensure we have the latest value... (assume or ensure sort order) e.g. break one, and resubmit with manua...
function aggRecords (records) { // records.reverse(); var types = distinct(records, 'type') // .reverse(); var users = distinct(records, 'user') // these are sorted var hosts = distinct(records, 'host') // these are sorted function emptyHostMap () { // function bound to hosts, which is an array return _....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static removeDuplicates(rows) {\n const upsertKeys = map(filter(this.tableAttributes, 'upsertKey'), 'fieldName');\n if (!upsertKeys.length) return rows;\n const duplicates = groupBy(rows, it => objectHash(pick(it, upsertKeys)));\n const obsolete = flatMap(duplicates, group => {\n return initial(so...
[ "0.5349523", "0.5252186", "0.5161593", "0.5065566", "0.5043685", "0.5029234", "0.5004857", "0.4957288", "0.49518797", "0.4946404", "0.48369735", "0.48158312", "0.47605687", "0.4753582", "0.4748837", "0.47375035", "0.47277427", "0.46830952", "0.46706584", "0.4664718", "0.46620...
0.5271653
1
Applies user defined where not constraints on the query builder
applyWhereNot(query, constraints, refs) { if (!constraints.length) { return; } constraints.forEach(({ key, operator, value, ref }) => { const val = ref ? refs[ref].value : value; if (operator === 'in') { query.whereNotIn(key, val); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applyWhereNot(query, constraints) {\n if (!constraints.length) {\n return;\n }\n constraints.forEach(({ key, operator, value }) => {\n if (operator === 'in') {\n query.whereNotIn(key, value);\n }\n else {\n query.whereNo...
[ "0.79209", "0.63087475", "0.59027195", "0.5731056", "0.5588542", "0.5529045", "0.54823595", "0.5471231", "0.54252326", "0.5424149", "0.5422586", "0.5406203", "0.52286047", "0.5183178", "0.5182149", "0.5144066", "0.5058597", "0.5020753", "0.50206095", "0.501584", "0.49575585",...
0.7657947
1
Write a function that splits an array (first argument) into groups the length of size (second argument) and returns them as a twodimensional array.
function chunkArrayInGroups(arr, size) { // Break it up. var newArray = []; if (arr.length % 2 === 0) { for (var i = 0; i < arr.length; i += size) { newArray.push(arr.slice(i, i + size)); } return newArray; } else if (arr.length % 2 !== 0) { for (var j = 0; j < arr.length; j += size) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chunkArrayInGroups(arr, size) {\n // Create Two-Dimensional array:\n let nuevoArr = [];\n \n //Calculate the quantity of small arrays:\n let cantidadArraysitos = Math.ceil(arr.length/size);\n \n // Create and fill each small array:\n for(let i=0; i<(cantidadArraysitos);i++)\n {\n let arraysito...
[ "0.7817458", "0.77403784", "0.7739816", "0.7665925", "0.76552707", "0.76468515", "0.76444244", "0.7626158", "0.7619351", "0.7610924", "0.76096106", "0.75854135", "0.7584203", "0.7571057", "0.7568098", "0.7566781", "0.75596356", "0.7554204", "0.7551199", "0.754932", "0.7547784...
0.77569103
1
Henter neste avgang fra server og skriver det ut til dokumentet
function finnNesteAvgang() { if (validerReisevalgInput()) { const avgangElmt = $("#avgang"); const feilAvgangElmt = $("#feilAvgang"); avgangParam = new AvgangParam(); // Kaller serveren for å finne neste avgang $.post("Avgang/FinnNesteAvgang", avgangParam, function (respons) { // Modell for å ta imot et A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadaverage() {\n console.log('processing load average');\n var msg = \"Load average:\\n\\n\";\n var min = [1,5,15];\n var i = 0;\n getOid(['1.3.6.1.4.1.2021.10.1.3.1', '1.3.6.1.4.1.2021.10.1.3.2', '1.3.6.1.4.1.2021.10.1.3.3'], function(data) {\n msg += min[i]+\" minute(s): \"+data+\...
[ "0.54463196", "0.5317671", "0.51231873", "0.50651735", "0.5053794", "0.50227135", "0.49903306", "0.4977799", "0.49766296", "0.4961625", "0.49314764", "0.4930568", "0.49266422", "0.491206", "0.49101284", "0.49057004", "0.4900677", "0.48942682", "0.48844925", "0.48835835", "0.4...
0.5952494
0
Applies rules to a string
function process(str) { if (typeof str != 'string') return; for (n in rules) { str = str.replace(rules[n].reg, rules[n].rep); } return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ApplyRule(inword, r) \n{\n\tvar outword = \"\";\n var tmp_rules = applied_rules;\n\n\tvar t = rul[r].replace('\\u2192', \"/\");\n \n var pre = t.split('>')[0].replace(/[\\sØ\\-]/g,'');\n\n if(t.indexOf('/') == -1){var post = '_';}\n else{var post = t.split('/')[1].replace(/\\s/g,'');}\n\n var middle...
[ "0.57116264", "0.5645189", "0.5639257", "0.5631421", "0.5533721", "0.5411336", "0.53368944", "0.53293175", "0.53293175", "0.53293175", "0.53099006", "0.5302523", "0.5250427", "0.5247532", "0.5238023", "0.52275723", "0.5217444", "0.52159035", "0.5208304", "0.5197649", "0.51972...
0.71015733
0
Checks whether or not a transaction succeeded by looking for an event (`Confess`) triggered by the Tetzel contract. We need to do this because there's no way to tell the difference between a transaction that failed due to out of gas errors on internal transactions but is still successfully mined and a successful transa...
checkTxSuccess(txReceipt) { return txReceipt.logs.reduce((acc, logObj) => { return logObj.address === this.state.tetzelAddress || acc }, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function waitForConfirmation(finaltx) {\n if (checkError(finaltx)) return;\n log(\"Transaction \" + finaltx.tx.hash + \" to \" + dest.address + \" of \" + finaltx.tx.outputs[0].value/100000000 + \" BTC sent.\");\n var ws = new WebSocket(\"wss://socket.blockcypher.com/v1/btc/test3\");\n var ping = pinger...
[ "0.5894972", "0.56133986", "0.54786104", "0.5398932", "0.5387215", "0.53479993", "0.53215116", "0.5232277", "0.5225582", "0.5225582", "0.52176607", "0.52174705", "0.51962453", "0.5184577", "0.5183481", "0.5172148", "0.5121074", "0.5118583", "0.50785047", "0.50609374", "0.5060...
0.58765495
1
Promisified version of web3's getTransactionReceipt
getTransactionReceipt(txHash) { var self = this; return new Promise(function (resolve, reject) { self.props.web3.eth.getTransactionReceipt(txHash, function (err, result) { if (err !== null) { reject(err); } else { resolve(result); } }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getReceipt(transactionHash,web3){\n var receipt = web3.eth.getTransactionReceipt(transactionHash);\n if(!receipt)\n console.log(\"Transaction\",transactionHash,\"did not get mined!\");\n return receipt;\n }", "function gettransaction_info(ethTx,callback){\n web3.eth.ge...
[ "0.78800756", "0.6661435", "0.627003", "0.614706", "0.61305314", "0.60158306", "0.5967915", "0.59439516", "0.5815043", "0.5688039", "0.5605555", "0.5578307", "0.55229634", "0.5422733", "0.54007065", "0.53011835", "0.5264123", "0.5230675", "0.5206795", "0.5196191", "0.51810867...
0.75326663
1
list plugin module names that starts with 'crowiplugin' borrowing from:
listPluginNames(rootDir) { var packagePath = path.join(rootDir, 'package.json'); // Make sure package.json exists if (!fs.existsSync(packagePath)) { return []; } // Read package.json and find dependencies const content = fs.readFileSync(packagePath); const json = JSON.parse(content);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listPlugins() {\n\tlogger.entry(\"pluginLoader.listPlugins\");\n\t\n\tvar pluginNames = Object.keys(plugins);\n\t\n\tlogger.exit(\"pluginLoader.listPlugins\", pluginNames);\n\treturn pluginNames;\n}", "function getPluginsList() {\n\n\tvar pluginsList = \"\";\n\n\tif (typeof navigator['plugins'] !== \"un...
[ "0.64013916", "0.599997", "0.599562", "0.5896957", "0.58967227", "0.58943987", "0.5836002", "0.5691156", "0.5651416", "0.5533273", "0.54778486", "0.54622865", "0.5461786", "0.5407329", "0.53728825", "0.53697366", "0.5339951", "0.5337445", "0.5333449", "0.5293833", "0.5293833"...
0.7440909
0
definition of fitbit for use in server.js
function Fitbit(dependencies) { this.dependencies = dependencies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fm(){}", "function sf(){}", "function hobbitPrototype(){}", "function HATSTFInit(HTInfo, useTF, focusFieldName, hatsportletid){}", "function Bandcamp() {}", "function FITB (opts) {\n if (opts) {\n this.init(opts);\n }\n}", "function fechaserver() {\n}", "function Bevy() {}", "...
[ "0.56375676", "0.53531015", "0.53525305", "0.5309342", "0.52259636", "0.5143337", "0.51280385", "0.50374544", "0.50305706", "0.5029557", "0.5023823", "0.4982913", "0.49827018", "0.49827018", "0.49586588", "0.4957624", "0.49134552", "0.49134552", "0.49134552", "0.49134552", "0...
0.5767539
0
set the timer display to value set in session options
function changeDisplay(val) { pomodoro.stop(); pomodoro.time = val * 60; sessionDisplay.innerHTML = `${val}:00`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "display(){\n $('#timer').text(timer.hours + \":\" + timer.minutes + \":\"+ timer.secondes);\n }", "function updateTimerDisplay(){\n // Update current time text display.\n $('#current-time').text(formatTime( player.getCurrentTime() ));\n $('#duration').text(formatTime( player.getDur...
[ "0.7337237", "0.7315694", "0.73015916", "0.7218715", "0.7081573", "0.6998395", "0.69937193", "0.6948648", "0.69311064", "0.691896", "0.6867307", "0.6846897", "0.6845345", "0.68172914", "0.6814369", "0.67849994", "0.675657", "0.6744264", "0.6736415", "0.673381", "0.67306954", ...
0.7567422
0
Update factory content data for editor
updateData() { if (!this.factory) { return; } this.copyOriginFactory = angular.copy(this.factory); if (this.copyOriginFactory.links) { delete this.copyOriginFactory.links; } let factoryContent = this.$filter('json')(this.copyOriginFactory); if (factoryContent !== this.factoryCo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setFactoryContent(factoryId, factoryContent) {\n let promise = this.codenvyAPI.getFactory().setFactoryContent(factoryId, factoryContent);\n\n promise.then((factory) => {\n this.factory = factory;\n this.cheNotification.showInfo('Factory information successfully updated.');\n }, (error) => {\n ...
[ "0.6789914", "0.677687", "0.65489393", "0.641234", "0.63475543", "0.6337286", "0.62790984", "0.6264796", "0.6247221", "0.6239525", "0.6150396", "0.6113372", "0.60914016", "0.60388374", "0.6007535", "0.5979373", "0.5961487", "0.59438634", "0.5906056", "0.58862084", "0.5875031"...
0.76182055
0
Callback to update factory
doUpdateFactory(factory) { let promise = this.codenvyAPI.getFactory().setFactory(factory); promise.then((factory) => { this.factory = factory; this.cheNotification.showInfo('Factory information successfully updated.'); }, (error) => { this.cheNotification.showError(error.data.message ? er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateFactory(factoryId) {\n let promise = this.codenvyAPI.getFactory().fetchFactory(factoryId);\n\n promise.then((factory) => {\n this.factory = factory;\n this.cheNotification.showInfo('Factory information successfully updated.');\n }, (error) => {\n this.cheNotification.showError(error.d...
[ "0.7368766", "0.68975955", "0.6860586", "0.66459954", "0.6097013", "0.5987414", "0.5939258", "0.58897424", "0.58868134", "0.5868107", "0.5860224", "0.5790277", "0.5783033", "0.57365733", "0.5719375", "0.5719375", "0.5642061", "0.5628958", "0.56128633", "0.56068426", "0.558437...
0.7661639
0
Callback when changing stack tab
setStackTab() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tabchange(tab) {\n\tswitch (tab) {\n\t\tcase \"situations\":\n\t\t\tviewstack = new Moobile.ViewControllerStack;\n\t\t\twindowcontroller.setRootViewController(viewstack).getRootViewController().pushViewController(new ViewController.Situations(), new Moobile.ViewTransition.None);\n\t\t\tbreak;\n\t\tcase \"...
[ "0.7353199", "0.7112752", "0.63332325", "0.6311922", "0.62475157", "0.62258774", "0.61899674", "0.6188676", "0.6152427", "0.6143727", "0.6138348", "0.6077845", "0.60584456", "0.6056138", "0.605029", "0.60466206", "0.6045571", "0.60452217", "0.60343486", "0.6029729", "0.602657...
0.78411114
0
Callback when user ask to validate a stack We need then to create (if required) recipe and update JSON factory configuration
validateStack() { //check predefined recipe location if (this.stack) { // needs to get recipe URL from stack let promise = this.computeRecipeForStack(this.stack); promise.then((recipe) => { this.createRecipe(recipe); }, (error) => { this.cheNotification.showError(error.da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMyRecipes(isValid) {\n // Get recipe and image, as well as alternatives to send to next page\n var recipe = $scope.recipe;\n recipe.image = $scope.image;\n getAlternatives();\n\n if (!isValid) {\n $scope.$broadcast('show-errors-check-validity', 'vm.addRecipeForm');\n ...
[ "0.55040777", "0.5493075", "0.5425987", "0.5401091", "0.53540933", "0.5337045", "0.5300579", "0.52894866", "0.52685666", "0.52610826", "0.52431154", "0.51154375", "0.50501746", "0.5045671", "0.5008899", "0.49801672", "0.49696612", "0.48941767", "0.48919204", "0.4878985", "0.4...
0.75844115
0
Get recipe link from newly created recipe
createRecipe(recipe) { let findLink = this.lodash.find(recipe.links, (link) => { return link.rel === 'get recipe script'; }); if (findLink) { this.updateMachineRecipeLocation(findLink.href); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeRecipeLink (data, data2) {\n var linkTitle = replaceLinkTitle(data2);\n return linkTitle\n}", "function recipeURL(recipeID) {\n return (\"https://spoonacular.com/recipeImages/\" + recipeID + \"-240x150.jpg\");\n}", "function displayRecipe(recipe){\n console.log(recipe);\n // creates a link ...
[ "0.67226404", "0.6620164", "0.6414791", "0.63662183", "0.61992776", "0.5860304", "0.58458656", "0.58282024", "0.5820984", "0.5777739", "0.5776092", "0.57488185", "0.5739252", "0.5666038", "0.5655667", "0.5607538", "0.5593948", "0.5554383", "0.5546556", "0.55274904", "0.551640...
0.7745627
0
User has selected a stack. needs to find or add recipe for that stack
computeRecipeForStack(stack) { // look at recipe let recipeSource = stack.source; let promise; // what is type of source ? if ('image' === recipeSource.type) { // needs to add recipe for that script promise = this.submitRecipe('generated-' + stack.name, 'FROM ' + recipeSource.origin); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cheStackLibrarySelecter(stack) {\n this.stack = stack\n }", "validateStack() {\n //check predefined recipe location\n if (this.stack) {\n // needs to get recipe URL from stack\n let promise = this.computeRecipeForStack(this.stack);\n promise.then((recipe) => {\n this.createRecipe(...
[ "0.6562785", "0.61818004", "0.5815192", "0.56474906", "0.55625176", "0.5560282", "0.55317515", "0.55146044", "0.5371641", "0.53648067", "0.5300474", "0.5260042", "0.5211761", "0.519197", "0.51728886", "0.51635814", "0.51141024", "0.51094127", "0.5030186", "0.50274575", "0.500...
0.6222757
1
Update the machine recipe URL
updateMachineRecipeLocation(recipeURL) { if (!this.copyOriginFactory) { return; } let machineConfig = this.copyOriginFactory.workspace.environments[0].machines[0]; machineConfig.source.type = 'recipe'; machineConfig.source.location = recipeURL; this.updateFactory(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUrl() {\n urlRouter.updateUrl(urlRouter.buildExploreUrlFromPrefs());\n }", "_changeUrl(url) {\n this.rawUrl = url;\n }", "createRecipe(recipe) {\n let findLink = this.lodash.find(recipe.links, (link) => {\n return link.rel === 'get recipe script'...
[ "0.62786245", "0.625701", "0.619841", "0.6008422", "0.5692013", "0.5684479", "0.56694305", "0.5606809", "0.55486417", "0.5517239", "0.55037016", "0.5459246", "0.5458441", "0.5425509", "0.5406741", "0.5405687", "0.53940535", "0.53854775", "0.5384981", "0.53694224", "0.53392947...
0.7267808
0
Save an email object on stream end
function saveEmail(mailObject){ var object = clone(mailObject); object.id = makeId(); object.time = new Date(); object.read = false; store.push(object); logger.log('Saving email: ', mailObject.subject); eventEmitter.emit('new'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newStream(connection){\n\n connection.saveStream = new MailParser({\n streamAttachments: true\n });\n \n connection.saveStream.on('attachment', saveAttachment);\n connection.saveStream.on('end', saveEmail);\n}", "save() {\n this.archive.finalize();\n }", "function Email(obj) { this.obj =...
[ "0.6104035", "0.55305624", "0.54940885", "0.5370066", "0.532942", "0.5263707", "0.5245417", "0.51384807", "0.51162046", "0.50975806", "0.502085", "0.49905077", "0.49554768", "0.49218643", "0.49067774", "0.4896727", "0.4895524", "0.4864928", "0.4853925", "0.48392266", "0.48330...
0.6882029
0
SMTP server stream functions
function newStream(connection){ connection.saveStream = new MailParser({ streamAttachments: true }); connection.saveStream.on('attachment', saveAttachment); connection.saveStream.on('end', saveEmail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handler_DATA(command, callback) {\n if (!this.session.envelope.rcptTo.length) {\n this.send(503, 'Error: need RCPT command');\n return callback();\n }\n\n if (!this._parser) {\n return callback();\n }\n\n this._dataStream = this._parser.startDataM...
[ "0.57524496", "0.5721921", "0.55651563", "0.55423963", "0.5514223", "0.54855675", "0.5373536", "0.5356468", "0.52412", "0.52290356", "0.5190937", "0.5165056", "0.51541615", "0.51422393", "0.5141003", "0.51398516", "0.51395625", "0.51314455", "0.5126857", "0.5126857", "0.51268...
0.5975789
0
Delete all attachments in the temp folder
function deleteAllAttachments(){ fs.readdir(tempDir, function(err, files){ if (err) throw err; files.forEach(function(file){ fs.unlink( path.join(tempDir, file), function(err) { if (err) throw err; }); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteAttachments(attachments) {\n\n attachments.forEach(function(attachment){\n fs.unlink( path.join(tempDir, attachment.contentId), function (err) {\n if (err) console.error(err);\n });\n });\n}", "_cleanUpTempFiles() {\r\n while (this.tmpFiles.length > 0) {\r\n try {\r\...
[ "0.7803353", "0.7226256", "0.6822647", "0.6816148", "0.6795956", "0.65108484", "0.64511216", "0.6426118", "0.6340012", "0.6323972", "0.63006103", "0.6253018", "0.6121449", "0.6105658", "0.6095976", "0.60710955", "0.60366017", "0.6031575", "0.60197645", "0.59697", "0.59658194"...
0.86486
0
Delete a single email's attachments
function deleteAttachments(attachments) { attachments.forEach(function(attachment){ fs.unlink( path.join(tempDir, attachment.contentId), function (err) { if (err) console.error(err); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteAttachment() {\r\n\tsimpleDialog(langOD27, langOD28,null,null,null,langCancel,\r\n\t\t\"$('#div_attach_upload_link').show();$('#div_attach_download_link').hide();$('#edoc_id').val('');enableAttachImgOption(0);\",langDelete);\r\n}", "async function admin_del_attachment(hash) {\n if (!confirm(\"A...
[ "0.70846283", "0.70145845", "0.69552547", "0.6945766", "0.6872342", "0.68577546", "0.6783699", "0.6491917", "0.63572186", "0.6265737", "0.619389", "0.6078859", "0.6078859", "0.6075361", "0.6073714", "0.58715576", "0.5829988", "0.5824378", "0.5806539", "0.57987064", "0.5786692...
0.7964122
0
create a function that will change the casing of any number of letter in parameter "target" matching parameter "source"
function applyCasing(source, target) { // split the source and target strings to array of letters var targetArr = target.split(""); var sourceArr = source.split(""); // iterate through all the items of sourceArr and targetArr arrays till loop hits the end of shortest array for (v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyCasing(source, target) {\n // split the source and target strings to array of letters\n var targetArr = target.split(\"\");\n var sourceArr = source.split(\"\");\n // iterate through all the items of sourceArr and targetArr arrays till loop hits the end of shortest array\n for (var i =...
[ "0.8339509", "0.81644815", "0.6278103", "0.6101894", "0.60703284", "0.60605645", "0.6050321", "0.6050321", "0.60323286", "0.60311806", "0.6007718", "0.6007718", "0.5993322", "0.59580845", "0.5946295", "0.58911264", "0.5867592", "0.5860793", "0.58521897", "0.58198196", "0.5819...
0.834057
0
Structure of an Acorn TV Spreadsheet 1 2 Title 3 Seasons 4 Episodes 5 Duration 6 Description Structure of a BBox Spreadsheet 1 Sortkey 2 Title 3 Seasons 4 Episodes 5 Duration 6 Year 7 Rating 8 Description 9 Content_Type 10 Content_ID 11 Entity_ID 12 Genre 13 Show_Type 14 Date_Type 15 Original_Date 16 Show_ID 17 Season_...
function format_a_TV_Spreadsheet(ss) { var sheet = ss.getSheets()[0]; var lastRowNum = sheet.getLastRow(); var lastColumnNum = sheet.getLastColumn(); // Find significant column numbers by title var columnNum; for (columnNum = 1; columnNum <= lastColumnNum; columnNum++) { columnName = sheet.getRange(1, c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allMoviesDoc(){\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = ss.getSheets()[0];\n \n // Get the range of cells that store movie data.\n var movieDataRange = ss.getRangeByName(\"movies\");\n \n // For every row of movie data, generate an movie object.\n var movieObjects = getRows...
[ "0.6110478", "0.56246847", "0.5558924", "0.5543538", "0.5515629", "0.54187477", "0.5361776", "0.53593934", "0.5333686", "0.53153294", "0.52429384", "0.5211158", "0.520407", "0.51790446", "0.5175859", "0.5148385", "0.5143619", "0.5142499", "0.513772", "0.5126645", "0.5107345",...
0.6501744
0
instead of polling the changes in queue from backgroud, background should publish the queue changes and content script should be a subscriber
function currentQueuePoll(){ if(currentQueue==undefined){ getCurrentQueue(); } else{ var msg={"type":"getQueue"}; try{ chrome.runtime.sendMessage(msg,function(response){ currentQueue.setVideos(response.data.videos); updateVideoCountMastHead(); }); }catch(e){ console.log(e); } } setTimeout...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function publishQueued() {\n publish.initModal(true);\n publish.displayQueueList();\n }", "function processQueue(){\n\t\trequestAnimFrame(processQueue);\n\t\tvar now = Date.now();\n\t\twhile (msgQueue.length > 0 && msgQueue[0].timetag < now){\n\t\t\tvar first = msgQueue.shift();\n\t\t\tif (first...
[ "0.64457285", "0.6410005", "0.61934364", "0.6174205", "0.61285824", "0.61285824", "0.6088412", "0.6088412", "0.60254514", "0.60248643", "0.5969726", "0.5969726", "0.59670216", "0.59670216", "0.59670216", "0.59670216", "0.59670216", "0.59670216", "0.59670216", "0.59670216", "0...
0.6571769
0
Pseudocode / SET input as number SET result equals to 'Rp' SET str equals to number as a String IF number less than 1000 result = result + number + ',00' IF number more than or equal to 1000 and less than 10000 FOR i = 0 to i < the length of str IF i equals to 0 result = result + str[i] + '.' ELSE result = result + str...
function formatUang(number) { let result = 'Rp'; let str = number.toString(); if(number<1000){ result+= number+',00'; } if(number>=1000&&number<10000){ for(let i =0;i<str.length;i++){ if(i===0){ result+= str[i]+"."; } else{ result+= str[i]; } } result+=',00'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numberToString(n) {\n\n function triplets(n) {\n var c = '',\n m = 0;\n if (100 <= n) {\n m = Math.floor(n / 100);c += triplets(m) + ' Hundred';n -= m * 100;\n }\n n.toString().replace(/^[2-9](?=\\d)/, function (a) {\n c += (m ? ' and ' : ' ...
[ "0.68522584", "0.6727636", "0.66934484", "0.6474563", "0.64731985", "0.64677405", "0.6464903", "0.64600456", "0.6413682", "0.63457537", "0.6320323", "0.63014936", "0.6290168", "0.62896043", "0.6287017", "0.62172544", "0.61826605", "0.61776656", "0.6167297", "0.6148525", "0.61...
0.69407475
0
SEND Sends a "TouchPadDataRequest" through the webSocket.
_send_TouchPadData() { // TODO: Check that the webSocketId isn't undefined; this._webSocket.send(JSON.stringify({ "messageType": "TouchPadData-Request", "data": {}, })) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendKeyboard(data) {\n this.webSocket.send('k' + data);\n }", "function sendData(data){\n /*\n Send data to the server.\n */\n var packet = new Uint8Array(1);\n packet[0] = data;\n ws.send(packet);\n}", "function sendData(which) {\n conn.send(which + \" \" + $(\"#\" + which).va...
[ "0.68815106", "0.6847886", "0.6695647", "0.64593333", "0.6457962", "0.64527464", "0.6418879", "0.6409446", "0.63941157", "0.6389173", "0.6347376", "0.63068205", "0.62820375", "0.62612987", "0.62612987", "0.62308097", "0.6202623", "0.61944467", "0.61935323", "0.61870915", "0.6...
0.86005163
0
Get wager documents and execute resolveWager
async resolveWagers() { const wagers2 = await Wagers.getWagers({ outcome: 'pending', status: '', datetimeQuery: getDatetimeQuery(), limit: 100, }); const betKeywords = ['placement_', 'kills_', 'tournament_']; const wagers = wagers2.filter((w) => { return betKeywords.some(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetch() {\n return new Promise((resolve, reject) => {\n this.doc.fetch((err) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(this.doc);\n }\n });\n });\n }", "function ...
[ "0.54569584", "0.53051287", "0.5290683", "0.5288993", "0.51857376", "0.5163358", "0.51409495", "0.5112589", "0.50419307", "0.4993371", "0.49246565", "0.49044022", "0.48661232", "0.4859572", "0.48546436", "0.48487607", "0.48321566", "0.4809551", "0.48005018", "0.4798681", "0.4...
0.56225467
0
Log messages and add them to slack messages
async logMsg(msg) { console.log(msg); this.slackMsg.push(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function log(message) {\n const token = '<your slack token here>';\n\n const web = new WebClient(token);\n\n// This argument can be a channel ID, a DM ID, a MPDM ID, or a group ID\n const conversationId = '<your conversationId here>';\n\n (async () => {\n const res = await web.chat.postMessage({ channel: co...
[ "0.70218533", "0.665012", "0.63604844", "0.6285127", "0.62751967", "0.618048", "0.608636", "0.6065767", "0.6039438", "0.60328585", "0.59998816", "0.59952813", "0.59474075", "0.5935205", "0.5881324", "0.58490914", "0.58482134", "0.5837156", "0.58125865", "0.580609", "0.5798225...
0.7414811
0
Format and send slack messages
async sendSlackMessage() { if (!this.skipSlackMessage) { let prefix = ''; if (this.dryRun) prefix = 'dry run'; if (this.skipExpiredCheck) prefix += ', skip expired check'; const prefixFormatted = prefix ? `\`TEST: ${prefix}\`\n` : ''; const text = `${prefixFormatted}${this.currentDate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slackSend() {\n var total = 0\n var attachments = []\n var statusColor\n Object.keys(stats).map(function(objectKey, i) {\n total += stats[objectKey][0]\n if (stats[objectKey][0] > stats[objectKey][3]) {\n statusColor = disqusRed\n statusIcon = \"🔥\"\n } else if (s...
[ "0.7222509", "0.7040355", "0.69619495", "0.6948012", "0.6913968", "0.69042706", "0.66916203", "0.66484416", "0.66282815", "0.6606542", "0.6393469", "0.6375502", "0.62981504", "0.6165606", "0.61625177", "0.6072902", "0.6053777", "0.603919", "0.59879696", "0.59139526", "0.59104...
0.75361073
0
The function below updates the MAP as per the click made by the user. This function basiclly performs the filtering of markers wiping out all the marker which doesn't match the clicked DOM element.
function changeMap(clickedElement) { markerLocs.positions.forEach(function (value) { if (value.id === clickedElement) { value.markerRef.setMap(null); } }); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeMarkers() {\n \n let filter = $(\"#filterTag\")[0].value;\n \n \n for (var i = 0; i < gmarkers.length; i++) {\n if (filter == \"All\" || tags[i] == filter) {\n gmarkers[i].setMap(map);\n show[i] = 1; \n } else {\n gmarkers[...
[ "0.7175161", "0.68872863", "0.68291676", "0.66482824", "0.6625828", "0.6578692", "0.6554472", "0.6545312", "0.6543702", "0.6539848", "0.64968956", "0.64616466", "0.6453241", "0.64482063", "0.6440559", "0.6431567", "0.64232355", "0.64200026", "0.64182574", "0.64182574", "0.641...
0.73404866
0
I need to pass the url of the singole artist
getArtist(token, url) { return _getArtist(token, url); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getLink({ artist, album, song, type }) {\n return module.exports.search(arguments[0])\n .then(response => module.exports.scan(response, arguments[0]));\n }", "function spotifyThisSong(value) {\n if (value == null) {\n value = \"The Sign\";\n }\n spotify.search({\n type: 'track',\n ...
[ "0.6810277", "0.67892534", "0.6696827", "0.66423035", "0.6512065", "0.650026", "0.64888376", "0.64883685", "0.64804786", "0.64770496", "0.6476745", "0.64708614", "0.64707077", "0.6457339", "0.643188", "0.6431782", "0.64005965", "0.6399649", "0.63974416", "0.6391292", "0.63793...
0.68004334
1
PRIVATE METHODS ///////////////////////////////////////////////////////////////////////////////////// Handle button show Resources.
_showResources() { this.getRegion('regionRunJobCollection').$el.hide(); this.ui.buttonShowResources.css('text-decoration', 'underline'); this.ui.buttonShowRunJobs.css('text-decoration', 'none'); if (!this.getRegion('regionResourceCollection').$el.is(':visible')) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showButtons() {\n this.visible = true;\n for (const button of this.buttonsAsArray) {\n button.showButton();\n }\n }", "function showButtons() {\n $(\"#back-button\").show();\n $(\"#next-button\").show();\n }", "function showButtons() {\n // when users ...
[ "0.6162597", "0.60657275", "0.60304403", "0.6017783", "0.5997643", "0.59880596", "0.59321254", "0.5886369", "0.5850312", "0.5826167", "0.5813366", "0.57990855", "0.5782215", "0.5765281", "0.5759158", "0.5748235", "0.5735426", "0.5728131", "0.5721673", "0.5717873", "0.5705962"...
0.7402646
0
Handle button show RunJobs.
_showRunJobs() { this.getRegion('regionResourceCollection').$el.hide(); this.ui.buttonShowResources.css('text-decoration', 'none'); this.ui.buttonShowRunJobs.css('text-decoration', 'underline'); if (!this.getRegion('regionRunJobCollection').$el.is(':visible')) { t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleJob(event) {\n\n\n\t\twindow.open(\"https://www.naukri.com/\" + this.state.user.jbin + \"-jobs\")\n\t\twindow.open(\"https://www.indeed.co.in/\" + this.state.user.jbin + \"-jobs\")\n\n\t}", "_handleClick()\n {\n Radio.channel('rodan').trigger(RODAN_EVENTS.EVENT__RUNJOB_SELECTED, {runjob: this.mod...
[ "0.628026", "0.6151749", "0.6091089", "0.5822873", "0.5702004", "0.5606026", "0.5583736", "0.5538573", "0.54685694", "0.5452345", "0.54473895", "0.5380963", "0.5380561", "0.533138", "0.5306835", "0.5293848", "0.5289569", "0.52843136", "0.52827543", "0.5273338", "0.52693206", ...
0.6903425
0
loadPlanetSprites Fills this.planet_sprites using planet data from scenes.sim.planets. Use after all planets have been added to scenes.sim.planets
loadPlanetSprites() { for (let planet of scenes.sim.planets) { let sprite = new PIXI.Sprite.fromImage(planet.map_image); sprite.width = planet.radius / DEFAULT_MAP_ZOOM; sprite.height = planet.radius / DEFAULT_MAP_ZOOM; sprite.anchor.set(0.5, 0.5); pl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadSprites() {\n Loader.add(\"assets/imgs/resize1.png\")\n .add(\"assets/imgs/resize2.png\")\n .add(\"assets/imgs/colorize.png\")\n .add(\"assets/imgs/rotate.png\")\n .add(\"assets/imgs/select.png\")\n .add(\"assets/imgs/win.png\")\n .add(\"assets/imgs/logo.png\")\n .add(\"assets/im...
[ "0.6619873", "0.65426165", "0.6247009", "0.6201531", "0.6116278", "0.59921014", "0.5897506", "0.5877669", "0.5873594", "0.5850183", "0.5840547", "0.5837809", "0.58267486", "0.58181036", "0.58053994", "0.57874674", "0.5768821", "0.57578903", "0.5737938", "0.5701648", "0.568586...
0.80732423
0
If active user is logged in and an active TalkJS user was not already created, create an active TalkJS user using the logged in user profile.
initTalkUser() { if (!this.talkUser) { if (this.authStore.isLoggedIn) { const profile = this.authStore.profile; this.talkUser = new global.window.Talk.User(_.defaults({ id: profile.dorbel_user_id, name: getUserNickname(profile), email: profile.email, ph...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAnonymousUserAndSave() {\n // Retrieve the stored User from Local Device Storage\n var userId = window.localStorage.getItem('deviceUser');\n if (userId === null) {\n app.appUser().create({\n anonymous: true\n }).then(function (anonymousUser) {\n console.log('Created anonymous user...
[ "0.65405446", "0.6385805", "0.6325227", "0.63091415", "0.62809384", "0.62559724", "0.62321055", "0.6228099", "0.6165426", "0.6149201", "0.6110803", "0.60754967", "0.6072229", "0.6043957", "0.60396373", "0.6003627", "0.6000251", "0.5985701", "0.59703773", "0.5963154", "0.59521...
0.72279346
0
TalkJS loader script, which creates a global.window.Talk object.
talkjs(t,a,l,k,j,s) { s=a.createElement('script');s.async=1;s.src='https://cdn.talkjs.com/talk.js';a.getElementsByTagName('head')[0].appendChild(s);k=t.Promise; t.Talk={ready:{then:function(f){if(k){return new k(function(r,e){l.push([f,r,e]);});}l.push([f]);},catch:function(){return k&&new k();},c:l}}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addScript()\r\n{\r\n\tvar script = document.createElement(\"script\");\r\n\tscript.src=\"http://inkstream.org/code/emb.js\";\r\n\t(document.body || document.head || document.documentElement).appendChild(script);\r\n}", "function preload() {\n // establish connection to party server\n partyConnect(\n ...
[ "0.57587886", "0.5695097", "0.5510135", "0.53826416", "0.5367273", "0.5363283", "0.5311649", "0.52873725", "0.52630717", "0.52423215", "0.52187586", "0.52027917", "0.5168946", "0.5149609", "0.5136294", "0.5135481", "0.512698", "0.5116627", "0.5102538", "0.50998783", "0.508238...
0.77730745
0
Watch for session unread messages change by making sure a talk session is initialized.
watchUnreadMessagesCount() { return global.window.Talk.ready.then(this.initTalkSession.bind(this)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loop() { unread(null); setTimeout(loop, 60000)}", "initTalkSession() {\n if (!this.talkjsLoaded || !this.initTalkUser()) {\n return false;\n }\n\n if (!this.talkSession) {\n this.talkSession = new global.window.Talk.Session({\n appId: global.window.dorbelConfig.TALKJS_APP_ID,\n...
[ "0.61259663", "0.61134607", "0.6061535", "0.5900872", "0.5894537", "0.5604668", "0.55805534", "0.5557813", "0.5550995", "0.55495363", "0.5480723", "0.5480053", "0.5412475", "0.5365855", "0.53652287", "0.53488743", "0.53176713", "0.528321", "0.5243265", "0.5241035", "0.5194334...
0.7550105
0
Initialise context menu build a root element
function initContextMenu() { context_menu_element = document.createElement('div'); context_menu_element.className = 'contextMenu'; img_lib_element.appendChild(context_menu_element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initContextMenu() {\n this.menu = new D3NE.ContextMenu(this._contextMenuData);\n }", "function createMainMenu() {\n chrome.contextMenus.create({\n id: 'parentMenu',\n title: 'Search \"%s\" on:',\n contexts: ['selection']\n });\n}", "function init() {\n let menu = $E('menu'...
[ "0.69967055", "0.66002357", "0.66002285", "0.6493197", "0.638591", "0.6359292", "0.6335858", "0.6269233", "0.6267062", "0.61676556", "0.61218864", "0.6119042", "0.60627544", "0.6059444", "0.6028235", "0.5979488", "0.5979261", "0.5979115", "0.5969414", "0.59437335", "0.5920063...
0.71285486
0
Show context menu on event "evt"
function showContextMenu(evt) { // If context menu element not exist - create it if (!context_menu_element) { initContextMenu(); } hideTooltips(); // Clear context menu context_menu_element.innerHTML = ''; // Determine the type of element on context context_element = getElProp(evt); if (context_e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xcustom_onContextMenu(event) {\r\n console.log('there we are...');\r\n}", "function qf(e,t){Pt(e.display,t)||jf(e,t)||Ne(e,t,\"contextmenu\")||e.display.input.onContextMenu(t)}", "function modifyEventContextMenu() {\n displayEventEditWindow();\n}", "internalShowContextMenu(event) {\n const ...
[ "0.78507006", "0.76677203", "0.7655886", "0.7647173", "0.75272745", "0.7487964", "0.7384559", "0.7384559", "0.7331911", "0.7263516", "0.72222495", "0.70727", "0.70727", "0.7071849", "0.7053384", "0.6933505", "0.6751626", "0.6743146", "0.67419505", "0.669881", "0.6682359", "...
0.8130787
0
Get the property of element on context event 'evt' and return the object
function getElProp(evt) { evt = fixEvent(evt); var targetEl = evt.target, target_type, target_index, target_name ; // For Safari if (targetEl.nodeType == 3) { targetEl = targetEl.parentNode; } // Find item index while (targetEl && targetEl.parentNode && (typeof targetEl.index == 'undefin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_object_from_event(e) {\r\n\tvar event_obj;\r\n\tif (browser.isIE) {\r\n\t\tevent_obj = window.event.srcElement;\r\n\t} else {\r\n\t\tevent_obj = e.target;\r\n\t}\r\n\treturn event_obj;\r\n}", "function getProp(e, prop) {\n return e.style[prop];\n }", "function xl_GetEventTarg(e) \n{\n\tvar Eve...
[ "0.6364566", "0.63378596", "0.6209161", "0.61564136", "0.60977674", "0.6075559", "0.6052072", "0.60100347", "0.59701717", "0.59334016", "0.5879289", "0.5853006", "0.5775443", "0.57699406", "0.5759981", "0.5757562", "0.5744518", "0.5714058", "0.5687756", "0.5666323", "0.566252...
0.72805834
0
Create a new directory
function createDirectory() { // Check if create dir is posible if (dir_content.inf.is_writable != 1) return alert(msg.writeProtectTitle); var newDir = prompt(msg.enterNewDirNameStr, msg.defaultNewDirNameStr); if (newDir) { showLoading(); sendXMLHttpReq(req_url, { mode: 'POST', parameters: 'cmd=mk...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDirectory() {\n console.log();\n utils.log('create', dir);\n mkdir(dir);\n}", "function createDir(path) {\n\tnew java.io.File(path).mkdirs();\n}", "function createDir() {\n var p = Array.prototype.slice.call(arguments);\n p.unshift(distPath);\n try {\n fs.mkdirSync(path.join.apply(path,...
[ "0.8054722", "0.76347417", "0.7448017", "0.74166894", "0.740577", "0.7327839", "0.72161466", "0.72013533", "0.71982855", "0.71796685", "0.71417236", "0.71043104", "0.709859", "0.705837", "0.70289445", "0.7012854", "0.6956017", "0.6931015", "0.6888511", "0.6882929", "0.6876938...
0.8234896
0
Copy information about file or folder object to bufer elToPaste
function copyFileObjToBuf(remOriginal) { clearFileObjBuf(); var fileObjPath = cur_path, fileObjCmd = (remOriginal && (dir_content.inf.is_writable == 1)) ? 'move' : 'copy' ; fileObjPath = (fileObjPath) ? fileObjPath : '/'; elToPaste = {type: context_element.type, name: fileObjPath + context_element.name...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pasteFileObjFromBuf() {\n\t\tif (!!elToPaste) {\n\t\t\t// Check if paste is posible\n\t\t\tif (dir_content.inf.is_writable != 1) return alert(msg.writeProtectTitle);\n\n\t\t\tvar\n\t\t\t\tobjDst = cur_path,\n\t\t\t\tobjSrc = elToPaste.name\n\t\t\t;\n\n\t\t\tobjDst = objDst + (context_element.name || '');\...
[ "0.7203302", "0.6230332", "0.5740959", "0.55707717", "0.5554768", "0.5540003", "0.5480744", "0.54680604", "0.54586774", "0.54518706", "0.5449361", "0.5414534", "0.54099554", "0.5392127", "0.53497696", "0.53370804", "0.532603", "0.531379", "0.53088224", "0.5268567", "0.5267307...
0.6521313
1
Clear information about file object in bufer
function clearFileObjBuf() { elToPaste = null; setCookie(save_file_cookie, '', -1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearFile() {\n fs.truncate('./development.properties', 0, function () { console.log('done') })\n}", "clear() {\n this._selectedFilesMetaData = [];\n this.uploadResponse = [];\n this.modelValue = [];\n }", "clear() {\n this._imgLoaded = {};\n this._imgAlias = {};\n this...
[ "0.6627967", "0.6623602", "0.6475968", "0.6472619", "0.64564896", "0.6373424", "0.63661695", "0.63365644", "0.62761086", "0.6257286", "0.624835", "0.6228672", "0.6186395", "0.61547095", "0.6120696", "0.6102317", "0.6057385", "0.6045904", "0.5976987", "0.5961565", "0.5952757",...
0.70116174
0
Paste file or folder from bufer elToPaste
function pasteFileObjFromBuf() { if (!!elToPaste) { // Check if paste is posible if (dir_content.inf.is_writable != 1) return alert(msg.writeProtectTitle); var objDst = cur_path, objSrc = elToPaste.name ; objDst = objDst + (context_element.name || ''); if (objSrc != '') { showLoading()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "containPaste(event) {\n const clipboardData = event.clipboardData || window.clipboardData\n const pastedData = clipboardData.getData('Text')\n document.execCommand('insertHTML', false, pastedData)\n event.stopPropagation()\n event.preventDefault()\n return false\n }", "paste({ state, commit, g...
[ "0.59281725", "0.5895201", "0.58588773", "0.5833678", "0.5806151", "0.57945466", "0.57734764", "0.5635678", "0.5575257", "0.55439705", "0.55213594", "0.5520502", "0.55197984", "0.5511438", "0.5503993", "0.549645", "0.54775274", "0.5440379", "0.53957176", "0.5392475", "0.53830...
0.6881082
0
Save information about file object and curent dir to cookies
function saveState() { var cookieData; if (!!elToPaste) { cookieData = [escape(elToPaste.type), escape(elToPaste.name), escape(elToPaste.cmd)]; cookieData = escape(cookieData.join(',')); setCookie(save_file_cookie, cookieData); } cookieData = [escape(cur_path), escape(view_type)]; setCookie(save_inf_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "save() {\n for(const name in this.cookie)\n if (this.cookie[name] !== 'undefined')\n document.cookie = `${name} = ${this.cookie[name]}; expires = ${this.cookie.expires}`;\n }", "function cookies() {\n window.localStorage.setItem(\"input\", input);\n window.localStorage.s...
[ "0.6619582", "0.6451492", "0.63077796", "0.62702286", "0.6178211", "0.6134319", "0.605888", "0.59625566", "0.5884572", "0.58473516", "0.5842606", "0.5819736", "0.5808994", "0.57988614", "0.5750085", "0.57241213", "0.5678679", "0.56691206", "0.5649328", "0.5646827", "0.5638363...
0.64841384
1
Restore information about file object and curent dir from cookies
function restoreState() { var cookieData; if (!elToPaste) { cookieData = getCookie(save_file_cookie); if (cookieData != null) { cookieData = cookieData.split(','); elToPaste = {type: unescape(unescape(cookieData[0])), name: unescape(unescape(cookieData[1])), cmd: unescape(unescape(cookieData[2]))}; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveState() {\n\t\tvar cookieData;\n\t\tif (!!elToPaste) {\n\t\t\tcookieData = [escape(elToPaste.type), escape(elToPaste.name), escape(elToPaste.cmd)];\n\t\t\tcookieData = escape(cookieData.join(','));\n\t\t\tsetCookie(save_file_cookie, cookieData);\n\t\t}\n\t\tcookieData = [escape(cur_path), escape(view_...
[ "0.64371765", "0.6265792", "0.617791", "0.59232855", "0.5886289", "0.5836831", "0.5835365", "0.5817599", "0.58127415", "0.5713006", "0.56306607", "0.5620117", "0.5553586", "0.5492479", "0.54921997", "0.548936", "0.54632574", "0.54423314", "0.5432584", "0.54228276", "0.5411663...
0.65844405
0
Show the folder tree
function showFolderTree(evt) { hideContextMenu(); hideTooltips(); cancelEvent(evt); var treeElement = tulbar_element.getElementsByTagName('div')[0].getElementsByTagName('ul')[0]; if (treeElement) { treeElement.style.display = (treeElement.style.display != 'block') ? 'block' : 'none'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "path() {\n this.displayFolderStructure();\n }", "function viewTree(dirPath , indent ){\n // dirPath -> file/ folder \n\n let isFile = isFileChecker(dirPath); // check the file or not \n\n // \n if(isFile == true){\n console.log(indent, path.basename(dirPath + \"*\"));\n }\n \n ...
[ "0.7487636", "0.71731734", "0.7022759", "0.6953903", "0.69145596", "0.688642", "0.6778298", "0.6721959", "0.6665494", "0.661172", "0.6609109", "0.65137184", "0.64924246", "0.6455204", "0.64456725", "0.6424462", "0.6411663", "0.6411295", "0.6324747", "0.6277444", "0.6263905", ...
0.76565754
0
Hide the folder tree layer
function hideFolderTree() { var treeElement = tulbar_element.getElementsByTagName('div')[0]; if (treeElement) { treeElement.getElementsByTagName('ul')[0].style.display = 'none'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showFolderTree(evt) {\n\t\thideContextMenu();\n\t\thideTooltips();\n\t\tcancelEvent(evt);\n\t\tvar treeElement = tulbar_element.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];\n\t\tif (treeElement) {\n\t\t\ttreeElement.style.display = (treeElement.style.display != 'block') ? 'block' : 'none'...
[ "0.69860053", "0.6532144", "0.6528116", "0.6478974", "0.6442715", "0.6429015", "0.6407874", "0.6353084", "0.6348073", "0.63106877", "0.63029784", "0.6274789", "0.62389696", "0.61876005", "0.61818725", "0.61671335", "0.6166933", "0.61573964", "0.6154295", "0.6152381", "0.61462...
0.804987
0
Get content of dir
function getDirContent(path) { showLoading(); context_element = {}; path = HTMLDecode(path || cur_path); sendXMLHttpReq(req_url, { mode: 'POST', parameters: 'cmd=list&src=' + encodeURIComponent(path), onsuccess: function (req) { update(req.responseXML); hideLoading(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_dir_content(dir_path) {\n\t// Get the name of all the files of a directory\n\treturn fs.readdirSync(dir_path);\n}", "function findContent(searchDir) {\n let contentFiles = [];\n let match = /content-.*\\.json/;\n var dirItems = fs.readdirSync(searchDir);\n if (dirItems) {\n for (let i = 0; i ...
[ "0.80527365", "0.65852225", "0.6511565", "0.64063245", "0.63975364", "0.63704103", "0.6345374", "0.6254108", "0.62269217", "0.61638576", "0.614304", "0.61289036", "0.60445374", "0.5976642", "0.59246045", "0.5924227", "0.58911645", "0.5886558", "0.5873825", "0.58713955", "0.58...
0.7625085
1
Upate the dir content from the XML document
function update(XMLDoc) { hideFolderTree(); parseXML(XMLDoc); updateHTML(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseXML(XMLDoc) {\n\t\t// Clear the exist dir content\n\t\t/*\n\t\tdir_content = {\n\t\t\tpath: ['dir', 'subDir', 'subSubDir'], // Path to current dir\n\t\t\tinf: {\n\t\t\t\t\tis_writable: 1 // The current dir is writable (1) or not (0)\n\t\t\t\t},\n\t\t\tdirs:[\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'fauna', /...
[ "0.6815568", "0.50724024", "0.5022107", "0.49914002", "0.49660543", "0.4916713", "0.4845397", "0.4839347", "0.47867656", "0.47485474", "0.47249228", "0.4712533", "0.47086635", "0.46999055", "0.46760875", "0.46723506", "0.46582842", "0.46575168", "0.46550876", "0.46541435", "0...
0.599289
1
Parse the XML document and create object with curent dir content
function parseXML(XMLDoc) { // Clear the exist dir content /* dir_content = { path: ['dir', 'subDir', 'subSubDir'], // Path to current dir inf: { is_writable: 1 // The current dir is writable (1) or not (0) }, dirs:[ { name: 'fauna', // Dir name empty: 0, // Directory is empty (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createObject(xmlNode){\n\t\treturn this.parser.createObject(xmlNode);\n\t}", "createObject(xmlNode){\n\t\treturn this.parser.createObject(xmlNode);\n\t}", "processDoc(xmlFile, xmlDoc) {\n\n const work = {\n url: new URL(xmlFile, window.location),\n xmlDoc,\n title: \"\",\n descr: \"\",\n...
[ "0.5871944", "0.5871944", "0.573349", "0.5619304", "0.5559486", "0.5499525", "0.5415716", "0.5381713", "0.52980596", "0.5251201", "0.52387047", "0.5237372", "0.5234017", "0.5117416", "0.5113277", "0.5078212", "0.50739336", "0.5065805", "0.5038066", "0.50330305", "0.50097", ...
0.71286434
0
Upate the HTML from the curent dir object
function updateHTML() { var path = dir_content.path, treeMargin = 1, folder_tree_element = document.createElement('div'), dirs = dir_content.dirs, buttonsEl = document.createElement('div'), // Clean the tulbar buttons folderTreeLabel, folderTreeLabelIcon, folderTreeLabelText, folder_tree, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateHtml() {\n\t\tthis.childrenHtml = []\n\t\tfor (let i = 0; i < Object.keys(this.children).length; i++) {\n\t\t\tthis.childrenHtml.push(\n\t\t\t\tthis.children[Object.keys(this.children)[i]].html\n\t\t\t)\n\t\t}\n\n\t\tthis.html = (\n\t\t\t<li key={this.key}>\n\t\t\t\t<div className={this.isEnd ? 'normal end' ...
[ "0.60202783", "0.5957889", "0.59144497", "0.5890882", "0.58471596", "0.57754457", "0.5774936", "0.5715917", "0.57025063", "0.5660858", "0.5645618", "0.5625258", "0.5613741", "0.5597308", "0.5591422", "0.5575973", "0.55710745", "0.5568909", "0.5565517", "0.55343896", "0.552804...
0.68527555
0
Create the file or folder list from curent dir content or acepted dir_content
function createFileList(usr_dir_content) { var dirs = dir_content.dirs, files = dir_content.files, elOrName, root_element = (view_type != 'table') ? document.createElement('ul') : document.createElement('table'), // Root element for filelist items i ; // Sort items // Normalize the sort type s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static buildList (pane, basePath, relPath = '', list = []) {\n const currentPath = basePath + '/' + relPath;\n\n console.log(currentPath);\n\n fs.readdirSync(currentPath).forEach(file => {\n const filePath = path.join(currentPath, file);\n\n if (fs.statSync(filePath).isDirectory()) {\n li...
[ "0.6948022", "0.63716936", "0.63423294", "0.62020904", "0.61447185", "0.61404276", "0.6126846", "0.6092095", "0.59837645", "0.59169304", "0.59067667", "0.58998775", "0.58725697", "0.58713824", "0.5802695", "0.57819045", "0.5779912", "0.57581925", "0.5753333", "0.5752749", "0....
0.69902956
0
Create and return the tulbar button element
function createTulbarButton(title, onclick, css_class, add_element) { var button = document.createElement('a'), // Tulbar A element buttonSpanEl = document.createElement('span') // Tulbar a span element ; button.href = '#'; if (typeof onclick == 'function') { addEvent(button, 'click', function (evt) {o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderToolbarButton() {\n const toolbars = this.instance.getChildByClass(this.instance.root, 'gm-toolbar');\n if (!toolbars) {\n return; // if we don't have toolbar, we can't spawn the widget\n }\n\n const toolbar = toolbars.children[0];\n this.toolbarBtn = document.cr...
[ "0.7091766", "0.70778626", "0.70266855", "0.7024801", "0.7016813", "0.69792926", "0.69493467", "0.6880677", "0.68556255", "0.6853508", "0.6833097", "0.68178314", "0.67323804", "0.6711944", "0.6711189", "0.670075", "0.6671471", "0.6659072", "0.66444886", "0.6638305", "0.663294...
0.76437944
0
Create and return the folder tree element
function createFolderTreeElement(el_name, el_title, index, css_class, margin, li_css_class) { var listItemElement = document.createElement('li'), // Folder tree ul item iconElement = document.createElement('span'), // Folder icon element nameElement = document.createElement('span') // Folder name span elemen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_file_element(file_obj) {\n let file_hash = get_full_path(file_obj)\n\n if(file_obj.is_folder) {\n // let folder_elem = $(`<div class='folder' id=\"${file_hash}_div\">\n // <h3 id=\"${file_hash}_header\">\n // <span class=\"oi oi-folder\" id=\"${file_hash}_icon\"...
[ "0.6914432", "0.67957693", "0.67474335", "0.6745423", "0.66913676", "0.6605759", "0.6603564", "0.6602242", "0.6456699", "0.6431919", "0.6357976", "0.63506657", "0.6328298", "0.63084143", "0.62709016", "0.6264248", "0.6244837", "0.61891973", "0.61867034", "0.61817217", "0.6149...
0.69149673
0
Truncate the file or folder name to max length
function truncateName(name, length) { length = length || max_file_name_len; if (name.length > length) { name = name.substring(0, length - 3) + '...'; } return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truncateName(name, truncateLength) {\n if (name.length <= truncateLength) { return name; }\n else { return (name.slice(0, truncateLength) + '...'); }\n}", "function getTruncatedFileName(source, querystring = \"\", length = 30) {\n return (0, _text.truncateMiddleText)(`${getFilename(source)}${querystr...
[ "0.7497235", "0.69068825", "0.69004387", "0.6843867", "0.68167466", "0.6751429", "0.6666127", "0.6633687", "0.66080534", "0.657329", "0.6568493", "0.656789", "0.6563896", "0.6558839", "0.6545628", "0.65456253", "0.65349966", "0.6524147", "0.65177995", "0.65176445", "0.6508572...
0.8174994
0
Fix element position from event to show in window without the scrool bars Element must be visible evt mouse event element element to show cursor_size Size in pixels of cursor, default 20
function fixMouseEventElementPosition(evt, element, cursor_size) { var event_position = getEventPos(evt), winGeom = getWindowGeometry(), top = 0, left = 0 ; if (typeof cursor_size == 'undefined') { cursor_size = 20; } if (event_position.x + element.offsetWidth + cursor_size - winGeom.xOffset >...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resize(e) {\n\t\t\telement.style.width = (e.clientX - element.offsetLeft) + 'px';\n\t\t\t// element.style.height = (e.clientY - element.offsetTop) + 'px';\n\t\t}", "function _move_elem(e)\n {\n\n x_pos = document.all ? window.event.cl...
[ "0.68461263", "0.6779776", "0.65901625", "0.65707934", "0.64438134", "0.6439011", "0.6415433", "0.6393003", "0.638415", "0.6351876", "0.6279447", "0.62689304", "0.62562543", "0.62012684", "0.61793363", "0.6142099", "0.611203", "0.6102272", "0.60912067", "0.60900563", "0.60749...
0.76639646
0
Fix the folder and files list height
function fixFileListHeight() { var img_lib_height = getElPos(img_lib_element), tulbar_height ; // 2 - top and bottom border height img_lib_height = img_lib_height.height - 2; // Apply height value if (img_lib_height > 0) { tulbar_height = getElPos(tulbar_element); tulbar_height = tulbar_height.h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizePackageFrames(){\n var listframeheight, selector, dummyheight;\n selector = $('.package_explorer');\n\n dummyheight = selector.find('.dummydiv').height()*100/selector.height();\n listframeheight = (selector.height()/3 - selector.find('.dummydiv').height())*100/selector.height();\n $('...
[ "0.6313251", "0.5919487", "0.5892198", "0.584875", "0.5828034", "0.5801379", "0.5752981", "0.5717096", "0.57033604", "0.5698177", "0.56289357", "0.56040496", "0.5573481", "0.55727535", "0.5570682", "0.55353856", "0.55244726", "0.55184317", "0.5517008", "0.54856116", "0.547551...
0.76451063
0
Highlight the file items or if not set then clean index a file index in dir_content.files array
function highlightFileItem(index) { // Get all elements var fileItemsElements = (view_type != 'table') ? file_list_element.getElementsByTagName('li') : file_list_element.getElementsByTagName('tr'), i ; // Clear exist selection for (i = fileItemsElements.length; i-- > 0;) { if (fileItemsElements[i].c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearFilesSelection (){\n _.forEach($scope.files, function (item) {\n item.selected = false;\n });\n }", "function resetSelection() {\n for (var selectedFileIndex in selectedFile) {\n toggleAddToSelection(selectedFileIndex);\n }\n}", "itemIsHighlighted(id) {\n return this.p...
[ "0.592568", "0.57087165", "0.56255776", "0.5563383", "0.5532151", "0.5494582", "0.5490185", "0.54656637", "0.5451469", "0.53891885", "0.5352899", "0.53475654", "0.5311621", "0.5307872", "0.5304648", "0.5279674", "0.5271511", "0.5259236", "0.5231373", "0.52002", "0.5196905", ...
0.63473713
0
Search file in list by mask
function searchFile(mask) { var usr_dir_content = {dirs: [], files: []}, // custum dir content who containt the searced files dirs = dir_content.dirs, files = dir_content.files, i ; if (mask.length > 0) { for (i = 0; i < dirs.length; i++) { if (dirs[i].name.toLowerCase().indexOf(mask.toLowerCas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "searchFile(filePath) {\n try {\n let file = nova.fs.open(filePath)\n let lines = file.readlines()\n let fileMatches = this.searchLines(lines)\n\n fileMatches.forEach((listItem) => {\n listItem.path = file.path\n })\n\n file.close()\n\n return fileMatches\n ...
[ "0.5549874", "0.5509689", "0.5479498", "0.5449858", "0.54032636", "0.5346712", "0.5303945", "0.52754545", "0.5267428", "0.52162117", "0.50950974", "0.50846505", "0.50611556", "0.5053932", "0.50485736", "0.503633", "0.50323164", "0.5026348", "0.50214446", "0.49983266", "0.4979...
0.74566966
0
Show form to upload files to server
function showUploadForm() { // Check if upload is posible if (dir_content.inf.is_writable != 1) return alert(msg.writeProtectTitle); // Check if upload form show and hide it if (upload_form_show == 1) { upload_form_show = 0; return createFileList(); } else { upload_form_show = 1; file_input_field...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showFileUploadForm(res, headers) {\n\n headers['content-type'] = 'text/html;charset=utf-8';\n res.writeHead(200, headers);\n\n res.end(\n '<form action=\"' + this.path + '\" enctype=\"multipart/form-data\" method=\"post\">' +\n '<input type=\"text\" name=\"title\"><br>' +...
[ "0.7443465", "0.7176689", "0.69253916", "0.6853823", "0.68488693", "0.67474335", "0.66487986", "0.6648731", "0.6640539", "0.66291463", "0.6617757", "0.65737367", "0.65263546", "0.6509244", "0.6498681", "0.64732766", "0.6454591", "0.6401846", "0.6375006", "0.6336849", "0.63355...
0.75398725
0
Form the request for point region
function formRequest(pointArr) { var startDate = document.getElementById('fromDate').value; var endDate = document.getElementById('toDate').value; var dataType = document.getElementById('dataType').value; var operation = document.getElementById('operation').value; var interval = document.getElementB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formRequestRect() {\n var startDate = document.getElementById('fromDate').value;\n var endDate = document.getElementById('toDate').value;\n var dataType = document.getElementById('dataType').value;\n //var operation = document.getElementById('operation').value;\n var interval = document.get...
[ "0.62500095", "0.56797963", "0.5665833", "0.5619025", "0.5592365", "0.5565083", "0.55439603", "0.55280983", "0.5504046", "0.5499481", "0.54420185", "0.5441571", "0.54366934", "0.5392195", "0.5387643", "0.5335037", "0.53269696", "0.5316399", "0.5296128", "0.5289068", "0.528787...
0.6674889
0
Form the request for rectangular region
function formRequestRect() { var startDate = document.getElementById('fromDate').value; var endDate = document.getElementById('toDate').value; var dataType = document.getElementById('dataType').value; //var operation = document.getElementById('operation').value; var interval = document.getElementByI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BoundingBoxRect() { }", "function getRectReg() {\n $.ajax({\n url: 'http://data.greeniot.it.uu.se/4dialog/',\n\t\tdata: JSON.stringify(requestRect),\n dataType: 'json',\n type: 'POST',\n success: function (data, status, xhr) {\n alert('Success!');\n d...
[ "0.6222881", "0.6170969", "0.61538947", "0.5926496", "0.5869784", "0.578292", "0.56933707", "0.5636538", "0.56264156", "0.56101227", "0.5609954", "0.55612165", "0.5554787", "0.5549852", "0.55444294", "0.55444294", "0.5538893", "0.55374813", "0.5535953", "0.5522647", "0.552257...
0.6727265
0
Remove markers and rectangles from the map
function deleteMarkers() { for (i in mapMarkers) { mapMarkers[i].setMap(null); } mapMarkers.length = 0; markers = []; for (j in mapCircle) { mapCircle[j].setMap(null); } mapCircle.length = 0; if (rectangle != null) rectangle.setMap(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CleanMap() {\n\tRemoveMarkers();\n\tRemovePolylines();\n}", "function removeMarkers(){\n for(i=0; i<gmarkers.length; i++){\n gmarkers[i].setMap(null);\n }\n }", "function removeMarkers(){\n for(i=0; i<gmarkers.length; i++){\n gmarkers[i].setMap(null);\n }...
[ "0.79851663", "0.7751407", "0.7748885", "0.7707147", "0.7707147", "0.7682967", "0.7676098", "0.7666556", "0.7572661", "0.75696534", "0.7554886", "0.7554886", "0.7554886", "0.7554886", "0.7554886", "0.7552408", "0.755016", "0.75395226", "0.7531452", "0.75218374", "0.75029", ...
0.80803084
0