Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
1 file, creating a bin for 1TB (32GB 16TB 16TB)
function test5() { const index = findSizeIndex(TB); const data = cloneData('test1').slice(0, index + 1); updateRecord(data[index], 1, TB); updateDb(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function binb(x, len) {\n\t var j, i, l,\n\t W = new Array(80),\n\t hash = new Array(16),\n\t //Initial hash values\n\t H = [\n\t new int64(0x6a09e667, -205731576),\n\t new int64(-1150833019, -2067093701),\n\t new int64(0x3c6ef372, -237915...
[ "0.5582785", "0.555717", "0.5519525", "0.5373391", "0.53367025", "0.533369", "0.5317442", "0.5248358", "0.5232325", "0.5208323", "0.5178006", "0.51681906", "0.51546764", "0.5146591", "0.5137168", "0.5131705", "0.50838166", "0.5082762", "0.5077001", "0.5064126", "0.50532967", ...
0.0
-1
validators set styling as side effect
function passwordValid() { if (this.state.password.length === 0) { this.noPasswordEntered(); return false; } else if (this.state.password !== this.state.confirmpassword) { this.nonSamePassword(); return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "errorStyles(style) {\r\n if(style === \"add\") {\r\n this.inputPeopleLabel.classList.add(\"error\");\r\n this.inputPeople.classList.add(\"error__border\");\r\n }\r\n if(style === \"remove\") {\r\n this.inputPeopleLabel.classList.remove(\"error\");\r\n ...
[ "0.6453208", "0.6438104", "0.63580847", "0.6292432", "0.62834436", "0.6232683", "0.60951674", "0.6024673", "0.5980301", "0.5966388", "0.595842", "0.5922285", "0.5883284", "0.588212", "0.58601236", "0.5838703", "0.5825768", "0.579898", "0.5755409", "0.5748215", "0.57408", "0...
0.0
-1
splits chunks of data into messages sorts messages splits message to determine message type process each message according to type
function processDataChunk(data) { var lines = data.split('\n'); lines.sort(compareEventIds).forEach(function(message) { var parts = message.split('|'); // switch on type switch(parts[1]) { case "F": // add 'from' client to 'to' client list Clients.addFollower(parts...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitBuffer(buffer, messageNumber, chunkSize) {\r\n \r\n var bufferSize = buffer.byteLength;\r\n //calculate the size of the data (doesn't include extra space in buffer)\r\n \r\n var sizeArray = new Int32Array(buffer, 0, 6*4);\r\n var dataSize = sizeArray[0]; \r\n\r\n console.log(\"dataSize:\", dat...
[ "0.62520444", "0.6171248", "0.60869706", "0.5950321", "0.5690584", "0.5670904", "0.5666197", "0.54634047", "0.5451561", "0.5431315", "0.5373063", "0.53605473", "0.530681", "0.5278618", "0.52709675", "0.52627337", "0.5255342", "0.52450144", "0.522047", "0.51906645", "0.5181298...
0.72619563
0
comparator for messages sorts based on sequence
function compareEventIds(a, b) { return a.split('|')[0] - b.split('|')[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortMessages(messages) {\n if (!messages) return;\n\n messages.sort(function(item1, item2) {\n return item2.timestamp - item1.timestamp;\n });\n}", "_sortMessagesForOutput(messages) {\n node_core_library_1.LegacyAdapters.sortStable(messages, (a, b) => {\n let diff;\n ...
[ "0.6785225", "0.65642905", "0.62958205", "0.6210194", "0.6075294", "0.60037506", "0.60030323", "0.5854317", "0.56361943", "0.5619982", "0.5583743", "0.5583743", "0.5583743", "0.5583743", "0.5583743", "0.5583743", "0.5583743", "0.5583743", "0.5583743", "0.5583743", "0.5583743"...
0.0
-1
Method to insert a node in a tree it moves over the tree to find the location to insert a node with a given value
insertNode(node, newNode) { // if the value is less than the node // value move left of the tree if (newNode.value < node.value) { // if left is null insert node here if (node.left === null) { node.left = newNode; } else { // if left is not null recurr until // null...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insert(value) {\n this.count++;\n let newNode = new Node(value)\n const searchTree = (node) => {\n // if value < node.value, go left\n if (value < node.value) {\n // if no left child, append new node\n if (!node.left) {\n node.left = newNode; \n // if left child, ...
[ "0.7896973", "0.78957236", "0.76140195", "0.7539056", "0.74728364", "0.74310833", "0.7414899", "0.7411064", "0.74023324", "0.73932505", "0.736033", "0.7345211", "0.7336312", "0.73130095", "0.7263182", "0.725121", "0.72511446", "0.7245889", "0.7213", "0.7207939", "0.7187698", ...
0.6875121
37
high score update func
function tableUpdate(arr) { var lines = ""; for (let i = 0; i < arr.length; i++) { lines += '<div title =' + (arr[i].date ? arr[i].date : '') + '> <span class="rec">' + arr[i].score + '</span> <span class="playerName">' + arr[i].name + '</span> </div>'; } document.getElementById("bestPlayers")....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateScore() {\n currentScore = ansArray.length;\n $('#currentScore').text(`Current Score = ${currentScore}`);\n\n if (parseInt(highScore) === 0) {\n highScore = currentScore;\n $('#highScore').text(`High Score = ${highScore}`);\n } else if (parseInt(currentScore) > parseInt(highSco...
[ "0.76534957", "0.75970286", "0.74401736", "0.7429385", "0.73836946", "0.732695", "0.7326819", "0.7318715", "0.7257679", "0.7219891", "0.71968573", "0.71785635", "0.71726036", "0.7172054", "0.716562", "0.7154095", "0.71329445", "0.71305484", "0.71305484", "0.7100006", "0.70758...
0.0
-1
multyply score by lvl
function startGame() { //start btn secs = 60; seconds.innerHTML = secs; //set primary time startBtn.style.display = "none"; //hide the start button spinDiv.style.display = "block"; // unhide the spiner p.innerHTML = grade; //count ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_calcLevelByScore (score) {\n if (app.ctx.level + 1 < app.ctx.scoreMmMap.length) {\n if (score >= app.getScoreByLevel(app.ctx.level + 1)) {\n return app.ctx.level + 1\n }\n return app.ctx.level\n } else {\n return Math.min(app.ctx.level, app.ctx.scoreMmMap.length - 1)\n }\n }",...
[ "0.6970904", "0.6708442", "0.66591775", "0.6655267", "0.63625044", "0.63618886", "0.6348063", "0.62985045", "0.61598086", "0.6156114", "0.6150287", "0.60745203", "0.600313", "0.5981789", "0.5940032", "0.59291476", "0.5922715", "0.59217745", "0.5914885", "0.5873868", "0.586886...
0.0
-1
Update the pulldown menus based on the identifier
function updatePulldowns(newIdentifier, oldIdentifier) { if(newIdentifier.indexOf(':') > -1) { $scope.query.route = $scope.routes[1]; $scope.query.parameter = $scope.parameters[3]; } else if(newIdentifier.match(/^[a-fA-F0-9]+$/)) { if(newIdentifier.match(/^001bc509408/)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateOption(id) {\n\t$('#options_btn').empty();\n\tfor(o in Qs[id].options) {\n\t\t$('#options_btn').append('<li onclick=\"select_option('+\"'\"+ o+\"'\" +')\">'+ Qs[id].options[o].title +\"</li>\");\n\t}\n}", "function change_pullDownList(selectedIdx, childListObj, childListArray ) {\n // Empty the c...
[ "0.64521056", "0.6408876", "0.62665516", "0.6195112", "0.61763173", "0.6143263", "0.6085726", "0.6072362", "0.6056862", "0.6048564", "0.60442644", "0.59892005", "0.59311", "0.5911158", "0.5898213", "0.5897119", "0.58903587", "0.58251804", "0.58212316", "0.5799116", "0.5792234...
0.58740586
17
Provide hook that creates auth object and handles state
function useProvideAuth() { const [user, setUser] = useState(null); const [sessionID, setSessionID] = useState(null); const [role, setRole] = useState(null); const login = (username, password) => { return api.auth.login(username, password).then(res=>{ setUser(res.username) setSessionID(res.sess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async handleAuth() {\n if (!this.API)\n return;\n // handle authorize and try to get the access_token\n const accessToken = await this.API.handleAuth();\n if (accessToken) {\n // new access_token\n this.setAccessToken(accessToken);\n this.user...
[ "0.6996523", "0.68201923", "0.68009627", "0.67603475", "0.67366827", "0.67332774", "0.67216825", "0.6692876", "0.6645137", "0.6644109", "0.65772355", "0.65286124", "0.64945287", "0.64694595", "0.64193445", "0.64191395", "0.64166236", "0.6414317", "0.6410991", "0.6382386", "0....
0.645168
14
Manejo de mensajes recibidos desde ESPino
handleESPINOMessage(message) { console.log('Mensaje desde ESPino: ' + message); if (message === "MS Detection" || message === "PIR Detection") { email.sendMail(message); } serverClient.publish('web/messages', message); serverClient.publish('bot/messages', message); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "inviaMessaggio(){\n if(this.messaggioInputUtente != ''){\n this.contacts[this.contattoAttivo].messages.push({\n date: dayjs().format('YYYY/MM/DD HH:MM:SS'),\n text: this.messaggioInputUtente,\n status: 'sent',\n ...
[ "0.66193455", "0.648504", "0.63383085", "0.6334795", "0.62968135", "0.62265486", "0.6199864", "0.61862993", "0.6064371", "0.60336703", "0.6029958", "0.6027625", "0.60162956", "0.59996575", "0.59733725", "0.5956475", "0.59548306", "0.59436476", "0.592624", "0.592348", "0.59224...
0.56001323
70
Manejo de mensajes recibidos desde la pagina Web
handleWebMessage(message) { console.log('Mensaje desde Web: ' + message); if (message === 'estado'){ this.verificarEstado(); return; } serverClient.publish('Espino/commands', message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mensajes(respuesta){\n\n\t\t\t\tvar foo = respuesta;\n\n\t\t\t\t\tswitch (foo) {\n\n\t\t\t\t\t\tcase \"no_exite_session\":\n\t\t\t\t\t\t//============================caso 1 NO EXISTE SESSION==================//\n\t\t\t\t\t\tswal(\n\t\t\t\t\t\t\t\t'Antes de comprar Inicia tu Session en la Pagina?',\n\t\t\t...
[ "0.68735737", "0.66281134", "0.6532616", "0.648485", "0.6372329", "0.63462645", "0.6345334", "0.6329752", "0.6286921", "0.6284476", "0.6273281", "0.6259438", "0.62465066", "0.62438774", "0.6199646", "0.61417", "0.61343044", "0.61214274", "0.61208063", "0.60985434", "0.6079899...
0.5940024
26
Manejo de mensajes recibidos desde el Bot Telegram
handleBotMessage(message) { console.log('Mensaje desde TelegramBot: ' + message); if (message === 'estado'){ this.verificarEstado(); return; } serverClient.publish('Espino/commands', message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receivedMessage(senderId, message) {\n console.trace(\"[receivedMessage] Procesando evento webhook 'message': %j\", message);\n\n let messageId = message.mid;\n\n if (message.quick_reply) {\n // GLOZADA: Propaga a la app Bot-NLP el procesamiento de la respuesta a pregunta con opcion multiple\n le...
[ "0.71345526", "0.6884324", "0.6631414", "0.65191996", "0.6513095", "0.6509733", "0.6497622", "0.64231217", "0.6403696", "0.63231546", "0.6306915", "0.62973934", "0.6247731", "0.62253755", "0.62129915", "0.6198411", "0.61846423", "0.61766064", "0.6161987", "0.6126189", "0.6116...
0.59659296
45
Verificado el estado de cada cliente espino registrado
verificarEstado() { espinoClients.forEach((host) => { ping.sys.probe(host, (isAlive) => { msg = isAlive ? 'host ' + host + ' esta conectado' : 'host ' + host + ' no esta conectado'; console.log(msg); serverClient.publish('web/messages', msg); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async geraUsuariosNovos(){\n\t\tawait this.geraUsuarios(1);\n\t\t\n\t\t//Botei esse tempo porque acredito que mesmo esperando geraUsuarios, os setState dentro podem não ter terminado, pode ser por estar mal configurado também.\n\t\tawait new Promise(resolve => { setTimeout(resolve, 1000); });\n\t\tthis.setState({c...
[ "0.6273397", "0.62089485", "0.62032586", "0.6078039", "0.6074679", "0.60253733", "0.5999619", "0.58951396", "0.584843", "0.5787949", "0.5691357", "0.56681293", "0.56340927", "0.5626309", "0.5620927", "0.56122994", "0.56061995", "0.5593618", "0.55524546", "0.5549024", "0.55193...
0.6414848
0
verifica la conexion con los clientes para detectar la perdida de conexion de alguno
verificarConexion() { if (espinoClients.length != 0) { espinoClients.forEach((host) => { ping.sys.probe(host, (isAlive) => { if (!isAlive) { //Si algun cliente espino esta desconectado, se manda notificacion var i; f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "verificarEstado() {\n espinoClients.forEach((host) => {\n ping.sys.probe(host, (isAlive) => {\n msg = isAlive ? 'host ' + host + ' esta conectado' : 'host ' + host + ' no esta conectado';\n console.log(msg);\n serverClient.publish('web/messages', msg);...
[ "0.69046175", "0.65228444", "0.62390524", "0.61430943", "0.60520005", "0.59928024", "0.5971449", "0.5931375", "0.59222305", "0.5884482", "0.58726895", "0.58433884", "0.5793338", "0.57748663", "0.57173395", "0.5705801", "0.56586564", "0.5638109", "0.5632202", "0.56102705", "0....
0.77527213
0
function to create a new peer when the user has currently joined
function createPeer(userToSignal, callerID, stream) { const peer = new Peer({ initiator: true, trickle: false, stream, }); // sending the stream of current user to others peer.on("signal", signal => { const username = myUsernameRef.current...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPeer() {\n const {\n updateSessionPeers,\n }= this.props;\n\n const peerEmail = this.peerinput.value;\n const reviewer = this.getPeerObject(peerEmail);\n\n updateSessionPeers(reviewer);\n }", "function makeNewPeer(\n socket,\n roomName,\n peers,\n participants,\n myName,\n videoRefs...
[ "0.6800906", "0.6736438", "0.66744214", "0.6637902", "0.65973365", "0.65894353", "0.65756756", "0.6533941", "0.6504239", "0.64577013", "0.63963044", "0.62918675", "0.6287978", "0.6220841", "0.62196213", "0.6212053", "0.6186105", "0.6140331", "0.61389756", "0.612463", "0.61201...
0.5761035
54
function to add a new peer if the user was already in the room
function addPeer(incomingSignal, callerID, stream) { const peer = new Peer({ initiator: false, trickle: false, stream, }) // sending the signal to the server to get in return the socketid for the user peer.on("signal", signal => { socketRe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPeer() {\n const {\n updateSessionPeers,\n }= this.props;\n\n const peerEmail = this.peerinput.value;\n const reviewer = this.getPeerObject(peerEmail);\n\n updateSessionPeers(reviewer);\n }", "addPeer(peerHost) {\n const peerIsKnown = this.peers.find(\n peer => peer.host.indexOf(p...
[ "0.7487249", "0.7263946", "0.7257929", "0.70713276", "0.7019268", "0.69406086", "0.6735714", "0.6605807", "0.656907", "0.6518076", "0.6477875", "0.64419127", "0.64419127", "0.64023244", "0.63825345", "0.63795567", "0.63738334", "0.62968814", "0.6294997", "0.6292743", "0.62846...
0.55905336
97
redirecting the user to home screen after leaving the room
function leaveRoom() { socketRef.current.emit("user clicked leave meeting", socketRef.current.id); props.history.push("/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leaveRoom() {\n window.location = routeHome()\n }", "function leaveRoom() {\n const leaveRoom = confirm('Are you sure you want to leave the chatroom?');\n if (leaveRoom) {\n window.location = '../index.html';\n }\n}", "function redirectHome() {\n cleanUp();\n $sta...
[ "0.83340126", "0.72112024", "0.71186656", "0.7021678", "0.68831414", "0.68677324", "0.68663454", "0.6838351", "0.67523843", "0.67367595", "0.6658079", "0.6648531", "0.66252977", "0.6613418", "0.6597612", "0.65817875", "0.65692097", "0.65604246", "0.6493024", "0.64863575", "0....
0.6909798
4
redirecting user to the chat room after leaving the video call
function changeStatus() { if (showVideo) { window.location.reload(); } else { myUsernameRef.current = currentUsername; socketRef.current.emit("join room", { roomID, currentUsername }); } changeVideoState(!showVideo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receiveVideoEndMessage() {\n window.location = '/';\n}", "function leaveRoom() {\n socketRef.current.emit(\"user clicked leave meeting\", socketRef.current.id);\n props.history.push(\"/\");\n }", "function hangUpCall() {\n closeVideoCall();\n\n sendToServer({\n // caller...
[ "0.7726118", "0.6876941", "0.6779505", "0.67573225", "0.67252105", "0.6706335", "0.6704078", "0.6702675", "0.66484493", "0.64891255", "0.64212155", "0.63867897", "0.6357712", "0.6249385", "0.62007153", "0.61947834", "0.61924595", "0.61895937", "0.6174899", "0.61247796", "0.60...
0.5856622
33
Concrete function call for splinechart with dynamical content
function drawChart(loc, cycle, ctitle, xtitle, ytitle, dataname, pointnum, xvalue, yvalue){ Highcharts.setOptions({global: {useUTC: false}}); $(loc).highcharts({ chart: { type: 'spline', animation: Highcharts.svg, // don't animate in old IE marginRight: 10, events: { load: function() { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cryptic_sparkline_charts() {\n $('.sparklines').sparkline('html');\n}", "function SVGRowChart() {\r\n }", "_drawChart()\n {\n\n }", "function SVGLineChart() {\r\n }", "get Charting() {}", "function SVGPieChart() {\r\n }", "function LineChartApi(p_element, p_settings, p_data) {\n\...
[ "0.59460264", "0.59378785", "0.5905532", "0.58537006", "0.5830879", "0.5826319", "0.57548064", "0.5725811", "0.5710692", "0.5682321", "0.56780463", "0.56561553", "0.56393915", "0.5622451", "0.5589185", "0.5580378", "0.5576126", "0.5574195", "0.55734694", "0.55732244", "0.5556...
0.58738947
3
Get a list of SchemeTypes. Returns details of all SchemeTypes, results are unbound.
function getSchemeTypes() { return instance.get(`/SchemeTypes/`) .then(function (response) { return (response); }) .catch(function (error) { return (error); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDeviceTypes() {\n return deviceService.getTypes()\n .then(function (data) {\n vm.deviceTypes = data.data;\n });\n }", "function fetchContentTypes () {\n return client.getContentTypes()\n .then((response) => response.items)\n .catch((error) => {\n console.log...
[ "0.5802029", "0.57077026", "0.56858015", "0.56583244", "0.56311965", "0.55984575", "0.5510711", "0.5459701", "0.5415679", "0.5403605", "0.53426695", "0.53242123", "0.53164226", "0.5256261", "0.5223614", "0.5210062", "0.5169357", "0.51479197", "0.507291", "0.5040114", "0.50295...
0.82921726
0
Returns null if cookie doesn't exist. Returns cookie value if it exists.
function rmGetCookie(Name) { var search = Name + "=" ; var CookieString = document.cookie ; var result = null ; if(CookieString.length > 0) { offset = CookieString.indexOf(search) ; if(offset != -1) { offset += search.length ; end = CookieString.indexOf(";", offset) ; if(end == -1) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __retrieve_from_cookie(field_name)\n{\n var cookie_val = __get_cookie(field_name)\n var val = null\n if (cookie_val)\n {\n val = cookie_val\n }\n else\n {\n var default_val = __get_cookie(field_name + DEFAULT_SUFFIX)\n if (default_val)\n {\n val ...
[ "0.7615577", "0.7437689", "0.73885477", "0.7345527", "0.72804266", "0.72029763", "0.7191346", "0.7128719", "0.71240777", "0.7118574", "0.7082815", "0.7071502", "0.70525783", "0.7050969", "0.7033706", "0.70322204", "0.7017525", "0.7017525", "0.7009795", "0.6989794", "0.6981158...
0.0
-1
Funzione che controlla che le due password sono uguali, se lo sono abilita il bottone di submit, altrimenti lo disabilita.
function checkValidity() { if (test_pass_bis && test_pass) $("#submit").attr("disabled", false); else $("#submit").attr("disabled", true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "processPassRep() {\n if (this.password.value !== this.passwordRepeat.value) {\n this.passwordRepeat.err = true;\n this.passwordRepeatErr.seen = true;\n this.valid = false;\n this.passwordRepeatErr.text = \"رمز عبور و تکرار آن یکسان نیستند\";\n ...
[ "0.71235365", "0.70731145", "0.68981993", "0.68748426", "0.6822579", "0.68195504", "0.6817573", "0.67463934", "0.67444015", "0.6715138", "0.6710467", "0.6708896", "0.6706583", "0.6691114", "0.66487485", "0.66200274", "0.6608813", "0.6593365", "0.6584428", "0.6581528", "0.6565...
0.6528907
30
This function is called on mouse click. Every time it is called, it updates the PacMan image, position and direction on the screen.
function Run() { let img = document.getElementById("PacMan"); let pactop = document.getElementById("pacman-top"); let pacbot = document.getElementById("pacman-bottom"); focus = (focus + 1) % 2; direction = checkPageBounds(direction, pos); if (direction) { pos -= 20; img.style.left = pos + "px"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() \n\t\t\t{\n\t\t\t\tif (canFollow)\n\t\t\t\t{\n\t\t\t\t\tvar point = e.globalToLocal(stage.mouseX, stage.mouseY);\n\t\t\t\t\ttool.set ({x:point.x, y:point.y});\n\t\t\t\t}\n\t\t\t\tif (dragging)\n\t\t\t\t{\n\t\t\t\t\tvar yPos = carGrabbed.rotation == 180 ? -25 : 25;\n\t\t\t\t\tvar point = e.globalT...
[ "0.687129", "0.6679706", "0.66051924", "0.65727866", "0.6563801", "0.6454009", "0.6309112", "0.62997484", "0.62933564", "0.6288204", "0.62695795", "0.6259248", "0.6252043", "0.62483704", "0.6234826", "0.62171453", "0.61973506", "0.61940444", "0.61590165", "0.61463475", "0.613...
0.62378967
14
function that is used to print the item to html file
function printLocation(item, node){ $(node).append(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printItem(item){\n\t\t$(\"#items_list\").append('<span style=\"min-height:55px;min-width:55px;display:inline-block;\"><a class=\"tooltip-stop\" href=\"http://canisback.com/tooltips/item/'+item['id']+'\"><span class=\"item\" data-id=\"'+item['id']+'\" style=\\'background : url(\"'+Canis.LoL.TheoryCrafter.g...
[ "0.6950856", "0.67662686", "0.67145115", "0.65728515", "0.65453523", "0.6477293", "0.64600736", "0.64589196", "0.6398041", "0.6375321", "0.62455595", "0.6218351", "0.6217909", "0.61782336", "0.6173305", "0.61341846", "0.61098105", "0.60741085", "0.60261554", "0.60187775", "0....
0.5992882
23
============================================================================ CONVERSATION HANDLING ============================================================================ Add a conversation Echo is in
addConversation(conversation) { this.conversations.push(conversation); if(!this.currentConversation) { this.currentConversation = conversation; } //this.on('send', (message) => { // conversation.send(message); //}); conversation.on('message', (message, user, conversation) => { t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function conversationInvite() {\n conversationsClient.on('invite', function(invite) {\n invite.accept().then(conversationStarted);\n tlog('You have a incoming invite from: <strong>' + invite.from + '</strong>');\n });\n}", "addMessage(sender, to, message, type = 'message') {\n const { messages, alertN...
[ "0.64666176", "0.6376639", "0.63695765", "0.6080184", "0.60186446", "0.5945779", "0.5906828", "0.58953804", "0.586454", "0.5793736", "0.5792167", "0.5787013", "0.5779642", "0.5774517", "0.57717466", "0.57689184", "0.57648873", "0.57498556", "0.57476664", "0.5719663", "0.56832...
0.7025022
0
Set the current conversation Echo is in
setCurrentConversation(i) { this.currentConversation = this.conversations[i]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setVoice() {\n msg.voice = voices.find(voice => voice.name === this.value);\n playAudio();\n}", "function setVoice() {\n console.log('Changing voice...');\n msg.voice = voices.find(voice => voice.name === this.value);\n // Stop and restart\n toggle();\n}", "enterClientInAblyPresenceSet(vueContex...
[ "0.6273118", "0.62530446", "0.6170674", "0.5442559", "0.54203904", "0.5419875", "0.54186344", "0.54161143", "0.5392171", "0.53728235", "0.53557557", "0.53532565", "0.5330634", "0.5329383", "0.53106457", "0.53019714", "0.52666056", "0.5225447", "0.5224766", "0.52245945", "0.52...
0.6261061
1
Handle a message sent in conversation Echo is in
listen(message, user, conversation) { if (conversation === this.currentConversation) { this.log(user + ": " + message); } else { this.log('#' + conversation.name + '@' + user + ": " + message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async handle(text, senderId, chatId) {}", "handleBotMessage(message) {\n console.log('Mensaje desde TelegramBot: ' + message);\n if (message === 'estado'){\n this.verificarEstado();\n return;\n }\n serverClient.publish('Espino/commands', message);\n }", "fun...
[ "0.70748305", "0.7001378", "0.6970164", "0.6917478", "0.6829464", "0.67971075", "0.67661786", "0.6758715", "0.6754992", "0.6681896", "0.66392636", "0.66364527", "0.65917337", "0.6580295", "0.65753925", "0.65707475", "0.65279067", "0.6493921", "0.64917046", "0.6476588", "0.647...
0.6347227
35
Send a message to the current conversation
send(message) { if(this.currentConversation){ //this.emit('send', message, this.currentConversation); this.log(this.userProfile.nickname+": "+message); this.currentConversation.send(message); } else { this.log("No conversation specificed! Please specify a conversation before sending....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async sendMessage (conversation, message) {\n await agent('POST', `https://graph.facebook.com/v2.6/me/messages?access_token=${conversation.channel.token}`)\n .send(message)\n }", "function sendMessage() {\n // Create a new message object\n var message = {\n text: vm.messageText\n...
[ "0.73940885", "0.7290203", "0.7289199", "0.721078", "0.7203348", "0.7189562", "0.7156088", "0.71452504", "0.71412516", "0.70341015", "0.69897634", "0.69897634", "0.6893399", "0.686181", "0.6816581", "0.68033594", "0.6790652", "0.6777472", "0.67674595", "0.67341805", "0.672073...
0.83204746
0
============================================================================ ADMIN INTERFACE ============================================================================ Add a admin interface
addAdmin(adminInterface) { this.on('log', message => { adminInterface.log(message); }); adminInterface.on('recieve', message => { this.recieve(message); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GivenIAmAnAdmin() {}", "function showAdmin(){\n addTemplate(\"admin\");\n userAdmin();\n}", "function adminInstanzInit()\n\t{\n\t\tnavigationInit(\"adminInstanz\", \"web_admin_instanz\");\n\t}", "function GivenIAmATrustAdmin() {}", "function add_admin_access () {\r\n // fetch the admin group ...
[ "0.69524485", "0.65984917", "0.63241756", "0.62867063", "0.62217355", "0.6075731", "0.58641076", "0.58641076", "0.57037985", "0.56866837", "0.5593434", "0.5573683", "0.5573683", "0.55648655", "0.5524379", "0.5513487", "0.54555357", "0.5420953", "0.54126686", "0.5406933", "0.5...
0.7296453
0
Recieve a message from an admin interface
recieve(message) { const params = message.split(" "); const invoked = this.commandCenter.invoke(params[0], this, ...params.splice(1)); if(!invoked) { this.send(message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adminUpdate(message){\n bot.sendMessage(admin,message);\n}", "handleWebMessage(message) {\n console.log('Mensaje desde Web: ' + message);\n if (message === 'estado'){\n this.verificarEstado();\n return;\n }\n serverClient.publish('Espino/commands', me...
[ "0.6960321", "0.62778115", "0.6203218", "0.619325", "0.61910844", "0.60946774", "0.60904235", "0.60804003", "0.60742414", "0.6017274", "0.60099787", "0.59901655", "0.5985426", "0.5976654", "0.59666365", "0.59628356", "0.5962516", "0.5959903", "0.595366", "0.5895555", "0.58929...
0.6146022
5
Log a message to all admin interfaces
log(message) { this.stream.write((new Date()).toUTCString() + " ------ " + message + "\n"); this.emit('log', message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addAdmin(adminInterface) {\n this.on('log', message => {\n adminInterface.log(message);\n });\n adminInterface.on('recieve', message => {\n this.recieve(message);\n });\n }", "sendLogs() {\n this.log.info('logging from tests');\n }", "function initLog() {\n\n console...
[ "0.713722", "0.6035284", "0.58934426", "0.58457893", "0.57244784", "0.57170033", "0.5693926", "0.56897426", "0.56897426", "0.56897426", "0.56897426", "0.5682649", "0.56559545", "0.5598701", "0.55973744", "0.55899715", "0.55336297", "0.5533261", "0.5463338", "0.5454808", "0.54...
0.0
-1
Parse user's uploaded word list
function parseTxtFile() { if (file) { var reader = new FileReader(); reader.onload = function(e) { var content = e.target.result; // Parsing var words = content.split("\n"); console.log(words); var pattern = new RegExp("^#[A-Za-z]+");; // Test the correctness of the first row (a wor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parse(words){\n\n\n\n}", "function readWords(path){\n var wordList;\n \n $.ajax({\n url: path,\n async: false,\n dataType: \"text\"\n }).done(function(data) {\n wordList = data.split('\\n');\n });\n \n return wordList;\n}", "takeFromLocalStorage(){\...
[ "0.6232012", "0.5922098", "0.5766924", "0.57388026", "0.56979156", "0.5652628", "0.56322247", "0.56118345", "0.5557932", "0.5511576", "0.5429123", "0.5374345", "0.53734577", "0.5353601", "0.5237688", "0.52273095", "0.52270436", "0.522523", "0.52227515", "0.5216538", "0.521209...
0.53752625
11
this component only updates when there is a new analysis with a new search term
shouldComponentUpdate(nextProps, nextStates) { return this.props.analysis.searchTerm !== nextProps.analysis.searchTerm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onSearchTermChange() {\n this.search();\n Metrics.getInstance().updateMetric(Filters.SEARCH, 1);\n }", "function searchUpdated(term) {\n setsearch(term);\n }", "onSearch() {\n try {\n const searchText = this.getSearchHash();\n if (searchText === this.prio...
[ "0.7369667", "0.7127044", "0.6362071", "0.6268286", "0.6135323", "0.61229074", "0.6110052", "0.6093351", "0.6060579", "0.6059973", "0.60267264", "0.6014052", "0.5970794", "0.5969507", "0.5968414", "0.59469235", "0.59334236", "0.5932533", "0.59226865", "0.5912796", "0.5901745"...
0.55383223
68
draw function this is our 'game' loop that automatically executes over and over
function draw() { // draw a series of ellipses locked to a given Y position and the mouseX position ellipse(mouseX, 100, 25, 25); ellipse(mouseX, 200, 25, 25); ellipse(mouseX, 300, 25, 25); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gameDraw()\n{\n\tstate.gameDraw();\t\n\t/* repeat */\n\trequestAnimationFrame(gameDraw);\n}", "function draw(){\n//Add the clearRect method as shown to clear the canvas with each execution of the draw function.\n\tctx.clearRect(0, 0, canvas.width, canvas.height);\n\n\tif(lives<=0 || time<=0){\n\t\tplay ...
[ "0.8443535", "0.79860985", "0.7867873", "0.7852261", "0.7807818", "0.77703416", "0.7751932", "0.7734554", "0.77323276", "0.77323276", "0.77323276", "0.7715219", "0.7685584", "0.7681761", "0.7660041", "0.7660029", "0.76566064", "0.76503354", "0.764775", "0.7645775", "0.764123"...
0.0
-1
Brings in data (JSON) to display in table
function displayResults(redditLinks) { // console.log(redditLinks + "redditlinks here"); // console.log(redditlinks[0].id); // var something = JSON.stringify(redditlinks); // console.log(something.data); //Empty the Table // for(var i=0; i<redditLinks.length; i++) { // $("#articles").tex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTableDataFromJSON() {\n\n }", "function displayData(data){ \n tbody.text(\"\")\n data.forEach(function(sighting){\n new_tr = tbody.append(\"tr\")\n Object.entries(sighting).forEach(function([key, value]){\n new_td = new_tr.append(\"td\").text(value)\t\n })\n})}", "funct...
[ "0.76024944", "0.7433475", "0.7391113", "0.7324216", "0.7312262", "0.7310918", "0.7301873", "0.7301873", "0.7291497", "0.7291497", "0.7263478", "0.72610515", "0.72571707", "0.7204702", "0.71834695", "0.71422213", "0.7104225", "0.71036375", "0.7087458", "0.7086322", "0.7022581...
0.0
-1
create a pattern function
function circlePattern(radius, color) { var radius = radius; context.fillStyle = color; //begin drawing the circle context.beginPath(); context.arc(centerX, centerY, radius, 0, 2 * Math.PI); context.fill(); context.closePath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Pattern() {\n }", "function patternFactory() {\n var len,\n j,\n newPattern,\n funcs = arguments; // each argument is a pattern being combined\n\n len = funcs.length;\n\n for (j = 0; j < len; j += 1) {\n if (typeof funcs[j] !== \"fu...
[ "0.7682013", "0.73877686", "0.7184328", "0.71083045", "0.6957135", "0.6627508", "0.6564799", "0.6564799", "0.638338", "0.6315151", "0.62768704", "0.6243569", "0.6205162", "0.6201096", "0.6186421", "0.61810607", "0.6075753", "0.60597", "0.60588133", "0.6032687", "0.60236263", ...
0.0
-1
Set the start time for this timer
setStart(pDateTime) { // If this is a Luxon DateTime, we are golden. if (typeof(pDateTime) === 'number') this.StartTime = pDateTime; else if (typeof(pDateTime) === 'string') { this.StartTime = Date.parse(pDateTime); } else this.StartTime = Date.now(); // If the EndTime isn't set or is less than...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startTimer() {\n this.startTime = Date.now();\n }", "set startTime(value) { this._startTime = value || new Date(); }", "start_time(val) {\n this._start_time = val;\n return this;\n }", "function startTimer() {\n if (self._timeout) {\n clearTimeout(self._timeout);\n }\n self._timeout ...
[ "0.73664093", "0.73308146", "0.7279801", "0.71554947", "0.71554947", "0.7128579", "0.70927244", "0.6929451", "0.68970567", "0.6821216", "0.6807156", "0.6793453", "0.6787566", "0.67838115", "0.6734367", "0.6732825", "0.6711179", "0.6688242", "0.66869426", "0.66425914", "0.6604...
0.0
-1
Set the end time for this timer
setEnd(pDateTime) { // If this is a Luxon DateTime, we are golden. if (typeof(pDateTime) === 'number') this.EndTime = pDateTime; else if (typeof(pDateTime) === 'string') { this.EndTime = Date.parse(pDateTime); } else this.EndTime = Date.now(); // If the StartTime isn't set or is greater than th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_stopTimer() {\n this._tock.end();\n }", "function setTimer() {\n time--;\n\n timerEl.textContent = time;\n\n if (time <=0)\n endQuiz()\n }", "stopTimer() {\n if (this.start) {\n this.totalTime += new Date().getTime() - this.start;\n }\n }", "funct...
[ "0.64968735", "0.64857525", "0.6392149", "0.6379621", "0.63765943", "0.6354408", "0.6323572", "0.63232684", "0.6306789", "0.63003933", "0.6249435", "0.6247609", "0.6203135", "0.6185194", "0.61651593", "0.6127528", "0.61047816", "0.6028902", "0.6013251", "0.6007637", "0.599171...
0.61260164
16
Example POST method implementation:
async function postData(url = '', data = {}) { // Default options are marked with * const response = await fetch(url, { method: 'POST', // *GET, POST, PUT, DELETE, etc. mode: 'cors', // no-cors, *cors, same-origin cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached credenti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postRequest() {\n // TODO\n}", "function POST(){\n \n}", "post(url, body, options = {}) {\n return this.request('POST', url, addBody(options, body));\n }", "function postRESTlet(datain) {\n\n}", "function Post() {}", "function handlePost() {\n\tvar bodyStr = $.request.body ? $.request.bo...
[ "0.7490199", "0.71357495", "0.7128225", "0.6975604", "0.6901487", "0.6881401", "0.6873031", "0.68466735", "0.68466735", "0.68466735", "0.68466735", "0.68466735", "0.6845591", "0.67787445", "0.6692046", "0.66535485", "0.65688956", "0.6541765", "0.65206856", "0.6491015", "0.648...
0.0
-1
Reads the component's transformation tag, texture tag, material tag and children
readingComponent() { this.readingCompTrans(this.element.getElementsByTagName('transformation')[0]); this.readingTextures(this.element.getElementsByTagName('texture')[0]); this.readingMaterials(this.element.getElementsByTagName('materials')[0]); this.readingAnimations(this.element.get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "readingTextures(textureElem) {\n\n if (textureElem == null)\n this.graph.onXMLError(\"components:: it must have one texture block.\");\n\n var id = this.reader.getString(textureElem, 'id');\n this.cgfTextureId = id;\n\n if (id == \"inherit\") {\n this.cgfText...
[ "0.6710035", "0.6372976", "0.60785", "0.59493434", "0.56800014", "0.549557", "0.5372558", "0.535852", "0.5344507", "0.52753526", "0.52541447", "0.52360255", "0.51852685", "0.5094339", "0.5091435", "0.50513816", "0.50398237", "0.5031852", "0.49981016", "0.4993346", "0.49375454...
0.7235816
0
Reads the component's transformation tag
readingCompTrans(transElem) { //now we have to see if we heave transformationref //or the translates, rotates and scales var transRef = transElem.getElementsByTagName('transformationref'); if (transRef.length == 1) { let id = this.reader.getString(transRef[0], 'id'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTransform() {\n if (this.__transformComponent == null) {\n this.__transformComponent = this.getComponentByComponentTID(_components_WellKnownComponentTIDs__WEBPACK_IMPORTED_MODULE_0__[\"WellKnownComponentTIDs\"].TransformComponentTID);\n }\n return this.__transformComponent;\n ...
[ "0.6277297", "0.6226578", "0.6106186", "0.60973287", "0.600723", "0.600723", "0.600723", "0.600723", "0.5490983", "0.52748805", "0.52650654", "0.524483", "0.52397215", "0.51694757", "0.51578474", "0.5150764", "0.5125445", "0.5125445", "0.5125445", "0.5125445", "0.5125445", ...
0.7226795
0
Reads the component's animation tag
readingAnimations(animationElem) { if (typeof animationElem != 'undefined') { var animations = animationElem.getElementsByTagName('animationref'); for (let animation of animations) { var id = this.reader.getString(animation, 'id'); if (typeof this....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "readingComponent() {\n this.readingCompTrans(this.element.getElementsByTagName('transformation')[0]);\n this.readingTextures(this.element.getElementsByTagName('texture')[0]);\n this.readingMaterials(this.element.getElementsByTagName('materials')[0]);\n this.readingAnimations(this.el...
[ "0.6302055", "0.6211099", "0.6211099", "0.5958871", "0.5950864", "0.5948869", "0.5948869", "0.59245205", "0.59245205", "0.5874538", "0.58643013", "0.58643013", "0.58550733", "0.5751233", "0.5751233", "0.5751233", "0.5751233", "0.5729591", "0.5729591", "0.57062894", "0.5706289...
0.61210907
3
Reads the component's material tag
readingMaterials(materialElem) { var materials = materialElem.getElementsByTagName('material'); if (materials.length == 0) this.graph.onXMLError("components:: it must have at least one material block."); let i = 0; for (let material of materials) { var id =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getMaterial(_name) {\n return this.Materials[_name];\n }", "get material() {\n return this.viewer == null ? null : this.viewer.material;\n }", "function getMaterialFill(datum){\n let material = datum.material;\n return materialColors[material];\n}", "getSelect...
[ "0.65608495", "0.6438972", "0.61850494", "0.61417097", "0.6002439", "0.58507895", "0.5820472", "0.5774371", "0.57665616", "0.5746287", "0.57372886", "0.5723725", "0.5719038", "0.5719038", "0.56805265", "0.56365556", "0.55269635", "0.55167", "0.55167", "0.55097497", "0.5509749...
0.6862832
0
Reads the component's texture tag
readingTextures(textureElem) { if (textureElem == null) this.graph.onXMLError("components:: it must have one texture block."); var id = this.reader.getString(textureElem, 'id'); this.cgfTextureId = id; if (id == "inherit") { this.cgfTexture = null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get texture() {}", "get texture() {return this._lastValidTexture.object;}", "get texture() {\n return this.texture_;\n }", "get texture() {\n return textureAsset.getGFXTexture();\n }", "getBufferTexture(name) {\n\t\treturn this.bufferTextures.get(name);\n\t}...
[ "0.74684846", "0.6571758", "0.655798", "0.6474528", "0.63080984", "0.62322", "0.6138476", "0.6080436", "0.598606", "0.59739935", "0.58450073", "0.5816081", "0.5744531", "0.57031745", "0.5691285", "0.56849456", "0.56849456", "0.56849456", "0.56849456", "0.5640786", "0.56357056...
0.70096976
1
Reads the component's children. Adds component's primitives children to the graph scene.
readingChildren(childrenElem) { //taking care of componentref var components = childrenElem.getElementsByTagName('componentref'); for (let component of components) { this.componentsRefId.push(this.reader.getString(component, 'id')); } var primitives = children...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async readChildren () {\n return this._children\n }", "async readChildren () {\n return this._children\n }", "GetComponentsInChildren() {}", "GetComponentsInChildren() {}", "GetComponentsInChildren() {}", "GetComponentsInChildren() {}", "getChildren() {\n if ( this._baseComponent ) {\n ...
[ "0.65482163", "0.65482163", "0.59962887", "0.59962887", "0.59962887", "0.59962887", "0.5835583", "0.57796615", "0.5735819", "0.5703282", "0.56500405", "0.56500405", "0.5631634", "0.5612908", "0.55741", "0.5571637", "0.5491937", "0.5460914", "0.5456653", "0.5451687", "0.545168...
0.7129403
0
Reads the component's children. Adds component's components children to the graph scene.
conectingChildrens() { for (let componentRefId of this.componentsRefId) { if (typeof this.graph.components[componentRefId] == 'undefined') { this.graph.onXMLError("components:: it doens't have any component with that id, " + componentRefId + "."); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async readChildren () {\n return this._children\n }", "async readChildren () {\n return this._children\n }", "readingChildren(childrenElem) {\n //taking care of componentref\n var components = childrenElem.getElementsByTagName('componentref');\n\n for (let component of component...
[ "0.6939177", "0.6939177", "0.68904155", "0.6365523", "0.6365523", "0.6365523", "0.6365523", "0.6183217", "0.59233606", "0.5895597", "0.58661747", "0.5777035", "0.5745202", "0.5745202", "0.57420486", "0.56794876", "0.56793666", "0.567612", "0.5672858", "0.5651448", "0.5639665"...
0.6515692
3
Depthfirst display of components.
display() { this.scene.pushMatrix(); this.scene.multMatrix(this.transformationMatrix); if ((typeof this.cgfTexture != 'undefined') && this.cgfMaterial != null) this.cgfMaterial.setTexture(this.cgfTexture); if (this.cgfMaterial != null) this.cgfMaterial.apply...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "draw() {\n\t\t\t\t//sort by depth\n\t\t\t\tthis.sort(function (a, b) {\n\t\t\t\t\treturn a.depth - b.depth;\n\t\t\t\t});\n\n\t\t\t\tfor (var i = 0; i < this.size(); i++) {\n\t\t\t\t\tthis.get(i).display();\n\t\t\t\t}\n\t\t\t}", "print_in_dfs() {\n let layer = 0;\n for (let i = 0; i < this.root.chil...
[ "0.6790991", "0.6644715", "0.65904886", "0.63068545", "0.6153267", "0.6068724", "0.6051251", "0.5995386", "0.59286046", "0.5829446", "0.5822667", "0.58099824", "0.57969165", "0.57735294", "0.5760173", "0.5755705", "0.57528156", "0.5745593", "0.5745064", "0.5726893", "0.570709...
0.6088037
5
Prevent window from being scrolled programatically so that the modal is positioned correctly and to prevent scrollIntoView from scrolling the window.
render() { const { actions, appearance, autoFocus, body, children, components, footer, header, height, isBlanketHidden, isChromeless, isHeadingMultiline, isOpen, onClose, onCloseComplete, onOpenComplete, onStackCha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function noScroll() {\n window.scrollTo(0, 0)\n}", "function noScrollFn() {\n window.scrollTo(scrollPosition ? scrollPosition.x : 0, scrollPosition ? scrollPosition.y : 0);\n }", "function openModal() {\n modal.style.display = 'block'; \n noscroll();\n}", "function noScroll() {\n window....
[ "0.68692577", "0.6861013", "0.6824261", "0.68148667", "0.6780719", "0.6757726", "0.67422193", "0.67215526", "0.6708298", "0.6708298", "0.6678707", "0.6628932", "0.6623899", "0.65484935", "0.64866716", "0.64768994", "0.64455444", "0.6436893", "0.6381426", "0.6369378", "0.63693...
0.0
-1
Function to create the pdf accept id's in array
async function createPdf(id) { id = '#' + id let pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'letter', compression: true }) console.log('id --------', document.querySelector(id)) // Converting all the element into canvas and storing them in an array ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function properSerials(){\n\t\tj= 0; \n\t\tfor (j=1; j <= finalDataForPdf.length ; j++){\n\t\ttext= \"\"+j+\".\";\n\t\tfinalDataForPdf[j][0] = {text}\n\t\t};\n}", "createPDFFile(uid, barcodeArray, barcodePNGArray, real, qr) {\r\n var doc = new PDFDocument({\r\n layout: \"landscape\",\r\n ...
[ "0.62413764", "0.6149967", "0.61154413", "0.5887082", "0.5866351", "0.5856178", "0.5850278", "0.5826882", "0.5670967", "0.56688213", "0.5664642", "0.5597444", "0.5572085", "0.555881", "0.55536145", "0.5545944", "0.5544921", "0.55326897", "0.5529784", "0.5522052", "0.5497718",...
0.60450685
3
Shows the following Buttons : 'pageNavButton' is displayed as 'none' by default : 'informationButton' is displayed as 'none' by default : 'descriptionToggle' buttons / collectionOfButtons is displayed as 'none' by default : 'locationToggle' buttons / collectionOfButtons2 is displayed as 'none' by default
function showButtons() { pageNavButton.style.display = 'inherit'; pageNavButton.style.display = 'inline-block'; informationButton.style.display = 'inherit'; informationButton.style.display = 'inline-block'; for(var i = 0; i < collectionOfButtons.length; i++) { collectionOfButtons[i].style.display = 'inherit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _toggleButtons(){\n\n\t\t\t\tif($nav.children('.fn-previous-button').is(':hidden')){\n\t\t\t\t\t$nav.children('.fn-previous-button, .fn-next-button').show();\n\t\t\t\t \t$nav.children('.fn-close-button').hide();\n\t\t\t\t }\n\t\t\t\telse {\n\t\t\t\t\t$nav.children('.fn-previous-button, .fn-next-button').h...
[ "0.7030002", "0.6814289", "0.6759109", "0.67492265", "0.6647853", "0.647092", "0.64429504", "0.643544", "0.63754493", "0.6339199", "0.6333028", "0.6326219", "0.63100296", "0.6304118", "0.6289361", "0.62852275", "0.62844056", "0.628277", "0.6282215", "0.6281075", "0.6271858", ...
0.8025794
0
Hides the following Div's : 'pageNavDiv' is displayed as 'block' by default : 'informationDiv' is displayed as 'block' by default : 'descriptionDiv's are displayed as 'tablecell' by default : 'locationDiv's are displayed as 'tablecell' by default
function hideDivs() { pageNavHeader.style.marginBottom = '1em'; pageNavButton.innerHTML = 'Show Quick Links'; pageNavDiv.style.display = 'none'; informationHeader.style.marginBottom = '1em'; informationButton.innerHTML = 'Show Information'; informationDiv.style.display = 'none'; for(var i = 0; i < collection...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hide_info()\r\n{\r\n $('info_div').hide();// = 'hidden';\r\n}", "function showHide() \n{ \n if (document.querySelector(\"div.grid_container-2\").style.display!==\"none\") {\n document.querySelector(\"div.grid_container-2\").style.display=\"none\";\n document.getElementById(\"2\").sty...
[ "0.6620775", "0.6587741", "0.6554749", "0.6446761", "0.6421876", "0.6399098", "0.63948256", "0.63331896", "0.6330007", "0.6301654", "0.6286273", "0.6276152", "0.62308824", "0.62124145", "0.6200018", "0.6168731", "0.61647815", "0.61384314", "0.6137556", "0.61240613", "0.611172...
0.75431114
0
=== Create a Stark ===========================
function Stark(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SharkSpotter(opts) {\n\tmod_assert.object(opts, 'opts');\n\tmod_assert.object(opts.log, 'opts.log');\n\tmod_assert.string(opts.moray, 'opts.moray');\n\tmod_assert.string(opts.shark, 'opts.shark');\n\tmod_assert.string(opts.nameservice, 'opts.nameservice');\n\tmod_assert.optionalNumber(opts.begin, 'opts.be...
[ "0.56461644", "0.5262656", "0.5262656", "0.4977699", "0.4946632", "0.49163944", "0.49119106", "0.48789874", "0.4863522", "0.48584205", "0.48024604", "0.47959092", "0.47959092", "0.47903663", "0.4787746", "0.47779763", "0.4764281", "0.4759287", "0.47510514", "0.47510514", "0.4...
0.7590728
0
=================================================== Check link ===================================================
function check(url,e) { GM_xmlhttpRequest({ method: "GET", timeout: "10000", // 10s url: url, headers: { "User-Agent": "Mozilla/5.0", 'Accept': 'text/xml', 'Referer': "" }, onload: function(response) { var res = response.responseText; // Dead if(/men_file_lost\.jpg/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkLink() {\n var href = this.href;\n if (pattern.test(href)) {\n // Show context menu on right click\n $(this).bind('contextmenu', function(e) {\n targetHref = href;\n $('#gview-cmenu').removeClass('gview-hidden').css(\n {'left':e.pageX, 'top':e.pageY})[0].focus();\n ...
[ "0.77902776", "0.75281155", "0.73405296", "0.727555", "0.72363687", "0.71617234", "0.7141599", "0.69706494", "0.6956105", "0.6930987", "0.69058275", "0.68927807", "0.68833965", "0.6838203", "0.6821858", "0.6796799", "0.67874235", "0.676617", "0.6701398", "0.6675854", "0.66530...
0.0
-1
Retrieve generic details about the node.
getNodeInformation() { return this.query('/', 'GET'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNodeInformation() {\r\n _doGet('/node/info');\r\n }", "function getNodeInformation(type) {\n $.ajax({\n method: 'GET',\n url: '/edit/getinformation?type=' + type,\n success: function (response) {\n $('#node-info').append(response);\n ...
[ "0.7514152", "0.67426056", "0.65901023", "0.6271403", "0.62121606", "0.61324656", "0.6099877", "0.5926688", "0.58792293", "0.58792293", "0.58164", "0.5799964", "0.57636017", "0.57353926", "0.5697899", "0.5663451", "0.56528884", "0.5651823", "0.5650067", "0.5600784", "0.559223...
0.7070462
1
Get the status of the Kong Node
getNodeStatus() { return this.query('/status', 'GET') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStatus() {\n\tapi({ data: \"cmd=getstatus\" },syncStatus);\n}", "function getStatus() {\n return status;\n }", "function device_status(){\n if(node.sensor.status.initialized === false){\n node.status({fill:\"red\",shape:\"ring\",text:\"disconnected\"});\n return false;\...
[ "0.6856373", "0.6716329", "0.661345", "0.6561844", "0.6556167", "0.64746356", "0.6470838", "0.6447085", "0.6444043", "0.641869", "0.6361014", "0.628606", "0.62691873", "0.6269128", "0.6202714", "0.6187416", "0.61254066", "0.6071798", "0.6050329", "0.6041745", "0.60393137", ...
0.74257076
0
function which prompts the user for what action they should take
function start() { inquirer .prompt({ name: "action", type: "list", message: "What would you like to do?", choices: [ "View Products for Sale", "View Low Inventory", "Add to Inventory", "Add New P...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UserInputs(action, input) {\n switch (action) {\n case \"concert-this\":\n runBandsInTown(input);\n fixString(input)\n break;\n case \"spotify-this-song\":\n runSpotify(input);\n fixString(input)\n break;\n case \"movie-this\":\n runOmdb(input);\n fixStrin...
[ "0.77564573", "0.74372256", "0.73923296", "0.7361864", "0.73519737", "0.73270017", "0.7200751", "0.7187863", "0.7137887", "0.71224785", "0.70762116", "0.69826204", "0.6961095", "0.695858", "0.6937502", "0.69215536", "0.69117534", "0.6895512", "0.68800056", "0.68800056", "0.68...
0.0
-1
show into dashboard admin how many register has into database
dashboard(){ return new Promise((resolve, reject)=>{ conn.query(`SELECT (SELECT COUNT(*) FROM tb_contacts) AS nrcontacts, (SELECT COUNT(*) FROM tb_menus) AS nrmenus, (SELECT COUNT(*) FROM tb_reservations) AS nrreservations, (SELECT COUNT(*) FROM tb_users) AS nrusers; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static countUsers(){\n console.log('there are 50 users');\n }", "function cntRegHousehold(req, res, next){\n var db = require('../../lib/database')();\n db.query(\"SELECT COUNT(*) AS CNT FROM tbluser WHERE strStatus = 'Registered' AND strType = 'Household Worker' \", function(err, results){\n if (err) r...
[ "0.605164", "0.59460396", "0.5893503", "0.5818072", "0.5781522", "0.5729809", "0.5713752", "0.5706738", "0.56992847", "0.56992847", "0.5667837", "0.56347454", "0.5626892", "0.5615211", "0.5534002", "0.5458079", "0.54578453", "0.5453401", "0.5452848", "0.5451955", "0.54284173"...
0.5525492
15
function to be called by the event listener for the button with id generate
async function submit(){ // pull in values form the user inputs on the webpage getUserInput() // get the location data let data = await getData(geoURL) postData('/getLatLon', data); // let x = await postData('/getLatLon', data); // console.log(x) // update user i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callToGenerate() {\n let btnGenerate = document.querySelector('.btn_generate')\n btnGenerate.addEventListener('click', function() {\n GenTable()\n })\n}", "function buttonOnClick(e) {\r\n\tvar obj = targetElement(e);\r\n\tvar id = obj.id;\r\n\tvar namearray = new Array();\r\n\tidarray = ...
[ "0.6892312", "0.6859561", "0.678621", "0.661228", "0.66070354", "0.6577032", "0.6546764", "0.65441924", "0.6507643", "0.63794845", "0.63297844", "0.6322352", "0.63106793", "0.62784064", "0.6277734", "0.62763494", "0.625646", "0.6242434", "0.62338436", "0.62162834", "0.6208768...
0.0
-1
Function that controls opening of the pageslide
function _start( direction, speed ) { var slideWidth = $pageslide.outerWidth( true ), bodyAnimateIn = {}, slideAnimateIn = {}; // If the slide is open or opening, just ignore the call if( $pageslide.is(':visible') || _sliding ) return; _sliding =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "openNextSlide() {\n if (this.animation === true) return;\n this.startAnimation();\n\n this.current_page++;\n this.next_button.blur();\n this.openSlide();\n }", "openSlide() {\n this.reposSlide();\n this.dropAnimation();\n ...
[ "0.7192383", "0.68282247", "0.67881525", "0.675621", "0.6753798", "0.6623583", "0.65791065", "0.65772426", "0.6539064", "0.65125203", "0.65084094", "0.6469638", "0.64520264", "0.64426297", "0.64383113", "0.6437337", "0.64168715", "0.64143634", "0.6373914", "0.6355935", "0.632...
0.0
-1
! vuerouter v3.1.3 (c) 2019 Evan You
function Dr(e){return Object.prototype.toString.call(e).indexOf("Error")>-1}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}", "private public function m246() {}", "function TM(t,e,n,i,r,o,a,s){var u=(\"functio...
[ "0.59239113", "0.58903736", "0.5833187", "0.58102256", "0.57634693", "0.5732173", "0.5665377", "0.5650265", "0.5647531", "0.5626944", "0.561062", "0.56094474", "0.5606293", "0.55355585", "0.5528292", "0.5493751", "0.54901534", "0.54666305", "0.54265106", "0.54195833", "0.5414...
0.0
-1
Transforms the given SituationAware Choreography Model to a SituationAware Collaboration Model within the Editor
_transformModel(sitawareChorModel) { console.log('Received following model:'); console.log(sitawareChorModel); // the elements of the situation-aware choreography model let sitawareChorModelDefinitions = sitawareChorModel['bpmn2:definitions']; let cliMethods = this._getMethods(this.cli); let b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeModelTransform(currModel) {\n var zAxis = vec3.create(), sumRotation = mat4.create(), temp = mat4.create(), negCtr = vec3.create();\n\n // move the model to the origin\n mat4.fromTranslation(mMatrix,vec3.negate(negCtr,currModel.center)); \n \n // scale for highlighti...
[ "0.53669465", "0.53163326", "0.52146435", "0.5131532", "0.5097381", "0.5088552", "0.50870454", "0.49868977", "0.48778635", "0.47975332", "0.47796747", "0.47754818", "0.47663018", "0.47663018", "0.46998152", "0.4699365", "0.45871633", "0.45720458", "0.4555634", "0.4555634", "0...
0.64607567
0
Walks through the given choreographyModel starting at the given set of bpmn tasks
_choreography2collaborationWalk(tasks, visited, created, choreographyModelDefinitions, collaborationModelDefinitions) { if (tasks.length == 0) { return; } let currentTask = tasks.pop(); visited.push(currentTask); this._transformTaskFromChoreographyToCollaboration(currentTask, choreographyMo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getCollabPredecessorTasks(choreoTask, choreographyModel) {\n let collabPredTasks = [];\n let parentSubprocess = this._findParentSubprocess(choreoTask, choreographyModel);\n let incomingSequenceFlows;\n\n if (this._isSubprocess(choreoTask.$.id, choreographyModel)) {\n let endTasks = this._findEndT...
[ "0.64721614", "0.5925992", "0.5876595", "0.55070364", "0.54090154", "0.5366101", "0.5298048", "0.5243674", "0.52230996", "0.519641", "0.5145519", "0.5087597", "0.50572586", "0.50198525", "0.4934801", "0.49089023", "0.49061704", "0.49061704", "0.49021855", "0.49011126", "0.489...
0.656133
0
Returns the previous tasks of the given task in the current collaboration model
_getCollabPredecessorTasks(choreoTask, choreographyModel) { let collabPredTasks = []; let parentSubprocess = this._findParentSubprocess(choreoTask, choreographyModel); let incomingSequenceFlows; if (this._isSubprocess(choreoTask.$.id, choreographyModel)) { let endTasks = this._findEndTasksInSubpr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function previousTask() {\n\tif(tasks.length == 1) return;\n\thideCurrentTask();\n\tchangeCurrentIndex(-1);\n\tvar id = tasks[current_task];\n\tif(id) $(\"task-\"+id).className = \"active\";\n}", "getAllPreviousInstructions() {\r\n return this.getAllInstructions().map(c => c.previousInstruction).filter(c ...
[ "0.7253443", "0.60531044", "0.5884361", "0.58663887", "0.5784604", "0.5746285", "0.57293034", "0.5645881", "0.56438804", "0.56412315", "0.5626219", "0.5567012", "0.5562422", "0.5533281", "0.5508675", "0.5500453", "0.550041", "0.55002224", "0.54810727", "0.54592645", "0.542681...
0.61717093
1
starting point of the transformation algorithm. It performs a depth first search of the source model and sets, depending on the defined values of the source model, the correct elements in the target model. The algorithm begins with the starting situationscope, creates a evaluation subprocess, creates the execution subp...
transformModel(sourcemodel) { this._transformModel(sourcemodel); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_transformModel(sitawareChorModel) {\n console.log('Received following model:');\n console.log(sitawareChorModel);\n\n // the elements of the situation-aware choreography model\n let sitawareChorModelDefinitions = sitawareChorModel['bpmn2:definitions'];\n\n let cliMethods = this._getMethods(this.cli...
[ "0.5386814", "0.5277861", "0.5178664", "0.47514072", "0.47490442", "0.47081822", "0.46827814", "0.4614406", "0.45778626", "0.4538628", "0.45307624", "0.45028177", "0.44927457", "0.4472132", "0.44582516", "0.44553012", "0.4445588", "0.44450217", "0.4342497", "0.4338685", "0.43...
0.0
-1
If index.bs exists, start watching it and run a build. Otherwise retry with a truncated exponential delay until it starts to exist.
function tryWatch(delay) { if (fsWatcher !== undefined) { fsWatcher.close(); fsWatcher = undefined; } try { fsWatcher = fs.watch(INPUT, onChange); build(); } catch (e) { if (e.code === 'ENOENT') { log(`${INPUT} not there right now. Waiting a bit.`); if (delay === undefined) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function watchIndex() {\n gulp.watch(config.assets.client.index, gulp.series(buildIndex));\n}", "async function run() {\n const location = await triggerBuildReturnLocation({})\n await sleep(8000) // Build # isn't available immediately\n const number = await getBuildNumberFromQueue(location)\n await sleep(30...
[ "0.60044986", "0.5905685", "0.5493808", "0.5106201", "0.5071832", "0.49910238", "0.4968522", "0.49647197", "0.4917469", "0.49034667", "0.4898618", "0.48966402", "0.48744267", "0.48744267", "0.48526636", "0.48253462", "0.48223233", "0.47853878", "0.47831452", "0.47732446", "0....
0.61905265
0
nova verzija funkcije ucitaj podatke
function ucitajPodatkeBaza() { var ajax = new XMLHttpRequest(); ajax.open("GET", "http://localhost:8080/getRezervacije", true); ajax.send(); ajax.onreadystatechange = function() { if (ajax.readyState == 4 && ajax.status == 200) { // ucitati u periodicnaZauzeca i u VanrednaZauzeca let jsonText = JSO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comportement (){\n\t }", "function mostraNotas(){}", "function fl_outToOznei_aman ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1...
[ "0.64703614", "0.61583555", "0.6073329", "0.6064742", "0.597032", "0.59677196", "0.5945514", "0.5924709", "0.5904443", "0.5860691", "0.5853582", "0.5835891", "0.5835383", "0.5830563", "0.5829896", "0.58173454", "0.5800634", "0.57970154", "0.57845926", "0.5779331", "0.5773362"...
0.56412977
36
Function to define javascript subclass
function inherit(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); // delegate to prototype subClass.prototype.Constructor = subClass; // update constructor on prototype }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SuperclassBare() {}", "function SuperclassBare() {}", "function peg$subclass(child,parent){function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();}", "function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototyp...
[ "0.70358485", "0.70358485", "0.6966534", "0.6941173", "0.67722815", "0.67722815", "0.6691782", "0.6691782", "0.66748565", "0.65602654", "0.64614314", "0.64491886", "0.6389486", "0.6304769", "0.62228715", "0.6185022", "0.61707246", "0.61707246", "0.61707246", "0.61707246", "0....
0.0
-1
function to remove the display: none of an element the script contains two DOM elements ( options and markers). They are created to hide other DOM element util KO is initialized. The display:none are moved once Ko is initialized / Google Maps Location class The application will create a Location object per location gMa...
function gMaps() { this.markers = []; this.infoWindow = new google.maps.InfoWindow({ pixelOffset: new google.maps.Size(-23, -10), maxWidth: 300 }); this.marker_animation = google.maps.Animation.DROP; this.map = map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayOntology(){\n document.getElementById(\"ontology_lookup\").style.display='';\n document.getElementById(\"geographic_location\").style.display='none';\n document.getElementById(\"map_canvas\").style.visibility='hidden';\n}", "function hideUnusedElements() {\n if (document.getElementsB...
[ "0.6552807", "0.644022", "0.6361889", "0.6333338", "0.6324814", "0.61946326", "0.61658984", "0.6106036", "0.6078821", "0.60688674", "0.6068137", "0.6053461", "0.6016122", "0.59848976", "0.59783804", "0.5966911", "0.5955433", "0.59438986", "0.59423256", "0.5928805", "0.5927803...
0.0
-1
searchBox.getPlaces() to look for a new location Newyork Central Square London Picadilly Circus or any Full address
function boxSearch() { var self = this.self; var newLocation = self.newLocation(); /* looking for a new location */ if (newLocation.trim().length > 0) { var searchedPlaces = searchBox.getPlaces(); var places = searchedPlaces.length; if (places >= 1) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchBoxPlaces(searchBox){\n hideMarkers(placeMarkers);\n var places = searchBox.getPlaces();\n // For each place, get the icon, name and location.\n createMarkersForPlaces(places);\n if (places.length == 0){\n window.alert('We did not find any places matching that search!');\n }\n...
[ "0.761538", "0.76075166", "0.7521717", "0.7449236", "0.74452305", "0.7435715", "0.74172056", "0.73187554", "0.7274982", "0.71687347", "0.7167604", "0.7124609", "0.7113943", "0.70958775", "0.70401", "0.7017131", "0.7007487", "0.70074403", "0.69925225", "0.6986202", "0.6968287"...
0.7984862
0
END of Google maps location class / Application Model view
function ViewModel() { /* * A factory function we can use to create binding handlers for specific * keycodes. */ var ENTER_KEY = 13; function keyhandlerBindingFactory(keyCode) { return { init: function(element, valueAccessor, allBindingsAccessor, data, bindingContext) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function locationView() {\r\n this.searchText = null;\r\n this.locationName = null;\r\n this.template = null;\r\n\r\n //this.load = function (albumId) { };\r\n }", "function Location(data){\n var self = this;\n self.location = {lat: data.lat, lng: data.lng};\n self.name = ...
[ "0.70693266", "0.66002536", "0.65370387", "0.6475617", "0.6427619", "0.6411135", "0.638872", "0.63525736", "0.6348913", "0.63336647", "0.63124204", "0.62835515", "0.62775534", "0.6272799", "0.62663853", "0.6253089", "0.6215468", "0.6193423", "0.61930233", "0.6191845", "0.6153...
0.0
-1
Location is a subclas of gMaps
function Location(location) { gMaps.call(this, location); // properties from gMaps this.name = ko.observable(location.name); this.city = ko.observable(location.city); this.mapcenter = ko.observable(location.mapcenter); this.selected = ko.observable(location.selected); thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Location(obj) { this.obj = obj; }", "function location(lat, longi) {\n this.latitude = lat;\n this.longitude = longi;\n}", "function Location(address, latitude, longitude){\n\tthis.address=address;\n\tthis.latitude=latitude;\n\tthis.longitude=longitude;\n\tthis.locatedItems=[];\n}", "function ...
[ "0.68296856", "0.66609746", "0.66129863", "0.64208996", "0.63723385", "0.6280659", "0.6234936", "0.6189886", "0.61512023", "0.6148428", "0.6148428", "0.6141719", "0.6077778", "0.6077397", "0.60678595", "0.6064418", "0.60422885", "0.599419", "0.59882087", "0.5982337", "0.59673...
0.6743469
1
function to return string starting with prefix
function stringStartsWith(string, prefix) { return string.slice(0, prefix.length) == prefix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startswith (string, prefix)\n{\n\treturn string.indexOf(prefix) == 0;\n}", "function startsWith(str, prefix)\n{\n return (str.substr(0, prefix.length) == prefix);\n}", "function strStartsWith(str, prefix)\n{\n if(typeof str != \"string\")\n {\n return false;\n }\n return str.inde...
[ "0.76581264", "0.7607418", "0.7505791", "0.7483576", "0.73761195", "0.7345613", "0.7345047", "0.7345047", "0.73336613", "0.7300098", "0.7274186", "0.72724605", "0.726684", "0.7242505", "0.7164136", "0.7124621", "0.70926", "0.69959503", "0.6966612", "0.6966612", "0.69507307", ...
0.7635664
1
function for navigating photo viewer The direction is either positif or negatif
function navigate(direction) { var numberPhotos = self.placePhotos().length; var current = self.currentIndex(); var next = (current + direction) % numberPhotos; if (next < 0) { next = numberPhotos - 1; } self.currentPhoto(self.placePhotos()[next]); sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function navigate(direction) {\n // hide current image\n current.style.display = 'none';\n //change the index\n index += direction;\n\n // make sure the index isn't negative when using prev\n if (direction === -1 && index < 0) {\n index = amount -1;\n }\n // when the index gets too high and it can't be ...
[ "0.68239725", "0.66292214", "0.6179536", "0.5942894", "0.5936763", "0.5858127", "0.58314806", "0.58287466", "0.58170736", "0.5747701", "0.5652592", "0.56105834", "0.5544028", "0.55203", "0.5510617", "0.5497512", "0.54966795", "0.5492052", "0.54812694", "0.547004", "0.5462854"...
0.71129
0
function hide or show results list depending on the screen resizing ,
function showResults() { self.showResults(true); if (self.numPlaces() === 0) { self.showResults(false); return; } var winWidth = window.innerWidth; if (winWidth > 750) { self.showResults(true); self.showSlider(true); } els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showList () {\n const list = $('.list');\n //there is the only way to find out if the media-query condition is fulfilled\n //z-index for the list is set only in media-query\n //we cannot take width property as a criterion since jQuery returns it in pixels while z-index is easier to compare\n if (lis...
[ "0.7431794", "0.71555805", "0.6940424", "0.6689111", "0.66481596", "0.6636938", "0.6575141", "0.65559775", "0.6468632", "0.63941985", "0.63931686", "0.6379985", "0.62901986", "0.6272391", "0.6268429", "0.6262101", "0.61474687", "0.61305994", "0.61285466", "0.61265874", "0.610...
0.7058538
2
function to open first screen and add start quiz button
function openingPage() { openScreen = "<p class='text-center'><a class='btn btn-secondary btn-md btn-block start-button' href='#' role='button'>Start Quiz</a></p>"; $("#mainArea").append(openScreen); //using append function to add the start button to the open screen. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startScreen() {\n\t\t\tinitialScreen =\n\t\t\t\t\"<p class='text-center main-button-container'><a class='btn btn-default btn-lg btn-block start-button' href='#' role='button'>Start Quiz</a></p>\";\n\t\t\t$( \".mainArea\" )\n\t\t\t\t.html( initialScreen );\n\t\t}", "function startQuiz() {\n displayNo(...
[ "0.78969127", "0.7768847", "0.7532558", "0.7513486", "0.7503629", "0.7503514", "0.74786395", "0.74558616", "0.7455113", "0.74320334", "0.7408898", "0.73752666", "0.7328337", "0.7317669", "0.7308943", "0.7308943", "0.7308943", "0.7307875", "0.7284409", "0.72842807", "0.7279467...
0.722953
23
var to hold all HTML elements
function generateQuestions() { quizHTML = "<p class='text-center timer-p'>Time Remaining: <span class='timer'>30</span></p>" + "<p class='text-center'>" + questionArray[position] + "</p>" + "<button class='answers btn-secondary ml-3 mt-3 mb-1 p-2'>A. " + answerArray[position]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getElementsFromHTML() {\n toRight = document.querySelectorAll(\".to-right\");\n toLeft = document.querySelectorAll(\".to-left\");\n toTop = document.querySelectorAll(\".to-top\");\n toBottom = document.querySelectorAll(\".to-bottom\");\n }", "get $elements() {\n if (thi...
[ "0.67471015", "0.6577203", "0.65631336", "0.65089494", "0.64719737", "0.6460316", "0.6460316", "0.64347667", "0.6329015", "0.63237435", "0.62480676", "0.6217627", "0.62116915", "0.61939806", "0.61456174", "0.61310005", "0.6128689", "0.61246896", "0.6042131", "0.60371906", "0....
0.0
-1
function if no answer till time is up
function timeoutLoss() { incorrectOnes++; quizHTML = "<p class='text-center'>Time Remaining: <span class='timer'>" + counter + "</span></p>" + "<p class='text-center'>Time's Up! The correct answer was: " + correctAnswers[position] + "</p>" + "<img class='result-img' src='assets/images/timeout.jpg'>"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkTime() {\n setTimeout(function() {\n if (!game.quiz[game.p].answered && !cStatus.feedback.spoken && !game.german && !cStatus.speaking) {\n tellJoke();\n // checkTime();\n }\n }, LIMIT);\n}", "function answerCheck() {\n if (timeLeftPlay === 0) {\n pauseTimer = tru...
[ "0.7098126", "0.6998193", "0.6946313", "0.6928396", "0.69156456", "0.686289", "0.6826387", "0.67738825", "0.6748797", "0.66434485", "0.6614595", "0.66113406", "0.6579854", "0.6557355", "0.6531332", "0.6501726", "0.64892304", "0.6462537", "0.6446359", "0.64156705", "0.6400417"...
0.0
-1
function if user got correct answeer
function generateWin() { correctOnes++; //increament win by 1 quizHTML = "<p class='text-center'>Time Remaining: <span class='timer'>" + counter + "</span></p>" + "<p class='text-center'>Correct! The answer is: " + correctAnswers[position] + "</p>" + "<img class='result-img' src='assets/images/correctan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function answerIsIncorrect () {\r\n feedbackForIncorrect();\r\n}", "function checkmarried(married) {\n\nif(married === null) return null;\n\tmarried = married.toLowerCase();\n\t\n\n\tif (married === expectedvalue1 || married === expectedvalue2) {\n\t\talert('Congratulations!! your is answer is correct');\n ...
[ "0.69796985", "0.6802148", "0.6757049", "0.6726552", "0.66584504", "0.6588336", "0.6544826", "0.6542328", "0.654207", "0.65198666", "0.65126896", "0.6500992", "0.649272", "0.6480819", "0.6433063", "0.64259696", "0.6397048", "0.6391833", "0.6378621", "0.63784504", "0.637391", ...
0.0
-1
this function at last question
function wait() { if (position < 9) { //this number can be changed depending on how many qustion we have. position++; generateQuestions(); counter = 30; timerWrapper(); } else { finalScreen() }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "transient protected internal function m189() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "transient final protected i...
[ "0.67992455", "0.67596555", "0.6721944", "0.6616309", "0.66013587", "0.6595046", "0.6307017", "0.62308407", "0.61726254", "0.61122096", "0.60764945", "0.6059101", "0.6028897", "0.6022344", "0.59864044", "0.5944401", "0.59013385", "0.58903724", "0.58419704", "0.5822483", "0.57...
0.0
-1
needed as regular equality check is not possible w/ regex
function regexValidate(x, y) { return (x instanceof RegExp) && (y instanceof RegExp) && (x.source === y.source) && (x.global === y.global) && (x.ignoreCase === y.ignoreCase) && (x.multiline === y.multiline); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchEqual() {\n\t\tvar pattern = /^=/;\n\t\tvar x = lexString.match(pattern);\n\t\tif(x !== null) {\n\t\t\treturn true;\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function RegExp$prototype$equals(other) {\n return other.source === this.source &&\n other.global === this.global &&\...
[ "0.70233583", "0.698033", "0.698033", "0.68399096", "0.6511998", "0.6459517", "0.6405109", "0.62911195", "0.62911195", "0.6284336", "0.6278284", "0.62353784", "0.6189765", "0.6183942", "0.6177816", "0.6162857", "0.6162857", "0.61375314", "0.6116293", "0.6113605", "0.6085452",...
0.6367399
7
local variables kick start the app
function bootstrap() { MODULE.Controller.init(MODULE.Model, MODULE.View); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startApp() {\n //first calls, default dataset? \n }", "start() {\n //DO BEFORE START APP CONFIGURATION/INITIALIZATION\n super.start();\n }", "start() {\n console.log(\"Die Klasse App sagt Hallo!\");\n }", "function startApp() {\n\tswitch (arg_1) {\n\t\tca...
[ "0.7577945", "0.7302711", "0.729446", "0.72682023", "0.72563386", "0.7150709", "0.7032159", "0.6972265", "0.69365495", "0.6865681", "0.68447673", "0.6840021", "0.67841256", "0.67738724", "0.6665898", "0.6613039", "0.659601", "0.65445864", "0.6509025", "0.6501729", "0.6495402"...
0.0
-1
Cargar CSV una vez seleccionada se cargara el CSV
loadCSV(e) { var vm = this if (window.FileReader) { var reader = new FileReader(); reader.readAsText(e.target.files[0]); // Handle errors load reader.onload = function(event) { var csv = event.target.result; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function importPunkteCSV() {\n var files = document.getElementById(\"importPunkteCSV\").files;\n if (files.length < 1) {\n return;\n }\n var reader = new FileReader();\n // Closure to capture the file information.\n reader.onload = (function (theFile) {\n return function (e) {\n ...
[ "0.67779887", "0.67578816", "0.6654558", "0.66433424", "0.6596133", "0.6589837", "0.65887135", "0.6552255", "0.6508565", "0.63874966", "0.6367437", "0.6366419", "0.6312027", "0.628311", "0.6266596", "0.6248366", "0.6240248", "0.6191761", "0.61780524", "0.6177044", "0.6162997"...
0.6598103
4
Esto es para que te concatane el texto con el nombre de la imagen que se guardo en la base de datos
cargarunaImagen(valorI){ return 'media/ImagenesDeIncidencia/'+valorI }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ver() { //funcion que recorrera las imagenes y las mostrara\n let contenido=\"\";\n\n for(let i=0;i<fileVal.length;i++){\n let imgtemporal=fileVal[i].name;\n insetar(imgtemporal);\n \n }\n\n}", "function CreateImgName(longName,ending){\n if(longName.length > 1 ){\n switch(ending...
[ "0.6313659", "0.63064986", "0.6182901", "0.6154096", "0.6152548", "0.60617733", "0.6047796", "0.6031525", "0.59707034", "0.5915043", "0.5909917", "0.59031343", "0.5827013", "0.5797304", "0.57966983", "0.57935226", "0.5793169", "0.57881063", "0.5737998", "0.57302374", "0.56845...
0.59869057
8
Boton para ordenar segun lo que precciones en que tabla
orderByIncidenciaTecnico(key){ if(this.orderBy.order == 'desc'){ this.orderBy.order = 'asc'; }else{ this.orderBy.order = 'desc'; } const data = new FormData(); data.set('action', 'orderbyIncidencia'); data.set('field...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comprobaciones(){\n if($('#tabla tbody tr').length <= 4){\n $('#agregarPago').attr(\"disabled\", false);\n }\n if($('#tabla tbody tr').length == 1){\n $(\"#filaInicial\").show();\n }\n comprobarMontos();\n }", "function comprobaciones(){\n if($('#tabla tbody tr').length <= 4...
[ "0.68404406", "0.68404406", "0.6643598", "0.6620329", "0.6542385", "0.6514089", "0.6464109", "0.6351181", "0.6336928", "0.6336928", "0.6332636", "0.6320052", "0.631659", "0.6311081", "0.63079226", "0.62733066", "0.6252087", "0.6237493", "0.6226361", "0.62084246", "0.6188283",...
0.0
-1
select from incidencia WHERE id not in ( SELECT Id_Incidencia FROM `tecnico_incidencia` ) OrdenartablaDepartamento
orderByDepartamento(key){ if(this.orderBy.order == 'desc'){ this.orderBy.order = 'asc'; }else{ this.orderBy.order = 'desc'; } const data = new FormData(); data.set('action', 'orderbyb'); data.set('field', this.orderB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCuponesPorIndustria(idIndustria){\n\t\n}", "function fCargaListadoA(){\n frm.hdFiltro.value = \"ICVEMODULO = \" +frm.iCveModulo.value+ \" AND INUMREPORTE NOT IN (SELECT INUMREPORTE FROM GRLREPORTEXOPINION WHERE ICVEOPINIONENTIDAD = \"+frm.iCveOpinionEntidad.value+ \" AND ICVESISTEMA = 44 AND ICVEM...
[ "0.6015589", "0.5609713", "0.54352915", "0.54327554", "0.5409782", "0.5342246", "0.5323829", "0.5312916", "0.52816427", "0.52773017", "0.5247335", "0.5194472", "0.51918596", "0.51541674", "0.5137987", "0.50693345", "0.50667566", "0.5056471", "0.5049977", "0.5027405", "0.50244...
0.0
-1
SHOW DELIVERY DATES / Create a button that when clicked will load the estimated delivery dates of each of the search results, when they come into view
function isScrolledIntoView(elem) { var docViewTop = $(window).scrollTop(); var docViewBottom = docViewTop + $(window).height(); var elemTop = $(elem).offset().top; var elemBottom = elemTop + $(elem).height(); return ((elemBottom <= docViewBottom+$(elem).height()) && (elemT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function denverDepart(x){\n var queryURL = \"https://api.sandbox.amadeus.com/v1.2/flights/extensive-search?apikey=mRIoU7QG9mM6rewSvr88b6nk6gSzGZoo&origin=YTO&destination=den&one-way=true\";\n \n console.log(select);\n $.ajax({\n url: queryURL,\n method: \"GET\"\n...
[ "0.6429789", "0.6167166", "0.61138004", "0.6039688", "0.601972", "0.60002726", "0.59781444", "0.59323394", "0.586465", "0.5798233", "0.5782932", "0.57789433", "0.57751715", "0.57666445", "0.575925", "0.5749513", "0.5707682", "0.57058513", "0.5679133", "0.56627816", "0.5660701...
0.0
-1
return red if the delivery date is over 40 days from now, or green if it's less
function getDateColor(deliveryDate){ var d = deliveryDate.match(/- (.*)/); if(!d) return "#dd1e31"; /* hack: red, input is 'no date range, so no match */ d = new Date(d[1]); d.setFullYear((new Date()).getFullYear()); if(d < Date.now()) d.setFullYear(d.getFullYear() +1); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CalcStyle() {\n\t\tconst diff = this.DiffinDays();\n\t\tif (diff <= 1) {\n\t\t\treturn 'item_red';\n\t\t}\n\t\tif (diff <= 3) {\n\t\t\treturn 'item_yellow';\n\t\t} else {\n\t\t\treturn 'item_green';\n\t\t}\n\t}", "function colorChange(currentPrice, openingPrice) {\n if (currentPrice > openingPrice) {\n ...
[ "0.62911445", "0.60609186", "0.60461736", "0.59568834", "0.5812773", "0.5776452", "0.57745516", "0.5771311", "0.5710186", "0.5682813", "0.5679052", "0.5654312", "0.56514126", "0.5650471", "0.5645471", "0.56424594", "0.5637201", "0.56339926", "0.5631018", "0.56308305", "0.5623...
0.75395626
0
create element & render farm data
function renderData(doc, collection){ let li = document.createElement('li'); let name = document.createElement('span'); let data_json = document.createElement('span'); let cross = document.createElement('div'); let id_doc = document.createElement('div'); id_doc.className = 'id_class' li.set...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createElement(){ \n let my = this.data.entity;\n let $element = $(`<div data-name=\"${my.name}\" data-type=\"${my.type}\"></div>`); // Create element with data attributes\n $element.appendTo(this....
[ "0.6885692", "0.6569476", "0.6515933", "0.6299645", "0.62444097", "0.6169484", "0.61254585", "0.60678965", "0.60531", "0.6025086", "0.6011434", "0.59877306", "0.5973948", "0.5968896", "0.59578747", "0.5956571", "0.5954479", "0.5949222", "0.5944857", "0.5929299", "0.592653", ...
0.0
-1
Yay for long add comma because they didnt add one nativly HOW FUN. Credit
function addCommas(nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addComma(str){\r\n return \", \"+str;\r\n}", "function addComma() {\n if (!isDirty) {\n setNum1Array('.');\n } else {\n setNum2Array('.');\n }\n setOutput(',');\n }", "function addCommas(x) {\n\treturn x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function ...
[ "0.7466196", "0.691807", "0.6792138", "0.6752027", "0.66520476", "0.6620041", "0.661827", "0.659281", "0.6572763", "0.6569191", "0.6569191", "0.6554809", "0.6544829", "0.65174615", "0.65124327", "0.65093035", "0.6494175", "0.64936787", "0.64936787", "0.6488541", "0.64722335",...
0.6183943
57
function that details a single image
function GalleryItem({ photo, handleLikes }) { //provides logic for the display switch with conditional states const [isHidden, setIsHidden] = useState(false); const handleFlip = () => { if (isHidden) { setIsHidden(false); } else { setIsHidden(true); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImageInfo() {\n\n}", "function image_display() {\r\n\r\n}", "function mycallback() {\n // either call the ImageInfo.getAllFields([file]) function which returns an object holding all the info\n alert(\n \"All info about this file: \" + ImageInfo.getAllFields(file)\n );\n // or call Ima...
[ "0.81213355", "0.6894892", "0.6763672", "0.6762269", "0.66489047", "0.65374106", "0.6486903", "0.648072", "0.64608866", "0.6456134", "0.6440577", "0.6431274", "0.6429509", "0.6384891", "0.6358477", "0.63472986", "0.63135546", "0.6267938", "0.6266077", "0.6260033", "0.6250086"...
0.0
-1
keyboard interactions | direction != '...' doesn't let the snake go backwards
function changeDirection(keycode) { if(keycode == 37 && direction != 'right') { directionQueue = 'left'; } else if(keycode == 38 && direction != 'down') { directionQueue = 'up'; } else if(keycode == 39 && direction != 'left') { directionQueue = 'right'; } else if(keycode == 40 && direction != 'up') { directionQueue...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeSnakeDirection(event)\r\n {\r\n const keyPressed = event.keyCode;\r\n \r\n const isGoingUp = dy === -10;\r\n const isGoingDown = dy === 10;\r\n const isGoingLeft = dx === -10;\r\n const isGoingRight = dx === 10;\r\n\r\n if(keyPressed === LEFT_KEY &...
[ "0.72789335", "0.7248829", "0.72049963", "0.71867865", "0.7107365", "0.70838886", "0.70761305", "0.7017573", "0.70167863", "0.697029", "0.69596434", "0.69365686", "0.693148", "0.6920508", "0.69164443", "0.68198025", "0.68187803", "0.68021727", "0.6801647", "0.67894936", "0.67...
0.0
-1
1.Property 2.Constructor 3.Method Every class component must have render method and it always return html
render(){ return( <div className="i"> <span>Hello</span> <span>I<J/></span> </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){\n //Every render method always return HTML\n return <h1>Welcome to Myclass</h1>;\n }", "render() {\n\t\treturn <div>{this.renderContent()}</div>;\n\t}", "static rendered () {}", "static rendered () {}", "render(){}", "render(){}", "_render()\n {\n if (this.isDisabled())\...
[ "0.80796826", "0.7566531", "0.7431134", "0.7431134", "0.73977137", "0.73977137", "0.7371006", "0.7350355", "0.7299702", "0.72716254", "0.72476697", "0.7229568", "0.7215809", "0.7206299", "0.71864724", "0.71759474", "0.717014", "0.71265256", "0.709876", "0.7069214", "0.7062872...
0.0
-1
`inputLoc`: URL or local path.
function processFile (inputLoc, out, replacements) { var file = urlRegex.test(inputLoc) ? hyperquest(inputLoc) : fs.createReadStream(inputLoc, encoding) file.pipe(bl(function (err, data) { if (err) throw err data = data.toString() replacements.forEach(function (replacement) { data = data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(inputPath /*: string */) {\n this._inputPath = inputPath;\n }", "function formatPath(input) {\n if (input && input.lastIndexOf('/') !== input.length - 1) {\n input = input + '/';\n }\n if (input && input.substr(0, 2) === '//') {\n inp...
[ "0.5848985", "0.5511443", "0.54178894", "0.5240369", "0.5232868", "0.52212435", "0.52093226", "0.51997447", "0.51906407", "0.51638323", "0.51013", "0.5083963", "0.5058148", "0.5030846", "0.4999873", "0.4989696", "0.49895415", "0.49723837", "0.49699405", "0.49699405", "0.49579...
0.0
-1
const red = 'rgba(255, 0, 0, 0.78)';
function should_open_list(nodes, order_num) { const should_open = []; function push_parent_num(num) { if (!nodes[`order_num${num}`]) { // 如果当前节点不存在,那么打开父节点 const parent_num = num % 2 === 0 ? num / 2 : (num - 1) / 2; should_open.unshift(parent_num); push_parent_num(parent_num); } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rgba(red, green, blue, alpha) {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}", "rgbaString (r, g, b, a = 255) {\n a = a / 255; const a4 = a.toPrecision(4)\n return (a === 1) ...
[ "0.7375536", "0.709556", "0.6765684", "0.6698777", "0.66478515", "0.661375", "0.6608761", "0.66045845", "0.6597019", "0.6571418", "0.6495568", "0.646489", "0.6456432", "0.6446929", "0.6399306", "0.6397308", "0.6392654", "0.63879466", "0.6385123", "0.6353109", "0.6329054", "...
0.0
-1
Tests if the given message is a request message
function isRequestMessage(message) { let candidate = message; return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRequestMessage(message) {\n const candidate = message;\n return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));\n}", "function isRequestMessage(message) {\n const candidate = message;\n return candidate && is.string(candidate.method) && (is...
[ "0.8517848", "0.8517848", "0.84735465", "0.8423944", "0.8423944", "0.73683006", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", "0.69129854", ...
0.8397437
8
Tests if the given message is a notification message
function isNotificationMessage(message) { let candidate = message; return candidate && is.string(candidate.method) && message.id === void 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNotificationMessage(message) {\r\n var candidate = message;\r\n return candidate && is.string(candidate.method) && is.undefined(message.id);\r\n}", "function isNotificationMessage(message) {\n const candidate = message;\n return candidate && is.string(candidate.method) && message.id === vo...
[ "0.8176402", "0.8156104", "0.8156104", "0.81458783", "0.81332076", "0.6770679", "0.65501684", "0.6247668", "0.6180732", "0.6160722", "0.60216355", "0.5924634", "0.5849784", "0.5845099", "0.579987", "0.57594573", "0.569955", "0.5673291", "0.5666991", "0.56560105", "0.5612461",...
0.803884
8
Tests if the given message is a response message
function isResponseMessage(message) { let candidate = message; return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isResponseMessage(message) {\n var candidate = message;\n return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);\n}", "function isResponseMessage(message) {\n const candidate = message;\n return can...
[ "0.8241674", "0.8201667", "0.8201667", "0.8175793", "0.77404356", "0.704402", "0.6138777", "0.6041767", "0.59976566", "0.59674263", "0.5908699", "0.5864956", "0.58448505", "0.58343536", "0.5826786", "0.58085173", "0.58085173", "0.57941806", "0.57941806", "0.57886004", "0.5784...
0.81260735
7
This file must not be changed or exchanged.
function Zr(e){return e.join(";")}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertUnprotectedFilePath (filepath) {\n if (filepath === '/' + DAT_MANIFEST_FILENAME) {\n throw new ProtectedFileNotWritableError()\n }\n}", "function actionFileNOTExist() {\r\n // Format the content of the file\r\n const data = new Uint8Array(Buffer.from(contentFile));\r\n // We want to write ...
[ "0.5791086", "0.57793844", "0.57221735", "0.57056624", "0.5599936", "0.5595832", "0.5557807", "0.54247075", "0.53997356", "0.5275984", "0.5242918", "0.5237091", "0.52313155", "0.52279836", "0.52273166", "0.5212353", "0.51928705", "0.51917315", "0.51483107", "0.51447105", "0.5...
0.0
-1
Converts bytes to kilobytes rounded to one decimal place.
function bytesToRoundedKilobytes_(val) { return (val / 1024).toFixed(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundByteSize(bytes){\r\n\t\tvar powers = [6, 3, 0, -3],\r\n\t\t\tsuffixes = [\"MB\", \"KB\", \"B\", \"mB\"],\r\n\t\t\tDECIMAL_PLACES_TO_SHOW = 1;\r\n\t\t\r\n\t\tfor(var i = 0, len = powers.length, lim; i < len; i++){\r\n\t\t\tlim = Math.pow(10, powers[i]);\r\n\t\t\t\r\n\t\t\tif(bytes >= lim)\r\n\t\t\t\tr...
[ "0.6664913", "0.6551116", "0.6524414", "0.6505555", "0.6468789", "0.645165", "0.63640815", "0.6359866", "0.63506037", "0.6317336", "0.6297088", "0.6282772", "0.6204753", "0.6192422", "0.6184977", "0.61626387", "0.61444545", "0.61386776", "0.61366135", "0.60946465", "0.6083045...
0.7909561
0
Returns bandwidth savings as a percent rounded to one decimal place.
function getPercentSavings_(original, received) { if (original > 0) { return ((original - received) * 100 / original).toFixed(1); } return '0.0'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function to_percent(ask) {\n return Math.round((ask - BASE_PRICE) / BASE_PRICE * 10000) / 100.0;\n }", "percentage() {\n if(this.totalCount) {\n return parseInt((this.loadedCount * 100) / this.totalCount);\n }\n }", "function percentage() {\n return percent;\n}", "function ...
[ "0.6887571", "0.66627854", "0.65850407", "0.6489211", "0.6489211", "0.6489211", "0.6455925", "0.64523685", "0.64417076", "0.641032", "0.6374172", "0.63473785", "0.63348335", "0.63325745", "0.63228035", "0.6308333", "0.6285684", "0.6260693", "0.62412965", "0.62320745", "0.6213...
0.7119596
0