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
const URL = "
function App() { //here const [current, currentPage] = useState(1); return ( <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-5"> <div className="max-w-3xl mx-auto"> <Button text={"fetch todo:"} currentPage={current} setCurrentPage={currentPage} />...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function url() {\n var u = a + b + c + d\n return u\n }", "get url() {return '/';}", "getUrl(name) { return \"\"; }", "url() {\n throw new Error('Not implemented');\n }", "function URLUtils() {}", "function getURL() {\n return {\n omDbURL: \"http://www.omdbapi.com/?\",\n ...
[ "0.71569324", "0.6840512", "0.67221534", "0.6622638", "0.6613246", "0.65714806", "0.6568856", "0.6567772", "0.6546268", "0.6543383", "0.6453681", "0.6453681", "0.6453681", "0.6450127", "0.6445954", "0.62873447", "0.62824005", "0.6259838", "0.6259838", "0.6259838", "0.6259838"...
0.0
-1
Compulsory authentication on this route
getProfile(profile = {}) { return new Promise((resolve, reject) => { if (this.isAuthenticated()) { return fetch(`${Config.host}/api/users/${profile._id}`, { headers: { Authorization: `Bearer ${this.user.token}` } }) .then(res => res.json()) ....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "canHandleAuthentication() {\n return false;\n }", "canHandleAuthentication() {\n return false;\n }", "canHandleAuthentication() {\n return false;\n }", "canHandleAuthentication() {\n return false;\n }", "canHandleAuthentication() {\n return false;\n }", "...
[ "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537", "0.72788537"...
0.0
-1
request twitter for each colume from service
function getTwitters() { var promises = []; vm.twitterCards = {}; _.forEach(vm.twitterTypes, function(type) { promises.push(TwitterDashboardService.getTwitters(type).then(function(items) { vm.twitterCards[type] = items; }, onError))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twitter(){\n\t\tvar client = new Twitter({\n\t\t\tconsumer_key: '',\n\t\t\tconsumer_secret:'',\n\t\t\taccess_token_key:'', \n\t\t\taccess_token_secret:''\n\t\t});\n\t\tvar params = {screen_name: 'Dov Vah Kiin', count: 20};\n\t\t\n\t\t// console.log('retrieving tweets');\n\n\t\tclient.get('statuses/user_ti...
[ "0.72596914", "0.7173208", "0.71022075", "0.7070356", "0.7057268", "0.70318633", "0.70260715", "0.69888717", "0.69797015", "0.6956024", "0.6954888", "0.6952431", "0.6903411", "0.6899342", "0.6894081", "0.68829185", "0.6876753", "0.6873856", "0.68549657", "0.6836466", "0.68326...
0.66100943
47
use orders from localStorage to sort twitter types in order
function initializeLayout() { vm.twitterTypes = []; _.forEach(vm.settings.order, function(index) { vm.twitterTypes.push(unSortedTwitterTypes[index]); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reorderList() {\n const data = Array.from(document.querySelectorAll('.value'));\n const orderOfTodos = data.map(cur => parseInt(cur.dataset.id, 10));\n\n todos.sort((a, b) => {\n const keyA = a.ID;\n const keyB = b.ID;\n\n return orderOfTodos.indexOf(keyA) > orderOfTodos.indexOf(ke...
[ "0.63326514", "0.62911785", "0.6289395", "0.62620944", "0.62599564", "0.61472434", "0.60964894", "0.6027626", "0.6012999", "0.60015494", "0.5997452", "0.59761", "0.597563", "0.5975033", "0.5974185", "0.5963393", "0.59595746", "0.5947611", "0.5933506", "0.5926439", "0.5921782"...
0.0
-1
to load data again when setting is confirmed
function reload() { initialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load() {\n var stored = $.config('RaterData');\n if (prop) {\n data = stored;\n }\n data.launchCount++;\n $.config('RaterData', data);\n\n if (data.neverRemind || data.launchCount % interval !== 0) { return; }\n\n var alert = Ti.UI.createAlertDialog({\n tit...
[ "0.6451175", "0.6414437", "0.6349662", "0.62995607", "0.62643594", "0.6138193", "0.61350304", "0.5982594", "0.59518415", "0.5947207", "0.59420216", "0.59027517", "0.5901956", "0.5895325", "0.58725137", "0.5871825", "0.5862524", "0.58621204", "0.5858976", "0.5858976", "0.58589...
0.0
-1
AJAX// Funciones Obtener Formas
function ObtenerFormaAgregarProyecto() { $("#dialogAgregarProyecto").obtenerVista({ nombreTemplate: "tmplAgregarProyecto.html", url: "Proyecto.aspx/ObtenerFormaAgregarProyecto", despuesDeCompilar: function(pRespuesta) { $("#dialogAgregarProyecto").dialog("open"); $("#...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajax_get_forms(){\t \n\tvar post_params = \"ajax_action=get_forms\";\n\tcreate_http_request();\n\tsend_http_request(handler_get_forms, \"POST\", target_url, post_params);\n}", "function handler_get_forms(){\n\tif(xmlHttp.readyState == 4 && xmlHttp.status == 200){\n\t\tpopulate_list_from_xml(xmlHttp.resp...
[ "0.74094415", "0.71162504", "0.7084593", "0.7029192", "0.69319344", "0.6800424", "0.67640704", "0.6742454", "0.6733936", "0.6688279", "0.6679552", "0.6636513", "0.65738", "0.65717846", "0.6549637", "0.6526461", "0.65031123", "0.64916795", "0.64772135", "0.64716786", "0.645573...
0.0
-1
AJAX// Funciones de Acciones
function AgregarProyecto() { var pProyecto = new Object(); pProyecto.NombreProyecto = $("#txtNombreProyecto").val(); pProyecto.IdCliente = $("#divFormaAgregarProyecto").attr("idCliente"); pProyecto.FechaInicio = $("#txtFechaInicio").val(); pProyecto.FechaTermino = $("#txtFechaTermino").val(); pP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajax_provjera(acc, unos){\n\t\tvar x;\n\t\tif(window.XMLHttpRequest) x= new XMLHttpRequest();\n\t\telse x = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\tx.onreadystatechange = function(){\n\t\t\tif(x.readyState == 4 && x.status == 200) { \n\t\t\t\tif(acc==\"User\") provjeraUsername_back(x.responseText);...
[ "0.70635414", "0.6975727", "0.6703966", "0.666719", "0.6630362", "0.66036355", "0.6599524", "0.6582062", "0.65450937", "0.65442777", "0.6533662", "0.65026975", "0.6480893", "0.64750934", "0.647057", "0.64688635", "0.6445045", "0.6437804", "0.6423671", "0.64165187", "0.6414825...
0.0
-1
Rendering error message or null if there is no message
render() { const { message } = this.props if (!message.length) { return null } return ( <FlatButton label={message} secondary /> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderErrorMessage() {\n return (\n <ErrorMessage message=\"The data couldn't be loaded!\" />\n );\n }", "_renderError() {\n return null;\n }", "renderErrorMsg(error) {\n if (error.email) {\n return <Text style={styles.errorText}>Not a valid email address.</Text...
[ "0.74791205", "0.73332846", "0.72570723", "0.71992224", "0.6945982", "0.69443214", "0.6876909", "0.6841316", "0.68222696", "0.6818979", "0.6805761", "0.67670983", "0.6758309", "0.6743042", "0.67278767", "0.6705172", "0.66965336", "0.6667745", "0.66676295", "0.6667593", "0.666...
0.0
-1
xGetElementsByClassName() Returns an array of elements which are descendants of parentEle and have tagName and clsName. If parentEle is null or not present, document will be used. if tagName is null or not present, "" will be used. credits: Mike Foster, crossbrowser.com.
function xGetElementsByClassName(clsName, parentEle, tagName) { var elements = null; var found = new Array(); var re = new RegExp('\\b'+clsName+'\\b'); if (!parentEle) parentEle = document; if (!tagName) tagName = '*'; if (parentEle.getElementsByTagName) {elements = parentEle.getElementsByTagName(tagName);}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_elem_by_class(parents, classname){\n\tvar class_elems = [];\n\tvar all_elems = document.getElementsByTagName('*');\n\tfor(var i = 0; i < all_elems.length; i++){\n\t\tif(all_elems[i].className == classname){\n\t\t\tclass_elems.push(all_elems[i]);\n\t\t}\n\t}\n\n\treturn class_elems;\n}", "function ge...
[ "0.722926", "0.7149649", "0.67905724", "0.67595136", "0.6729352", "0.67131925", "0.6695941", "0.66442794", "0.6634979", "0.6632233", "0.6605924", "0.6600723", "0.6585041", "0.6566677", "0.6565086", "0.656407", "0.65474665", "0.6536813", "0.6478188", "0.64177233", "0.6273202",...
0.83334893
0
1.3 function that create the HTML table from an array
function createHTMLTable(array){ // Table let table = document.createElement("table"); let i = 0, j; // intermediates variables for the enumeration let currentElementI, currentElementJ; // intermediates variables for the sequentials treatments // table's header let thead = document.createElement("thead");...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeTableHTML(array) {\n var result = \"<table>\";\n for (var i = 0; i < array.length; i++) {\n result += \"<tr>\";\n for (var j = 0; j < array[i].length; j++) {\n result += '<td>' + array[i][j] + \"</td>\";\n }\n result += \"</tr>\";\n }\n result += \"</table>\";\n\n return result;\...
[ "0.8464953", "0.8186444", "0.80687916", "0.79150796", "0.7902168", "0.7819887", "0.7790542", "0.7773908", "0.76676095", "0.7594785", "0.7589576", "0.7551533", "0.75459516", "0.7545154", "0.74943095", "0.7486575", "0.7451355", "0.73855597", "0.73657256", "0.7357632", "0.731396...
0.8085601
2
returns the elevator to its original position
backToPosition() { while (this.current_position != this.position) { this.closeDoors(); if (this.current_position > this.position) { this.moveDown(); console.log(this.current_position); } else if (this.current_position < this.position) { this.moveUp(); } console....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "closestIdleElevator(building, floor) {\n let a, elevator, closest, i, lowest, nonmoving;\n console.log(`Building: ${building}, Finding closest elevator to ${floor} from `, this.elevators[building] );\n\n //Create the list of idle elevators\n nonmoving = (()=> {\n ...
[ "0.62003213", "0.61787075", "0.61056906", "0.5954898", "0.5916379", "0.5872283", "0.57255906", "0.5686919", "0.56862", "0.5657063", "0.5651757", "0.5620039", "0.5575353", "0.5526843", "0.55081594", "0.5472726", "0.547176", "0.5458992", "0.5421981", "0.5407073", "0.5401627", ...
0.0
-1
get the elevator to the floor requested when the person is inside the elevator
requestFloor(requestedFloor) { this.requests.push(requestedFloor); this.requests.sort(); console.log(this.requests); for (var i = 0; i < this.requests.length; i++) { if (this.current_position > this.requests[i]) { this.closeDoors(); for ( var floor = this.current_positio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getToFloor(floor){\n floor.on(\"up_button_pressed\", function() {\n findTheBestElevator(elevators,floor);\n\n });\n floor.on(\"down_button_pressed\", function() {\n findTheBestElevator(elevators,floor);\n\n\n\n });\n }", "f...
[ "0.7343171", "0.7234735", "0.72077495", "0.7100512", "0.6932476", "0.68367773", "0.6820925", "0.67024857", "0.66709185", "0.6643447", "0.65647244", "0.65336585", "0.6438633", "0.6428841", "0.6408782", "0.6306285", "0.6195504", "0.618058", "0.6099492", "0.5988239", "0.5953505"...
0.6279832
16
the close button in case of emergency
closeButton() { if (this.openDoors == true) { this.closeDoors(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleCloseClick() {\n\t\tthis.close();\n\t}", "function onCloseButtonClick(){\n\t\tt.hide();\n\t}", "function handleCloseClick(){\n handleClose()\n }", "close() {\n this.sendAction('close');\n }", "function ForceClose() {\r\n}", "handle_closing() {\n if (!this.app || !this.element)...
[ "0.75382024", "0.73766685", "0.7339367", "0.7313149", "0.72684515", "0.7243059", "0.7225333", "0.72154313", "0.71780705", "0.717636", "0.7133656", "0.71221995", "0.7120877", "0.70969605", "0.70232123", "0.7000485", "0.6994072", "0.697924", "0.697924", "0.69781625", "0.6969163...
0.0
-1
the phone button in case of emergency
phoneButton() { console.log("dialing 911..."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function devicepopup ()\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n webphone_api.plhandler.DevicePopup();\n}", "handlePhonePress(phone) {\n if (Platform.OS !== 'android') {\n var BUTTONS = [\n 'Text message',\n 'Call',\n 'C...
[ "0.6555744", "0.6349897", "0.62021095", "0.6149041", "0.6120871", "0.61009943", "0.6091227", "0.6082179", "0.6080464", "0.6063524", "0.6040992", "0.601247", "0.59988916", "0.5973503", "0.59428", "0.59037256", "0.59010756", "0.5898564", "0.58862907", "0.5883178", "0.5878844", ...
0.7322977
0
this function is called to send the elevator when it is requested at any floor
function sendElev(elevator, requestedFloor, direction) { elevator.requests.push(requestedFloor); elevator.requests.sort(); for (var i = 0; i < elevator.requests.length; i++) { elevator.closeDoors(); if (elevator.current_position > elevator.requests[i]) { for ( var floor = elevator.current_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestElevator(requestedFloor, direction) {\n getPositions();\n getMovements();\n getGaps(requestedFloor);\n\n if (gapList[0] > gapList[1]) {\n if (movList[1] == \"idle\") {\n sendElev(elevator_2, requestedFloor, direction);\n console.log(\"Elevator 2 is idle, so I'm using elevator 2.\")...
[ "0.78392863", "0.74851274", "0.73045415", "0.71136767", "0.6915783", "0.6758481", "0.6693166", "0.6633986", "0.6601295", "0.65919816", "0.6526211", "0.6516791", "0.6457688", "0.645366", "0.64448804", "0.6339432", "0.6309235", "0.6276464", "0.62518835", "0.6225617", "0.6106629...
0.7772498
1
make a list for positions
function getPositions() { for (var k = 0; k < listElevators.length; k++) { posList.push(listElevators[k].current_position); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getpositions(id){\n let res = [];\n let pos = id.split('_');\n let xLastPos = parseInt(pos[0]);\n let yLastPos = parseInt(pos[1]);\n\n for(let i = 0 ; i < offsets.length ; i++){\n\n let xNewPos = xLastPos + offsets[i][0];\n\n if(xNewPos >= 1 && xNewPos <= 8 ){\n let...
[ "0.663997", "0.6552474", "0.6349578", "0.6306841", "0.62228656", "0.61669403", "0.61550546", "0.6147287", "0.6141375", "0.61384225", "0.61257607", "0.6107502", "0.6086346", "0.6065497", "0.6062586", "0.604612", "0.60075045", "0.6003188", "0.5997083", "0.5982897", "0.59375125"...
0.7028136
0
make a list for elevator movements
function getMovements() { for (var j = 0; j < listElevators.length; j++) { movList.push(listElevators[j].movement); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestElevator(requestedFloor, direction) {\n getPositions();\n getMovements();\n getGaps(requestedFloor);\n\n if (gapList[0] > gapList[1]) {\n if (movList[1] == \"idle\") {\n sendElev(elevator_2, requestedFloor, direction);\n console.log(\"Elevator 2 is idle, so I'm using elevator 2.\")...
[ "0.5950189", "0.5876723", "0.5844209", "0.5815139", "0.57125586", "0.5676775", "0.567124", "0.56648034", "0.56544447", "0.5631465", "0.5603797", "0.5480167", "0.5474574", "0.5471487", "0.54476416", "0.5419048", "0.53854555", "0.5372376", "0.53438467", "0.528863", "0.52867794"...
0.6962673
0
make a list for gaps
function getGaps(requestedFloor) { for (var i = 0; i < listElevators.length; i++) { gapList.push(Math.abs(requestedFloor - listElevators[i].current_position)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gap(g, m, n) {\n // your code\n if (g < 2 || m < 2 || n <= m || g % 2 !== 0) {\n return null;\n }\n let tempM = m;\n let tempN = n;\n let temp = 0;\n let newArr = [];\n for (tempM; tempM < tempN; tempM++) {\n temp = tempM + g;\n if (tempM % 2 === 0 && tempM !== 2) {\n continue;\n ...
[ "0.66989094", "0.6436895", "0.6176899", "0.61068666", "0.6075054", "0.60078245", "0.5975468", "0.5963638", "0.5871524", "0.5856328", "0.57904506", "0.5759653", "0.5705749", "0.5657769", "0.5600228", "0.5582005", "0.55419487", "0.5538689", "0.5533146", "0.55101377", "0.5501578...
0.6769636
0
this function allows you to request an elevator from any floor.
function requestElevator(requestedFloor, direction) { getPositions(); getMovements(); getGaps(requestedFloor); if (gapList[0] > gapList[1]) { if (movList[1] == "idle") { sendElev(elevator_2, requestedFloor, direction); console.log("Elevator 2 is idle, so I'm using elevator 2."); } else if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_callElevatorOnFloor(floor_no){\n // call any of the elevators that are on this floor\n let floor = this.floorsAvailableElevators[floor_no];\n for (var elevator in floor) {\n if(floor.hasOwnProperty(elevator)){\n floor[elevator].request();\n break;\n ...
[ "0.7578758", "0.72784936", "0.72357285", "0.7159075", "0.70071155", "0.671415", "0.66727155", "0.6657867", "0.6490842", "0.6395957", "0.63658047", "0.6299519", "0.619479", "0.61900353", "0.61456627", "0.6139765", "0.6098845", "0.60767114", "0.60661083", "0.6054962", "0.605284...
0.7735914
0
=== Autogenerated preamble library stuff === ======================================== Runtime essentials ========================================
function callRuntimeCallbacks(callbacks) { while(callbacks.length > 0) { var callback = callbacks.pop(); var func = callback.func; if (typeof func === 'number') { func = FUNCTION_TABLE[func]; } func(callback.arg === undefined ? null : callback.arg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _setup () {\n }", "function setup() {}", "setup() {}", "setup() {}", "setup() {}", "_initialize() {\n\n }", "initialise () {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "function _init() {\n\t\tget...
[ "0.6539264", "0.6469167", "0.6443687", "0.6443687", "0.6443687", "0.624726", "0.6238948", "0.6132246", "0.6132246", "0.6132246", "0.6132246", "0.6132246", "0.6132246", "0.6121236", "0.60965186", "0.6096354", "0.6074593", "0.6067864", "0.6067864", "0.6067864", "0.6062104", "...
0.0
-1
functions called during startup
function initRuntime() { callRuntimeCallbacks(__ATINIT__); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onStartup()\n{\n\tprintLog(\"info\", \"onStartup called\");\n}", "async startup() { }", "async startup() { }", "function handleStartup() { //Read from local storage\r\n restoreOptions();\r\n enableGoogle();\r\n enableWikipedia();\r\n enableBing();\r\n enableDuckDuckGo();\r\n enabl...
[ "0.6926536", "0.6891939", "0.6891939", "0.6868105", "0.67997867", "0.6771736", "0.6696395", "0.6685952", "0.66805816", "0.6646489", "0.66427875", "0.6634881", "0.66088694", "0.66088694", "0.66088694", "0.66088694", "0.66088694", "0.66088694", "0.66088694", "0.66088694", "0.66...
0.0
-1
=== Autogenerated postamble setup entry stuff ===
function run(args) { initRuntime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {}", "setup() {}", "setup() {}", "setup() {}", "function setup() {\n\n\t\t\t\t\t}", "function setup(args, ctx) {\n}", "function _setup () {\n }", "async setup() { }", "function setup() {\r\n}", "function setupDefault() {\n}", "function setup(p){\n\n}", "function setup(...
[ "0.7310062", "0.69991285", "0.69991285", "0.69991285", "0.6918506", "0.68147945", "0.66805965", "0.66240525", "0.6547048", "0.65167487", "0.6404582", "0.63875294", "0.63875294", "0.6369214", "0.6369214", "0.634504", "0.6320578", "0.6320578", "0.6320578", "0.6320578", "0.63009...
0.0
-1
Inicializa eventos y variables
function enableForm() { $('#logo-footer').animate({ bottom: "-100px", opacity: '0'}, 0); $('#logo-footer').animate({bottom: "0", opacity: '1'}, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constroiEventos(){}", "function _init() {\n addEvent();\n getData();\n }", "function initEventListener() {\n \n }", "setEvents() {\n\t\tlet sprite = this;\n\t\tthis.evt = {\n\t\t\twindow: {\n\t\t\t\tkeydown: function (e) {\n\t\t\t\t\tsprite.ajouterEnFile(e);\n\t\t\t\t}\n\t\t...
[ "0.738276", "0.70685774", "0.69704795", "0.68613183", "0.6807159", "0.6748821", "0.6742074", "0.6697069", "0.66196066", "0.6583823", "0.65155107", "0.6514478", "0.6489527", "0.64664185", "0.64516014", "0.6416527", "0.640568", "0.63771933", "0.6368665", "0.6364516", "0.6362343...
0.0
-1
Get List Items Functions
async function updateParticipationLastUsedDate(participationEntry) { participationEntry.Last_Opened = Date.now(); let participationUpdateParams = { TableName:PARTICIPATIONCOLLECTION, Item:participationEntry }; await docClient.put(participationUpdateParams).promise(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ListItem() { }", "function ListItem() {}", "function ListItem() {}", "function ListItem() {}", "getListName() {}", "function getListItensTask() {\n const itemListTack = document.querySelectorAll('.item-list');\n return itemListTack;\n}", "function getItemListings() {\n\tconsole.log(\"Get Ite...
[ "0.76594156", "0.7614687", "0.7614687", "0.7614687", "0.6813966", "0.6646559", "0.6643931", "0.66385216", "0.6521543", "0.64799607", "0.6475114", "0.64645857", "0.64455986", "0.6401192", "0.6380541", "0.63744485", "0.63442874", "0.63285697", "0.6312436", "0.63047945", "0.6281...
0.0
-1
Create List Item Functions
function getFieldValue(Item) { //Check for missing field values since dynamoDB won't accept empty strings. if(Item.fieldName === "Name" && Item.fieldValue === "") throw new Error(); if(Item.fieldValue === "") return " "; else return Item.fieldValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ListItem() {}", "function ListItem() {}", "function ListItem() {}", "function ListItem() { }", "function createListItem(item) {\n text += '<li>' + item + '</li>\\n';\n}", "function Listify() {\r\n}", "function renderList(item1, item2, item3) {\n const newList = document.createElement('ul')...
[ "0.8435264", "0.8435264", "0.8435264", "0.8328025", "0.7114388", "0.686577", "0.6821288", "0.6607303", "0.6523306", "0.65216684", "0.6514322", "0.6494865", "0.6491373", "0.6482072", "0.6472455", "0.6472367", "0.646971", "0.6468878", "0.6458157", "0.64400476", "0.6438624", "...
0.0
-1
Display the cards on the page shuffle the list of cards using the provided "shuffle" method below loop through each card and create its HTML add each card's HTML to the page Shuffle function from
function init(){ createCards(); first=null; secound=null; starsNumber=stars.length; //reset old timer timer=0; //reset old matched cards matched=0; winDiv.style.display="none" notWinDiv.style.display="flex" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createHTML() {\n let cardList = shuffle(myCards);\n cardList.forEach(function(card) {\n $(\".deck\").append('<li><i class=\"card fa ' + card + '\"></i></li>');\n })\n}", "function shuffleCards() {\n let shuffledCards = shuffle(cardsArray);\n\n for (let i = 0; i < shuffledCards.length; i++) {\n ...
[ "0.78762597", "0.7811376", "0.77949566", "0.77602756", "0.7730809", "0.76926136", "0.7692171", "0.7621627", "0.7616959", "0.7616283", "0.75475186", "0.75420684", "0.75414556", "0.75405294", "0.753373", "0.7510418", "0.75093275", "0.75049835", "0.7500857", "0.7496024", "0.7493...
0.0
-1
handle the submitted value of the form
function handleSubmit(e) { e.preventDefault(); //get the value input in a readable format for the API call let inputReadyForUrl = formatInput(input.value); //launch the API request and return an object of movies postRequest(inputReadyForUrl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleSubmit(e) {\n e.preventDefault()\n setValue(input.value)\n console.log(data)\n }", "function handleSubmit(e) {\n e.preventDefault();\n if(!isValid)\n {\n return\n }\n return history.replace(\"/ColleagueWelcome\", value);\n }", "function handleChange(e) {\n var k...
[ "0.72336173", "0.6777092", "0.6716124", "0.6520146", "0.6509343", "0.64392644", "0.63915473", "0.6383156", "0.637776", "0.6368335", "0.63423204", "0.6292082", "0.6290967", "0.62632066", "0.62437475", "0.62353003", "0.6231631", "0.62307763", "0.6225929", "0.6218671", "0.621780...
0.0
-1
set the input value to a useable string for the API request.
function formatInput(value) { let useableString = ''; return value.toLowerCase().split(' ').join('+'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set stringValue(value) {}", "function ui_setInputValue(id_inputbox, str_value){\n\tui_getObjById(id_inputbox).value = str_value;\n}", "set Input(value) {\n this._input = value;\n }", "function setUserInput (input) {\n user_input = input;\n }", "setInputValue(value) {\n\t\tthis._input.value = ...
[ "0.6455083", "0.61037415", "0.60321146", "0.59598184", "0.5951221", "0.59230065", "0.5851701", "0.58001727", "0.57304895", "0.56779647", "0.56231236", "0.55988187", "0.5598785", "0.5589647", "0.5587876", "0.55872", "0.5564016", "0.5562851", "0.55585253", "0.5525946", "0.55117...
0.55422914
19
Show one movie infos//
async function showMovie(id) { const searchForASpecificMovie = await fetch(`https://www.omdbapi.com/?apikey=${apikey}&i=${id}`); const data = await searchForASpecificMovie.json(); $('#modal').modal('show'); showModal(data); console.log(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printMovieDetail() {\n if (movie.bkgimage != null) {\n bkgImageElt.css('background-image', `url(${movie.bkgimage})`);\n }\n else {\n bkgImageElt.css('background-image', `linear-gradient(rgb(81, 85, 115), rgb(21, 47, 123))`);\n }\n\n titleElt.text(movie.title);\n modalTitle....
[ "0.7261106", "0.7142403", "0.7122492", "0.7052709", "0.70444554", "0.6966251", "0.6921757", "0.69114906", "0.6884844", "0.687785", "0.68623316", "0.6809063", "0.68084645", "0.6746739", "0.6706405", "0.66479707", "0.6647408", "0.66474056", "0.6643219", "0.66246784", "0.6554831...
0.0
-1
The projectspeed/duration of the effect in milliseconds
function projecttypeWriter() { if (pps < projecttxt.length) { document.getElementById("projectP").innerHTML += projecttxt.charAt(pps); pps++; // if (projecttxt.charAt(pps-1)=='.' ){ // projectP.innerHTML += (`<br>`); // } setTimeout(projecttypeWriter, projectspeed); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDuration(){\n // coefficient to increase or reduce the default animation duration\n var coeff = 1 / this.getSpeed()\n\n var duration = coeff * this.durationAnim\n\n // check if the duration is different from the one that has been used\n if (this.oldDuration !== duration){\n ...
[ "0.6837227", "0.66995305", "0.6688796", "0.66577923", "0.65700066", "0.6560316", "0.6541577", "0.64769435", "0.6405138", "0.634773", "0.63198197", "0.6302473", "0.6297781", "0.6293532", "0.62859404", "0.62378746", "0.6227012", "0.6208357", "0.61907315", "0.6161616", "0.610239...
0.0
-1
Setup listeners for sockets
initSocketEvents() { const { socketReducer } = this.props; const { socket } = socketReducer; socket.on('PUT/api/v1/contacts/:contactId/', (payload) => { const contactId = this.props.match.params.contactId; // We'll directory dispatch the event here instead of calling ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function socketListeners(){\n\tsocket.on('joined',function(){\n\t\tuser.success();\n\t});\n\tsocket.on('exists',function(err){\n\t\tuser.error(err);\n\t});\n\tsocket.on('roomList',function(roomlist){\n\t\tchatRoom.populate(roomlist);\n\t});\n}", "_setDefaultListeners () {\n this.io.on('connection', (objSocket...
[ "0.744667", "0.742656", "0.73885334", "0.7307563", "0.7281327", "0.7047084", "0.70171416", "0.69579023", "0.6895703", "0.6890054", "0.6881527", "0.67248636", "0.67188406", "0.6714919", "0.6704389", "0.6606973", "0.66000396", "0.65326566", "0.6531294", "0.6531134", "0.6482507"...
0.0
-1
Dispatch action to get the contact
getContact() { const contactId = this.props.match.params.contactId; const { reducer } = this.props; const { contact } = reducer; // Since this methods fires on componentDidUpdate we must do some checks // to ensure we only dispatch the event when the contact ID in the URL ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getContact() {\n\t\tget_contact_data_p.innerText = 'Getting contact...';\n\n\t\tconst url_search_params = new URLSearchParams({\n\t\t\t'first_name': get_contact_first_name_input.value,\n\t\t\t'last_name': get_contact_last_name_input.value\n\t\t});\n\n\t\tlet response = await submitGETRequest(url_sea...
[ "0.7001504", "0.6937458", "0.6721479", "0.6500849", "0.6430798", "0.64042217", "0.6253975", "0.6203146", "0.6164747", "0.6142408", "0.6121569", "0.6121569", "0.6121569", "0.6121569", "0.6113458", "0.6065646", "0.6030557", "0.6030557", "0.60238427", "0.60049784", "0.59612703",...
0.77732915
0
Writing... And then, to read it... Type of symbol BTC / ETH / BNB / USDT
function pairType(pair){ if(pair.slice(pair.length-4,pair.length) == "USDT"){ return "USDT"; }else{ return pair.slice(pair.length-3,pair.length); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleTradeData (exchange, symbol, input){\n\n\tvar output = {\n\t\tsymbol: \"\",\n\t\ttime: \"\",\n\t\tprice: \"\",\n\t\tquantity: \"\",\n\t\texchange: exchange\n\t};\n\n\tif (exchange == \"binance\") {\n\t\toutput.symbol = input.s;\n\t\toutput.time = input.E;\n\t\toutput.price = input.p;\n\t\toutput.qua...
[ "0.5342503", "0.51861477", "0.51287884", "0.5113496", "0.49994087", "0.49809685", "0.4963358", "0.4963358", "0.4963358", "0.4963358", "0.49532914", "0.49375728", "0.49331272", "0.49115977", "0.48700577", "0.48456845", "0.48346817", "0.48321345", "0.48261958", "0.48072696", "0...
0.0
-1
create a class "APP" which will inherit the methods from the "component" class
render() { // the "render" method required by "component" returns HTML https://www.w3schools.com/react/react_components.asp return ( // virtual DOM of REACT, so that you can insert HTML syntax below in a js file // ↓ "class" is a reserved word in js, so turn it into "className" <div className="App...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function App () {\n Base.call(this);\n this.dependencies = {};\n}", "function App() {\n this.modules = [];\n this.registry = new registry.Registry();\n\n this._started = false;\n\n // Register a bunch of default utilities\n this.registry.registerUtility(notification.defaultNotifier,\n ...
[ "0.7312849", "0.70637006", "0.6891218", "0.6808124", "0.6737292", "0.67229986", "0.65752125", "0.65069854", "0.64923084", "0.6453073", "0.6453073", "0.64520884", "0.6426616", "0.6397108", "0.62407285", "0.6233206", "0.6231105", "0.6216451", "0.6215629", "0.620758", "0.620195"...
0.0
-1
best quick examle I could find of get images
function getImage(url) { window.open(url, 'MovieImages', 'width=500, height=450'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getImages(arg){\n if(!arg){\n return this.images;\n }\n else{\n if(this.images.sized[arg]) return this.images.sized[arg];\n // else this.dev('image not in app');\n }\n }", "function getsImages(){\n\tvar src = [];\n\tvar alt = [];\n\tvar tit = [];\n\tvar lde = [];\n\tva...
[ "0.7082813", "0.6865089", "0.6739831", "0.67278683", "0.67229325", "0.6721731", "0.6673119", "0.66608155", "0.66182715", "0.6593178", "0.6570239", "0.6553199", "0.65496874", "0.65450394", "0.6522079", "0.6519879", "0.64830625", "0.6477175", "0.64733917", "0.64693075", "0.6428...
0.0
-1
Note: Do not use any builtin library function such as sqrt.
function isPerfectSquare(input) { // Square numbers are non-negative if (input < 0) return false; let count = 0; while (true) { const squared = count * count; if (input === squared) { return true; } else if (input < squared) { return false; } count++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sqrt(x) {\r\n var y;\r\n y = Math.sqrt(x);\r\n return y;\r\n}", "function square_root(x) {\n return Math.sqrt(x);\n}", "function sqrt(number,root){\n root = root || 2;\n return pow(number,1/root);\n}", "function doubleSquareRootOf(num) {\n // your code here\n}", "function square...
[ "0.8069015", "0.775551", "0.76174456", "0.7501366", "0.74673694", "0.7449625", "0.7402068", "0.738263", "0.731013", "0.729535", "0.7285117", "0.72738045", "0.7252548", "0.7247595", "0.72372395", "0.71218574", "0.71009517", "0.70382404", "0.7031371", "0.69904953", "0.6986067",...
0.0
-1
this generate 50 index in [xaxis, yaxis] formate in string
calAllIndex() { for (let i = 0; i < this.length; i++) { for (let j = 0; j < this.breath; j++) { let index = i + "-" + j; this.indexes.push(index); } } return this.indexes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function niceAxisNumbering(amin, amax, ntick) {\n var nfrac; // number of fractional digits to show\n var d; // tick mark spacing\n var graphmin, graphmax;\n var range, x;\n var axisValues = [];\n\n if (amin>0 && amin/amax < 0.5) amin = 0; // My fudge, to show origin when appropriate.\n\n...
[ "0.5758495", "0.5719569", "0.5677264", "0.56424856", "0.5638363", "0.55718", "0.5529697", "0.5487081", "0.54813415", "0.5459634", "0.5434479", "0.5434479", "0.5370896", "0.5352875", "0.53382456", "0.5315861", "0.5308904", "0.5302877", "0.53016907", "0.5301384", "0.52991545", ...
0.0
-1
this generate two random numbers one number between 110 and other 15
randomNum() { let i = Math.floor(Math.random() * this.length); let j = Math.floor(Math.random() * this.breath); return i + "-" + j; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randRange(a, b) {return Math.round(Math.random() * (b + 1)) + a;}", "function generateNumbers(){\n\tnumber1 = Math.ceil(Math.random()*maxNum);\n\tnumber2 = Math.ceil(Math.random()*maxNum);\n}", "function randomNumberBetween(num1, num2) {\n return Math.floor(Math.random() * num2) + num1;\n}", "fun...
[ "0.75747865", "0.7516167", "0.7300745", "0.7254927", "0.7234978", "0.7219293", "0.7217632", "0.71538454", "0.7151403", "0.7109908", "0.7106115", "0.71057606", "0.7075068", "0.7074714", "0.70716673", "0.7059837", "0.7049749", "0.70430136", "0.7038927", "0.70384496", "0.7023896...
0.0
-1
this will allocate mines as given mineNo on random
allocateMine(mineNo) { for (let i = 0; i < mineNo; i++) { let mine = this.randomNum(); if (!this.mines.includes(mine)) { this.mines.push(mine); } else { i--; } } return this.mines; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static randomlyAssignMines(aBoard) {\n var mineLocation = [];\n for (let i = 0; i < aBoard.mineCount; i++) {\n let cell = generateAMine();\n //reallocate mine when the cell is already mined\n while (mineLocation.includes(cell)) {\n cell = generateAMine();\n }\n ...
[ "0.79582375", "0.7692207", "0.76734143", "0.7604349", "0.7475392", "0.74410725", "0.739742", "0.7339789", "0.7273945", "0.71841294", "0.69224024", "0.68888175", "0.68606734", "0.68532014", "0.67948794", "0.67125285", "0.66376156", "0.661701", "0.6604182", "0.6589752", "0.6581...
0.8466648
0
this will call all the cautionArea around all mines
allocateCautionArea() { const calNum = (n) => [n - 1, n, n + 1]; const calCasIndex = (index) => { let [a , b] = index.split('-'); let front = calNum(parseInt(a, 10)); const frontcheck = (n) => n < this.length && n > -1; let back = calNum(parseInt(b, 10)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arealv() {\r\n\tconfigAddButton();\r\n\t/******** Set Default Vaue ***********/\r\n\t//if(getC(\"minStar\r\n\r\n var picNum = [ \r\n \"http://upic.me/i/vx/80j01.png\",\r\n \"http://upic.me/i/tv/deg02.png\",\r\n \"http://upic.me/i/b3/8uz03.png\",\r\n \"http://upic.me/i/q6/cch04.png\",\r\n ...
[ "0.5680598", "0.5409831", "0.5402605", "0.5389264", "0.53850573", "0.5357306", "0.5354088", "0.52977806", "0.5295283", "0.52843404", "0.5282285", "0.5230774", "0.5201237", "0.5190148", "0.5185269", "0.5170028", "0.515846", "0.5140813", "0.5135787", "0.512007", "0.5120025", ...
0.64713734
0
The directive's controller function
function FsDatePickerController ($element, $scope) { // Put dependencies on the instance var ctrl = this; ctrl.$element = $element; ctrl.$scope = $scope; // Invoke init ctrl.init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function controllerFn($scope) {\n\n var index = $scope.index = indexService;\n $scope.renameForm = false;\n $scope.deleteForm = false;\n\n $scope.$on('index-update', function(){\n $scope.renameForm = false;\n $scope.deleteForm = false;\n })\n\n // Open the name/rename fo...
[ "0.6490243", "0.62636185", "0.6237826", "0.62264085", "0.6186699", "0.6181207", "0.6159353", "0.607454", "0.607454", "0.60632837", "0.6040689", "0.60103756", "0.60045403", "0.5975468", "0.5943877", "0.5890139", "0.5878166", "0.5873581", "0.5873581", "0.58684546", "0.5845803",...
0.56782603
31
Multiplies the two values given
function calc(number1, number2){ console.log(number1 + " times " + number2 + " equals " + number1 * number2) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mulValues(firstValue, secondValue) {\n\t\tcount++;\n\t\tvar result = 0; \n\t\tresult = firstValue * secondValue;\n\t\treturn result;\n\t}", "function multiple(){\n results.value = Number(a.value) * Number(b.value);\n }", "function multiply(val1, val2) {\n return val1 * val2;\n}", "static mult...
[ "0.8319152", "0.8007545", "0.7783291", "0.77416044", "0.7721091", "0.76826257", "0.7639428", "0.7627116", "0.7623815", "0.7622955", "0.7622955", "0.760421", "0.75873417", "0.7574928", "0.7563254", "0.7551224", "0.7535647", "0.7526974", "0.7491422", "0.7478068", "0.7478068", ...
0.0
-1
Prompts the user for their favorite city, then returns with a city capitalized in a string
function capitalize(str){ return str.charAt(0).toUpperCase() + str.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cityFormat(CityInput){\n CityInput.toLowerCase();\n CityInput = CityInput.charAt(0).toUpperCase() + CityInput.slice(1);\n return CityInput\n}", "function userCity(callback){\n prompt.get(\"Enter your current city\", function(err, userInput){\n if(err){\n \n }\n ...
[ "0.70162416", "0.694841", "0.68531966", "0.6703943", "0.66734594", "0.6606259", "0.6502603", "0.64944327", "0.64880836", "0.6441668", "0.6433237", "0.6318741", "0.62842983", "0.6225834", "0.62032646", "0.61791545", "0.6120171", "0.610109", "0.60382074", "0.6007611", "0.598618...
0.0
-1
Insert. Clonamos el item y le cambiamos su id
function insertField(item, cantidad){ fields++; var copia = $(item).clone(); var itemID = $(item).attr("id"); $(copia).attr("id", itemID+cantidad); var labelID = $(copia).find(".fieldLabel").attr("id"); $(copia).find(".fieldLabel").attr("id", labelID+cantidad); $(copia).attr("selected", false); $(copia).hide()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insert(item, index){\n let id;\n if (!item) throw new Error(\"item is not defined\");\n if (index < 0) throw new Error(\"index should be a positive int\");\n\n if (typeof index === \"undefined\" || index > this._items.length) {\n id = this._items.length;\n } else { \n id = index;\n }\n\...
[ "0.7307353", "0.69858253", "0.6481824", "0.6469984", "0.6447993", "0.6420788", "0.6365956", "0.63155025", "0.62919647", "0.6287418", "0.62826264", "0.6274854", "0.6262584", "0.62567693", "0.62518114", "0.6250049", "0.62439454", "0.6207519", "0.615551", "0.61500436", "0.614392...
0.0
-1
reset de estilos del form
function resetFieldStyle(){ $(".fieldBox").css("backgroundColor","#fff"); $(".fieldBox").css("borderColor", "#fff"); $(".fieldBox").attr("selected",false); $(".fieldBox").find(".removeButton").hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n\t\tthis.formElement.reset();\n\t}", "function resetform() {\n clearField(nameField);\n clearField(emailField);\n clearField(messageField);\n}", "function limpiar() {\r\n document.getElementById(\"miFormulario\").reset();\r\n\r\n}", "function resetform(){\n\t$.each($(\"body\").find(\"form\"),f...
[ "0.8292652", "0.8193041", "0.81037635", "0.80978256", "0.80763364", "0.79887307", "0.79445463", "0.7937729", "0.7930765", "0.79170924", "0.78774434", "0.785796", "0.7844211", "0.7804552", "0.77940154", "0.7793609", "0.7789284", "0.77891296", "0.77844703", "0.7769021", "0.7764...
0.0
-1
Cambia estilos con el hover evitando los items seleccionados
function fieldHover(){ $(this).css("borderColor","rgb(35, 140, 215)"); $(this).css("borderStyle", "dotted"); //$(this).css("backgroundColor", "#E5F9FC"); $(this).mouseout(function(){ if (!($(this).attr("selected"))){ $(this).css("borderColor", "#fff"); $(this).css("backgroundColor", "#fff"); $(this)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hover() {\n raycaster.setFromCamera( pointer, camera );\n const intersects = raycaster.intersectObjects( buttons ); // De objecten binnen de array aan buttons die doorkruist worden door de ray van de raycaster.\n\n if ( intersects.length > 0 ) {\n if ( hoveredItem != intersects[ 0 ].obje...
[ "0.69012356", "0.68122274", "0.6514354", "0.63971025", "0.6377891", "0.6367689", "0.6361437", "0.6359062", "0.62953836", "0.62647027", "0.62545055", "0.6252843", "0.62513655", "0.6221533", "0.6220621", "0.6217368", "0.6185689", "0.61711144", "0.6160858", "0.6122317", "0.60718...
0.0
-1
set up player functions
function getPlaylist(id, params) { return playlist.get(id, params).then(function(message) { message.results = _.shuffle(message.results); console.log(message); return message; }).catch(function(err) { console.error(err); throw err; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function player() {}", "function setupPlayer() {\n playerX = 4 * width / 5;\n playerY = height / 2;\n playerHealth = playerMaxHealth;\n playerStamina = playerMaxStamina;\n}", "function setupPlayer() {\n\t\"use strict\";\n\tjsReady = true;\n\tif ( 'undefined' === typeof player ) {\n\t\tplayer = GetPlayer();...
[ "0.8108403", "0.7475299", "0.74122477", "0.73914844", "0.73914844", "0.73914844", "0.7383993", "0.7381088", "0.735615", "0.7346077", "0.72562045", "0.7163947", "0.7130867", "0.7115683", "0.711448", "0.7098711", "0.70746875", "0.70149815", "0.7010983", "0.70059174", "0.6911217...
0.0
-1
saving mouse positions once the video starts playing throttler controls the interval the function 'mouseMoveHandler' gets executed
function mouseMoveHandler(event) { var ev = event || window.event; var mouse_posX_save = ev.pageX; var mouse_posY_save = ev.pageY; var mouse_time_save = player.getCurrentTime(); var canvasRect = videoCanvas.getBoundingClientRect(); // record mouse movements if (player.getState() === 'playing'){ // con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_start_mouse_track() {\n\t\t\tthis.current_mouse_movement = [];\n\t\t\tvar self = this;\n\t\t\tvar coord_scaling = this.selection_board.scale_to_source_size();\n\t\t\t// start tracking loop\n\t\t\tthis.track_id = setInterval(function() {\n\t\t\t\tlet mousePos = document.get_mouse_pos();\n\t\t\t\t// save a single t...
[ "0.6923326", "0.67684156", "0.6730633", "0.6592349", "0.639435", "0.6386045", "0.63848484", "0.6313063", "0.6285088", "0.6284926", "0.6270587", "0.62700546", "0.6247179", "0.62171274", "0.62098545", "0.62062806", "0.6148074", "0.6140393", "0.6139794", "0.6139612", "0.6129272"...
0.63135165
7
draw the square shape grid
function setupGridDimentional() { var gridCanvas = document.getElementById("gridCanvas"); gridCanvas.height = div_height; gridCanvas.width = div_width; user.canvasSize = [div_width, div_height]; const tickLength=4; var gridCtx = gridCanvas.getContext('2d'); gridCtx.strokeStyle = '#FF0000'; gridCtx.strok...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawGrid() {\n for (r = 0; r < ROW; r++) {\n for (c = 0; c < COLUMN; c++) {\n drawSquare(c, r, grid[r][c]);\n }\n }\n }", "function drawGridSquares(){\n\tcontext.globalCompositeOperation = 'destination-over';\n\tcontext.fillStyle = gridSquareColor;\n...
[ "0.8135463", "0.8004049", "0.7908579", "0.78888285", "0.78535855", "0.7845935", "0.76561505", "0.7613047", "0.7600372", "0.75963074", "0.7559754", "0.7555196", "0.7503076", "0.74798685", "0.74627405", "0.7441379", "0.74360335", "0.74171245", "0.7310218", "0.73044187", "0.7289...
0.0
-1
src/diagrams/robust.svelte generated by Svelte v3.6.1
function add_css() { var style = Object(__WEBPACK_IMPORTED_MODULE_0_svelte_internal__["f" /* element */])("style"); style.id = 'svelte-1hfm4g5-style'; style.textContent = ".flex-container.svelte-1hfm4g5{display:flex;justify-content:center;flex-wrap:wrap}"; Object(__WEBPACK_IMPORTED_MODULE_0_svelte_internal__["b" /*...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function About_svelte_create_fragment(ctx) {\n\tlet p0;\n\tlet p1;\n\tlet t3;\n\tlet p2;\n\tlet p3;\n\tlet t12;\n\tlet p4;\n\n\treturn {\n\t\tc() {\n\t\t\tp0 = (0,internal/* element */.bG)(\"p\");\n\n\t\t\tp0.innerHTML = `Thank you for using this open source solution for diy pedals. <br/>\r\n This is not to be ...
[ "0.6228652", "0.5714616", "0.5706687", "0.5634653", "0.56247425", "0.5547528", "0.5514222", "0.5464187", "0.54100364", "0.5363077", "0.527941", "0.52790374", "0.52409434", "0.5219216", "0.51955676", "0.512268", "0.5091763", "0.5083889", "0.50785977", "0.50335145", "0.4983231"...
0.0
-1
unused harmony export SvelteComponentDev
function noop() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function About_svelte_create_fragment(ctx) {\n\tlet p0;\n\tlet p1;\n\tlet t3;\n\tlet p2;\n\tlet p3;\n\tlet t12;\n\tlet p4;\n\n\treturn {\n\t\tc() {\n\t\t\tp0 = (0,internal/* element */.bG)(\"p\");\n\n\t\t\tp0.innerHTML = `Thank you for using this open source solution for diy pedals. <br/>\r\n This is not to be ...
[ "0.60719687", "0.6010353", "0.57549626", "0.575442", "0.56585723", "0.55829096", "0.5559219", "0.5487359", "0.54740477", "0.5469893", "0.5467051", "0.54572284", "0.5424369", "0.5394552", "0.5385343", "0.536993", "0.5368931", "0.5351499", "0.53022385", "0.527264", "0.5251027",...
0.0
-1
used internally for testing
function set_now(fn) { now = fn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "protected internal function m252() {}", "static private internal fun...
[ "0.71199185", "0.6984853", "0.6819444", "0.6718284", "0.6586265", "0.6495085", "0.6412607", "0.6308305", "0.6290814", "0.62548345", "0.6224499", "0.61498475", "0.6146985", "0.6119751", "0.6100155", "0.6027559", "0.6022185", "0.5970338", "0.59053296", "0.59052354", "0.58940244...
0.0
-1
TODO figure out if we still want to support shorthand events, or if we want to implement a real bubbling mechanism
function bubble(component, event) { const callbacks = component.$$.callbacks[event.type]; if (callbacks) { callbacks.slice().forEach(fn => fn(event)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dumbListener2(event) {}", "function dumbListener2(event) {}", "function a(e, t, n) {\n for (var r = []; e; ) r.push(e), e = e._hostParent;\n var o;\n for (o = r.length; o-- > 0; ) t(r[o], \"captured\", n);\n fo...
[ "0.6424446", "0.6424446", "0.6186791", "0.6141718", "0.6128067", "0.61115056", "0.6101574", "0.6043465", "0.6026412", "0.6026268", "0.60221314", "0.600876", "0.59744817", "0.5928404", "0.5923925", "0.5923925", "0.5915001", "0.59078276", "0.59060436", "0.59016454", "0.58995956...
0.567334
33
Add a file to be downloaded.
add(options) { options.retries = options.retries || 5; options.destination += options.alias ? options.alias : options.origin.split('/').pop(); let Worker = new DownloadWorker(options); //remote(options.origin, (err, o) => //{ // Worker.totalSize = o this.downloads.push( Worker ) //}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "add(url, content, shouldOverWrite = true) {\r\n return new Files_1(this, `add(overwrite=${shouldOverWrite},url='${url}')`)\r\n .postCore({\r\n body: content,\r\n }).then((response) => {\r\n return {\r\n data: response,\r\n file: this.getB...
[ "0.6277242", "0.6104741", "0.6097865", "0.59584", "0.5953819", "0.5695493", "0.5652132", "0.56169504", "0.55963796", "0.559261", "0.5579964", "0.5556747", "0.5555496", "0.55074745", "0.5493672", "0.54909927", "0.54830337", "0.54665244", "0.54618704", "0.543336", "0.53984946",...
0.53760606
22
Start a download by index.
startSingle(index) { this.downloads[index].start(); this.addListeners(this.downloads[index]) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start(){\r\n req.open(\"GET\", fileToDownload+\"?\"+Math.random());\r\n req.start();\r\n }", "function startDownloading()\n{\n if (isDownloading)\n {\n log(\"Downloading process is already busy\");\n return;\n }\n isDownloading = true;\n for (var i = 0; i < simultaniousDownloads; ++i)\n {\...
[ "0.6236619", "0.5859311", "0.5667505", "0.5571568", "0.55245316", "0.55191326", "0.5490821", "0.54087865", "0.5398195", "0.5302962", "0.5260926", "0.5199928", "0.51899683", "0.51853174", "0.51772517", "0.514888", "0.51477575", "0.5126163", "0.5119436", "0.51018375", "0.509607...
0.73649335
0
sends message to user
function sendMessage(recipientId, message) { console.log("sending message '"+ JSON.stringify(message) +"' to " + recipientId + " !!!"); request({ url: "https://graph.facebook.com/v2.6/me/messages", qs: {access_token: process.env.PAGE_ACCESS_TOKEN}, method: "POST", json: { recipient: {id: recip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendMessage () {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n var senddata = message.split(\"|\");\n var targetid = senddata[0];\n message = senddata[1];\n // if there is a non-empty message and a socket connectio...
[ "0.77817917", "0.75431484", "0.7533001", "0.7504381", "0.7439131", "0.74257106", "0.73771036", "0.73747104", "0.73747104", "0.7366278", "0.73528075", "0.73402184", "0.73113644", "0.7305314", "0.72858995", "0.72832525", "0.72723246", "0.72669536", "0.7264974", "0.72612345", "0...
0.0
-1
Adds a filename comment to the beginning of the file contents
function commentFilename(options){ return function (files, metalsmith, done) { var regex = /^(exports|initializers|functions|widgets|bindings|aliases|finalizers)/; setImmediate(done); Object.keys(files).forEach(function(file){ if (regex.test(file)) { var data = files[file]; var in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prependHeader() {\n return gulp.insert.prepend(`// Do not edit this file; automatically generated by gulp.\\n`);\n}", "function indent_file_comment(file, spaces_added) {\n // How long should the tab string be?\n var file_name_length = _.last(file.name.split('/')).length;\n\n // The comment spaces is...
[ "0.6070299", "0.58329743", "0.5432988", "0.53630203", "0.52915436", "0.52650076", "0.52180755", "0.5123499", "0.5104368", "0.509551", "0.5074512", "0.50694716", "0.5034936", "0.50326985", "0.50326985", "0.50326985", "0.50326985", "0.50326985", "0.5029224", "0.50287867", "0.50...
0.6780776
0
Computes the DFT of a real sequence. The DFT size n must be a power of two, and the input and output arrays must have length n. On return, the output array contains the DFT of the input array and the input array is unmodified. The real parts of elements 0 through n / 2 of the DFT are stored in the corresponding output ...
function realFft(input, output) { var n = input.length, x = output, TWO_PI = 2*Math.PI, sqrt = Math.sqrt, n2, n4, n8, nn, t1, t2, t3, t4, i1, i2, i3, i4, i5, i6, i7, i8, st1, cc1, ss1, cc3, ss3, e, a, rval, ival, mag; _rever...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fft(input) {\n var\n n = input.length,\n nHalf,\n even,\n odd,\n output = [],\n wnkMultiplied,\n wnk,\n k,\n r;\n\n if (n === 1) {\n return input;\n }\n\n // even and odd parts\n even = fft(getListHalf(input, 0));\n od...
[ "0.6586579", "0.6464219", "0.6041781", "0.60376555", "0.5995664", "0.5907469", "0.5891883", "0.5836069", "0.581849", "0.5716947", "0.5704102", "0.5505738", "0.5439857", "0.5421298", "0.54198384", "0.53775525", "0.53440535", "0.5223646", "0.51883274", "0.50436455", "0.49659878...
0.71892834
0
add to the list of books
createNewBook(e) { e.preventDefault(); var bookname = this.state.bookName; var review = this.state.review; var rating = this.state.rating; // TODO console.log("create a new book"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addtoLibrary(id, book, authorName, pages, read, list) {\n list.push(new Book(id, book, authorName, pages, read));\n}", "function addBookToLibrary(book) {\n let bookList = document.querySelector('.bookList');\n \n const newBook = new Book();\n myLibrary.push(newBook);\n }"...
[ "0.80941576", "0.7956222", "0.7777636", "0.774322", "0.77287364", "0.77067417", "0.76871127", "0.76665205", "0.76205575", "0.7617521", "0.75869", "0.7579084", "0.7538007", "0.75126255", "0.75073004", "0.7478863", "0.7475004", "0.7474728", "0.74647385", "0.74646825", "0.745559...
0.0
-1
Given a string, return true if the string is a palindrome or false if it is not. Palindromes are strings that form the same word if it is reversed. Do include spaces and punctuation in determining if the string is a palindrome. Examples: palindrome("abba") === true palindrome("abcdefg") === false
function palindrome(str) { debugger; return str.split(``).every((value, index) => { return value == str[str.length - index -1]; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function palindrome(str) {\n \n // pre-process\n str = str.toLowerCase();\n \n // find unwanted characters and replace\n const re = /[^a-z\\d]+/g;\n\tstr = str.replace(re, '');\n\t\n // for reversing a string\n function reverseString(txt) {\n return txt.split('').reverse().join('');\n\t}\n\n\t// A quest...
[ "0.84105533", "0.8378884", "0.8348495", "0.83476365", "0.8336062", "0.83340245", "0.833091", "0.8316948", "0.8276817", "0.82523996", "0.8251815", "0.82491213", "0.8239834", "0.8228487", "0.821896", "0.8201765", "0.8198832", "0.8171502", "0.81682163", "0.8163941", "0.8158128",...
0.0
-1
This function creates buf[] to store individual output string and uses printPatternUtil() to print all permutations.
function printPattern(str) { var buf = []; // Copy the first character as it is, since it will be always // at first position buf.push(str[0]); printPatternUtil(str, buf, 1, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printPattern(n){\r\n\tif (isValidNum(n)) {\r\n\t\tlet space = ' ', arr = ['*'];\r\n\t\tfor (let j = 0; j < n - 2; j++) {\r\n \t\tarr.push(space + arr[0]);\r\n \t}\r\n \t\tlet arr1 = [...arr];\r\n \t\tfor (let i = 1; i < n - 2; i++){\r\n \t\tarr1[i] = space + space;\r\n \t}\r\n \t\tfor (le...
[ "0.61922973", "0.6000047", "0.5918584", "0.57204735", "0.57007986", "0.5689522", "0.5652139", "0.5519991", "0.5444885", "0.54393315", "0.5438747", "0.54119974", "0.53833", "0.5376496", "0.53368986", "0.5332648", "0.52725136", "0.524745", "0.5219877", "0.52175575", "0.5216951"...
0.6355397
0
Driver program to test above functions
function main() { var str = "ABCD"; printPattern(str); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testRun()\r\n{\r\n}", "function runTests() {\n\ttestBeepBoop();\n\ttestGetDigits();\n}", "function run(){\n\n\tdescribe(\"XML Tester\", function(){\n\t\t\n\t\t//gameName = process.env.npm_config_gamename;\n\t\t//console.log(\"Testing \" + gameName);\n\t\t\n\t\t//findXML();\n\t\t//parseXML();\n\t\t//lo...
[ "0.6943763", "0.6799977", "0.65061843", "0.6503053", "0.6403439", "0.6389373", "0.63745534", "0.6363702", "0.63411087", "0.6336098", "0.6294766", "0.62929136", "0.62903804", "0.6266198", "0.6255165", "0.6234417", "0.62246454", "0.6202381", "0.61848456", "0.61640614", "0.61478...
0.0
-1
write myFind(array, callback). It should return the first element for which callback returns true, or undefined if none is found.
function myFind(array, callback) { for(let i = 0; i < array.length; i++) { if (callback(array[i])) { return array[i]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find(array, callback) {\n const index = findIndex(array, callback);\n\n if (index === -1) {\n return undefined;\n }\n\n return array[index];\n}", "function myFind(arr, cb) {\n for (let i = 0; i < arr.length; i++) {\n if (cb(arr[i], i, arr) === true) return arr[i]\n }\n return undefined\n}",...
[ "0.8624664", "0.8598655", "0.847042", "0.8463477", "0.8435616", "0.8221286", "0.8221286", "0.820407", "0.820407", "0.820407", "0.820407", "0.7991535", "0.7795193", "0.77901125", "0.7744378", "0.76910067", "0.76910067", "0.7677196", "0.76131606", "0.7564818", "0.7564818", "0...
0.88592863
0
sorting algorithms enumerable functions. not necessary to know all of them but practice with some of them hard ones, zip, flatten, transpose curry curried sum form as well inherits myBind probably won't do recursive subsets substrings recursive fair game, some of the easier ones fair game do recursive questions come fr...
function bsearch(arr, target) { /* let middle = Math.floor(arr.length / 2); let midP = arr[middle]; if (arr.length === 1 && arr[0] != target) { return -1; } if (midP < target) { let search = bsearch(arr.slice(middle + 1), target); return (search === -1) ? -1 : search + middle + 1; } else if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Sort() {}", "sort() {\n\t}", "sort() {\n\t}", "function Zc(a){a=a.Xb();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].Zg;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort($c);b.sort($c);return[c,b]}", "async function TopologicalSort(){}", "function bc(){for(var a=B.Za(),b=[],c=[],d=0;d<a....
[ "0.6470853", "0.6360575", "0.6360575", "0.63112783", "0.5952386", "0.5904253", "0.5757478", "0.5753479", "0.5752494", "0.5706587", "0.5698747", "0.5672965", "0.5645436", "0.5624452", "0.5597917", "0.5588753", "0.5576852", "0.55720776", "0.5515319", "0.5500138", "0.5500138", ...
0.0
-1
console.log([1, 32, 2, 1, 5, 6, 3, 4, 9, 7].bubbleSort());
function digital_root(num) { while (Math.floor(num >= 10)) { num = Math.floor(num/10) +Math.floor(num % 10); } return num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bubbleSort(numbers) {\n for (var i=0; i<numbers.length-1; i++) {\n bubble(numbers);\n }\n}", "function bubblesort(){\n\tfor(var i = 0; i < numbers.length - 1; i ++){\n\t\tif(numbers[i] > numbers[i+1]) {\n\t\t\tswap(numbers, i, i+1);\n\t\t}\n\t}\n}", "function bubbleSort(arr){\r\n\tlen=arr.length;...
[ "0.78671676", "0.78033644", "0.7624914", "0.7604721", "0.7576002", "0.75666964", "0.753814", "0.75333196", "0.75331897", "0.74952817", "0.74946386", "0.74880236", "0.74808824", "0.7452437", "0.74382156", "0.7435592", "0.73947793", "0.7394596", "0.7385499", "0.7376941", "0.736...
0.0
-1
selected any two random players from the list of available users and starts a new game from them
function setOpponents() { // get the count of users waiting var users_waiting = getUsersWaiting(); // if number of users waiting for game >= 2 then assign the game if (users_waiting >= 2) { var max_two = 1; for (var socket_id in users_pool) { if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function determineStartingPlayer()\n{\n // @TODO: Random laten bepalen welke speler aan de beurt is of mag beginnen\n \n}", "launchGame() {\n this.grid.generate()\n this.grid.generateWalls()\n this.grid.generateWeapon('axe', this.grid.giveRandomCase())\n this.grid.generateWeapon...
[ "0.659515", "0.6550331", "0.6505562", "0.64832723", "0.6451876", "0.644287", "0.6436833", "0.6428973", "0.63959163", "0.63885844", "0.6386447", "0.6382492", "0.63391787", "0.6334738", "0.6314691", "0.62957627", "0.62905717", "0.62879336", "0.6265084", "0.6238641", "0.6202021"...
0.69010025
0
get the number of users waiting to get assigned to opponents
function getUsersWaiting() { // get the count of users waiting var users_waiting = 0; for (socket.id in users_pool) { if (users_pool[socket.id] == 0) { users_waiting++; } } return users_waiting; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTournamentOverdueCnt() {\n var cnt = 0, i; \n var d = Date.now();\n if (this.tournament.paymentdeadline != \"0\") {\n for (i = 0; i < this.players.length; i++) {\n if (this.players[i].paymentstatus == \"open\" && d > (parseInt(this.players[i].datetime) + (24*60*60*...
[ "0.68672097", "0.66987586", "0.64998615", "0.6445678", "0.6336057", "0.6295012", "0.62917525", "0.62645805", "0.62565106", "0.6252735", "0.6228349", "0.61167145", "0.6092475", "0.60733366", "0.60618347", "0.6038861", "0.6001712", "0.59564173", "0.59540725", "0.5937846", "0.59...
0.74259245
0
maintains the game timer for multiple games
function timer() { var from = socket.id; var to = user_games[from]; if (typeof game_timer[from] != 'undefined' && typeof game_timer[to] != 'undefined') { clearInterval(game_timer[from]); clearInterval(game_timer[to]); } var timer_data = { 'c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adjustTimers() {\n\tgameTime += 10;\n\tquestionTime += 10;\n}", "function startGameTimer(){\n var timer = setInterval(() => {\n console.log(GMvariables.timerSecs);\n $(\"#timer\").text(GMvariables.timerSecs);\n if(GMvariables.timerSecs == 0){\n $(\"#timer\").text(\"Go\...
[ "0.74784154", "0.73649013", "0.7327132", "0.72975415", "0.7297011", "0.7280037", "0.72322077", "0.72220606", "0.7203725", "0.71860313", "0.715417", "0.7148423", "0.7142443", "0.71149135", "0.70989364", "0.70925176", "0.70845604", "0.7070818", "0.70640874", "0.70563906", "0.70...
0.7115431
13
function called everytime a block is clicked to check the result Not working properly
function check_result(block, counter) { var One = block.one; var Two = block.two; var Three = block.three; var Four = block.four; var Five = block.five; var Six = block.six; var Seven = block.seven; var Eight = block.eight; var Nine = block.nine; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickHandler() {\n $(\"li\").on(\"click\",function(){\n var userChoice = $(this).text();\n if (userChoice === answerText) {\n alert(\"correct broseph\");\n questionCount++;\n recalculateVariables();\n stopwatch.reset();\n generateQues...
[ "0.6373179", "0.63307035", "0.6306638", "0.62625057", "0.61184806", "0.6069509", "0.6014631", "0.6011982", "0.5987556", "0.59691846", "0.59523124", "0.5927802", "0.5854554", "0.58505476", "0.5831532", "0.5820522", "0.5818041", "0.58017254", "0.5796113", "0.57797766", "0.57650...
0.0
-1
List of clusters is not completed, feel free to add more.
isCluster(clusterName) { return this.Cluster.name === clusterName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function load_clusters() {\n\n}", "function resolveClusters() {\n \n // Check for clusters\n findClusters();\n \n // While there are clusters left\n while (clusters.length > 0) {\n \n // Remove clusters\n removeClusters();\n \n ...
[ "0.74533576", "0.6758969", "0.67501056", "0.6590354", "0.6590354", "0.6488301", "0.6336951", "0.63040864", "0.6263972", "0.6231114", "0.61905444", "0.61883605", "0.6124124", "0.6102308", "0.6093378", "0.6081265", "0.6077682", "0.6077682", "0.60421157", "0.6034191", "0.6013166...
0.0
-1
List of commands is not completed, feel free to add more.
isCommand(commandName) { return this.getCommand().name === commandName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCommands() {\n console.log(`${mainDivider}\\n${\"WELCOME TO LIRI-BOT! HERE'S WHAT I CAN DO!\"}\\n${mainDivider}`)\n console.log(`${\"Use the following commands to run Liri-Bot:\"}\\n${minorDivider}\\n${\"'my-tweets' : To list the last 20 tweets\"}\\n${minorDivider}\\n${\"'spotify-this-song' + 'song ...
[ "0.7289839", "0.7281134", "0.6832916", "0.6726492", "0.6625007", "0.6577985", "0.65505755", "0.6499317", "0.64360535", "0.6259603", "0.6217226", "0.619914", "0.6193275", "0.6172223", "0.6107012", "0.60867083", "0.60801315", "0.60719407", "0.60610384", "0.60416657", "0.5973155...
0.0
-1
Global Uses Scale Canvas With Window: scalingCanvasWindow(width, height, gameInstance) Limit Input TextBox with only numbers: limitNumberInput() |||||||||||||||||||||||||||||| Sample Usage: "" Limit Input TextBox with limited number length: inputNumberValidation(id, maxLength, maxNumber) Update HTML DOM element with Ph...
function scalingCanvasWindow(width, height, gameInstance) { gameInstance.input.maxPointers = 1; if (gameInstance.game.device.desktop) { gameInstance.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; gameInstance.stage.forcePortrait = true; gameInstance.scale.setScreenSize = true; } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enforceTextboxLimits() {\n\tif (inputPixelsWide.value() < 1) inputPixelsWide.value(1); //Pixels Wide\n\telse if (inputPixelsWide.value() > MAX_PIX_WIDE) inputPixelsWide.value(MAX_PIX_WIDE);\n\tif (inputBlocksWide.value() < 1) inputBlocksWide.value(1); //Blocks Wide\n\tif (inputBlocksWide.value() > MAX_BLO...
[ "0.63645875", "0.58528847", "0.56741333", "0.5470718", "0.545932", "0.54211235", "0.53193057", "0.5283239", "0.52811646", "0.5261913", "0.52588046", "0.5234438", "0.52245414", "0.5223115", "0.5211858", "0.52004766", "0.51963085", "0.51714647", "0.51514584", "0.5147171", "0.51...
0.55314267
3
Used for positioning debugging
function cursorUpdate(obj, xOffSet, yOffSet, gameInstance) { if (typeof obj != "undefined") { if (obj != null) { obj.x = gameInstance.game.input.mousePointer.x + xOffSet; obj.y = gameInstance.game.input.mousePointer.y + yOffSet; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_dumpFrame()\n {\n const objects = {'@': this._droidPos};\n this._grid.dump(' ', objects);\n console.log(`springdroid position: [${this._droidPos}]`);\n console.log('');\n }", "function position(pos) {\n log.innerHTML = pos\n }", "function drawDebugInfo() {\n\tfill(255);\n\ttext(\"x: \"...
[ "0.69571596", "0.6721771", "0.6662455", "0.6644032", "0.65245694", "0.6491973", "0.643744", "0.6404313", "0.64039195", "0.63346994", "0.6319512", "0.6284389", "0.62654275", "0.626169", "0.6198814", "0.61123395", "0.60961837", "0.6073835", "0.6047057", "0.6046614", "0.6032992"...
0.0
-1
Charge function that is called for each node This is what creates the repulsion between nodes Charge is proportional to the radius attribute of the circle Charge is negative so that nodes repel
function charge(d) { return -Math.pow(d.radius, 2) * forceStrength; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function charge(d) {\n return -Math.pow(d.radius, 2.0) / 8;\n }", "function charge(d) {\n\t\t\treturn Math.pow(d.radius, 2.0) * 0.01\n\t\t}", "function charge(d) {\n return -Math.pow(d.radius, 2.0) * forceStrength*1.4;\n }", "charge(d) {\n if (d.radius === 0) {\n return 0;\n }\n return ...
[ "0.6834833", "0.6773706", "0.6714479", "0.6691946", "0.66890436", "0.6658279", "0.66543245", "0.664597", "0.66036046", "0.6497034", "0.64406097", "0.60405415", "0.5804359", "0.57918876", "0.57423824", "0.56003296", "0.5567225", "0.55634594", "0.55392283", "0.55227023", "0.547...
0.6697633
3
Takes raw data from JSON returned by Twitter Converts it into an array of node objects Adds attributes to each node Returns new node array, with a node array for each element in raw data
function createNodes(rawData) { // Use the max total_amount in the data as the max in the scale's domain let maxAmount = d3.max(rawData, function (d) { return d.tweet_volume; }); if (maxAmount === undefined) { maxAmount = 500000; } // Sizes bubbles based on area let radiusScale = d3.scal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function data_to_nodes (data) {\n\treturn data.map(([url, type]) => object_to_node(url, type));\n}", "function processTweetData(data) {\n var twitterTextUrlData = [];\n data.forEach(function(tweet) {\n if(tweet.entities.urls[0]) {\n if(tweet.entities.urls[0].expanded_url) {\n ...
[ "0.60397834", "0.59702915", "0.5970185", "0.5788595", "0.5695022", "0.5676949", "0.56244034", "0.5518304", "0.5502173", "0.546232", "0.5456341", "0.5436668", "0.54243535", "0.5357325", "0.53466034", "0.5301907", "0.5286672", "0.5238344", "0.5220994", "0.5179865", "0.51703215"...
0.5788598
3
Callback function that is called after every tick of the force simulation Repositions the SVG circles based on the current x and y values of their bound node data The x and y values are modified by the force simulation
function ticked() { bubbles .attr('cx', function (d) { return d.x; }) .attr('cy', function (d) { return d.y; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePosition() {\r\n\t\t\tcircle.attr('transform', `translate(${point.x * graph.cell_size + graph.offset.x} ${point.y * graph.cell_size + graph.offset.y})`);\r\n\t\t}", "function tick() {\n // Update SVG size\n updateSvgSize();\n svgPointer.attr('height', height)\n .attr('width', width);\n simu...
[ "0.73305964", "0.7046232", "0.69702774", "0.6879184", "0.67834985", "0.6749952", "0.67472994", "0.6638279", "0.6620225", "0.65986127", "0.65864956", "0.65804374", "0.65089434", "0.6452232", "0.6415937", "0.6406751", "0.63980144", "0.63942224", "0.6351135", "0.6350396", "0.633...
0.0
-1
Sets visualization. tick function is set to move all nodes to the center of the visualization.
function groupBubbles() { hideNames(); // Reset the 'x' force to draw the bubbles to the center simulation.force('x', d3.forceX().strength(forceStrength).x(center.x)); // Reset the alpha value and restart the simulation simulation.alpha(1).restart(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tick() {\n path.attr(\"d\", function (d) {\n return linkArc(d);\n });\n path_invisible.attr(\"d\", function (d) {\n return linkArc(d);\n });\n node.attr(\"cx\", function (d) { return d.x = Math.max(50, Math.min(plotWidth ...
[ "0.6165307", "0.604885", "0.60299546", "0.5780206", "0.5762297", "0.5686958", "0.5660697", "0.5612583", "0.560167", "0.5600342", "0.55774784", "0.5570366", "0.55678725", "0.5566909", "0.5562889", "0.5562889", "0.55564123", "0.5545517", "0.5520922", "0.5517834", "0.55176866", ...
0.0
-1
This function calls the tooltip on mouseover
function showDetail(d) { // changes outline to indicate hover state // calls moveToFront to move circle to top level // increases radius of circle d3.select(this) .moveToFront() .attr('stroke', 'black') .transition() .duration(300) .style("opacity", 1.0) .attr("r", d.radius*...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseOver() {\n\t\ttooltip.style(\"display\", \"block\")\n\t\t\t .style(\"visibility\", \"visible\");\n\t}", "function mouseOver() {\n tooltip\n .style(\"opacity\", 1)\n .style(\"display\",\"inherit\");\n}", "function showTooltip_onMouseOver(){\n//-----------------------------------...
[ "0.80194783", "0.7891477", "0.78590745", "0.7761713", "0.76202196", "0.7500115", "0.7437451", "0.7430914", "0.7410543", "0.7408706", "0.7402116", "0.7370759", "0.7360521", "0.73270947", "0.72905", "0.727217", "0.7241314", "0.7227977", "0.7216838", "0.7216568", "0.71947104", ...
0.0
-1
Function called once data is loaded from Twitter API. Calls bubble chart function to display inside vis div
function display(data) { myBubbleChart('#vis', data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawChart() {\r\n drawSentimentBreakdown();\r\n drawSentimentTimeline();\r\n drawPopularityTimeline();\r\n}", "function display(error, data) {\r\n if (error) {\r\n console.log(error);\r\n }\r\n\r\n myBubbleChart('#vis', data);\r\n}", "function display(error, data) {\n if (error) {\n conso...
[ "0.6846839", "0.6671257", "0.6665398", "0.6665398", "0.66589457", "0.6649591", "0.6531296", "0.64154994", "0.63749385", "0.635881", "0.6309503", "0.62684727", "0.62656224", "0.6247709", "0.62469274", "0.62415844", "0.62329733", "0.62317115", "0.621533", "0.620934", "0.6190062...
0.7072118
0
Display tooltip with provided content (HTML string) event is d3.event for positioning.
function showTooltip(content, event) { tt.style('opacity', 1.0) .html(content); updatePosition(event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n \n updatePosition(event);\n }", "function showTooltip(content, event) {\n tooltip.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }", "function showToolt...
[ "0.77625823", "0.77496827", "0.7748009", "0.76961493", "0.7674846", "0.71228945", "0.6835533", "0.66375226", "0.65843207", "0.6390603", "0.6242512", "0.6239231", "0.62252957", "0.6170623", "0.61018926", "0.60795134", "0.6078541", "0.6046181", "0.60135067", "0.6010938", "0.594...
0.7774566
0
Figure out where to place the tooltip based on d3 mouse event.
function updatePosition(event) { var xOffset = 20; var yOffset = 10; var ttw = tt.style('width'); var tth = tt.style('height'); var wscrY = window.scrollY; var wscrX = window.scrollX; var curX = (document.all) ? event.clientX + wscrX : event.pageX; var curY = (document.all) ? event.cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawTooltip() {\n \n console.log(d3.mouse(this));\n \n \n //console.log(Math.floor(xScale.invert(d3.mouse(this)[0])))\n mYear = Math.floor(xScale.invert(d3.mouse(this)[0])) + 1;\n\n cYear = dataset.year[0];\n for (i = ...
[ "0.73653805", "0.72793233", "0.71801907", "0.71586174", "0.7155518", "0.709138", "0.70270675", "0.7001061", "0.69077057", "0.69051415", "0.6888221", "0.6886967", "0.68859833", "0.68582356", "0.68314177", "0.6824222", "0.6816944", "0.6793166", "0.6791133", "0.6776614", "0.6708...
0.0
-1
Function to get a random pokemon from the list
function getPokemon() { var rngIndex = Math.floor(Math.random() * pokemonList.length); return pokemonList[rngIndex].name.toUpperCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getRandomPokemon() {\n let randomNum = Math.floor(Math.random() * (802));\n return Pokemon.allPokemons[randomNum]\n }", "function pickPok() {\n\t\tvar random = Math.floor(Math.random() * randomPokemon.length);\n\t\treturn randomPokemon[random];\n\t}", "function randomPokemon(pokedex) {\r\n let...
[ "0.81704485", "0.8147017", "0.81152034", "0.80853814", "0.80459934", "0.80126756", "0.7453889", "0.7277793", "0.7237174", "0.7231135", "0.72246593", "0.70932835", "0.70878416", "0.697496", "0.6922707", "0.6908274", "0.68065274", "0.66700035", "0.6635013", "0.6620242", "0.6603...
0.85850316
0
Function to start the round
function startRound() { // Reset the lives to 5 userLives = 5; $("#user-lives").text(userLives); // Enable all the alphabet buttons $(".alphabet-button").attr("disabled", false); $(".alphabet-button").removeClass("letter-clicked"); // Get a random word to be guessed wordToGuess = getPoke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startRound()\n {\n $scope.stopRunningRound = false;\n }", "function round(){\n\t\trandomNumGen();\n\t\taddRound();\n\t\tincrement();\n\t}", "function startNewRound() {\n userObject.round = currentRound;\n userObject.currentSelection = \"\";\n databaseModify.update();\n ...
[ "0.75445086", "0.7295906", "0.7132083", "0.70368916", "0.6918309", "0.6845575", "0.67931014", "0.67660284", "0.6746778", "0.6745493", "0.67452466", "0.67350376", "0.6667824", "0.66082805", "0.6565976", "0.65354925", "0.65198404", "0.6513491", "0.6494667", "0.6469164", "0.6458...
0.0
-1
Function called when round ends
function endRound() { // Disable all the buttons $(".alphabet-button").attr("disabled", true); // Check if its a loss if (userLives === 0) { $("#result").text("You lost! The word was " + wordToGuess); } else { $("#result").text("You won!"); } $("#replay-button").attr("hid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endRound()\n{\n //@TODO: Hier coderen we alles om een ronde te beëindigen\n\n}", "updateRound() {}", "endRound() {\n return __awaiter(this, void 0, void 0, function* () {\n this.clearTimer();\n });\n }", "function finishRound(callback)\n {\n try\n ...
[ "0.82619536", "0.695614", "0.6909023", "0.67117804", "0.6600345", "0.6573108", "0.64601946", "0.63690835", "0.6306024", "0.6267069", "0.6266442", "0.62319005", "0.6228111", "0.62159455", "0.619348", "0.6180111", "0.6164754", "0.60922444", "0.6071054", "0.60223377", "0.5977336...
0.0
-1
Updates the position of the popper, computing the new offsets and applying the new style. Prefer `scheduleUpdate` over `update` because of performance reasons.
function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // ...
[ "0.81239766", "0.80965054", "0.809285", "0.809285", "0.809285", "0.809285", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.8...
0.0
-1
Setup needed event listeners used to update the popper position
function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; window.addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(reference); atta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function g(e){if(Q.popperInstance?(y()||Q.popperInstance.scheduleUpdate(),Q.props.livePlacement&&!y()&&Q.popperInstance.enableEventListeners()):(Q.popperInstance=v(),Q.props.livePlacement||Q.popperInstance.disableEventListeners())\n/**\n * If the instance previously had followCursor behavior, it will be\n ...
[ "0.6769974", "0.6417632", "0.64030445", "0.6223608", "0.6183171", "0.6181786", "0.6170131", "0.6156681", "0.6137401", "0.610449", "0.6096503", "0.6080667", "0.60669744", "0.60642374", "0.6033124", "0.60322726", "0.60289633", "0.60249007", "0.6023305", "0.60156345", "0.6015634...
0.0
-1
It will add resize/scroll events and start recalculating position of the popper element when they are triggered.
function enableEventListeners() { if (!this.state.eventsEnabled) { this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "adoptPositionOnResize() {\n if (this.adoptOnResize) {\n\n /**\n * Get app event manager\n * @type {ApplicationEventManager|{subscribe, eventList}}\n */\n const appEventManager = this.view.controller.root().eventManager;\n\n appEventManager.subscribe({\n event: {name: appE...
[ "0.6576275", "0.6570369", "0.6539556", "0.6458064", "0.6442035", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "...
0.0
-1
Remove event listeners used to update the popper position
function removeEventListeners(reference, state) { // Remove resize event listener on window window.removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { target.removeEventListener('scroll', state.updateBound); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEvents () {\n this.container.classList.remove(\"tooltiped\");\n\n this.container.removeEventListener(\"mouseenter\", this._mouseOver);\n this.container.removeEventListener(\"mousemove\", this._mouseMove);\n this.container.removeEventListener(\"mouseleave\", this._mouseOut);\n ...
[ "0.6902162", "0.6785765", "0.6785765", "0.6785765", "0.6770545", "0.6743059", "0.6592434", "0.6507296", "0.6457278", "0.6452451", "0.6450113", "0.64127916", "0.63347775", "0.629248", "0.62742007", "0.62729037", "0.6259061", "0.62421805", "0.6237802", "0.62315637", "0.62195307...
0.0
-1
It will remove resize/scroll events and won't recalculate popper position when they are triggered. It also won't trigger onUpdate callback anymore, unless you call `update` method manually.
function disableEventListeners() { if (this.state.eventsEnabled) { window.cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(){ // if popper is destroyed, don't perform any further update\nif(this.state.isDestroyed){return;}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}}; // compute reference element offsets\ndata.offsets.reference = getReferenceOffsets(this.state,this.popper,this...
[ "0.7483206", "0.728697", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", "0.72542346", ...
0.0
-1
public methods used by ControllerView to operate on data
getAll() { return { comments: _comments }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ViewData() {}", "function ViewData() {}", "function ViewData() {}", "function ViewData() { }", "function ViewData() { }", "function ViewData(){}", "function ViewController(){}//Extends Controller (at bottom of page).", "setupController(controller , model ){ \n contro...
[ "0.67061555", "0.67061555", "0.67061555", "0.6705485", "0.6705485", "0.66890496", "0.6313902", "0.6180029", "0.6120839", "0.6018066", "0.58707154", "0.57675266", "0.5758174", "0.5746665", "0.5743828", "0.5721797", "0.57118046", "0.5693033", "0.56911904", "0.5670363", "0.56696...
0.0
-1
! Vue.js v2.3.3 (c) 20142017 Evan You Released under the MIT License.
function n(t){return void 0===t||null===t}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mounted() {\n }", "mounted() {\n\n }", "mounted() {\n\n }", "constructor() {\n this.vue = new Vue();\n }", "mounted() {\n /* eslint-disable no-console */\n console.log('Mounted!');\n /* eslint-enable no-console */\n }", "created () {\n\n }", "created () {...
[ "0.6971927", "0.69317377", "0.69033617", "0.6580222", "0.6495123", "0.63756263", "0.63756263", "0.63605577", "0.6345544", "0.6321052", "0.63121384", "0.6309843", "0.6251874", "0.62462175", "0.6241032", "0.6218533", "0.6214965", "0.6175605", "0.61701155", "0.61701155", "0.6167...
0.0
-1
DA A VIDA PRO JOGO
function desenhar(){ //imagem posicao x e y ctx.drawImage(bg,0,0); if(continua){ for(var i = 0; i < canos.length; i++){ constante = canoCima.height + intervaloCanos; ctx.drawImage(canoCima,canos[i].x,canos[i].y); ctx.drawImage(canoBaixo,canos[i].x,canos[i].y+constante); canos[i].x--; if(canos[i]....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leerDatosProductos(producto){\n const infoProducto = {\n img: producto.querySelector('.imagen').src,\n titulo: producto.querySelector('#title-product').textContent,\n cantidad: producto.querySelector('#cantidad').value,\n precio: producto.querySelector('#precio').textCo...
[ "0.61729443", "0.612191", "0.6064804", "0.602141", "0.59659845", "0.5908075", "0.58936614", "0.58857846", "0.5857164", "0.578625", "0.5771184", "0.575071", "0.57500416", "0.5726825", "0.57182986", "0.5701177", "0.56986207", "0.56914777", "0.56901217", "0.5648152", "0.56448704...
0.0
-1
Compensate for the fixedposition main nav when scrolling to anchors.
function scrollToTarget(e) { let destination, offset, target; if (e && e.target.nodeName !== 'A') { return; } if (e && e.target.href.indexOf('#') === -1) { return; } if (e) { destination = document.getElementById(e.target.href.split('#')[1]); } else { desti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function conteudoAtual(){\r\n\t\tvar scrollTop = $(this).scrollTop();\r\n\t\t$('.nav-anchor').each(function(){\r\n\t\t\t\r\n\t\t\tvar distanciaIndex = $(this).parent().offset().top;\r\n\t\t\tvar navContent = $(this).text();\r\n\t\t\tvar alturaNav = $('.section-index-fixed').outerHeight() - 2;\r\n\t\t\tvar ditancia...
[ "0.70668024", "0.68402946", "0.6632437", "0.6630142", "0.6611114", "0.6566989", "0.65533686", "0.65281487", "0.64842355", "0.64800596", "0.6479257", "0.6468242", "0.6455125", "0.6408782", "0.63811827", "0.63410795", "0.6304204", "0.6277771", "0.62670165", "0.62491345", "0.623...
0.57142854
93
all valid cases go through this.
function testValidTemplate(ruleName, item) { var config = { rules: {} }; if (item.globals || item.global) { config.global = item.globals ? item.globals : item.global; } config.rules[ruleName] = item.args ? item.args : 1; var messages = eslin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate(){\n\n\t\t//TODO: make this work\n\n\n\t}", "validateAll () {\n for (let fieldID of Object.keys(this.fields)) {\n this.fields[fieldID].validate()\n }\n }", "function next(){\n\tvalidate();\n}", "function next(){\n\tvalidate();\n}", "function validation() {\r\n\...
[ "0.5778514", "0.5496515", "0.54765195", "0.54765195", "0.54557467", "0.5455593", "0.545231", "0.5432685", "0.539498", "0.539498", "0.53709894", "0.53238297", "0.5310575", "0.5274819", "0.5265935", "0.5231831", "0.5206951", "0.5188704", "0.51873785", "0.5179317", "0.5177739", ...
0.0
-1
all invalid cases go through this.
function testInvalidTemplate(ruleName, item) { var config = { rules: {} }; if (item.globals || item.global) { config.global = item.globals ? item.globals : item.global; } config.rules[ruleName] = item.args ? item.args : 1; var messages = esl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_invalidateProperties() {\n this.__isInvalid = true;\n super._invalidateProperties();\n }", "function validate(){\n\n\t\t//TODO: make this work\n\n\n\t}", "function next(){\n\tvalidate();\n}", "function next(){\n\tvalidate();\n}", "function next(){\n validate();\n}", "function n...
[ "0.5477013", "0.54299045", "0.54209197", "0.54209197", "0.5387659", "0.5387659", "0.53781176", "0.53581345", "0.5347819", "0.5318524", "0.5317603", "0.52422976", "0.523721", "0.5221522", "0.5196965", "0.51656127", "0.5158442", "0.51506275", "0.51352847", "0.5131769", "0.51235...
0.0
-1
Analyze and score a piece of text
async function AnalyzeApieceOfText() { let sentimentService = new sentiment.SentimentService( process.env.MICRO_API_TOKEN ); let rsp = await sentimentService.analyze({ text: "this is amazing", }); console.log(rsp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_text_score(text) {\n\tvar punctuationless = text.replace(/[\\.,-\\/#!$%\\^&\\*;:{}=\\-_`~()]/g, \" \");\n\t// S(text).stripPunctuation().s; //My string full of punct\n\tvar words = punctuationless.toLowerCase().split(' ');\n\tvar sum = 0;\n\t// var unknown_words = [];\n\t_.each(words, function(word) {...
[ "0.68353045", "0.6794308", "0.67318296", "0.6666667", "0.65159374", "0.6345133", "0.6328304", "0.6317346", "0.62106526", "0.6208227", "0.6151889", "0.6138787", "0.61067754", "0.61052424", "0.6090011", "0.60325783", "0.6027208", "0.6017731", "0.6015313", "0.6001178", "0.599688...
0.595265
22
dropdown change event for both the dropdowns.
function dropdownChange(event) { let elementId = event.target.id; let dropdown = document.getElementById(elementId); let id = dropdown.options[dropdown.selectedIndex].value; let chartId = getChartId(elementId); let dataObj = getDataObj(elementId); document.getElementById(chartId + '-text').inner...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hideDropDown() {\n\n // check if the 1st dropdown(#jsonFrom) has a selection, if not we'll\n // hide the 2nd dropdown(#jsonTo)\n if (!this.isDropDownSelected()) {\n jQuery('#jsonTo_chosen').hide();\n }\n\n // Add an event listener and check for changes on the first dropdown\n // and show th...
[ "0.6719707", "0.6592821", "0.6568608", "0.6466199", "0.6466199", "0.6429608", "0.6405071", "0.63879746", "0.638026", "0.63757086", "0.6372699", "0.63440007", "0.63303894", "0.6304347", "0.6296349", "0.6284125", "0.62291205", "0.62231266", "0.61949366", "0.6175191", "0.6172763...
0.59477055
41
creating functions to get chart id.
function getChartId(elementId) { if (elementId == 'dropdown-1') { return 'chart-1'; } else { return 'chart-2'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updatechartId(chart) {\n let id = '';\n if (id === '') {\n id = this.addChartRelation(this.documentCharts, chart);\n }\n return id;\n }", "async idChart() {\n return this.idView;\n }", "function id(dataset) {\n return dataset.id;\n }", "function l...
[ "0.75462484", "0.71802586", "0.66997457", "0.6683701", "0.63218737", "0.61355025", "0.60719764", "0.60060453", "0.60060453", "0.60060453", "0.5980185", "0.5930263", "0.58772266", "0.58581555", "0.5844549", "0.5826903", "0.57903546", "0.57380164", "0.57071644", "0.5657412", "0...
0.7061239
2
creating functions to get data object.
function getDataObj(elementId) { if (elementId == 'dropdown-1') { return mcdData; } else { return bkData; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_data() {}", "getData(){}", "GetData() {}", "getData () {\n }", "function getData(data) {\n return data;\n}", "function getData(data) {\n return data;\n}", "getData() {\n \n}", "function accessesingData2() {\n\n}", "function accessesingData2() {\n\n}", "function getData(data) {...
[ "0.8486543", "0.7906463", "0.7497307", "0.74342066", "0.72407866", "0.72157913", "0.71401143", "0.70329374", "0.70329374", "0.69408464", "0.6879435", "0.6879435", "0.67890143", "0.67551357", "0.6743474", "0.66915774", "0.665628", "0.6645042", "0.6633657", "0.6592943", "0.6535...
0.0
-1
d3 function animating donut charts Author: Modified by: Avneet Arora d3 mouse over function animating arc of donut chart
function handleMouseOver(d, i) { d3.select(this).transition().duration(300).attr('d', d3.arc().innerRadius(70).outerRadius(185 * 1.2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arcTween(d) {\t\t\t \n\t\t\t /*define the path of each tween*/\n\t\t\t var path = d3.select(this);\n\t\t\t /*get the starting y position of each bar*/\n\t\t\t var y0 = d.index * yBandScale_extraChart.bandwidth();\n\t\t\t \n\t\t\t return function(t) {\n\t\t\t ...
[ "0.7363794", "0.7079144", "0.70527494", "0.69723356", "0.6920645", "0.6887739", "0.6884906", "0.6873524", "0.6870795", "0.6800284", "0.6799302", "0.67085177", "0.67074794", "0.67027366", "0.6655468", "0.6650833", "0.6645927", "0.6637673", "0.65893114", "0.65407616", "0.651968...
0.67373
11