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
Actualiza el movimiento inicial a cero
function mostrarMovimientoInicial() { let cartel = document.getElementById('movimientos'); cartel.innerText = movimientos.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function actualizarCantidadMovimientos() {\n limiteMovimientos -= 1;\n}", "function IA_Actualizador() {\n IA.call(this);\n\n //\n this.actualizacion = function() {\n\n // Mientras la serpiente este viva el juego seguira.\n if(!victoria) clearInterval(jugando);\n\n Tablero.prototype.limpiar(tablero...
[ "0.6750639", "0.62169254", "0.6151132", "0.60878325", "0.6079938", "0.59720045", "0.594438", "0.592422", "0.59055454", "0.58598", "0.58067167", "0.5803271", "0.5779001", "0.577003", "0.5752221", "0.5745709", "0.57134247", "0.57105416", "0.5672678", "0.56479204", "0.56374544",...
0.0
-1
Funcion para seleccionar el rompecabezas
function seleccionarJuego(rompecabezas){ var tablero = []; for(let i = 1; i < 9; i++) { tablero.push(document.getElementById('pieza'+i)); }; var tagStart = "<img class='pieza-juego' src="; var tagEnd = " alt='pieza1'>"; for (pos in rompecabezas) { tablero[pos].innerHTML = tagStart + `'../images/$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cambiarMapas()\r\n{\r\n\t opcion = sel.value();\r\n}", "selectTheatre(){\n browser.click('#cmbComplejos')\n browser.click('#cmbComplejos > option:nth-child(2)');\n }", "function selectErasmu(){\n changeMapByPosition(this.childNodes[3].innerHTML,this.childNodes[4].innerHTM...
[ "0.63061804", "0.63051903", "0.630441", "0.6205183", "0.6156791", "0.6112551", "0.60880417", "0.60735285", "0.6054968", "0.59239954", "0.59036034", "0.58977896", "0.5877433", "0.58263195", "0.582406", "0.5822503", "0.5822058", "0.58008826", "0.5791992", "0.5786542", "0.578636...
0.6544207
0
Implementar alguna forma de mostrar un cartel que avise que ganaste el juego Muestra el cartel ganador y reinicia el juego
function mostrarCartelGanador() { hideAndShow('#cartel-ganador','#juego-contenedor'); animateContenedor('#cartel-ganador'); setTimeout(() => { window.location.href = "index.html"; }, 4000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateCart() { //mostando ou nao o carrinho\n c('.menu-openner span').innerHTML = cart.length; // dando update na tela do cel\n\n\n\n\n if (cart.length > 0) {\n c('aside').classList.add('show'); // ad a class que foi criada chamada de show para aparecer o carrinho\n c('...
[ "0.7294194", "0.72392535", "0.7234605", "0.72150284", "0.70805013", "0.7035346", "0.6968561", "0.69434875", "0.68957305", "0.6893672", "0.6869483", "0.6838821", "0.6814804", "0.6807197", "0.679201", "0.6784917", "0.67720497", "0.6741313", "0.6737469", "0.6731945", "0.67298627...
0.0
-1
Muestra el cartel perdedor y reinicia el juego
function mostrarCartelPerdio() { hideAndShow('#cartel-perdedor','#juego-contenedor'); animateContenedor('#cartel-perdedor'); setTimeout(() => { window.location.href = "index.html"; }, 4000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateCart() { //mostando ou nao o carrinho\n c('.menu-openner span').innerHTML = cart.length; // dando update na tela do cel\n\n\n\n\n if (cart.length > 0) {\n c('aside').classList.add('show'); // ad a class que foi criada chamada de show para aparecer o carrinho\n c('...
[ "0.6853265", "0.6723955", "0.66210145", "0.64528507", "0.64224386", "0.6419592", "0.64113736", "0.6372325", "0.63290715", "0.63143265", "0.62691015", "0.6264909", "0.62460023", "0.6243755", "0.6235017", "0.6201684", "0.6194189", "0.61930716", "0.6150508", "0.61455876", "0.614...
0.5789369
76
Funcion que realiza el intercambio logico (en la grilla) y ademas actualiza el intercambio en la pantalla (DOM). Para que funcione debera estar implementada la funcion intercambiarPosicionesGrilla()
function intercambiarPosiciones(fila1, columna1, fila2, columna2) { // Intercambio posiciones en la grilla var pieza1 = grilla[fila1][columna1]; var pieza2 = grilla[fila2][columna2]; intercambiarPosicionesGrilla(fila1, columna1, fila2, columna2); intercambiarPosicionesDOM('pieza' + pieza1, 'pieza' + pieza2);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function intercambiarPosiciones(fila1, columna1, fila2, columna2){\n //Actualizar LA GRILLA\n var filaPieza = grilla[fila1];\n var numero1 = filaPieza[columna1];\n var filaPieza2 = grilla[fila2];\n var numero2 = filaPieza2[columna2];\n grilla[fila1][columna1] = numero2;\n grilla[fila2][columna2] = numero1;\...
[ "0.6723702", "0.6697972", "0.66293323", "0.6235213", "0.61754096", "0.61754096", "0.6156732", "0.60943216", "0.605456", "0.60209656", "0.59639865", "0.5926508", "0.59185916", "0.5918434", "0.5877378", "0.58659095", "0.5853588", "0.5851443", "0.5827494", "0.5817522", "0.581752...
0.63413775
3
Intercambio de posiciones de los elementos del DOM que representan las fichas en la pantalla
function intercambiarPosicionesDOM(idPieza1, idPieza2) { // Intercambio posiciones en el DOM var elementoPieza1 = document.getElementById(idPieza1); var elementoPieza2 = document.getElementById(idPieza2); var padre = elementoPieza1.parentNode; var clonElemento1 = elementoPieza1.cloneNode(true); var clonEl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filesFromElem(index) {\n var _a;\n return (index < this.rootNode.length) ? ((_a = this.rootNode[index]) === null || _a === void 0 ? void 0 : _a.files) ? this.rootNode[index].files : [] : [];\n }", "filesFromElem(index) {\n var _a;\n return (index < this.rootNode.length) ? ((_a = th...
[ "0.61527526", "0.61527526", "0.6147267", "0.5865779", "0.57187253", "0.57057184", "0.56939137", "0.56841904", "0.56294334", "0.56190586", "0.55976737", "0.5581081", "0.55448925", "0.5537502", "0.5499427", "0.5496874", "0.5494434", "0.54629415", "0.543503", "0.5427625", "0.541...
0.53200984
27
change code below this line SOLUTION CODE
function merge(arr1, arr2) { let merged = new Array(); while (arr1.length > 0 && arr2.length > 0) { (arr1[arr1.length - 1] > arr2[arr2.length - 1]) ? merged.unshift(arr1.pop()) : merged.unshift(arr2.pop()); (arr1.length == 0) ? Array.prototype.unshift.apply(merged, arr2) : ((arr2.length == 0) ? Ar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected internal function m252() {}", "private internal function m248() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "transient protected internal function m189() {}", "transient final protected i...
[ "0.6715145", "0.6562627", "0.6321141", "0.617423", "0.599749", "0.5964229", "0.5936729", "0.5908433", "0.57667714", "0.56397116", "0.5627806", "0.5506694", "0.5494976", "0.5494976", "0.5494976", "0.5494976", "0.5494976", "0.5494976", "0.5494976", "0.5494976", "0.5494976", "...
0.0
-1
State Current createdWidgets on the grid
constructor(props) { super(props); this.state = { componentDicts: [], }; this.handleRemove = this.handleRemove.bind(this); this.handleCreate = this.handleCreate.bind(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function manageGrid() {\n CanvasGrid.prop('checked') ?\n Canvas.addClass('borders') :\n Canvas.removeClass('borders');\n if (CanvasBgr.css('display') === 'block') {\n manageHistory('update');\n manageUndoRedoBtn();\n };\n }", "function initWidge...
[ "0.6119417", "0.6037476", "0.59509337", "0.59451103", "0.59057844", "0.5905304", "0.58987284", "0.5882286", "0.58405036", "0.5807724", "0.5805932", "0.57190555", "0.56954074", "0.5686034", "0.56759316", "0.5674476", "0.5673204", "0.56600296", "0.5625208", "0.55790657", "0.556...
0.0
-1
function adds a component to the grid
handleCreate(component, id, posX, posY, width, height, props) { // if id not provided generate it now if (!id) { id = uuid() } //if no height/ width provided, set it here. if (!width || !height) { width = 4; height = 4; } //if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addComponent(component) {\n console.log(\"******************* Component data **************\");\n\n\t//if we dont know about the id yet, setup a new component.\n\tif (components[component.id] == null) {\n\t\t//create the component display object\t\t\n\t\t// pass in null for the children for the moment\...
[ "0.6920576", "0.69203603", "0.6796587", "0.67215663", "0.643547", "0.6371192", "0.62761295", "0.62678087", "0.62637556", "0.625972", "0.62568384", "0.62228787", "0.6211734", "0.6176942", "0.61448944", "0.6123227", "0.6117711", "0.60914165", "0.608969", "0.60782284", "0.606927...
0.5580142
76
Handle HTTP errors since fetch won't.
function handleErrors(response) { if (!response.ok) { throw Error(response.statusText); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFetchErrors(response) {\n // \"clone\" so we can still read the original `response` downstream)\n return response.clone().text()\n .then(bodyTxt => {\n if (!response.ok) {\n console.error(\"Fetch response wasn't OK\");\n throw new Error(`status: \"${response.status}\", body: ...
[ "0.74301404", "0.70337486", "0.6903284", "0.6510197", "0.6494188", "0.64738214", "0.63793975", "0.63562024", "0.6327584", "0.6234705", "0.62299573", "0.6203106", "0.61723304", "0.6155043", "0.6136561", "0.61218405", "0.6107685", "0.6063942", "0.6031494", "0.6005256", "0.59981...
0.554096
96
A cyclic dependency in the style object will cause an infinite loop here
static getStyleInstances(selector, style) { let result = []; let ownStyle = {}, haveOwnStyle = false; for (let key of Object.keys(style)) { let value = style[key]; let isProperValue = (typeof value === "string" || value instanceof String || ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get style(){ return this.__baseStyle; }", "async function t(t,i,n){const s=t&&t.getAtOrigin&&t.getAtOrigin(\"renderer\",i.origin);if(s&&\"unique-value\"===s.type&&s.styleOrigin){const a=await Object(_core_asyncUtils_js__WEBPACK_IMPORTED_MODULE_2__[\"result\"])(s.populateFromStyle());if(Object(_core_promiseUtils_...
[ "0.5959146", "0.5885569", "0.58754724", "0.58441997", "0.5820535", "0.57865804", "0.57067543", "0.5690209", "0.5682893", "0.56769395", "0.56570226", "0.5642527", "0.55801153", "0.5560764", "0.55501634", "0.5537946", "0.5537027", "0.5516843", "0.5486474", "0.545439", "0.544904...
0.0
-1
componentDidMount called by default after render() if did NOT use componentDidMount would need to create and call some other function that had the interval in it
componentDidMount() { console.log('called componentDidMount'); this.interval = setInterval(() => { console.log('called setInterval'); // update the DOM with the new state, every second this.setState({ count: this.state.count + 1 }); // if count 8 or more, BOOM and stop interval if (this.stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.startInterval()\n }", "componentDidMount() {\n // First update the time and setup a timer\n this.tick();\n this.timerId = setInterval(this.tick, 1000);\n }", "componentDidMount() {\n // Ensure that the page processes a tick immediately on load.\n ...
[ "0.84641314", "0.84475994", "0.8317219", "0.82541215", "0.82464015", "0.82271725", "0.8210157", "0.8201236", "0.81500113", "0.8144786", "0.81297904", "0.8129446", "0.81077325", "0.8101064", "0.8068766", "0.8010048", "0.80017805", "0.7993811", "0.79806405", "0.79527944", "0.79...
0.7744943
59
componentWillUnmount cleans up the interval when the component is removed from the DOM. We don't want any setInterval's hanging around when they shouldn't be!
componentWillUnmount() { console.log('called componentWillUnmount'); clearInterval(this.interval); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillUnmount() {\n\t\tif (this.state.interval) {\n\t\t\tclearInterval(this.state.interval);\n\t\t\tthis.setState({ interval: null });\n\t\t}\n\t}", "componentWillUnmount() {\n if (this.interval) {\n clearInterval(this.interval);\n }\n }", "componentWillUnmount() {\n if(this.state.int...
[ "0.90101373", "0.8877298", "0.8846458", "0.8832372", "0.8812848", "0.8812848", "0.8790888", "0.8722952", "0.8705352", "0.8705352", "0.8705352", "0.8705352", "0.86879784", "0.8684524", "0.86805356", "0.86805356", "0.86805356", "0.86805356", "0.86638516", "0.86429197", "0.86306...
0.89752376
1
Helper method for defining associations. This method is not a part of Sequelize lifecycle. The `models/index` file will call this method automatically.
static associate(models) { // define association here // Todo belongs to users table one to many relationship Todos.belongsTo(models.Users, { foreignKey: 'userId', onDelete: 'CASCADE', }); Todos.hasMany(models.TodoItems, { foreignKey: 'todoId', as: 'todoIte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n // define association here\n // This is how Sequelize knows to create \"magic methods\"\n // These are functions that can automatically pull\n // related data.\n // For example: If I have a User object\n // I can call `await user.getContacts()` to get an\n...
[ "0.76423585", "0.75082916", "0.7312812", "0.7307368", "0.7307368", "0.7307368", "0.7294376", "0.7284563", "0.72789294", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985"...
0.0
-1
identify the voices available, and set it to the dropdown.
function populateVoices() { voices = this.getVoices(); //filter only by english const voiceOptions = voices // .filter(voice => voice.lang.includes('en')) .map( voice => `<option value="${voice.name}">${voice.name} (${voice.lang})</option>` ) .join(""); voicesDropdown.innerHTML = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUpVoices() {\r\n try {\r\n var voiceSelect = document.querySelector(\"#voice\");\r\n if (voiceSelect.options.length == 0) {\r\n if (typeof window.speechSynthesis !== \"undefined\") {\r\n var voices = window.speechSynthesis.getVoices();\r\n for (var n = 0; n < voices.length; ++...
[ "0.79223555", "0.78939795", "0.7807574", "0.7745171", "0.76914173", "0.7672928", "0.7571603", "0.7551842", "0.74971724", "0.7422331", "0.7394708", "0.7377485", "0.7346569", "0.7169969", "0.6990111", "0.663745", "0.6557157", "0.6534804", "0.65196466", "0.6513229", "0.6278993",...
0.7731368
4
this is to change the voice, and have it play
function setVoice() { msg.voice = voices.find(voice => voice.name === this.value); playAudio(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setVoice() {\n console.log('Changing voice...');\n msg.voice = voices.find(voice => voice.name === this.value);\n // Stop and restart\n toggle();\n}", "function Voicie () { self._.voice = window.speechSynthesis.getVoices().find(a => a.lang.indexOf(self._.recog.lang) == 0) }", "function speak2(){\n...
[ "0.8231753", "0.76759905", "0.7640828", "0.75787336", "0.7485213", "0.7411988", "0.73717797", "0.72392124", "0.7228065", "0.7226439", "0.7210592", "0.7182294", "0.7149322", "0.7111554", "0.7063147", "0.7056433", "0.70409954", "0.70374984", "0.70017624", "0.69954586", "0.69771...
0.8391496
0
const About = lazy(() => import('./components/About')) const JoinCea = lazy(() => import('./components/JoinCea')) const Login = lazy(() => import('./components/Login')) const Work = lazy(() => import('./components/Work')) const Hiring = lazy(() => import('./components/Hiring')) const Contact = lazy(() => import('./comp...
function App() { return ( <> <Router> <Suspense fallback={<div>Loading...</div>}> <AnimatePresence> <Switch> <Route exact path="/" component={Home} /> {/* <Route path="/About" component={About} /> <Route path="/join" component={JoinCea}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "preloadFutureComponents(){\n try{\n switch(window.location.pathname){\n case '/':\n AsyncLogin.preload();\n AsyncSettings.preload();\n break;\n case '/login':\n AsyncResetPassword.preload();\n AsyncSignup.preload();\n break;\n case ...
[ "0.6546514", "0.6128901", "0.6082087", "0.60644627", "0.5943231", "0.5935507", "0.57822764", "0.57130826", "0.56944", "0.56783414", "0.5677364", "0.5650281", "0.5632212", "0.5616154", "0.56094134", "0.5592542", "0.5590565", "0.5584946", "0.5559898", "0.55544573", "0.5551163",...
0.52352834
73
our method to handle all click events from our buttons
handleClick(event) { const value = event.target.value; // get the value from the target element (button) switch (value) { case '=': { // if it's an equal sign, use the eval module to evaluate the question // convert the answer (in number) to String ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleButton() {}", "clickHandler(e) {\n // Only activate if there is a buttonHandler\n if (this.buttonHandler !== false) {\n // Activate if not active\n if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n ...
[ "0.71509403", "0.7148891", "0.7142262", "0.70906556", "0.7078708", "0.7049997", "0.7044475", "0.7014617", "0.69529665", "0.68737006", "0.68708634", "0.68594164", "0.6837708", "0.6836103", "0.6832515", "0.67999667", "0.6792959", "0.6762513", "0.6716699", "0.66975605", "0.66880...
0.0
-1
debounce so filtering doesn't happen every millisecond
function debounce(fn, threshold) { var timeout; return function debounced() { if (timeout) { clearTimeout(timeout); } function delayed() { fn(); timeout = null; } timeout = setTimeout(delayed, th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debounceFilter(ms) {\n let timer;\n\n const filter = invoke => {\n const duration = unref(ms);\n if (timer) clearTimeout(timer);\n if (duration <= 0) return invoke();\n timer = setTimeout(invoke, duration);\n };\n\n return filter;\n}", "computedFilterDebounce(newValue) {\n if (!newV...
[ "0.72184706", "0.7040509", "0.69791424", "0.686084", "0.686084", "0.686084", "0.6829882", "0.6776649", "0.6699325", "0.6679382", "0.6530525", "0.64610726", "0.6428119", "0.6427759", "0.6407876", "0.63415986", "0.63347167", "0.6318437", "0.6318437", "0.6318437", "0.6318437", ...
0.61069536
50
loads data from database, sets new values to the state
componentDidMount() { var lang = "fi"; if(this.props.match.params.language != undefined) { lang = this.props.match.params.language; } console.log(lang); fetch(restaurantDataUrl + "?restaurantId=" + this.state.id+"&language="+lang) .then(res => res.json()) .then( (result) => { console.log("DEBU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadData() {\n this.hvacData = HVACDataLoader.getHVACData(this);\n if (this.hvacData.getBuildingList().length > 0) this.selectBuilding(this.hvacData.getBuildingList()[0]);\n }", "alldata(state, data) {\n return state.alldata = data\n }", "loadData(state, lists) {\n ...
[ "0.6428281", "0.6072699", "0.60544443", "0.6046776", "0.6038157", "0.59773654", "0.59594727", "0.5917171", "0.5910614", "0.5905156", "0.58971465", "0.58484083", "0.5844453", "0.5843623", "0.5836594", "0.582672", "0.58258086", "0.5825627", "0.5824817", "0.5822022", "0.5822022"...
0.0
-1
Function used to loop through arrays
looper(tags) { var tagString = ""; if (Array.isArray(tags)) { for (var i = 0; i < tags.length; i++) { if (i > 0) { tagString = tagString + ", " + tags[i]; } else { tagString = tagString + tags[i]; } } } return tagString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayFor(array) {\n //Write your code here\n}", "function iterateArray(arr, fn) {\n for (var i=0; i < arr.length; i++) {\n fn(arr[i]);\n }\n }", "function arrayEach(array, func) {\n var i = 0;\n for (i = 0; i < array.length; i++) {\n func(array[i]);\n}\n}", "functio...
[ "0.7132774", "0.6888883", "0.68143845", "0.672744", "0.67125106", "0.66446763", "0.6576588", "0.65597326", "0.6557597", "0.6557597", "0.652261", "0.65221286", "0.64709836", "0.64689106", "0.6441124", "0.6401014", "0.63899606", "0.63805026", "0.6378605", "0.63775814", "0.63743...
0.0
-1
Renders the restaurant info, button to open the writing view and links the review list at the bottom
render () { let strings = new LocalizedStrings({ en:{ preTitle: "Restaurant's reviews: ", priceLevel: "Price level: ", userRating: "User rating: ", allergyTags: "Allergy information: ", openingHours: ["Opening hours", "Mon: ","Tue: ","Wed: ","Thu: ","Fri: ","Sat: ", "Sun: "], addReview: "Add a rev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showRestaurantData(e) {\r\n\r\n //Retrieve the data stored in the node\r\n var restaurant = e.target.getData('data-info-restaurant');\r\n\r\n //Show it!\r\n Y.one('#title').setHTML(restaurant.Title);\r\n Y.one('#address').setHTML(restaurant.Address);\r\n Y.one('#p...
[ "0.6820762", "0.65841025", "0.65544444", "0.65254277", "0.6316683", "0.6315318", "0.62851447", "0.62752575", "0.62638205", "0.61141217", "0.6061353", "0.605628", "0.60362357", "0.5997358", "0.5983833", "0.5961336", "0.59030014", "0.5841094", "0.5837163", "0.5828402", "0.58226...
0.0
-1
Create a new build paths object.
function BuildPaths( config, outPath, feedID ) { outPath = outPath||config.get('build.dirs.output','output'); this.outputRoot = feedID ? mods.path.resolve( outPath, feedID ) : outPath; var publishDir = config.get('build.dirs.publish','publish'); this.publishRoot = feedID ? mods.path.join( publishDir, fe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create(path) {\n const pathA = pathSplit(path);\n\n for (let i = 0 ; i < pathA.length ; i++) {\n console.log(\"> create > start\");\n // need to append on the path.\n let curPath = pathA[i];\n let curDir = ds[curPath];\n let fullPathRef = \"\";\n \n // debug\n console.log(\">CP \...
[ "0.6094487", "0.57911736", "0.573846", "0.5735675", "0.5593119", "0.5564615", "0.5547112", "0.55281806", "0.5464941", "0.54078406", "0.5371806", "0.53522974", "0.5277592", "0.5261375", "0.5224427", "0.5221968", "0.5215079", "0.5209696", "0.5207407", "0.5206962", "0.5191133", ...
0.57936037
1
Function: Markdown Arguments: text the text to be modified ex the regex to match tag the HTML tag to use Returns: The text with anything inside the Regex matches wrapped by the specified HTML tags TODO: Create a JSON object with all the markdown syntax and tags
function markdown(text, ex, tag) { var regex = new RegExp(ex, 'gm'); var subst = '<' + tag + '>$1</' + tag + '>'; return text.replace(regex, subst); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatText(text){\n text = text.replace(/\\r/g, \" \").replace(/\\n/g, \" \");\n text = text.replaceAll(/#w(.*?)#w;/g, \"<span class='text-important'>$1</span>\");\n text = text.replaceAll(/##(.*?)##;/g, \"<span class='text-title'>$1</span>\");\n text = text.replaceAll(/#d(.*?)#d;/g, \"<span c...
[ "0.64768744", "0.64161026", "0.6415271", "0.63937795", "0.6343918", "0.63070774", "0.6253176", "0.6239411", "0.6207494", "0.62061584", "0.6185826", "0.6089643", "0.6079694", "0.60229194", "0.6012829", "0.60124433", "0.60124433", "0.59989727", "0.5988826", "0.5988826", "0.5986...
0.6896484
0
Returns true when search term matches keyword on json
function findLatex(wordQuery, syntax) { return syntax.filter(math => { const regex = new RegExp(wordQuery, "gi"); if (math.key.match(regex) || math.description.match(regex)) return true; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function match(data, keyword) {\n\t if (typeof data === 'number') {\n\t data = '' + data;\n\t }\n\t if (typeof data === 'string') {\n\t return data.toLowerCase().indexOf(keyword) !== -1;\n\t }\n\t if (typeof data !== 'object' || data === null) {\n\t return false;\n\t }\n\t ...
[ "0.7071776", "0.6688545", "0.66287756", "0.64263123", "0.63017976", "0.6300785", "0.6266102", "0.6229284", "0.6217958", "0.6217958", "0.6217958", "0.6217958", "0.6217958", "0.61510897", "0.6121914", "0.61036754", "0.604581", "0.60441834", "0.60380656", "0.60290354", "0.602827...
0.0
-1
reload page and/or reset game when reset icon is clicked
function reloadPage() { window.location.reload(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetGame() {\n location.reload();\n }", "function resetGame() {\n location.reload()\n}", "function gameReset() {\n location.reload();\n}", "function resetGame() {\n location.reload();\n}", "function resetGame(){\n console.log('stopGame clicked');\n window.location.reload(...
[ "0.84937483", "0.84740734", "0.84620357", "0.8434789", "0.83387", "0.83183", "0.8300271", "0.8299121", "0.8275367", "0.8182779", "0.8174026", "0.8162176", "0.80927163", "0.80907357", "0.8054689", "0.80357385", "0.8030547", "0.802737", "0.80206084", "0.7988423", "0.77526283", ...
0.0
-1
if clicked cards are a match, this function is run
function cardsMatch() { // add match class openCards[0].classList.add('match'); openCards[1].classList.add('match'); // allow clicks again & remove 'open', 'show' classes for (let i = 0; i <= initialArray.length - 1; i++) { listOfCards[i].classList.remove('no-click', 'open', 'show'); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doCardsMatch(event) {\n if (clickedCards.length === 2) {\n if (clickedCards[0].innerHTML === clickedCards[1].innerHTML) {\n clickedCards[0].classList.add('match');\n clickedCards[0].classList.remove('open', 'show');\n clickedCards[1].classList.add('match');\n clickedCards[1...
[ "0.79792", "0.79674315", "0.7886694", "0.7801544", "0.7801449", "0.7789398", "0.7773438", "0.77492833", "0.7724486", "0.7617687", "0.76135993", "0.76062614", "0.7595412", "0.7586902", "0.75401545", "0.7522255", "0.7521362", "0.7493078", "0.74876696", "0.7476985", "0.7466362",...
0.7512885
17
if clicked cards don't match, this function runs
function cardsUnmatch() { // allow clicks again & hide unmatched cards for (let i = 0; i <= initialArray.length - 1; i++) { listOfCards[i].classList.remove('no-click', 'open', 'show', 'no-match'); } // empty openCards array openCards = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleClickCard(event) {\n $(event.currentTarget).find('.backOfCard').addClass('hidden');\n console.log(event.currentTarget);\n if (firstCardClicked === null) {\n firstCardClicked = $(event.currentTarget);\n } else {\n secondCardClicked = $(event.currentTarget);\n attempts++;\n var firstPi...
[ "0.78316647", "0.78058124", "0.77998126", "0.7749825", "0.7697153", "0.769676", "0.7671326", "0.7671058", "0.76405746", "0.7626561", "0.7605216", "0.75687104", "0.7562067", "0.75567657", "0.75501734", "0.75489694", "0.7546304", "0.7540419", "0.7537505", "0.75323516", "0.75287...
0.0
-1
close modal when clicking X icon
function closeModal() { modalCloseIcon.style.display = 'none'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "'click .close' (event) {\n console.log(\"MODAL CLOSED VIA X\");\n modal.hide();\n }", "closeModal() {\n this.close();\n }", "closeInteliUiModal() {\n $(this.target.boxContainer).parents().find('.modal-content').find('#btnClose').click();\n }", "function closeModal...
[ "0.79182243", "0.7357279", "0.7356438", "0.7247679", "0.7230337", "0.7148684", "0.709401", "0.7087816", "0.70865697", "0.7079387", "0.7016884", "0.6992149", "0.6975464", "0.6975464", "0.69690156", "0.6962471", "0.69330174", "0.692984", "0.6904418", "0.68818927", "0.6879935", ...
0.7281517
3
count the number of moves
function countMoves() { clicksCount++; movesCount.innerHTML = clicksCount; // when game starts, get initial time if (clicksCount == 1) { gameTimer(); } // hide stars if clicks go beyond a certain value if (clicksCount > 25 && clicksCount < 35) { starRating[0].style.display ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countMoves() {\n moves++;\n if (moves === 1) {\n counter.textContent = `${moves} move`;\n } else {\n counter.textContent = `${moves} moves`;\n }\n}", "function countMoves() {\n moves++;\n if (moves === 1) {\n movesCounter.innerHTML = `1 movimento`;\n } else {\n movesCounter.innerHTML ...
[ "0.7808495", "0.7778942", "0.7512684", "0.7421226", "0.7380093", "0.73448324", "0.72994345", "0.72878003", "0.72867453", "0.71837574", "0.71780586", "0.7173403", "0.7079509", "0.70776486", "0.70725965", "0.70277137", "0.70205593", "0.7016897", "0.69936", "0.6989643", "0.69645...
0.0
-1
Ende return Fische zeichnen
draw() { EndeGelaende.crc2.beginPath(); EndeGelaende.crc2.arc(this.x + 53, this.y + 45, 4 * this.size, 0, 2 * Math.PI); EndeGelaende.crc2.fillStyle = "#AC0603"; EndeGelaende.crc2.fill(); EndeGelaende.crc2.beginPath(); EndeGelaende.crc2.moveTo(30, 2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fun1(){} //toda a função de js retorna alguma coisa", "function getVardas() {\n return \"Tadas\";\n}", "getResult() {}", "resultado() {\n return this.local + \"-\" + this.visitante;\n }", "function mostraNotas(){}", "function kaliTerusRekursif(angka) {\r\n // you can only write your code...
[ "0.6181579", "0.6096008", "0.6004622", "0.59566724", "0.58907914", "0.58524895", "0.5850616", "0.5849676", "0.58371145", "0.5802296", "0.5765397", "0.5723555", "0.57203376", "0.5712236", "0.571221", "0.5697956", "0.5691652", "0.5690332", "0.5682298", "0.5657963", "0.5650515",...
0.0
-1
global to keep track of which series is what. If ever MODEL becomes blank maybe set it back to 0 /reads dropdown and converts it into url and returns it to be passed to Ajax call. Also save params into model and changes the url
function readPricesValues(){ let exchange = document.getElementById("exchange").value; exchange = exchange == "Aggregated" ? "" : exchange; let symbol = document.getElementById("symbol").value; let unit = document.getElementById("unit").value; let interval = document.getElementB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToModel(url){\n \n url = url.split(\"?\");\n\n for(let i = 1 ; i < url.length ; i++){\n current = url[i];\n \n if(current.includes(\"price\")){\n let symbol = getParameterByName(\"symbol\", current);\n symbol = (sym...
[ "0.6572208", "0.6089828", "0.57668126", "0.5737418", "0.5645646", "0.5633771", "0.5495845", "0.5485592", "0.54785866", "0.5470696", "0.54512405", "0.542057", "0.5416069", "0.54091096", "0.54004693", "0.5380594", "0.53712755", "0.534541", "0.53334063", "0.5312132", "0.5301637"...
0.518233
29
reads and converts dropdown and converts it into url and returns it to be passed to Ajax call
function readBlockValues(){ let symbol = document.getElementById("block-symbol").value; let datatype = document.getElementById("block-datatype").value; let interval = document.getElementById("block-interval").value; interval = (interval == "None" ? "" : interval); interval = (i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdata2(surl, inputHidden, content){\n\tvar cbo = null;\n\tvar json = new Request.JSON({\n\t\tmethod : 'post',\n\t\turl : surl,\n\t\t async: false,\n\t\t noCache : true,\n\t\t//data : param,\n\t\tonComplete : function(data) {\n\t\t\tcbo = dropdownA2(data,inputHidden,content);\n\t\t}\n\t});\n\tjson.send()...
[ "0.6379768", "0.6215891", "0.6210195", "0.61987615", "0.6174082", "0.6151802", "0.61493176", "0.6115681", "0.6102748", "0.60916525", "0.6069532", "0.6061634", "0.6046339", "0.60388106", "0.60315883", "0.6029791", "0.60120666", "0.59893775", "0.59503186", "0.59461504", "0.5941...
0.0
-1
function that parses the url by interval, units, symbol... or whatever name, if that name doesn't exist then return null
function getParameterByName(name, url) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&"); regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processUrl(url){\n\tvar rawid = url.split(\"v=\")[1];\n\tif(rawid == null || rawid.length==0){\n\t\treturn false;\n\t}\n\tid = rawid.replace(/(&|#).+/g, \"\");\n\tvar time = -1;\n\tvar timeraw = url.split(\"t=\")[1];\n\tif(!(timeraw == null || timeraw.length==0)){\n\t\t//process time\n\t\ttimeraw = timera...
[ "0.5871587", "0.5764483", "0.5591681", "0.5591625", "0.55735946", "0.55597967", "0.55590165", "0.55263424", "0.5518356", "0.5515862", "0.5514656", "0.55085784", "0.548378", "0.54797477", "0.54797477", "0.54797477", "0.54797477", "0.54736", "0.5473028", "0.5469601", "0.5449696...
0.0
-1
convert a url to a Model
function convertToModel(url){ url = url.split("?"); for(let i = 1 ; i < url.length ; i++){ current = url[i]; if(current.includes("price")){ let symbol = getParameterByName("symbol", current); symbol = (symbol == null ? "" : s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fromURL(model, url) {\n const path = Path.normalize(`./${url}`);\n const parts = path.split('/').reverse();\n const result = { fields: [] };\n if (parts.pop() === this.QueryPrefix) {\n while (parts.length) {\n const prefix = parts[parts.length - 1];\n ...
[ "0.70737547", "0.63396615", "0.61429507", "0.5804361", "0.56883216", "0.56466526", "0.56466526", "0.56027925", "0.55443376", "0.5531048", "0.5520202", "0.55068225", "0.54081887", "0.54081887", "0.54081887", "0.54081887", "0.54081887", "0.5399679", "0.5319619", "0.5297954", "0...
0.6504752
1
given a model, convert it to usable parameters
function convertModelToParameter(model){ if(model.type == "price"){ let symbol = model.symbol; let unit = model.unit; let exchange = model.exchange; let interval = model.interval; symbol = model.symbol; let p_symbol = "symbol=" + model.symb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "model(params) {\n\n }", "function setPara(model, parameters){\n var obj = {};\n model.forEach(function(prop) {obj[prop] = parameters[prop];});\n return obj;\n}", "function transformFunction(model) {\n\t// Need to convert the model to a JSON object\n\tvar transform = model.toJSON();\n\ttransform.title = '' ...
[ "0.68553966", "0.6808766", "0.6318802", "0.6279526", "0.6279526", "0.6261136", "0.6174771", "0.60438967", "0.6039601", "0.59155923", "0.5858168", "0.58418554", "0.5752087", "0.57312286", "0.56570107", "0.564781", "0.564781", "0.564781", "0.5619078", "0.561508", "0.56016994", ...
0.7617974
0
call API and Generate the Price and Volume graphs
function getPriceAPI(arr){ var parameter = arr[0]; console.log(parameter) var id1 = arr[1]; var id2 = arr[2]; var symbol = arr[3]; if(exchange == "") exchange = "Aggregated"; var unit = arr[4]; var exchange = arr[5]; var interval = arr[6]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateChart() {\r\n if (price_list.length > 0) {\r\n for (var i = 0; i < price_list.length; i++) {\r\n console.log(price_list[i][0] + \"++\" + price_list[i][1]);\r\n callAPI(price_list[i][0], price_list[i][1], i);\r\n }\r\n }\r\n}", "function showChart(){\n const startDate = selectS...
[ "0.6791238", "0.63000983", "0.62943786", "0.6244988", "0.6233163", "0.62114346", "0.61330223", "0.61140233", "0.6105699", "0.61003906", "0.6099425", "0.6080438", "0.60485125", "0.60450435", "0.60367984", "0.60263854", "0.60239905", "0.6022887", "0.6007568", "0.5960087", "0.59...
0.73270345
0
Call the API and generate graph for Block data
function getBlockAPI(arr){ var parameter = arr[0]; console.log(parameter) var id = arr[1]; var symbol = arr[2]; var datatype = arr[3]; var interval = arr[4]; fetch(parameter) .then( function(response) { if (response.status !== 200...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getBlocks() {\n console.log(\"Entering getBlocks()\");\n // Defining rest-api endpoint for querying block\n let blockRequest = 'http://rest-api:8008/blocks';\n let blockResponse = await fetch(blockRequest);\n let blockResponseJSON = await blockResponse.json();\n return blockResponseJSON;\n ...
[ "0.6869453", "0.6491832", "0.6198535", "0.61582696", "0.6132471", "0.6120047", "0.60919434", "0.60453266", "0.60325676", "0.6016821", "0.5940794", "0.59337777", "0.5890049", "0.58746487", "0.5854054", "0.5852263", "0.5849731", "0.5843089", "0.5836278", "0.5827468", "0.5826434...
0.68396336
1
given a reporting period in string, return the start and end time stamps in an array in microseconds
function getTimeStamp(reporting_period){ var now = new Date(); var timestamps = []; var start_stamp = ""; var end_stamp = ""; if (reporting_period == "Day"){ start_stamp = new Date(now.getFullYear(),now.getMonth(),now.getDate()); start_stamp = (start_stamp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNumericalTime(substringArray){\n let time = 0;\n let rangePresent = substringArray.indexOf(\"to\");\n if (rangePresent !== -1){ \n //Averages a time range if present (\"12 to 17 minutes\" ==> 14.5)\n let lowerbound = parseInt(substringArray[rangePresent-1]);\n let upperbound = parseInt(subs...
[ "0.60721904", "0.5690954", "0.5574214", "0.55702055", "0.5536625", "0.545629", "0.53119737", "0.53119487", "0.5285965", "0.5276579", "0.52292913", "0.52292913", "0.5205221", "0.51882994", "0.51791185", "0.51791185", "0.51791185", "0.51791185", "0.51791185", "0.51791185", "0.5...
0.6221331
0
given the interval in string format, return the milliseconds in integer in order to be converted into dates.
function convertIntervalToNumber(interval){ interval_numbers = {"5min" : 300 * constants.MILLI, "hour" : 3600 * constants.MILLI, "day" : 86400 * constants.MILLI }; interval_i = interval_numbers[interval]; return interval_i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interval_to_seconds( $interval ) {\n\n\t$interval = $interval.replace( /and/, ',' );\n\t$interval = $interval.replace( /,/, ' ' );\n\t\n\tvar $amount = 0;\n\tvar results = $interval.match( /\\s*\\+?\\s*(\\d+)\\s*(\\w{1})\\w*\\s*/g); \n\tfor( var i = 0; i < results.length; i++ ) {\n\t\tif(!results[i]) con...
[ "0.5738849", "0.5550758", "0.55284715", "0.54681003", "0.545453", "0.53672165", "0.5356556", "0.5321972", "0.5309355", "0.5301219", "0.5274492", "0.52498066", "0.5235771", "0.52217233", "0.5211377", "0.52009916", "0.52009916", "0.52009916", "0.520008", "0.5181786", "0.5180286...
0.65690064
0
take in json with microsecond times and append to json the array of millisecond time stamps
function processDates(json,interval_i){ milliArray = []; time = json.x1/1000; for(i = 0 ; i < json.y.length ; i++){ milliArray.push(time); time += interval_i; } return milliArray.sort(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flattenJSON( jsonKeys, times, values, valuePropertyName ) {\n\n\tlet i = 1, key = jsonKeys[ 0 ];\n\n\twhile ( key !== undefined && key[ valuePropertyName ] === undefined ) {\n\n\t\tkey = jsonKeys[ i ++ ];\n\n\t}\n\n\tif ( key === undefined ) return; // no data\n\n\tlet value = key[ valuePropertyName ];\n\...
[ "0.60649574", "0.5431055", "0.5355776", "0.53504515", "0.5314075", "0.5285113", "0.5271556", "0.52489513", "0.5231777", "0.52301663", "0.52138096", "0.52060425", "0.520257", "0.5199567", "0.51856995", "0.5170641", "0.5158241", "0.51418686", "0.5140049", "0.51280457", "0.51242...
0.5585718
1
given a json with prices, and units in string, eliminate zeros, convert the prices to those units and return an array of prices
function processPrices(json,unit){ for(i = 0 ; i < json.y.length ; i++){ if(json.y[i] == 0){ json.y[i] = json.y[i-1]; }else if(json.y[i] == 0 && i == 0){ j = 0; while(json.y[j] == 0){j++ } json.y[0] = json.y[j]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processVolume(json,unit){\n json.w = json.w.map(function(vol){return round(vol/constants.conversions[unit],2)});\n return json.w;\n }", "function mixedDataCleaner (arrayOfObjects) {\n function parseCurrency(aString){\n var monk = aString.replace(/\\$/g, ''),\n kungfu = mo...
[ "0.6229029", "0.581567", "0.5666428", "0.55940604", "0.5407545", "0.5381317", "0.5305285", "0.53012323", "0.5300794", "0.52324873", "0.52058196", "0.5194299", "0.5183041", "0.5173414", "0.514895", "0.51330024", "0.5103175", "0.5092612", "0.50812197", "0.5080579", "0.5065504",...
0.79148036
0
given a json with volumes,convert the volumes to those units.
function processVolume(json,unit){ json.w = json.w.map(function(vol){return round(vol/constants.conversions[unit],2)}); return json.w; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getVolumeUtilisation() {\n let $itemVolume = 0;\n\n /** @var Item $item */\n this.items.forEach(item => $itemVolume += item.getVolume());\n\n // return round($itemVolume / this.box.getInnerVolume() * 100, 1);\n // FIXME: this doesn't maintain the same percision\n return Math.round($itemVolume / t...
[ "0.5508911", "0.541704", "0.5050772", "0.49539647", "0.49381694", "0.49185568", "0.49098983", "0.48907954", "0.48482463", "0.484821", "0.48369277", "0.47948903", "0.47454178", "0.47352552", "0.47347915", "0.47218445", "0.47190693", "0.47182533", "0.47166687", "0.47165528", "0...
0.78438306
0
given a json block data for a line graph, if the graph is majority 0's then graph as is. if the graph has zeros/falsy/NaN holes then eliminate zeros/falsy/NaN by reaching out and grabbing the previous values
function processData(json){ var count = 0; var holes = true; for(let i = 0 ; i < json.y.length ; i++){ if(json.y[i] == 0 ){ count++; } } if((count/(json.y.length)) > 0.6){ holes = false; return json.y } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeZeros(data) {\n $.each(data.datasets, function (i, dataset) {\n arraylength = dataset.data.length;\n $.each(dataset.data, function (i, number) {\n if (number > 0)\n valueindex = (i + 1);\n if (i == (arraylength - 1))\n lastvalueind...
[ "0.58322847", "0.56925446", "0.54187495", "0.53403205", "0.52528805", "0.51982224", "0.51204085", "0.50464094", "0.5026926", "0.501341", "0.4997992", "0.49928492", "0.49734262", "0.49516228", "0.49379823", "0.4920177", "0.49143714", "0.48991117", "0.48821837", "0.48818532", "...
0.71975636
0
given a unix timestamp in milliseconds, convert that to a date object
function convertUnix(data){ function unixToReg(time){ return new Date(time); } return data.map(function(time){return unixToReg(time)}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertUnixDate(unix_timestamp) {\n\treturn new Date(unix_timestamp * 1000);\n}", "function convertUnixToDate(time) {\r\n\tlet unix_timestamp = time;\r\n\tvar date = new Date(unix_timestamp * 1000);\r\n\treturn date;\r\n}", "function unixTimestampMillisecondsToDate() {\n return operator_1.cast(numb...
[ "0.7312934", "0.7077722", "0.7054989", "0.6623472", "0.6557115", "0.6502432", "0.6478088", "0.64126784", "0.6359912", "0.62413263", "0.6215979", "0.6154434", "0.6153047", "0.6134527", "0.6123795", "0.60469675", "0.6026832", "0.6007536", "0.5973196", "0.593141", "0.59133023", ...
0.5517179
52
print out the API call URL and the exact time stamps you called for debugging.
function validateParamtersConsole(parameter){ /*if(Number(start_stamp) || Number(end_stamp) == 0){ console.log("No start or end time stamps requested") }else{ console.log(new Date(Number(start_stamp.slice(7,start_stamp.length))/1000)) //to validate timestamps in console ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debug(title, url, body, method, headers) {\n if (__DEV__) {\n const d = new Date();\n if (console.groupCollapsed) {\n console.groupCollapsed(title, `@ ${d.getHours()}:${d.getMinutes()}:${d.getSeconds()}.${d.getMilliseconds()}`);\n }\n else {\n console.l...
[ "0.69866574", "0.67117065", "0.66934913", "0.66934913", "0.6668619", "0.64362675", "0.6281716", "0.619284", "0.6107341", "0.6078748", "0.60494757", "0.6042722", "0.6034041", "0.6031716", "0.59922904", "0.59636384", "0.5915738", "0.5907285", "0.58936816", "0.58917147", "0.5871...
0.0
-1
Generates a signature for a chunk of data. The algorithm parameter is currently ignored.
function sign(algorithm, key, data, codec) { var hash = hash_1.ALGORITHMS[key.algorithm]; var keyData = typeof key.data === 'string' ? encoding_1.utf8.encode(key.data) : key.data; var byteData = typeof data === 'string' ? codec.encode(data) : data; return Promise_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSignature() {\n var encode = \"\"\n for(var i = 0; i < arguments.length; i++) {\n encode += arguments[i]\n }\n encode += secret\n return Qt.md5(encode)\n}", "function getSignature() {\r\n var encode = \"\"\r\n for(var i = 0; i < arguments.length; i++) {\r\n encode +...
[ "0.57677746", "0.57474834", "0.55154955", "0.54987663", "0.5449441", "0.540802", "0.5264518", "0.52453506", "0.5239379", "0.5161396", "0.5153992", "0.5142228", "0.5130746", "0.5104601", "0.51021194", "0.5090949", "0.5070002", "0.50364745", "0.5018275", "0.50172484", "0.501484...
0.560055
2
The algorithm is currently ignored as 'hmac' is the only supported algorithm.
function ScriptSigner(algorithm, key, codec) { var _this = this; if (key.data == null) { throw new Error('Key data must be non-null'); } if (!(hash_1.ALGORITHMS[key.algorithm])) { throw new Error('Invalid hash algorithm'); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateHmac (data, awsSecretKey, algorithm, encoding) {\n encoding = encoding || \"base64\";\n algorithm = algorithm || \"sha256\";\n return crypto.createHmac(algorithm, awsSecretKey).update(data).digest(encoding);\n}", "hmac(bytes, dk) {\n var mac = crypto.createHmac('sha256', dk.hmac_key)\n...
[ "0.7230237", "0.688469", "0.6884154", "0.68627614", "0.68587714", "0.65774626", "0.6490706", "0.6474143", "0.6474143", "0.644119", "0.6423271", "0.6400945", "0.62812823", "0.62488955", "0.62439936", "0.62394667", "0.6227158", "0.6204066", "0.61762387", "0.6152809", "0.6125268...
0.0
-1
The relative require() itself.
function localRequire(path) { var resolved = localRequire.resolve(path); return require(resolved, parent, path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function require() { return {}; }", "function innerRequire(_path) {\n\treturn require(path.join(process.cwd(), _path));\n}", "function fn(path){\n var orig = path;\n path = fn.resolve(path);\n return require(path, parent, orig);\n }", "function localRequire(path) {\n var resolved = require.resol...
[ "0.7195119", "0.7027229", "0.67329705", "0.6596608", "0.6578267", "0.639194", "0.6365622", "0.6191603", "0.61434335", "0.6125508", "0.612298", "0.60718775", "0.60600346", "0.60242426", "0.5872591", "0.5857044", "0.5844444", "0.5835678", "0.5775341", "0.57568234", "0.57419336"...
0.6648988
33
Initialize a new `Emitter`.
function Emitter(obj) { if (obj) return mixin(obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Emitter() {\n this.events = {};\n}", "constructor() {\n this.eventEmitter = new Emitter();\n }", "function Emitter() {\n\t\tthis.listeners = {};\n\t\tthis.singleListener = {};\n\t}", "function Emitter() {\r\n this.events = {};\r\n}", "function Emitter() {\r\n\t\tthis.callbacks = {};\r\n\...
[ "0.7572633", "0.75611305", "0.7546173", "0.75157267", "0.74574304", "0.74470466", "0.7429966", "0.7429966", "0.7429966", "0.7429966", "0.7406649", "0.7388987", "0.71889347", "0.7105113", "0.70984125", "0.7093921", "0.7062537", "0.7041451", "0.7000295", "0.6966955", "0.6840835...
0.0
-1
Check if `href` is the same origin.
function sameOrigin(href) { var origin = location.protocol + '//' + location.hostname; if (location.port) origin += ':' + location.port; return 0 == href.indexOf(origin); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sameOrigin(href) {\n let origin = location.protocol + '//' + location.hostname;\n if (location.port) origin += ':' + location.port;\n return (href && (0 === href.indexOf(origin)));\n}", "function sameOrigin(href) {\n var origin = location.protocol + '//' + location.hostname;\n if (location.port...
[ "0.8352021", "0.8294487", "0.8294487", "0.8294487", "0.8294487", "0.8294487", "0.8294487", "0.8294487", "0.8294487", "0.8201621", "0.8201621", "0.811714", "0.811714", "0.811714", "0.718082", "0.71057254", "0.7033726", "0.67998266", "0.6760805", "0.64356375", "0.6383799", "0...
0.81978863
12
! Returns the value passed to it.
function K (v) { return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function value() { }", "get value() {}", "get value() {}", "_get_value() {\n return this._has_value() ? this._value : undefined;\n }", "GetValue()\n\t{\n\t\treturn this.value;\n\t}", "function GetValue(param)\r\n\t{\r\n\r\n\t}", "function getVal() {\n return 5;\n}", "function get(x) { return x; ...
[ "0.74821967", "0.745293", "0.745293", "0.7302565", "0.72826886", "0.6938265", "0.69131595", "0.68675154", "0.6835031", "0.6772233", "0.6737532", "0.67359936", "0.67350465", "0.6734898", "0.6691064", "0.6691064", "0.6691053", "0.6691053", "0.6691053", "0.6691053", "0.6691053",...
0.0
-1
FUNCTIONS Function to set loc
function getLoc(breakWidth, loc, droptab) { if (targetWidth == "auto") { var w = droptab.parent().width(); } else { var w = $(targetWidth).width(); } if (w < breakWidth) { // Small size if (loc == "L" || loc == "") { if (loc == "L") { // Fir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SetLocation() {\n\n }", "function setLocation(){\n var lat = VALUE('plot_latitude');\n var lon = VALUE('plot_longitude');\n if (EXISTS(lon) && EXISTS(lat)) {\n SETLOCATION(lat,lon);\n }\n}", "setLocation(row, column){\n this.row = row;\n this.column = column;\n }", "function setLoc...
[ "0.7109455", "0.7060703", "0.6391277", "0.63473845", "0.6318818", "0.6290982", "0.623695", "0.61464024", "0.60110855", "0.5944936", "0.59338546", "0.5916786", "0.5910765", "0.590631", "0.58808666", "0.5880815", "0.58664626", "0.5814458", "0.58029693", "0.5743196", "0.57424843...
0.0
-1
html container element for itinerary information / create a map base on user input location, and then add it to a specific container in the html file.
function createMap(){ if(!map){ pos = new google.maps.LatLng(region.latitude,region.longtitude); map = new google.maps.Map(mapContainer, { mapTypeId: google.maps.MapTypeId.ROADMAP, //the default map type zoom: 17, //the default zoom level center: pos }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addingBaseHTML(){\n addHTML(\"div\", null, \"infoTopContainer\", null, null, \"mapContainer\");\n addHTML(\"div\", null, \"map\", null, null, \"mapContainer\");\n addHTML(\"div\", null, \"rightWindow\", null, null, \"mapContainer\");\n}", "function renderHTML(container) {\n container.classList.add...
[ "0.66047424", "0.6414321", "0.6405182", "0.64033955", "0.62041634", "0.61884004", "0.6130444", "0.59741193", "0.5924409", "0.5912459", "0.5865503", "0.5838566", "0.58363515", "0.58347726", "0.5778752", "0.57606333", "0.5757067", "0.573501", "0.57235146", "0.57167083", "0.5715...
0.0
-1
draw a marker in the center of the search region, and then add it to the begining of the markersArray
function drawCenterMarker(){ var imageURL='http://jspace.com.au/gmap/img/markers/arrow.png'; if(!markersArray[0] || makersArray[0].getIcon()!=imageURL){ pos = new google.maps.LatLng(region.latitude,region.longtitude); var marker = new google.maps.Marker({ map: map, title: region.name, icon: imageURL, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawAllMarkers(){\n\tfor(var i=0;i<results.length;i++){\n\t\tdrawMarker(results[i],i);\n\t}\n}", "function initMap() {\r\n map = new google.maps.Map(document.getElementById('map'), {\r\n center: center,\r\n zoom: 9\r\n });\r\n //creating some markerIcons\r\n defaultIcon = makeM...
[ "0.6501782", "0.6472965", "0.64512676", "0.63586915", "0.63524723", "0.6302175", "0.6289731", "0.6245552", "0.62329924", "0.62268656", "0.62244046", "0.6210465", "0.6177855", "0.61276394", "0.6121816", "0.61055213", "0.6103134", "0.6090658", "0.6084515", "0.6077012", "0.60767...
0.72902226
0
for a given result, draw a marker on the map input: result the result object, index index of the result object in the result list
function drawMarker(result, index){ var imageURL='http://jspace.com.au/gmap/img/markers/marker'+(index+1)+'.png'; pos = new google.maps.LatLng(result.location.lat,result.location.long); var marker = new google.maps.Marker({ map: map, title: result.name, icon: imageURL, animation: google.maps.Animation.DROP, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayResult(dataList, index) {\n const elem = document.createElement('li');\n elem.classList.add('list-item');\n elem.innerText = `${dataList[index].name}\\n${dataList[index].address_line_1}`;\n target.append(elem);\n\n const latCoord = dataList[index].geocoded_column_1.coordinates[1];\n ...
[ "0.6808411", "0.66121715", "0.6554029", "0.64767796", "0.6402244", "0.63911337", "0.6369475", "0.6252664", "0.62525696", "0.62390655", "0.6223266", "0.6192175", "0.6136237", "0.6122608", "0.611911", "0.6080679", "0.60798246", "0.60712886", "0.6044843", "0.6034657", "0.6010153...
0.79048985
0
draw all markers on the map for a list of search results
function drawAllMarkers(){ for(var i=0;i<results.length;i++){ drawMarker(results[i],i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderResults(){\n resultsArray = [];\n visibleMarkersId = [];\n visibleMarkersOnMap = [];\n\n for (var i = 0; i < newMarkers.length; i++) {\n if ( map.getBounds().contains(newMarkers[i].getPosition()) ){\n ...
[ "0.74795693", "0.7328954", "0.73185533", "0.72302985", "0.7168741", "0.6988159", "0.69768053", "0.6948621", "0.6944163", "0.6933771", "0.691961", "0.68869925", "0.6884407", "0.68831986", "0.6876895", "0.6872984", "0.68667126", "0.68539995", "0.6840927", "0.68326735", "0.68326...
0.84878284
0
add information window for a marker
function setMarkerInfo(marker,index){ var info = new google.maps.InfoWindow(); //content which goes into each infowindow var content = '<b style="font-size: 20px">'+results[index].name+'</b>'; content += '<br />'+ results[index].descriptionShort; content += '<br />Rating: ' + results[index].rating; conte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showInfoWindow() { \n currentmarker = this;\n infoWindow.open(map, currentmarker);\n buildIWContent();\n\n}", "function markerAddInfoWindow(marker, content) {\n var infoWindow = new google.maps.InfoWindow({\n content: content\n });\n google.maps.event.addListener(marker, \"click\", function...
[ "0.79976994", "0.7976676", "0.7951534", "0.7879421", "0.7862397", "0.779098", "0.7723936", "0.7713104", "0.7711015", "0.7696783", "0.7683007", "0.76806366", "0.76574874", "0.76558304", "0.7641222", "0.76248634", "0.7571004", "0.7546458", "0.7543967", "0.7535146", "0.74757856"...
0.733749
36
hide all markers from the map
function clearMarkers() { if (markersArray){ for(var i=1;i<markersArray.length;i++){ markersArray[i].setMap(null); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideMarkers() {\r\n setMapOnAll(null);\r\n}", "function hideMapMarkers() {\n //Hide map markers\n for (var i = 0; i < markers.length; i++) {\n markers[i].setVisible(false);\n }\n}", "function hideMarkers(currentMarkers) {\n for (var i = 0; i < currentMarkers.length; i++) {\n ...
[ "0.91967523", "0.8852471", "0.87103117", "0.8681857", "0.86692005", "0.8660254", "0.86230683", "0.86230683", "0.85806596", "0.8534925", "0.84564143", "0.8365121", "0.8332433", "0.83152163", "0.83060426", "0.83060426", "0.83060426", "0.82952005", "0.82900363", "0.8266936", "0....
0.0
-1
destroy all markers in the markersArray EXCEPT the first one (center marker)
function destroyMarkers() { clearMarkers(); markersArray = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remMarkerSez(){\n for (var x in markerArray){\n\t\t\tmarkerArray[x].setMap(null);\n\t\t }\n}", "function deleteAllMarkers() {\r\n if (_markersArray) {\r\n for (i in _markersArray) {\r\n _markersArray[i].setMap(null);\r\n }\r\n _markersArray....
[ "0.83070123", "0.8248328", "0.8202869", "0.8176945", "0.817282", "0.8152749", "0.81324345", "0.81179327", "0.80691177", "0.8056157", "0.80386233", "0.80329365", "0.7998259", "0.79964536", "0.7994168", "0.7989923", "0.7989081", "0.7976841", "0.7970689", "0.79387766", "0.793864...
0.8148785
6
hide all infowindows from the map
function clearInfo(){ if (infoArray) { for(var i=0;i<infoArray.length;i++){ infoArray[i].close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideAllInfoWindows(map) {\n markersOnMap.forEach(function(marker) {\n marker.infoWindow.close(map, marker);\n }); \n}", "function hideMarkers() {\r\n setMapOnAll(null);\r\n}", "function hideMapMarkers() {\n //Hide map markers\n for (var i = 0; i < markers.length; i++) {\n markers[i]....
[ "0.84843576", "0.83495146", "0.8143459", "0.80064017", "0.7826505", "0.7826505", "0.78031415", "0.7782615", "0.7779628", "0.77745163", "0.77709293", "0.77551675", "0.77551675", "0.77551675", "0.7741381", "0.7741059", "0.77171624", "0.77036923", "0.7669208", "0.7654211", "0.76...
0.0
-1
destroy all infowindows in the infoArray
function destroyInfo(){ clearInfo(); infoArray = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearInfoWindows() {\n infowindows.forEach((infowindow) => {infowindow.close();});\n infowindows = [];\n}", "function remove_all_infoWindows() {\n for (var i=0 ; i<infoWindows.length ; i++) {\n infoWindows[i].setMap(null);\n }\n}", "function clearOverlays(infowindow) {\n if (markersA...
[ "0.8519952", "0.80178857", "0.7870647", "0.77480227", "0.75351053", "0.7516821", "0.7513733", "0.74174964", "0.7388316", "0.7334419", "0.72883284", "0.7284326", "0.7258069", "0.7254145", "0.72452587", "0.7223842", "0.72160333", "0.71978265", "0.7190011", "0.717535", "0.717535...
0.7782758
3
Rezoom the map to a suitable size which can show all markers Note: default travel mode: driving
function zoomToFit(){ var bounds = new google.maps.LatLngBounds (); for(var i=0;i<markersArray.length;i++){ bounds.extend (markersArray[i].getPosition()); } map.fitBounds (bounds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reZoomMap() {\n \n largeInfoWindow.close();\n var myLatlng = { lat: 40.706086, lng: -73.99686 };\n map.setCenter(myLatlng);\n map.setZoom(11);\n }", "zoomMap() {\n PaintGraph.Pixels.zoomExtent(this.props.map, this.props.bbox)\n window.refreshTiles()\n window.updateTi...
[ "0.76592714", "0.7570208", "0.7333955", "0.7279156", "0.71971655", "0.7168486", "0.7113202", "0.69966304", "0.69568795", "0.6884424", "0.6850639", "0.6843443", "0.6839154", "0.68190485", "0.678874", "0.6782977", "0.6763308", "0.6746949", "0.6727065", "0.6696602", "0.6666471",...
0.68029594
14
show a full itinerary which go through all the markers input: results result list, itinerary itinerary list, container the html container for displaying full itinerary information returns DirectionRenderer object in the end
function getFullItinerary(){ if(!itinerary || itinerary.length==0){ //if the itinerary array is empty alert('There\'s nothing in your itinerary list yet.'); }else if(itinerary.length==1){ //if the itinerary array only have one item alert('There\'s only one item in your itnerary list.'); }else{ directionsDi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showItineraryInfo(){\n\tif(directionsDisplay){\n\t\tvar html = '';\n\t\thtml += '<div id=\"intinerary\"><ul>Your Itinerary:';\n\t\tvar letter = 'A';\n\t\tfor(var i=0;i<itinerary.length;i++){\n\t\t\thtml += '<li>'+letter+': '+results[itinerary[i]].name+'</li>';\n\t\t\tletter = String.fromCharCode(letter.ch...
[ "0.721502", "0.64206165", "0.61767364", "0.60802966", "0.6004447", "0.5863783", "0.5771516", "0.57480943", "0.5746986", "0.57366496", "0.5702798", "0.56822336", "0.5681451", "0.5669327", "0.56242746", "0.56187284", "0.5606566", "0.55981326", "0.5579255", "0.557749", "0.557455...
0.63338006
2
show itinerary info in the 'itineraryContainer' html container
function showItineraryInfo(){ if(directionsDisplay){ var html = ''; html += '<div id="intinerary"><ul>Your Itinerary:'; var letter = 'A'; for(var i=0;i<itinerary.length;i++){ html += '<li>'+letter+': '+results[itinerary[i]].name+'</li>'; letter = String.fromCharCode(letter.charCodeAt(0) + 1); } html ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayInfo(element) {\n const container = document.getElementById('container');\n const divInfo = createAndAppend('div', container, {\n id: 'leftSide',\n class: 'left-div whiteframe',\n });\n // Table info\n createAndAppend('table', divInfo, { id: 'table' });\n const table = d...
[ "0.60914546", "0.6088063", "0.5811429", "0.55537224", "0.5503416", "0.5492608", "0.54678494", "0.5432793", "0.54198414", "0.53999656", "0.53989977", "0.53601605", "0.5331097", "0.53237563", "0.53071123", "0.5289974", "0.5273806", "0.52652067", "0.5247485", "0.52320796", "0.52...
0.7938041
0
remove itinerary from the map
function clearItinerary(){ if(directionsDisplay){ directionsDisplay.setMap(null); } itineraryContainer.innerHTML = ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mapRemove() {\n\n\t\tthis.map.remove();\n\n\t}", "remove() {\n this.setMap(null);\n }", "function removeItineraryLayers() {\n map.eachLayer(function(layer) {\n if (layer.feature && layer.feature.properties && layer.feature.properties.from) {\n map.removeLayer(layer);\n ...
[ "0.7254026", "0.6914474", "0.6809391", "0.65901685", "0.64955103", "0.6442315", "0.6433228", "0.64306134", "0.6403493", "0.6381358", "0.63126445", "0.6293758", "0.62902814", "0.6272396", "0.6271165", "0.62590915", "0.62399596", "0.62304306", "0.62160957", "0.6214667", "0.6198...
0.655908
4
itinerary request error handler
function itineraryErrorHandler(status){ switch(status){ case google.maps.DirectionsStatus.NOT_FOUND: alert("At least one of the locations could not be found."); break; case google.maps.DirectionsStatus.ZERO_RESULTS: alert("No route could be found."); break; case google.maps.DirectionsStatus.MAX_WAYPOIN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleRequestError(err, request, response) {\n\t\tconst url_parts = url.parse(request.url, true);\n\t\tlet payload = '';\n\n\t\tif (!!request.post) payload = request.post.Value;\n\n\t\tthis._requestslog('error', err.message, { error: err, client: url_parts, payload: payload });\n\n\t\tresponse.writeHead(err.code,...
[ "0.7644135", "0.7434484", "0.7412992", "0.72972155", "0.72933465", "0.72747", "0.7233971", "0.7189531", "0.71567893", "0.7133918", "0.7066232", "0.7055098", "0.7022883", "0.687792", "0.687792", "0.68756634", "0.687217", "0.677139", "0.67670935", "0.67467517", "0.67435634", ...
0.0
-1
adding the index of a winery in the result list to itinerary
function addToItinerary(index){ if(!inItinerary(index)){ if(itinerary.length<10){ itinerary.push(index); }else{ alert('Max waypoints (8) exceeded.'); } }else{ alert('This is place is already in your itinerary.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function re(idx) {return {row: Math.floor(idx/elesPerRow), ele: idx%elesPerRow}}", "createHealerIndexes() {\n console.log('Adding Healer Indexes');\n for (let index = 0; index < this._group.length; index++) {\n if(classes.channelClasses.healer.includes(classes.classList[this._group[index].class].toLow...
[ "0.55869204", "0.5573385", "0.553107", "0.5523203", "0.55077684", "0.5484165", "0.5437415", "0.54345536", "0.5375157", "0.53714454", "0.5370212", "0.53351235", "0.53324896", "0.533067", "0.5326828", "0.53238034", "0.5313374", "0.52710116", "0.5236732", "0.5227077", "0.5224556...
0.5550823
2
return true if the index of a winery in the result list is already in the itinerary
function inItinerary(index){ for(var i=0;i<itinerary.length;i++){ if(itinerary[i]==index){ return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tileIsOccupied(workerList, posn) {\n return workerList.some(function (iw) {\n return iw.x === posn.x && iw.y === posn.y;\n });\n }", "function checkWinner(player) {\n for (var i=0; i < winningArray.length; i++){ \n var winNums = winningArray[i];\n\n for (var j=0; j < w...
[ "0.64020056", "0.62280315", "0.6029004", "0.59683895", "0.5964378", "0.5939323", "0.59243774", "0.58900875", "0.5887339", "0.58813596", "0.5838857", "0.58282155", "0.58244306", "0.5816965", "0.5795136", "0.57839906", "0.5778318", "0.57721776", "0.5764812", "0.5764127", "0.576...
0.6686253
0
======================================================= app control =======================================================
function appShowAllResults(){ createMap(); destroyMarkers(); destroyInfo(); clearItinerary(); drawCenterMarker(); drawAllMarkers(); zoomToFit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initApp() {\n\tinitSounds();\n\tinitSensors();\n\tshowWelcome();\n}", "function App() {\n return null;\n }", "function App() {\n return null;\n }", "async function app() {\n //Render and display app logo\n renderLogo();\n //Inquirer \"home page\" which lists all options to t...
[ "0.6738463", "0.6712207", "0.6712207", "0.66633654", "0.6603449", "0.6597999", "0.65796673", "0.6567733", "0.65371263", "0.6526615", "0.652593", "0.65084076", "0.64909524", "0.64419585", "0.64199346", "0.64108455", "0.64068085", "0.63985825", "0.6396137", "0.6392891", "0.6378...
0.0
-1
HANDLES DE FORM CREATE
handleOrigen(event){ this.setState({origen: event.target.value}); let currentComponent = this; console.log(event.target.value); axios.get(`https://andromeda-api-buscabar.herokuapp.com/stations/${event.target.value}`) .then(function (response) { // handle success console.log(respons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createForm () {\n if (document.getElementById('leaderboardButton')) {\n document.getElementById('leaderboardButton').remove();\n }\n crDom.createLeaderboardButton();\n crDom.createForm();\n crDom.createCategoriesChoice(this.filter.category);\n crDom.createDifficultyChoice(this.filter.difficu...
[ "0.63964427", "0.6361946", "0.62376404", "0.6206056", "0.61998546", "0.6085449", "0.60715044", "0.6044389", "0.595017", "0.5932128", "0.5912574", "0.58457243", "0.58326757", "0.5811885", "0.5811885", "0.5801861", "0.57871896", "0.57833165", "0.57833165", "0.57797784", "0.5756...
0.0
-1
creates new object and send it to the server
function register() { var code = $("#txtCode").val(); var title = $("#txtTitle").val(); var price = $("#txtPrice").val(); var image = $("#txtImage").val(); var cat = $("#selCat").val(); var item = new Item(code, title, price, image, cat); var jsonOb = JSON.stringify(item); $.ajax(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createObject(e){\n\t\n\t// create random object data\n\tvar object={\n\t\tname: 'PeppaTest Object' + Math.floor(Math.random()*100),\n\t\tstatus: 'created',\n\t\tcost: 2.99\n\t};\n\t\n\t// Now Save It\n\tapi.Object.Create('PeppaTest',object,function(r){\n\t\tif(r.success){\n\t\t\talert('New Object persiste...
[ "0.7136622", "0.6422809", "0.6401353", "0.63983846", "0.61767924", "0.61090523", "0.60887194", "0.60820526", "0.6079988", "0.6076638", "0.60681826", "0.6029739", "0.5970152", "0.5960141", "0.5955183", "0.5937211", "0.5933886", "0.5913467", "0.5889597", "0.5871518", "0.5863989...
0.0
-1
Filters items by code and title
function search(text) { text = text.toLowerCase(); var container = $("#catalog"); // clear everything $(container).html(''); // paint only items that fullfil the filter for (var i = 0; i < DB.length; i++) { var item = DB[i]; // decide if the items fullfils the filter //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterItems(by, value, items){\n\tif(!value || value == ''){\n\t\treturn items;\n\t}\n\t\n\tvar debug = '';\n\tvar filteredItems = [];\n\t$.each(items, function(key, item) {\n\t\tif(by == 'shelf'){\n\t\t\tif(String(value) == String(item.shelf)){\n\t\t\t\tdebug += item.title + \"\\n\";\n\t\t\t\tfilteredIte...
[ "0.6886127", "0.639952", "0.63917553", "0.6333618", "0.6244688", "0.6215138", "0.6104373", "0.6045779", "0.60337067", "0.59603506", "0.59446985", "0.59121424", "0.58951", "0.5894019", "0.5891235", "0.58660674", "0.5859723", "0.5820517", "0.5817973", "0.5792379", "0.5789589", ...
0.6451985
1
test the comunication with the server
function test() { $.ajax({ url: URL + '/API/test', type: 'GET', success: function (res) { // this fn executed on succ request console.log("success", res); }, error: function (res) { // this fn executed of something is bad console.error("error", res)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testClient(payload, callback){\n client.request('pingRPC', payload, function(err, response) {\n if(err){\n return callback(err,err)\n }\n return callback(err,response)\n })\n}", "function serverCall(){\t\t \n\n\t\t chai.request(server) \n\t\t .get('/getAp...
[ "0.63737476", "0.6311517", "0.6286666", "0.62719005", "0.62688637", "0.62475914", "0.6162609", "0.61299723", "0.60853124", "0.6077368", "0.6065664", "0.60576665", "0.59928375", "0.59913", "0.59829587", "0.5957864", "0.5953285", "0.59350425", "0.58944076", "0.5887961", "0.5884...
0.0
-1
Retrieves (1based) slide number from the hash and returns it as zerobased. Corrects for negative values; changed to 0.
function slideNumFromHash(hash) { index = /\d+/.exec(hash)[0]; var slideNum = (parseInt(index) || 1) - 1; // slides are zero-based if (slideNum < 0) slideNum = 0; return slideNum }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSlideNumberFromURL () {\r\n\r\n var hash = window.location.hash,\r\n slideNumber;\r\n\r\n hash = hash.substr(1);//trim out the #\r\n\r\n // Slidenumber backwards compatibility\r\n if ( /slidenum=/i.test(hash) ){\r\n hash = hash.replace('slidenum=', '');...
[ "0.60562444", "0.58427894", "0.58427894", "0.58346474", "0.5498872", "0.5442573", "0.53361225", "0.5275181", "0.5224318", "0.5201418", "0.5075408", "0.5024345", "0.50221175", "0.49993908", "0.49859613", "0.4960292", "0.4929062", "0.49189624", "0.4875746", "0.4872911", "0.4837...
0.7564571
0
Updates the jump field with the slide number.
function updateJumpInputField(slideNum) { // translate to 1-based index slideNum++; $('.slideshowJumpInputField').val(slideNum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "jump() {\n if (this._state !== this.PLAY_STATE) {\n return;\n }\n if (this._jump > 1) {\n this._y -= Math.floor(this._jump * 0.08);\n if (this._y < 0) {\n this._y = 0;\n }\n this._jump = Math.floor(this._jump * 0.92);\n } else {\n this._jump = 0;\n }\n offset ...
[ "0.61810076", "0.6166924", "0.5991451", "0.59018975", "0.5785963", "0.5785963", "0.5784823", "0.5768582", "0.57261413", "0.57069457", "0.5691486", "0.56772083", "0.5652815", "0.5622693", "0.56119573", "0.55804133", "0.55698824", "0.55470127", "0.5536713", "0.54624015", "0.545...
0.81565225
0
Go to next slide (current slide derived from hash).
function goToNextSlide() { var hash = window.location.hash; var slideNum = slideNumFromHash(hash) + 1; if (slideNum > endSlide) slideNum = endSlide; $('.slideshow').cycle( slideNum ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "nextSlide() {\n\n if (this.currSlide < this.slides.length - 1) {\n\n this.goTo(this.currSlide + 1, -1);\n\n } else {\n\n this.goToFirstSlide();\n\n }\n\n }", "function goToNextSlide()\n\t{\n\t\tif($currentSlide.next().length)\n\t\t{\n\t\t\tgoToSlide($currentSlide.nex...
[ "0.75887966", "0.7504664", "0.7497264", "0.7478359", "0.74322796", "0.7406567", "0.7388054", "0.7335943", "0.73289853", "0.7323317", "0.7312685", "0.7311052", "0.729762", "0.728053", "0.72654665", "0.7246536", "0.72400725", "0.72213846", "0.7130221", "0.71274537", "0.7083979"...
0.8223437
0
Go to previous slide (current slide derived from hash).
function goToPreviousSlide() { var hash = window.location.hash; var slideNum = slideNumFromHash(hash) - 1; if (slideNum < 0) slideNum = 0; $('.slideshow').cycle( slideNum ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToPrevSlide()\n {\n if($currentSlide.prev().length)\n {\n goToSlide($currentSlide.prev());\n }\n }", "function goToPrevSlide()\n\t{\n\t\tif($currentSlide.prev().length)\n\t\t{\n\t\t\tgoToSlide($currentSlide.prev());\n\t\t}\n\t}", "prevSlide() {\n\n if (th...
[ "0.7980589", "0.7959216", "0.79298484", "0.7876121", "0.78338766", "0.77959883", "0.779111", "0.77608865", "0.77398", "0.76659036", "0.76499563", "0.76273054", "0.7618337", "0.7578478", "0.74856496", "0.74776417", "0.7397214", "0.73892426", "0.7386988", "0.7377371", "0.735038...
0.8348537
0
Set slideshowPrevNext pos to fixed pixels, to prevent shifting on pages with scrollbar. On window resize this function will be called as well, so the controls will stay centered (more or less).
function centerSlideshowPrevNext() { $('.slideshowPrevNext').livequery( function () { var WIDTH = 143; // we should calculate this var x = ($(window).width() - WIDTH) / 2; $(this).css('left', x + 'px'); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function seven_prev_carousel()\n\t\t{\n\t\t\t if(100*length<option.width)\treturn false;\n\t\t\t var tb=parseInt(option.width/160);\n\t\t\t var temp=Math.abs(Math.ceil(parseInt(handle.find(\"#seven_hviewport\").css(\"left\"))/160));\n\t\t\t if(temp>=tb)\n\t\t\t {\n\t\t\t\t handle.find(\"#seven_hviewport\").an...
[ "0.6890697", "0.6615163", "0.6557618", "0.6405018", "0.63360906", "0.6335855", "0.62916553", "0.6237732", "0.6223997", "0.6178657", "0.617011", "0.61001146", "0.6091494", "0.60701376", "0.6063622", "0.6037477", "0.6023562", "0.60023695", "0.60004956", "0.5987371", "0.59825844...
0.78978497
0
FUNCTIONS ///////////////////////////////////////////////////////////////////////////// initial menu toggle for small screens
function menuToggle() { if (window.innerWidth < 768) { $(".dropdown").slideToggle("400"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function menuForSmallScreen() {\n navMenuList.hide();\n\n hideMenuBtn.addClass(ClassName.NONE);\n showMenuBtn.removeClass(ClassName.NONE);\n\n function toggleSmallMenu() {\n navMenuList.fadeToggle();\n toggleButtons();\n }\n\n function toggleMenuEvent...
[ "0.8278319", "0.82277465", "0.7647724", "0.7419074", "0.7308397", "0.72278106", "0.7226352", "0.7226352", "0.71976", "0.71843755", "0.71402484", "0.7125973", "0.70794374", "0.7036926", "0.70124", "0.70124", "0.6964677", "0.6950696", "0.6940681", "0.69204885", "0.6919634", "...
0.6767242
35
Change maximum canvas width and height based on window size and cell size
function adjustMaxCanvasSize() { var windowWidth = window.innerWidth; var numFitSm = parseInt(0.8 * windowWidth / state.inputSize, 10); // for smaller screens var numFitLg = parseInt(0.65 * windowWidth / state.inputSize, 10); // for large screens function update(widthText, heightText, maxWidth, maxHeigh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSize(){\n\t\tif(window.innerWidth > window.innerHeight * (2/1)){\n\t\t\tcanvas.style.height = window.innerHeight + \" px\";\n\t\t\tcanvas.style.width = window.innerHeight * (2/1);\n\t\t}else{\n\t\t\tcanvas.style.height = window.innerHeight * (1/2) + \" px\";\n\t\t\tcanvas.style.width = window.innerHeig...
[ "0.79082644", "0.77162975", "0.76955783", "0.76237595", "0.76184183", "0.76036465", "0.7581828", "0.7536737", "0.75310814", "0.75310814", "0.7499349", "0.7455994", "0.7454279", "0.7451812", "0.744838", "0.74460626", "0.7442338", "0.7440189", "0.74274105", "0.7420912", "0.7406...
0.7545451
7
Build the color picker
function buildColorPicker() { // modify the DOM var container = $("#color-container"); if (!state.canvasDrawn) { var label = document.createElement("p"); var labelText = document.createTextNode("Color: "); label.className = "colorLabel"; label.appendChild(labelText); var colorP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ColorPicker() {\n this._colorPos = {};\n this.el = o(require('./template'));\n this.main = this.el.find('.main').get(0);\n this.spectrum = this.el.find('.spectrum').get(0);\n this.hue(rgb(255, 0, 0));\n this.spectrumEvents();\n this.mainEvents();\n this.w = 180;\n this.h = 180;\n this.render();\...
[ "0.734717", "0.729609", "0.7210948", "0.70944285", "0.7015406", "0.6930401", "0.69221485", "0.6901255", "0.6868021", "0.6839643", "0.6792046", "0.6750644", "0.67386264", "0.66873425", "0.6666238", "0.6656662", "0.66370195", "0.6594619", "0.65697944", "0.65531415", "0.65344334...
0.8254409
0
Fill or clear cells and draw resizedCanvas to match main canvas
function fillCell(e) { // calculate cell location var cx = ~~(e.offsetX / state.size); var cy = ~~(e.offsetY / state.size); if (state.mode == "draw" && state.canvasDrawn) { // fill the cell ctx.fillStyle = state.color; ctxResized.fillStyle = state.color; ctx.fillRect(cx * state....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearCanvas(event) {\n Array.prototype.forEach.call(canvasCells, function (cell) {\n cell.style.backgroundColor = \"#FFFFFF\";\n });\n}", "function updateCanvas() { //redraws the image data to fit whatever the current size is\r\n\t\t//////////////////////////////\r\n\t\t//non-white background col...
[ "0.7030179", "0.7010849", "0.69819504", "0.69500613", "0.68978363", "0.6865078", "0.68159556", "0.6727812", "0.671406", "0.6644617", "0.6626146", "0.66248417", "0.66248417", "0.66233695", "0.6598638", "0.6565906", "0.6562273", "0.65435576", "0.65379196", "0.6531205", "0.65259...
0.68219745
6
Convert and download given canvas to computer
function save(c, fileName) { if(state.canvasDrawn) { if ("msToBlob" in c) { var blob = c.msToBlob(); // for IE10+ compatibility navigator.msSaveBlob(blob, fileName); } else { var link = document.createElement("a"); link.href = c.toDataURL(); link.target = "_blank"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function download() {\n const a = document.createElement(\"a\");\n\n document.body.appendChild(a);\n a.href = canvas.toDataURL();\n a.download = \"canvas.png\";\n a.click();\n document.body.removeChild(a);\n}", "function downloadCanvas() {\n let name = prompt(\"Podaj nazwę obrazka\")\n if(name != nul...
[ "0.7568126", "0.7543526", "0.7053043", "0.6888134", "0.6852111", "0.6834596", "0.6784309", "0.67573404", "0.6754429", "0.6715843", "0.6712695", "0.6709507", "0.6703871", "0.66667676", "0.66577727", "0.65967387", "0.65918", "0.656156", "0.65589327", "0.6553296", "0.6534337", ...
0.5830954
79
Callback to set user's events.
function authDataCallback(authData) { if (authData) { console.log("User is logged in with " + authData.provider); self.eventsRef = authService.setEventRef(authData.uid); self.eventsArray = $firebaseArray(self.eventsRef); self.loggedStatus = true; } else { console.log("User is logged out"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async registerUserEvents () {\n const eventFiles = await this.loadEvents()\n\n _.forEach(eventFiles, async eventFile => {\n const Event = this.resolve(eventFile)\n const event = new Event()\n this.ensureEvent(event)\n\n const listeners = await this.getListenersFor(event.emit())\n thi...
[ "0.65430576", "0.6434059", "0.6434059", "0.6434059", "0.6370732", "0.6370732", "0.6350673", "0.6322419", "0.6173818", "0.6026224", "0.60105526", "0.6010366", "0.59778184", "0.59403825", "0.59376544", "0.59208006", "0.5858731", "0.5838447", "0.57985914", "0.57947433", "0.57906...
0.0
-1
Sets the user ref
function setEventRef(userId) { var userRef = ref.child("users").child(userId).child("events"); return userRef; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUser(u) {\n user = u\n}", "SET_USER(state, user) {\n state.user = user;\n }", "set user (value) {\n if (_user = value) {\n this.push();\n } else {\n this.clear();\n }\n }", "function setUser()...
[ "0.6799163", "0.64091647", "0.634603", "0.633649", "0.63261086", "0.631905", "0.6260055", "0.6233622", "0.6192625", "0.6161033", "0.6145872", "0.6127406", "0.6096931", "0.60330516", "0.60330516", "0.60330516", "0.60330516", "0.60330516", "0.60330516", "0.60330516", "0.6033051...
0.62202877
8
Specifies which props to inject into your component.
function dropCollect(connect, monitor) { return { // Call this function inside render() // to let React DnD handle the drag events: connectDropTarget: connect.dropTarget(), // You can ask the monitor about the current drag state: isOver: monitor.isOver(), canDrop:monitor.canDrop() }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function componentProps(){\n\t\tvar props = {};\n\t\tlog(arguments);\n\t\tfor(var i = 0; i< arguments.length; i++){\n\t\t\tvar arg = arguments[i];\n\t\t\tlog(arg);\n\t\t\tvar prop = String.prototype.split.call(arg,\"=\"); // key value pairs\n\t\t\tif(prop.length > 1) {\n\t\t\t\tprops[prop[0]] = prop[1];\n\t\t\t} e...
[ "0.68092453", "0.6762557", "0.65493995", "0.6466218", "0.6439845", "0.6390664", "0.6389516", "0.63072723", "0.6264694", "0.6187417", "0.6187417", "0.6187417", "0.6156609", "0.60851765", "0.606386", "0.59942526", "0.59551024", "0.5939558", "0.5939558", "0.5934871", "0.59165835...
0.0
-1
create nullos for dropdown lists
function createNullos(manager) { var unchanged = breeze.EntityState.Unchanged; createNullo(entityNames.user, { fullName: '[Select a user]' }); function createNullo(entityName, values) { var initialValues = values || { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDropDown(inputList) {\n $(\"div[id='columnNameListParent']\").removeClass('d-none')\n deletChild('columnNameList')\n var dropdown = $('#columnNameList')\n dropdown.append($('<option>').attr({ value: 'none', label: 'Choose a column' }))\n inputList.forEach(element => {\n var ent...
[ "0.6887539", "0.67035025", "0.66971344", "0.66971344", "0.6693267", "0.66748405", "0.66131955", "0.65337604", "0.65306413", "0.6489693", "0.64873147", "0.64351636", "0.64018136", "0.63787067", "0.6359519", "0.63437593", "0.6318983", "0.631199", "0.6311121", "0.63080156", "0.6...
0.0
-1
This implementation uses only the transparency for the key, since transparency is a boolean, there are only two slots.
getKey(transparency, color, sizes) { return transparency; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Key() {\n this.keyColor = '';\n this.keyName = '';\n\n this.color = function (c) {\n if (c) {\n this.keyColor = c;\n } else {\n return this.keyColor;\n }\n }\n\n this.name = function (n) {\n if (n) {\n this.keyName = n;\n }...
[ "0.58095187", "0.57866424", "0.57263476", "0.57144964", "0.57061857", "0.5584341", "0.5546184", "0.5514925", "0.55013156", "0.5497997", "0.54831666", "0.5481292", "0.5475849", "0.54651326", "0.5451642", "0.5450018", "0.5411229", "0.54098946", "0.54091275", "0.54041934", "0.53...
0.65424585
0
In addition to a default buffer, also add a color buffer
createBufferSet(transparency, color, sizes) { var buffer = super.createBufferSet(transparency, color, sizes); buffer.colors = this.settings.quantizeColors ? new Uint8Array(sizes.colors) : new Float32Array(sizes.colors); buffer.colorsIndex = 0; return buffer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createBuffers() {\n this.createBuffer('COLOR')\n this.createBuffer('POSITION')\n }", "addToGlBuffer(particle, posBuffer, colorBuffer, sizeBuffer) {\n posBuffer.push(particle.position[0],particle.position[1],particle.position[2]);\n colorBuffer.push(particle.color[0],particle.color[1],parti...
[ "0.7266562", "0.67798364", "0.6768111", "0.67009884", "0.6539169", "0.6469345", "0.64297795", "0.622823", "0.62002486", "0.61429125", "0.61260647", "0.61119705", "0.6109004", "0.6076454", "0.60646355", "0.6042215", "0.5988253", "0.59608054", "0.59520286", "0.59286904", "0.592...
0.65136814
5
Additionally reset the color buffer
resetBuffer(buffer) { super.resetBuffer(buffer); buffer.colorsIndex = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCanvas() {\n for (let i = 0; i < canvasData.length; i++) {\n canvasData[i] = defaultColor;\n dirtyIndices.push(i);\n }\n}", "reset(){\n this.pattern = new ACNLFormat();\n this.pixels_buffer = new ArrayBuffer(4096);\n this.pixels = new Uint8Array(this.pixels_buffer);\n ...
[ "0.7566394", "0.73618233", "0.70352024", "0.69805056", "0.6968982", "0.69151044", "0.6862394", "0.68497044", "0.681018", "0.67960936", "0.67747164", "0.6770032", "0.67299867", "0.6683777", "0.6683777", "0.66681254", "0.6640588", "0.6632096", "0.6609236", "0.65923506", "0.6592...
0.81257075
0
default arguments default age to 10;
function isValidAge(age) { return age }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Person(name, age) {\n // Setting default val\n age === undefined ? (this.age = -1) : (this.age = age);\n this.name = name;\n}", "constructor(name = 'Anonymous', age = 0) {\n this.name = name;\n this.age = age;\n }", "function person(name='John Doe', age=99) {\n console.log(name+...
[ "0.7046437", "0.68830335", "0.6859091", "0.6842153", "0.6691697", "0.66771406", "0.66266805", "0.6604143", "0.65398806", "0.6498122", "0.6460315", "0.6460315", "0.6460315", "0.6447479", "0.63935673", "0.6377103", "0.63522995", "0.6351845", "0.63504916", "0.6322824", "0.628974...
0.58307284
59
Initializes the fields of this object. This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mixins). Only for internal use.
static initialize(obj, assignee, authorAssociation, closedAt, comments, commentsUrl, createdAt, eventsUrl, htmlUrl, id, labels, labelsUrl, locked, milestone, nodeId, _number, repositoryUrl, state, title, updatedAt, url, user) { obj['assignee'] = assignee; obj['author_association'] = authorAssociation; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super();\n this._init();\n }", "init() {\n this._super(...arguments);\n this._applyDefaults();\n }", "_init() {\n\t\tthis.life.init();\n\t\tthis.render.init();\n\n\t\tthis.emission.init();\n\t\tthis.trail.init(this.node);\n\n\t\tthis.color.init();\n\t}", "function Co...
[ "0.7132527", "0.69649905", "0.68144095", "0.67468536", "0.67168033", "0.6644054", "0.6634022", "0.66023695", "0.6581312", "0.6565271", "0.6411091", "0.64048046", "0.6335285", "0.63051367", "0.6296763", "0.62831414", "0.62693095", "0.62406176", "0.6240038", "0.62344605", "0.62...
0.0
-1
UvAID: 10447555 File: draw.js draw choropleth
function Draw_Map(year, data, industry) { // small object to translate names in hover var industry_name = new Object; industry_name = { 'totalCO2': 'all industries', 'electricandheat': 'electric and heat', 'manufacturing': 'Manufacturing', 'transportation': 'transporation', 'fuelcombustion': 'fuel combust...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw_choropleth_map() {\n fetch('/mysql/map')\n .then(response => response.json())\n .then(result => {\n\n let countries = result.map(a => a.name);\n let deaths = result.map(b => b.total_deaths);\n\n let data = [{\n type: 'ch...
[ "0.7106307", "0.6802605", "0.6763258", "0.6736338", "0.6629548", "0.66148734", "0.66068345", "0.6563348", "0.6556179", "0.64886826", "0.6416362", "0.6368039", "0.63575816", "0.63392854", "0.6283178", "0.62647873", "0.6258202", "0.6223695", "0.6222162", "0.6221351", "0.6215738...
0.61289823
29
update sunburst on click
function click(d) { // Update linechart when clicked on country if (d.ccode) { Update_Linechart(data, Country_Path(d.ccode), sea_data); // store country code for later use stored_code = d.ccode; }; // update legend to clicked continent or country if (d.depth == 0) { Update_Legend(d.name)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSunburst(dataX, food) {\n\n // Get new data\n var data = sunburstData(dataX, food)[0]\n\n // Partition new data\n var root = partition(data)\n root.each(d => d.current = d);\n\n // Remove old elements\n label.remove()\n parent.remove()\n d3.selectAll(\"#sunburstsvg\").selectAll(\".path, #su...
[ "0.7568398", "0.7132099", "0.67076516", "0.66271836", "0.661721", "0.652977", "0.6496533", "0.64241546", "0.636105", "0.63533074", "0.6351005", "0.6345843", "0.6329109", "0.63209504", "0.6294772", "0.6282167", "0.6274458", "0.6256886", "0.6250457", "0.6249006", "0.6211114", ...
0.0
-1
Methods for Modifying Factories Sets a variable factory.
setVariableFactory(fn) { this.#fv = fn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "doUpdateFactory(factory) {\n let promise = this.codenvyAPI.getFactory().setFactory(factory);\n\n promise.then((factory) => {\n this.factory = factory;\n this.cheNotification.showInfo('Factory information successfully updated.');\n }, (error) => {\n this.cheNotification.showError(error.data....
[ "0.5987488", "0.5937704", "0.5900604", "0.5817755", "0.57740855", "0.57740855", "0.5748042", "0.5632721", "0.56185657", "0.55897963", "0.5533085", "0.5492774", "0.5468014", "0.5460905", "0.54488915", "0.542795", "0.5338912", "0.5313778", "0.5313778", "0.5313778", "0.5313778",...
0.782722
0
Sets a variable factory.
setConstraintFactory(fn) { this.#fc = fn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setVariableFactory(fn) {\n\t\tthis.#fv = fn;\n\t}", "setValue(variableName,value) {\r\n this.variables[variableName] = value;\r\n }", "function define(factory){\n\t\tif(arguments.length == 2){ // precompiled version\n\t\t\tdefine.factory[arguments[1]] = factory\n\t\t\treturn\n\t\t}\n\t\tdefine.last_f...
[ "0.8165664", "0.58813274", "0.57689065", "0.5718246", "0.56520265", "0.5585341", "0.5561505", "0.5561505", "0.5561505", "0.5561505", "0.5561505", "0.5561505", "0.5561505", "0.55588764", "0.5535273", "0.5535273", "0.5535273", "0.5535273", "0.5535273", "0.5504428", "0.55024403"...
0.56006354
5
Generation Methods Adds a variable to this problem.
addVariable(v) { v.setIndex(this._vars.length); this._vars.push(v); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addVariable(name, value) {\n // Check if variable is already included\n if (typeof this.varMap[name] !== 'undefined') {\n // Check if value for variable has changed\n if (this.varMap[name].value != value) {\n this.varMap[name].value = value;\n this.listUpdated = true;\n return;...
[ "0.6520708", "0.61715204", "0.59411496", "0.5788374", "0.57827926", "0.5679699", "0.5636215", "0.56305385", "0.5491577", "0.54747486", "0.54747486", "0.5471255", "0.54660904", "0.5452577", "0.54078865", "0.53503466", "0.5334985", "0.5303232", "0.52847654", "0.52500457", "0.52...
0.6421713
1
Modification Methods Remove the constraint.
removeConstraint(c) { const index = this._cons.indexOf(c); this._cons.remove(c); for (let i = index; i < this._cons.length; ++i) { this._cons[i].setIndex(i); } for (const v of c) { v.disconnect(c); } this._isFuzzy = false; for (const c of this._cons) { if (c.isFuzzy()) { this._isFuzzy = tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeConstraint(el, constraintFn) {\n if (!el.manipulatorConstraints) return;\n for (let priorityList of el.manipulatorConstraints.values())\n {\n let idx = priorityList.indexOf(constraintFn)\n if (idx >= 0)\n {\n priorityList.splice(idx, 1)\n }\n }\n }", "function dropCo...
[ "0.7482245", "0.6615927", "0.5885608", "0.57556474", "0.5610672", "0.55901843", "0.5572354", "0.55715215", "0.55057853", "0.5387414", "0.53748006", "0.5349839", "0.5344262", "0.5341465", "0.53348595", "0.53266764", "0.5302003", "0.52835876", "0.5263889", "0.5260033", "0.52510...
0.72805095
1
Changes the status of all variables to unassigned.
clearAllVariables() { for (const v of this._vars) { v.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UnassignedAssignment() {\n this.param = new canon.Parameter({\n name: '__unassigned',\n type: 'string'\n });\n this.paramIndex = -1;\n this.onAssignmentChange = util.createEvent('UnassignedAssignment.onAssignmentChange');\n\n this.setBlank();\n}", "unassignAll() {\n this.assignments && thi...
[ "0.6975932", "0.62300414", "0.6211105", "0.6118676", "0.5979961", "0.5924643", "0.5870813", "0.5850314", "0.5834761", "0.58101845", "0.58009875", "0.58009875", "0.57873213", "0.57849205", "0.5724304", "0.5695458", "0.56913394", "0.5668553", "0.56532437", "0.56431276", "0.5638...
0.6629809
1