query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Returns true if PageElement's location eventually equals the expected coordinates or if it deviates no more than the specified tolerances from the expected coordinates within a specific timeout.
hasLocation(coordinates, opts = { tolerances: { x: 0, y: 0 } }) { return this._node.__eventually(() => this._node.wait.hasLocation(coordinates, { tolerances: opts.tolerances, timeout: opts.timeout })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasLocation(coordinates, opts = { tolerances: { x: 0, y: 0 } }) {\n const { tolerances } = opts, otherOpts = __rest(opts, [\"tolerances\"]);\n if (tolerances && (tolerances.x > 0 || tolerances.y > 0)) {\n return this._waitWithinProperty('location', helpers_1.tolerancesToString(coordinates,...
[ "0.59154785", "0.59130114", "0.5601537", "0.5601537", "0.55209523", "0.55209523", "0.55209523", "0.55109185", "0.54743457", "0.53905445", "0.53264236", "0.52999794", "0.52465034", "0.5135375", "0.5055124", "0.50367963", "0.500801", "0.4976057", "0.4965728", "0.49221492", "0.4...
0.6335137
0
Returns true if PageElement's width eventually equals the expected width or if it deviates no more than the specified tolerance from the expected width within a specific timeout.
hasWidth(width, opts = { tolerance: 0 }) { return this._node.__eventually(() => this._node.wait.hasWidth(width, { tolerance: opts.tolerance, timeout: opts.timeout })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasWidth(width, tolerance) {\n const actual = this.getWidth();\n this._writeLastDiff(helpers_1.tolerancesToString(actual));\n return this._withinTolerance(width, actual, tolerance);\n }", "hasWidth(width, opts = { tolerance: 0 }) {\n const { tolerance } = opts, otherOpts = __rest(o...
[ "0.6754197", "0.6127725", "0.583207", "0.5472157", "0.54574215", "0.5284475", "0.5284475", "0.5284475", "0.5211116", "0.5168815", "0.5071889", "0.5038115", "0.5038115", "0.5037163", "0.5006208", "0.50015515", "0.49711844", "0.49611944", "0.4882115", "0.4823422", "0.47669", ...
0.64282453
1
Returns true if PageElement's height eventually equals the expected height or if it deviates no more than the specified tolerance from the expected height within a specific timeout.
hasHeight(height, opts = { tolerance: 0 }) { return this._node.__eventually(() => this._node.wait.hasHeight(height, { tolerance: opts.tolerance, timeout: opts.timeout })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasHeight(height, tolerance) {\n const actual = this.getHeight();\n this._writeLastDiff(helpers_1.tolerancesToString(actual));\n return this._withinTolerance(height, actual, tolerance);\n }", "hasHeight(height, opts = { tolerance: 0 }) {\n const { tolerance } = opts, otherOpts = __...
[ "0.64546937", "0.6424713", "0.5652048", "0.55804425", "0.5555738", "0.5515391", "0.5515391", "0.5515391", "0.53618956", "0.5277387", "0.52671355", "0.5213949", "0.51920885", "0.516472", "0.516126", "0.516126", "0.5130739", "0.5129248", "0.5102942", "0.5093831", "0.50541383", ...
0.6668106
0
returns the negated variants of PageElementEventually's state check functions
get not() { return { /** * Returns true if PageElement eventually does not exist within a specific timeout. * * @param opts includes the `timeout` within which the condition is expected to be met * * If no `timeout` is specified, PageE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get not() {\n return {\n /**\n * Returns true if PageElement currently does not exist.\n */\n exists: () => !this.exists(),\n /**\n * Returns true if PageElement is currently not visible.\n */\n isVisible: () => !thi...
[ "0.6878818", "0.67267936", "0.6322087", "0.6319103", "0.62808466", "0.62647396", "0.6190237", "0.6113469", "0.5989658", "0.595458", "0.5932684", "0.58754563", "0.58422637", "0.5809304", "0.5772138", "0.5690304", "0.5632559", "0.55861425", "0.55500305", "0.55435675", "0.551270...
0.68763745
1
Dump all file metadata.
function dumpFileMetadata() { var fileName = 'DebugLog'; var it = DriveApp.getFilesByName(fileName); while (it.hasNext()) { var file = it.next(); var message = file.getName() + ' ' + file.getMimeType() + ' ' + file.getUrl(); doLog('dumpFileMetadata', message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllFileMetadata(done) {\n\tvar params = {\n\t\tTableName : \"AutocareFiles\"\n\t};\n\tvar client = createClient();\n\tclient.scan(params, done);\n}", "function printAll() {\n printAllPathToIdMappings();\n printAllFiles();\n printAllDirectories()\n}", "collectMetadata(stack) {\n cons...
[ "0.56820506", "0.55470246", "0.5152287", "0.51498127", "0.5080959", "0.5070739", "0.5058406", "0.49835205", "0.49707788", "0.48767948", "0.48756272", "0.48685867", "0.4839626", "0.48104268", "0.47567692", "0.47509253", "0.47025105", "0.46947482", "0.46385852", "0.46171138", "...
0.67936206
0
This is the Hashparser, which parses the hash part of the url and makes sense of it (if possible)
function HashParser() { this.hash = window.location.hash; this.values = {}; var cleanhash = this.hash.split("#")[1] ? this.hash.split("#")[1] : "&page=0"; var pairs = cleanhash.split("&"); for (var i = 1; i < pairs.length; i += 1) { var pair = pairs[i].split("="); if (pair) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseURLHash () {\n var search = location.hash.substring(1);\n var urlHash = search?JSON.parse('{\"' + search.replace(/&/g, '\",\"').replace(/=/g,'\":\"') + '\"}',\n function(key, value) { return key===\"\"?value:decodeURIComponent(value) }):{}\n return urlHash;\n}", "functi...
[ "0.77042437", "0.6974944", "0.6942851", "0.69057214", "0.6844332", "0.6828567", "0.6818256", "0.67964596", "0.67964596", "0.6761033", "0.6761033", "0.6761033", "0.6738091", "0.67048967", "0.6683037", "0.66786593", "0.6675058", "0.6675058", "0.6675058", "0.6675058", "0.6663850...
0.8204865
0
A Blob Component to render a Git Tree blob object.
function BlobObject({ selected, blob, blob: { path, size, }, onBlob, depth, filepath, }) { const classes = useStyles(); const _filepath = Path.join(filepath || '', path); const _blob = { ...blob, filepath: _filepath }; const icon = selected ? <Note /> : <NoteOutlined />; return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get blob () {\r\n\t\treturn this._blob;\r\n\t}", "displayBlob(blob) {\n if (this.getBlob(blob.name)) {\n log(\"Diagram Name: \" + this.name)\n log(\"Blob Name: \" + blob.name);\n log(\"Shape: \" + blob.shape)\n log(\"(x, y) Coordinates: (\" +...
[ "0.60062003", "0.58708596", "0.57353014", "0.5728549", "0.57095844", "0.5605735", "0.55473477", "0.545975", "0.54596114", "0.5409337", "0.53363025", "0.5285749", "0.52018297", "0.5184523", "0.51738185", "0.5163813", "0.5155258", "0.51268804", "0.50826776", "0.5078835", "0.505...
0.6703164
0
random numbers selected for the crystals, between range 1 12
function crystalsRandomSel() { var C = Math.floor(Math.random() * 12) + 1; return C; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomlizeCrystals() {\n blueValue = Math.floor(Math.random() * 12) + 1;\n greenValue = Math.floor(Math.random() * 12) + 1;\n redValue = Math.floor(Math.random() * 12) + 1;\n purpleValue = Math.floor(Math.random() * 12) + 1;\n}", "function assignCrystalRand(){\n \n for(var i = 0; i...
[ "0.80783415", "0.800184", "0.78627", "0.77982116", "0.7710951", "0.7708862", "0.76887727", "0.76175845", "0.7572914", "0.74833137", "0.7469038", "0.74353176", "0.74050254", "0.73739445", "0.7255995", "0.72555125", "0.72221726", "0.7219479", "0.72116", "0.7152235", "0.71421164...
0.8444469
0
register validate: password confirmation listener
function validateConfirmPassword() { var passwordconfirm = document.getElementById('inputPasswordConfirm'); passwordconfirm.addEventListener("keyup", function (event) { validateConfirmPasswordIn(); }, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onupdateConfirmPassword(event) {\n this.password = event.target.value;\n this.passwordValidationState = '';\n }", "function new_password_validation(){\n\t\t$('#new-password-confirm').bind('click blur', function(){\n\t\t\tvar pass1 = $('#new-password');\n\t\t\tvar pass2 = $('#new-password-confirm');\n\t\t\...
[ "0.66382456", "0.6536439", "0.65104914", "0.6447445", "0.64277", "0.6382845", "0.6354765", "0.63206303", "0.62764215", "0.62703174", "0.6266017", "0.62560904", "0.6227405", "0.61984307", "0.6144881", "0.61413306", "0.6135923", "0.60701627", "0.6027763", "0.6024404", "0.601811...
0.7192901
0
Interacts with the Access Control REST API.
function AccessControlService() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestAccess() {\n\n var settings = {};\n var authRequest = {\n requestingAppId: false,\n referer: null,\n languageCode: false,\n permissionsArea: false,\n returnURL: false\n };\n authRequest.requestingAppId = requestingAppId.val();\n\n if (authRequest.requestingAppId.length < 6) {\n ...
[ "0.6000569", "0.56575173", "0.5492705", "0.54185903", "0.5407145", "0.531192", "0.5299614", "0.5263062", "0.5234061", "0.5221775", "0.52132726", "0.5175599", "0.51721865", "0.5160298", "0.5152095", "0.5148312", "0.5123112", "0.5097989", "0.5087075", "0.507601", "0.507196", ...
0.6759196
0
Funcion que me elimina la fila segun alla oprimido cualquier boton eliminar
function eliminarfila() { var columna_btn_eliminar = this.parentNode;//En este caso guardo el elemento padre //del boton eliminar que dimos click o sea la columna var fila_btn_eliminar = columna_btn_eliminar.parentNode;//Guardo la fila de la columna var elt_fila = fila_btn_eliminar.childNodes;//Guardo ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarLinea(indice){\n $(\"#fila\" + indice).remove();\n calculaTotalAjusteInv();\n detalles=detalles-1;\n evaluarAjusteInv();\n}", "function removerFila(cont_partida)\n{\n\tactualizarTotal(-1*regresarFloat($(\"#importe_\"+cont_partida).val()));\n\n\t$(\"#tr_\"+cont_partida).remove();\n}", "func...
[ "0.74939805", "0.7274197", "0.7226404", "0.72195053", "0.72120255", "0.7209643", "0.71927977", "0.7180945", "0.7148513", "0.71147877", "0.69995487", "0.694481", "0.69142437", "0.6858327", "0.68572927", "0.68443143", "0.67935723", "0.6776662", "0.6771456", "0.67620134", "0.673...
0.7485699
1
Funcion del boton menos, resta cantidad de tabla factura y aumenta cantidad tabla inventario
function botonmenos() { var col_btn_menos = this.parentNode;//El elemento padre de el boton menos al que dimos click es decir la columna var fila_btn_menos = col_btn_menos.parentNode;//Ahora que tenemos la columna sacamos su elemento padre es decir la fila var num_codigo = parseInt(fila_btn_menos.childNodes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function agregar_factura() {\n\n this.disabled = true;//Desactivo el boton agregar que he oprimido \n var columna_del_btn = this.parentNode;//Guardo el elemento padre del boton al que le he dado click y me saca <td>\n var fila = columna_del_btn.parentNode;//Guardo el elemento padre de la columna <td> con ...
[ "0.67998475", "0.6757204", "0.6744456", "0.66490567", "0.6589519", "0.6557192", "0.655041", "0.655041", "0.6542354", "0.65198296", "0.65067893", "0.64720297", "0.64711255", "0.6426701", "0.6408847", "0.64006466", "0.6387591", "0.6384353", "0.6352836", "0.63151467", "0.6311784...
0.7495035
0
Transforms a commaseparated string of tokens into a list of download URLs.
function xformTokens(metadata, tokens) { var valid = type.isString(tokens) && tokens.length > 0; if (!valid) { // This can happen if objects are uploaded through GCS and retrieved // through list, so we don't want to throw an Error. return []; } var en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xformTokens(metadata, tokens) {\n var valid = __WEBPACK_IMPORTED_MODULE_3__type__[\"b\" /* isString */](tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an E...
[ "0.64409393", "0.64409393", "0.6414391", "0.6414391", "0.635121", "0.5368734", "0.5316266", "0.52655053", "0.52106506", "0.51411337", "0.5131137", "0.49102095", "0.49061623", "0.48047817", "0.4783195", "0.47814", "0.47523227", "0.47523227", "0.47274536", "0.46977058", "0.4685...
0.64856493
1
Converts a stream to a single JSON value
function streamToJsonValue (res, cb) { streamToValue(res, (err, data) => { if (err) { return cb(err) } if (!data || data.length === 0) { return cb() } // TODO: check if needed, afaik JSON.parse can parse Buffers if (Buffer.isBuffer(data)) { data = data.toString() } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readStreamAsJSON(stream, callback) {\n let data = '';\n stream.on('data', (chunk) => (data += chunk));\n stream.on('end', () => {\n let result, error;\n try {\n if (typeof data === 'string') {\n result = JSON.parse(data);\n }\n else {\n result = data;\n }\n } ...
[ "0.719877", "0.60466915", "0.5781914", "0.55571043", "0.55571043", "0.5451997", "0.54458266", "0.5432053", "0.53278697", "0.5267921", "0.5257054", "0.5133018", "0.50634205", "0.5053614", "0.50425977", "0.50106376", "0.5008111", "0.5004075", "0.4984136", "0.49151593", "0.49031...
0.7092293
1
toDAGLink converts a DAGNode to a DAGLink
function toDAGLink (node) { return new DAGLink('', node.size, node.multihash) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createGraphFromNodeEdge(nodes, edges, seriesModel, directed, beforeLink) {\n // ??? TODO\n // support dataset?\n var graph = new data_Graph(directed);\n\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(util[\"O\" /* retrieve */]( // Id, name, dataIndex\n nodes[i].id, nodes[i].name, i),...
[ "0.5558313", "0.53969616", "0.5373632", "0.5321292", "0.5097137", "0.50744027", "0.5059837", "0.50165975", "0.5013145", "0.5013145", "0.5013145", "0.50051004", "0.4930786", "0.49163914", "0.4899423", "0.487491", "0.4857051", "0.4855338", "0.4831181", "0.48294252", "0.48287115...
0.68695366
1
Time: O(n) linear, despite nested loops because nested loop iterations are increasing the same index as outer loop is using catches early exits right away instead of after running .split on both strings Space: O(n), as v1 or v2 grow is size v1Revision or v2Revision could grow in size if there is a long revision number
function compareVers(v1, v2) { let v1Revision = ""; let v2Revision = ""; let idx1 = 0; let idx2 = 0; while (idx1 < v1.length || idx2 < v2.length) { while (v1[idx1] !== "." && idx1 < v1.length) { v1Revision += v1[idx1++]; } while (v2[idx2] !== "." && idx2 < v2.length) { v2Revision += v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareVersions(v1, v2) {\n const v1Split = v1.split(\".\");\n const v2Split = v2.split(\".\");\n\n for (let i = 0; i < v1Split.length || i < v2Split.length; i++) {\n // || 0 means if whatever is to the left of || is falsy, use 0 as the value instead\n const v1RevisionNum = parseInt(v1Split[i]) |...
[ "0.6507763", "0.61917746", "0.59103113", "0.5779801", "0.57654035", "0.57478887", "0.5724218", "0.5688004", "0.56536615", "0.5647298", "0.56264836", "0.5624085", "0.5621426", "0.5604947", "0.5603775", "0.5522933", "0.55020124", "0.5500522", "0.5431058", "0.5411704", "0.540553...
0.6688828
0
region GEN INDICES Generate Indices of both a Looped or Unlooped Grid, Backslash Pattern
static gridIndices(out, row_size, row_cnt, start_idx = 0, do_loop = false, rev_quad = false) { const row_stop = (do_loop) ? row_cnt : row_cnt - 1, col_stop = row_size - 1; let row_a, row_b, r, rr, a, b, c, d; for (r = 0; r < row_stop; r++) { // Figure out the starting Index for the T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static gridAltIndices(out, row_size, row_cnt, start_idx = 0, rev_quad = false) {\n const row_stop = row_cnt - 1;\n const col_stop = row_size - 1;\n let x, y, a, b, c, d, bit;\n for (y = 0; y < row_stop; y++) {\n bit = y & 1; // Alternate the starting Quad Layout for every row...
[ "0.665437", "0.57649857", "0.5752506", "0.56524664", "0.5641568", "0.5622807", "0.56084645", "0.5602589", "0.55783427", "0.5523", "0.54752374", "0.5474996", "0.5458179", "0.54041225", "0.5397516", "0.53647316", "0.5336123", "0.5302676", "0.5282279", "0.5268282", "0.52545017",...
0.6427814
1
endregion //////////////////////////////////////////////////////////////////////////////// region OPERATIONS Create a new TGeo Type Struct
static newGeo() { return { vertices: [], normals: [], indices: [], texcoord: [] }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createGeometry (type, coordinates) {\n return {\n type: getTypeString(type),\n coordinates: coordinates\n }\n}", "static mk_geo( g ){\n\t\t\tlet geo = new THREE.BufferGeometry();\n\t\t\tgeo.setAttribute( \"position\", new THREE.BufferAttribute( g.vertices.data, g.vertices.comp_len ) );\n\n\t\t\t...
[ "0.6686074", "0.6452077", "0.6102701", "0.6086229", "0.5973225", "0.5922936", "0.58417517", "0.58022225", "0.5689403", "0.56856686", "0.5572634", "0.5545496", "0.54755795", "0.5471024", "0.54219866", "0.538988", "0.5378276", "0.53714967", "0.53673154", "0.53601676", "0.534478...
0.6628085
1
SubDivide the 3 points of a triangle and save the results in a TGeo
static subDivideTriangle(out, a, b, c, div) { const irow = [[0]]; // Index of each vert per rowl const seg_a = new Vec3(); // Lerping const seg_b = new Vec3(); const seg_c = new Vec3(); let i, j, t, row, idx = 1; // Running Vertex Index Count out.vertices.push(a[0], a[1],...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "subdivide_triangle( a, b, c, count ) { \n\n // Base case of recursion - we've hit the finest level of detail we want. \n if( count <= 0) {\n this.indices.push( a,b,c ); \n return; \n }\n\n // So we're not at the base case. So, build 3 new vertices at midpoints,...
[ "0.64114064", "0.6360964", "0.6108985", "0.6084271", "0.60353684", "0.6033659", "0.60069185", "0.59866315", "0.5979377", "0.5951075", "0.5950947", "0.58935213", "0.5870248", "0.58081985", "0.57561636", "0.5693755", "0.56869453", "0.56735253", "0.5668026", "0.56648535", "0.564...
0.7009343
0
Flip the winding of the triangles inside of an indices array
static reverseWinding(iAry) { let t, ii; for (let i = 0; i < iAry.length; i += 3) { ii = i + 2; t = iAry[i]; iAry[i] = iAry[ii]; iAry[ii] = t; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flip(ourindices){\n\tvar old_edgelen = polyhedron_edge_length[ourindices[0]][ourindices[1]];\n\tvar l_a = polyhedron_edge_length[ourindices[0]][ourindices[2]];\n\tvar l_b = polyhedron_edge_length[ourindices[1]][ourindices[2]];\n\tvar l_c = polyhedron_edge_length[ourindices[0]][ourindices[3]];\n\tvar l_d =...
[ "0.7670152", "0.65728086", "0.64330554", "0.6112438", "0.6062891", "0.59689206", "0.58864176", "0.58695436", "0.58309346", "0.58183044", "0.56593853", "0.5648812", "0.5635258", "0.5634791", "0.5598821", "0.55846614", "0.5550969", "0.5505418", "0.550252", "0.54781765", "0.5472...
0.6620843
1
This doclet will be hidden by default because it begins with an underscore.
function _hidden() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "jsdocPeldaPrivate() {}", "function _() { }", "function _() { }", "function _() { }", "function _() { }", "function _() { }", "function FreeTextDocumentationView() {\r\n}", "newDoclet({doclet}) {\n\t\t\t\t\tif (typeof doclet.description === 'string') {\n\t\t\t\t\t\tdoclet.description = doclet.descript...
[ "0.64183664", "0.62822914", "0.62822914", "0.62822914", "0.62822914", "0.62822914", "0.6172458", "0.61563563", "0.6047067", "0.5915154", "0.5749949", "0.57411635", "0.5723386", "0.56843567", "0.56843567", "0.56838304", "0.56838304", "0.56838304", "0.56598186", "0.5649635", "0...
0.6322707
1
Replace tag in template literal and create literal
function replaceTag(template, tag) { const strings = [] for (let i = 0; i < template.length; i++) { strings.push(template[i].replace('{tag}', tag)) } return createTemplate(strings) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapTemplateExtension(node){let is=node.getAttribute(\"is\");if(is&&templateExtensions[is]){let t=node;t.removeAttribute(\"is\");node=t.ownerDocument.createElement(is);t.parentNode.replaceChild(node,t);node.appendChild(t);while(t.attributes.length){node.setAttribute(t.attributes[0].name,t.attributes[0].va...
[ "0.6324208", "0.6289219", "0.6262949", "0.6248036", "0.6134142", "0.60715336", "0.60599214", "0.60599214", "0.6055357", "0.60354704", "0.6019151", "0.5938012", "0.59255594", "0.59150994", "0.5898154", "0.5896374", "0.5879984", "0.5879984", "0.5879984", "0.5879984", "0.5870629...
0.6934821
0
use local storage to greet the user
function greetUser() { var userP = document.createElement('p'); // get the username from local storage var username = window.localStorage.getItem('username'); var userNode = document.createTextNode("Welcome! " + username); userP.className = "greet"; userP.appen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function welcome() {\n var welc = localStorage.getItem(\"email\");\n document.getElementById(\"welcomeUser\").innerHTML = welc;\n}", "function showGreetings() {\n const loadedLs = localStorage.getItem(MEMBERINFO_LS);\n const currentUser = JSON.parse(loadedLs)[0].id;\n greetings.innerText = `안녕하세요, ${cur...
[ "0.70758235", "0.70351994", "0.6879974", "0.6822089", "0.68057644", "0.67761517", "0.67199314", "0.6666366", "0.6654388", "0.6645684", "0.6547996", "0.6540385", "0.6522047", "0.6513031", "0.6451532", "0.64508957", "0.6430949", "0.64106154", "0.6403059", "0.64023626", "0.63919...
0.7240659
0
to reset all selection boxes and clear local storage
function resetAll() { let parentt = document.querySelector("#selectDiv"); while (parentt.firstChild) { parentt.firstChild.remove(); } // clear user slected item div var userSelect = document.querySelector("#displayCurrentSelec"); while(userSelect.firstChil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetSelect() {\n\t\tselectedSaves = Array();\n\t\tselectAllStatus = false;\n\t\t$('.myList-single').prop('checked', false);\n\t\t$('#myList-select-all').prop('checked', false);\n\t}", "function clearLS(){\n window.localStorage.removeItem(\"selection\");\n}", "function clearSelections() {\n //if w...
[ "0.78261656", "0.7603813", "0.74915695", "0.7392566", "0.7372664", "0.73684984", "0.73270965", "0.72724956", "0.72722936", "0.7259473", "0.72513235", "0.7246693", "0.7235749", "0.72081286", "0.71748203", "0.7172465", "0.71479344", "0.7107699", "0.7068744", "0.70592844", "0.70...
0.81628627
0
if the form is empty, validateForm() gives a warning and user stays on the same page if a name is received, validateForm() saves the name to localStorage, and calls functions to clear the current page and start the selections
function validateForm() { var namee = document.forms["myForm"]["fname"].value; if (namee == "") { alert("Please let me know your name. (*゚∀゚*)"); return false; } // console.log(x); window.localStorage.setItem('username', namee); clearForm(); clearH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateForm (which) {\n var x = which.firstName.value;\n var y = which.lastName.value;\n var z = which.emailID.value;\n \n //checks for any blank fields\n if (x==\"\" || y==\"\" || z==\"\") {\n alert(\"All the fields must be filled out\");\n ret...
[ "0.7012326", "0.6756167", "0.64626884", "0.64128506", "0.6356017", "0.63401556", "0.6307267", "0.63043773", "0.62926143", "0.62844634", "0.62710357", "0.62661594", "0.6265976", "0.620596", "0.6202663", "0.61663175", "0.6160381", "0.6136987", "0.6132392", "0.6126864", "0.61247...
0.7527523
0
remove the animated heart div
function clearHearts() { document.querySelector("#heartsHome").remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeHeart() {\n\n // Grab all the heart images from the hmtl page \n var heart1 = $(\"#heart1\");\n var heart2 = $(\"#heart2\");\n var heart3 = $(\"#heart3\");\n\n if (heart1.hasClass('removed') && heart2.hasClass('removed')) {\n heart3.addClass(\"removed\");\n endGame()\n ...
[ "0.70885867", "0.70836174", "0.672634", "0.66602147", "0.64298856", "0.64202636", "0.64003915", "0.63741696", "0.63599277", "0.6316511", "0.6308687", "0.6238249", "0.62159985", "0.6198418", "0.6143637", "0.6137252", "0.6129856", "0.6126312", "0.6117526", "0.61042356", "0.6091...
0.7153918
0
creat a heart according to the color
function createHeart(color) { const heart = document.createElement("div"); heart.className = "heart"; heartsHome.appendChild(heart); heart.style.backgroundColor = color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createHeart()\n {\n var span = document.createElement('span')\n\n span.style.position = 'absolute'\n span.style.color = '#f52887'\n span.style.opacity = '0'\n Util.addChildren(span, '\\u2665')\n\n document.body.appendChild(span)\n return span\n }", ...
[ "0.72294223", "0.7227214", "0.72234166", "0.71784246", "0.7164027", "0.7013778", "0.6917856", "0.6814137", "0.67683583", "0.64799637", "0.64569426", "0.63291144", "0.63290846", "0.6212678", "0.6162126", "0.61291534", "0.60540617", "0.59488046", "0.59419674", "0.5938753", "0.5...
0.817379
0
append the animated blocks of hearts to the body
function heartHeartHeart() { document.body.appendChild(heartsHome); heartBlock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addHearts(){\n $(\"#livesLeft\").empty();\n for(i=0;i<lives; i++){\n $(\"#livesLeft\").append('<img src=\"images/heart.png\" class=\"lifesize\">');\n }\n }", "function animateHeart(){\n if(stepAnimateHeart == 120){\n stepAnimateHeart--;\n ...
[ "0.6431174", "0.6145807", "0.6133687", "0.60659516", "0.6022132", "0.60054", "0.588723", "0.58617824", "0.5763669", "0.5736273", "0.57256806", "0.5708223", "0.57036257", "0.5694746", "0.5691308", "0.56843406", "0.56807256", "0.56761986", "0.56562245", "0.5627519", "0.5596628"...
0.6259767
1
create a line of 10 hearts, one after another with 0.5 second delay in 5 different colors parameter k is used to change the starting color
function heartLine(k) { var k; for (i = 0; i< 10; i++) { i = i + k; var color switch (i%5) { case 0: color = "#9b5de5"; // Amethyst break; case 1: color = "#f15bb5"; // Magenta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawDemo(t,duration) {\n push();\n translate(3*width/4,height/2);\n strokeWeight(1);\n let p = t/(duration);\n let g = (1-p)*100;\n stroke(40);\n // the first point of generation n and n-1\n let v1 = points3[0].copy();\n circle(v1.x,cy(v1.y),2)\n let v2 = points4[0].copy();\n...
[ "0.60584706", "0.6043308", "0.60290146", "0.60194194", "0.5975678", "0.5968258", "0.5966359", "0.5928731", "0.5909156", "0.5907851", "0.5907726", "0.59042776", "0.58995533", "0.58950347", "0.587612", "0.58610225", "0.5856509", "0.5854612", "0.584817", "0.57915133", "0.5778355...
0.7939914
0
Give element x a left border
function borderUp(x) { x.style.borderLeftStyle = 'solid'; x.style.borderLeftWidth = '5px'; x.style.borderLeftColor = '#B23A48'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTableLeftBorder(borders) {\n if (!isNullOrUndefined(borders.left)) {\n return borders.left;\n }\n else {\n let border = new WBorder(borders);\n border.lineStyle = 'Single';\n border.lineWidth = 0.66;\n return border;\n }\n }",...
[ "0.6902476", "0.6530093", "0.6185114", "0.6163974", "0.60717946", "0.602729", "0.59942037", "0.59460205", "0.5936154", "0.59288985", "0.5918596", "0.58426005", "0.5764397", "0.574079", "0.5737713", "0.57176155", "0.57133764", "0.57051843", "0.5651622", "0.5651193", "0.5645239...
0.69406736
0
remove the border from element x
function borderDown(x) { x.style.border = 'none'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeBorder(element) {\n element.style.removeProperty(\"border\");\n}", "function removeBorder(e) {\n var elm = returnEventElement(e);\n elm.style.border = 'none';\n }", "function removeBorder()\n{\n this.className = 'noBorder';\n}", "function resetBorder(element) {\n element.styl...
[ "0.75477517", "0.7473353", "0.7002397", "0.69608986", "0.6934963", "0.6794908", "0.65435934", "0.6455622", "0.64504087", "0.63295174", "0.63131577", "0.6301902", "0.6284709", "0.620382", "0.6191445", "0.61841375", "0.6172752", "0.6036221", "0.5980942", "0.592899", "0.59202164...
0.7726953
0
Retrieves API host for current auth. Assumes there is a valid auth already.
async function getApiHost(run) { const {stdout: apihost} = await run.command(`nim auth current --apihost`) return apihost.replace(/^(https:\/\/)/, '') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get apiHostname() {\n return url.format({\n protocol: this.apiProtocol,\n host: this.apiHost\n });\n }", "function getHost() {\n\t\tvar host = getQueryParam('host');\n\t\tif (host) {\n\t\t\tif (host.lastIndexOf('http',0) === -1) {\n\t\t\t\thost = 'http://'+host;\n\t\t\t}\n\t\t} else {\n\t\t\thos...
[ "0.7094483", "0.6731021", "0.6681193", "0.65925074", "0.61510617", "0.6087238", "0.606646", "0.606646", "0.60243905", "0.5954286", "0.5949882", "0.5881236", "0.58354366", "0.5834599", "0.56923735", "0.5679063", "0.5635785", "0.5608155", "0.5605639", "0.55869037", "0.55830544"...
0.7230958
0
Creates or updates the _redirects file; this file takes precedence over other redirect declarations, and is processed from top to bottom If there is an API path directive input.path in the plugin settings, add a matching rule to the _redirects file. The target is the Nimbella namespace/:splat. If deploying the web asse...
async function addRedirect(inputs, {namespace, apihost}) { const redirectRules = [] if (deployWeb) { redirectRules.push(`/* https://${namespace}-${apihost}/:splat 200!`) } else if (inputs.path) { const redirectPath = inputs.path.endsWith('/') ? inputs.path : inputs.path + '/' const pkg = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyRedirects(moduleInjector,configLoader,urlSerializer,urlTree,config){return new ApplyRedirects(moduleInjector,configLoader,urlSerializer,urlTree,config).apply();}", "addRedirect(props = {}) {\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_elasticloadbalancingv2_ApplicationLoadBa...
[ "0.5936484", "0.5802608", "0.56946117", "0.5562072", "0.5509819", "0.54917383", "0.5469601", "0.54671305", "0.5431973", "0.5431973", "0.5431973", "0.5431973", "0.5431973", "0.5431973", "0.5431973", "0.5429776", "0.5429776", "0.5429776", "0.5429776", "0.5429776", "0.5429776", ...
0.715977
0
Returns the screen used when signing in for a returning user.
function returningUserScreen(){ const view = document.createElement('div'); view.setAttribute('class','signInView'); let inputs = {}; ['email address','password'].forEach(function (text){ const label = appendLabel(view,text,'sign in'); inputs[text] = label; label.onkeypress = fu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login() {\n let username = 'Andre';\n function displayUser() {\n console.log(\"Thanks for logging in \" + username + \"!\" + \" would you like to see your daily reports!\");\n }\n return displayUser();\n}", "function getCurrentLoggedInUserAccount() {\n\t//access to the db\n\t//confirm they have p...
[ "0.5971156", "0.58956677", "0.58932096", "0.5831005", "0.5786153", "0.57636654", "0.57407045", "0.56819445", "0.5652436", "0.5647571", "0.5612444", "0.5586708", "0.55691814", "0.5552672", "0.55144536", "0.55139333", "0.5512813", "0.5510545", "0.55075574", "0.5468396", "0.5428...
0.6431372
0
xCenter r1, Copyright 2009 Arthur Blake ( Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL Center a positioned element within the current client window space. If w,h not specified, then the existing width and height of e are used.
function xCenter(e, w, h) { var ww=xClientWidth(),wh=xClientHeight(),x=0,y=0; e = xGetElementById(e); if (e) { w = w || xWidth(e); h = h || xHeight(e); if (ww < w) { w = ww; } else { x = (ww - w) / 2; } if (wh < h) { h = wh; } else { y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resize(centerElementWidth, centerElementHeight) { \n this.x = window.innerWidth / 2 + (((centerElementWidth + this.width) / 2) * (this._pos - 1)); \n this.y = window.innerHeight / 2;\n }", "function getCenterX()/*:Number*/ {\n return this.getLeftX() + this.getMyWidth() / 2;\n }", ...
[ "0.6364999", "0.63199216", "0.63172585", "0.63068396", "0.6247586", "0.6203929", "0.61430216", "0.6111064", "0.6091005", "0.6087579", "0.6074975", "0.60581416", "0.60263807", "0.5985473", "0.59047973", "0.58987606", "0.58942723", "0.5887833", "0.5887833", "0.5887833", "0.5881...
0.81675524
0
xClientWidth r5, Copyright 20012007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xClientWidth() { var v=0,d=document,w=window; if((!d.compatMode || d.compatMode == 'CSS1Compat') && !w.opera && d.documentElement && d.documentElement.clientWidth) {v=d.documentElement.clientWidth;} else if(d.body && d.body.clientWidth) {v=d.body.clientWidth;} else if(xDef(w.innerWidth,w.innerH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xClientWidth()\r\n{\r\n var v=0,d=document,w=window;\r\n if(d.compatMode == 'CSS1Compat' && !w.opera && d.documentElement && d.documentElement.clientWidth)\r\n {v=d.documentElement.clientWidth;}\r\n else if(d.body && d.body.clientWidth)\r\n {v=d.body.clientWidth;}\r\n else if(xDef(w.innerWidth,w...
[ "0.7589845", "0.6834815", "0.6834815", "0.6743959", "0.6732584", "0.67227733", "0.66449064", "0.6625575", "0.6566826", "0.63444614", "0.63298255", "0.631649", "0.6305098", "0.6239223", "0.62284064", "0.62069905", "0.6193392", "0.6193392", "0.6193392", "0.6193392", "0.6193392"...
0.754766
1
xDocSize r1, Copyright 2007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xDocSize() { var b=document.body, e=document.documentElement; var esw=0, eow=0, bsw=0, bow=0, esh=0, eoh=0, bsh=0, boh=0; if (e) { esw = e.scrollWidth; eow = e.offsetWidth; esh = e.scrollHeight; eoh = e.offsetHeight; } if (b) { bsw = b.scrollWidth; bow = b.offsetWidth; bsh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xDocSize()\r\n{\r\n var b=document.body, e=document.documentElement;\r\n var esw=0, eow=0, bsw=0, bow=0, esh=0, eoh=0, bsh=0, boh=0;\r\n if (e) {\r\n esw = e.scrollWidth;\r\n eow = e.offsetWidth;\r\n esh = e.scrollHeight;\r\n eoh = e.offsetHeight;\r\n }\r\n if (b) {\r\n bsw = b.scrollW...
[ "0.75057125", "0.63226646", "0.61942637", "0.6054785", "0.6043545", "0.59887975", "0.598418", "0.5962095", "0.59533155", "0.5930042", "0.5918116", "0.5918116", "0.5888468", "0.5858081", "0.5858081", "0.5853888", "0.5852877", "0.5852877", "0.5852877", "0.5852877", "0.5848278",...
0.74454796
1
xEnableDrag r8, Copyright 20022007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xEnableDrag(id,fS,fD,fE) { var mx = 0, my = 0, el = xGetElementById(id); if (el) { el.xDragEnabled = true; xAddEventListener(el, 'mousedown', dragStart, false); } // Private Functions function dragStart(e) { if (el.xDragEnabled) { var ev = new xEvent(e); xPreventDefault(e); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xl_EnableDrag(Obj)\n{ \n\tvar ObjCurrStyle; \n\t// Actually, allow use of id also: \n\t\n\tif (Obj instanceof Object == false) Obj = xl_GetObj(Obj); \n\t\n\t// IE method of getting computed style for this element (combines classes and inline CSS)\n\tif (Obj.currentStyle) \n\t\tObjCurrStyle = Obj.currentSt...
[ "0.76978725", "0.7310151", "0.7086949", "0.695257", "0.6948158", "0.6921571", "0.6894139", "0.68766165", "0.68694645", "0.6767543", "0.67180365", "0.67107785", "0.6703692", "0.66963196", "0.6628395", "0.6613076", "0.660789", "0.660789", "0.660789", "0.6564234", "0.65559036", ...
0.84146607
0
static property xEvent r11a, Copyright 20012007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL Modified by kp
function xEvent(evt) // object prototype { var e = evt || window.event; if (!e) return; this.type = e.type; this.target = e.target || e.srcElement; if (xDef(e.pageX)) { this.pageX = e.pageX; this.pageY = e.pageY; } else if (xDef(e.clientX)) { this.pageX = e.clientX + xScrollLeft(); this.p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xEvent(evt) // object prototype\r\n{\r\n var e = evt || window.event;\r\n if(!e) return;\r\n if(e.type) this.type = e.type;\r\n if(e.target) this.target = e.target;\r\n else if(e.srcElement) this.target = e.srcElement;\r\n // Section B\r\n if (e.relatedTarget) this.relatedTarget = e.relatedTarget;\...
[ "0.71752286", "0.6694606", "0.6510678", "0.6383604", "0.63579893", "0.63579893", "0.63579893", "0.63579893", "0.63579893", "0.6356503", "0.6356503", "0.6262094", "0.6183376", "0.61517465", "0.61314124", "0.6128314", "0.6104343", "0.6104343", "0.6043192", "0.60373634", "0.5996...
0.7151389
1
xGetElementById r2, Copyright 20012007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xGetElementById(e) { if (typeof(e) == 'string') { if (document.getElementById) e = document.getElementById(e); else if (document.all) e = document.all[e]; else e = null; } return e; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xGetElementById(e)\r\n{\r\n if(typeof(e)=='string') {\r\n if(document.getElementById) e=document.getElementById(e);\r\n else if(document.all) e=document.all[e];\r\n else e=null;\r\n }\r\n return e;\r\n}", "function e(x){\r\n\t\tvar theElement = document.getElementById(x);\r\n\t\treturn theEl...
[ "0.7787488", "0.71960926", "0.71672904", "0.7130375", "0.7130375", "0.7088511", "0.7088511", "0.70416903", "0.7020156", "0.6963332", "0.6946784", "0.6941683", "0.6931478", "0.6899797", "0.68746686", "0.68746686", "0.68741065", "0.68581325", "0.685081", "0.6812321", "0.6808678...
0.7737585
1
xHeight r8, Copyright 20012010 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xHeight(e,h) { var css, pt=0, pb=0, bt=0, bb=0; if(!(e=xGetElementById(e))) return 0; if (xNum(h)) { if (h<0) h = 0; else h=Math.round(h); } else h=-1; css=xDef(e.style); if (e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') { h = xClientHeight()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xHeight(e,h)\r\n{\r\n if(!(e=xGetElementById(e))) return 0;\r\n if (xNum(h)) {\r\n if (h<0) h = 0;\r\n else h=Math.round(h);\r\n }\r\n else h=-1;\r\n var css=xDef(e.style);\r\n if (e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {\r\n h = xClientHeig...
[ "0.71749127", "0.71749127", "0.6820876", "0.66179925", "0.65812266", "0.65322334", "0.6505412", "0.64938563", "0.6466729", "0.6433821", "0.6414677", "0.6352452", "0.6315172", "0.63073283", "0.6297479", "0.6295842", "0.62918174", "0.6266304", "0.62610734", "0.62577146", "0.625...
0.726252
0
xHttpRequest r11, Copyright 20062011 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xHttpRequest() // object prototype { // Private Properties var _i = this, // instance object _r = null, // XMLHttpRequest object _t = null, // timer _f = null, // callback function _x = false, // XML response pending _o = null, // user data object passed to _f _c = false; // sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xHttpRequest() // object prototype\r\n{\r\n // Private Properties\r\n var _i = this; // instance object\r\n var _r = null; // XMLHttpRequest object\r\n var _t = null; // timer\r\n var _f = null; // callback function\r\n var _x = false; // XML response pending\r\n var _o = null; // user data object ...
[ "0.79515123", "0.77036333", "0.74508315", "0.7256326", "0.7001178", "0.6977065", "0.6977065", "0.6962872", "0.6943439", "0.6878977", "0.68312854", "0.67965204", "0.6786881", "0.67490816", "0.67490816", "0.67414045", "0.67391783", "0.67039216", "0.66829544", "0.6665245", "0.66...
0.77036333
1
xLeft r2, Copyright 20012007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xLeft(e, iX) { if(!(e=xGetElementById(e))) return 0; var css=xDef(e.style); if (css && xStr(e.style.left)) { if(xNum(iX)) e.style.left=iX+'px'; else { iX=parseInt(e.style.left); if(isNaN(iX)) iX=xGetComputedStyle(e,'left',1); if(isNaN(iX)) iX=0; } } else if(css && xDef(e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xLeft(e, iX)\r\n{\r\n if(!(e=xGetElementById(e))) return 0;\r\n var css=xDef(e.style);\r\n if (css && xStr(e.style.left)) {\r\n if(xNum(iX)) e.style.left=iX+'px';\r\n else {\r\n iX=parseInt(e.style.left);\r\n if(isNaN(iX)) iX=xGetComputedStyle(e,'left',1);\r\n if(isNaN(iX)) iX=0;\r...
[ "0.65781534", "0.64729077", "0.6445383", "0.6388323", "0.63603264", "0.63392854", "0.6320828", "0.63185734", "0.624771", "0.6238373", "0.61991525", "0.61903787", "0.6169082", "0.61515784", "0.6135011", "0.6134156", "0.61181676", "0.6065107", "0.6065107", "0.6065107", "0.60613...
0.6495149
1
xMoveTo r1, Copyright 20012007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xMoveTo(e,x,y) { xLeft(e,x); xTop(e,y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xMoveTo(e,x,y)\r\n{\r\n xLeft(e,x);\r\n xTop(e,y);\r\n}", "function move(from, to) {\n\n}", "move_to(x, y) {\n this.move(x - this.abs_x, y - this.abs_y)\n }", "function testmove() {\n var ob = getObject(\"testobject\");\n var nextpos = posseq[i % posseq.length];\n ob.mov...
[ "0.80874896", "0.68789524", "0.6779067", "0.6547151", "0.64937574", "0.64705443", "0.6447396", "0.6433859", "0.6365963", "0.63479304", "0.63479304", "0.63321996", "0.63115335", "0.6301855", "0.62946063", "0.62779826", "0.6277924", "0.6268852", "0.62674993", "0.6267126", "0.62...
0.80723894
1
xPreventDefault r1, Copyright 20042007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xPreventDefault(e) { if (e && e.preventDefault) e.preventDefault(); else if (window.event) window.event.returnValue = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xPreventDefault(e)\r\n{\r\n if (e && e.preventDefault) e.preventDefault();\r\n else if (window.event) window.event.returnValue = false;\r\n}", "function __onPreventDefault(event) {\n event.preventDefault();\n event.returnValue = false;\n }", "function CancelD...
[ "0.8216547", "0.70399165", "0.6985761", "0.6943859", "0.68825984", "0.6841868", "0.6748187", "0.6699322", "0.668825", "0.66689557", "0.66396785", "0.6630247", "0.66295934", "0.6623291", "0.6619805", "0.66086453", "0.655957", "0.6511316", "0.6494775", "0.6494775", "0.6494775",...
0.81586534
1
xRemoveClass r3, Copyright 20052007 Daniel Frechette modified by Mike Foster Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xRemoveClass(e, c) { if(!(e=xGetElementById(e))) return false; e.className = e.className.replace(new RegExp("(^|\\s)"+c+"(\\s|$)",'g'), function(str, p1, p2) { return (p1 == ' ' && p2 == ' ') ? ' ' : ''; } ); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xRemoveClass(e, c) {\r\n e = xGetElementById(e);\r\n if (!e)\r\n return false;\r\n if (xHasClass(e, c))\r\n e.className = e.className.replace(new RegExp('(^| )'+c+'($| )','g'), '');\r\n return true;\r\n}", "rem_class(e, c)\n\t{\n\t\te && c && e.classList.remove(c);\n\t}", "function removeCla...
[ "0.76298076", "0.73570585", "0.71974677", "0.71373063", "0.7126877", "0.71064615", "0.71064615", "0.71064615", "0.70938075", "0.70938075", "0.70938075", "0.70938075", "0.70938075", "0.70938075", "0.7085745", "0.7085745", "0.70722574", "0.7061038", "0.7061038", "0.7061038", "0...
0.7543509
1
xResizeTo r2, Copyright 20012009 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xResizeTo(e, w, h) { return { w: xWidth(e, w), h: xHeight(e, h) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xResizeTo(e,w,h)\r\n{\r\n xWidth(e,w);\r\n xHeight(e,h);\r\n}", "function resize() {}", "function xResizeEvent()\n{\n if (window.xREL) setTimeout('xResizeEvent()', 250);\n var cw = xClientWidth(), ch = xClientHeight();\n if (window.xPCW != cw || window.xPCH != ch) { window.xPCW = cw; window.xPCH ...
[ "0.8027461", "0.706643", "0.6659495", "0.65161175", "0.65161175", "0.63201106", "0.6199201", "0.6149491", "0.6131812", "0.6000881", "0.59668887", "0.5953089", "0.59346086", "0.5933591", "0.5904728", "0.5882963", "0.587935", "0.5869771", "0.5867603", "0.5845975", "0.5831391", ...
0.74252355
1
xScrollLeft r4, Copyright 20012009 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xScrollLeft(e, bWin) { var w, offset=0; if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') { w = window; if (bWin && e) w = e; if(w.document.documentElement && w.document.documentElement.scrollLeft) offset=w.document.documentElement....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xScrollLeft(e, bWin)\r\n{\r\n var offset=0;\r\n if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {\r\n var w = window;\r\n if (bWin && e) w = e;\r\n if(w.document.documentElement && w.document.documentElement.scrollLeft) offset=w.d...
[ "0.83431214", "0.7655717", "0.75962305", "0.7501041", "0.7499501", "0.74873155", "0.74873155", "0.7472456", "0.74545974", "0.7415869", "0.74065876", "0.74065876", "0.74065876", "0.7383069", "0.7369113", "0.73638386", "0.73599905", "0.73599905", "0.73599905", "0.73599905", "0....
0.8287611
1
xScrollTop r4, Copyright 20012009 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xScrollTop(e, bWin) { var w, offset=0; if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') { w = window; if (bWin && e) w = e; if(w.document.documentElement && w.document.documentElement.scrollTop) offset=w.document.documentElement.sc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xScrollTop(e, bWin)\r\n{\r\n var offset=0;\r\n if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {\r\n var w = window;\r\n if (bWin && e) w = e;\r\n if(w.document.documentElement && w.document.documentElement.scrollTop) offset=w.doc...
[ "0.7495541", "0.7386788", "0.7116823", "0.70056456", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", "0.69690603", ...
0.7481356
1
xStopPropagation r1, Copyright 20042007 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xStopPropagation(evt) { if (evt && evt.stopPropagation) evt.stopPropagation(); else if (window.event) window.event.cancelBubble = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xStopPropagation(evt)\r\n{\r\n if (evt && evt.stopPropagation) evt.stopPropagation();\r\n else if (window.event) window.event.cancelBubble = true;\r\n}", "function stopPropagation_() {\n\t\tvar event = this; // jshint ignore:line\n\t\tevent.stopped = true;\n\t\tEvent.prototype.stopPropagation.call(eve...
[ "0.77404153", "0.6733475", "0.6668957", "0.6668957", "0.6578153", "0.647149", "0.6444971", "0.64330226", "0.64133745", "0.636771", "0.63603866", "0.6349646", "0.6329095", "0.6329095", "0.6327965", "0.6327965", "0.6327965", "0.6327965", "0.6200273", "0.6195646", "0.6195646", ...
0.77419376
0
xWidth r8, Copyright 20012010 Michael Foster (CrossBrowser.com) Part of X, a CrossBrowser Javascript Library, Distributed under the terms of the GNU LGPL
function xWidth(e,w) { var css, pl=0, pr=0, bl=0, br=0; if(!(e=xGetElementById(e))) return 0; if (xNum(w)) { if (w<0) w = 0; else w=Math.round(w); } else w=-1; css=xDef(e.style); if (e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') { w = xClientWidth(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xOnCanvas(x){\r\n\treturn (sciMonk.CanvasWidth/sciMonk.Width)*x;\r\n}", "function xWidth(e,w)\r\n{\r\n if(!(e=xGetElementById(e))) return 0;\r\n if (xNum(w)) {\r\n if (w<0) w = 0;\r\n else w=Math.round(w);\r\n }\r\n else w=-1;\r\n var css=xDef(e.style);\r\n if (e == document || e.tagName.toL...
[ "0.6570909", "0.656863", "0.6471198", "0.6471198", "0.6429759", "0.62572163", "0.62418705", "0.6200432", "0.61966383", "0.61523956", "0.61341494", "0.6120297", "0.61121035", "0.60772264", "0.60772264", "0.60758424", "0.6072363", "0.6069434", "0.6066925", "0.60540223", "0.6047...
0.6646972
0
map existing Service Desk Info
function mapExistingServiceDeskInfo() { $scope.dealDetails.offshoreSelected= $scope.existingServiceDeskInfo.offshoreAllowed == true ? "Yes" : "No"; $scope.dealDetails.standardwindowInfoSelected= $scope.existingServiceDeskInfo.levelOfService; $scope.dealDetails.towerArchitect = $scope.existingServiceDe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateServiceMap() {\n var serviceMapName = SUConsts[getServicesKey()].serviceMap.name;\n var lastUpdateData = localStorage.getItem(lastUpdateDataPrefix + serviceMapName);\n\n if (lastUpdateData && typeof lastUpdateData === 'string' && lastUpdateData.length > 0) {\n setServ...
[ "0.5841059", "0.57021993", "0.55371904", "0.5502362", "0.5340409", "0.5323658", "0.5310733", "0.5310733", "0.52928966", "0.5266834", "0.5248974", "0.5238394", "0.52357984", "0.5198043", "0.5189539", "0.51699543", "0.5161314", "0.5144832", "0.5091225", "0.50611895", "0.5060497...
0.6781267
1
getExisting Service Desk Volume LevelWise Info
function getExistingVolumeLevelWiseInfo(parent,yearlyDto,year){ var child = {}; if(parent.children != null){ for(var k = 0;k < parent.children.length;k++){ child = parent.children[k]; switch(child.id) { case "1.1": //contact break; case "1.1.1": //Voice Volume ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getvolume(dev, callback)\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n {\n if (typeof (dev) === 'undefined' || dev === null || dev.length < 1) dev = '-15';\n webphone_api.plhandler.GetVolume(dev, callback);\n }\n}", "function getExi...
[ "0.65277153", "0.61370575", "0.61291", "0.61062443", "0.6080112", "0.5919462", "0.5864787", "0.5841157", "0.58051026", "0.573641", "0.5710835", "0.5706107", "0.5688162", "0.56880534", "0.5601034", "0.55994946", "0.557621", "0.555247", "0.5545202", "0.55378145", "0.54485685", ...
0.61571664
1
Get existing Service Desk server price level wise
function getExistingServerPricingLevelWiseInfo(parent,yearlyDto,year){ if(yearlyDto.serviceDeskUnitPriceInfoDtoList != null){ if(yearlyDto.serviceDeskUnitPriceInfoDtoList.length > 0){ if($scope.viewBy.type == 'unit'){ $scope.serviceDeskInfo.contact.children[0].distributedVolume[year].unit = yearly...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getExistingServerPricingLevelWiseInfo(parent,yearlyDto,year){\r\n\t\t\tif(yearlyDto.serviceDeskUnitPriceInfoDtoList != null){\r\n\t\t\t\tif(yearlyDto.serviceDeskUnitPriceInfoDtoList.length > 0){\r\n\t\t\t\t\t if($scope.viewBy.type == 'unit'){\r\n\t\t\t\t\t\t $scope.serviceDeskInfo.contact.children[0].di...
[ "0.6814944", "0.6499798", "0.6033759", "0.60179013", "0.59448266", "0.58578247", "0.58539796", "0.58302796", "0.58224535", "0.5791167", "0.57077265", "0.56680447", "0.5613996", "0.56022865", "0.555577", "0.55320686", "0.5527284", "0.5502307", "0.548262", "0.53974235", "0.5396...
0.6828786
0
extract server price in units
function extractServerUnitPrice(parent,year){ var unitPrice = []; var unitInfo={}; if($scope.viewBy.type == 'unit'){ unitInfo.totalContactsUnitPrice = $scope.serviceDeskInfo.contact.children[0].distributedVolume[year].unit; for(var k = 0;k < parent.children.length;k++){ child...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function priceCalculation() {\n\n const bestPrice = getValue('primary-price');\n const extraMemory = getValue('extra-memory');\n const extraStorage = getValue('extra-storage');\n const fastDelivery = getValue('extra-delivery');\n const priceTotal = bestPrice + extraStorage + fastDelivery + extraMemo...
[ "0.64719063", "0.6430053", "0.64137185", "0.63718426", "0.6323258", "0.6314923", "0.62340057", "0.619755", "0.6159216", "0.614066", "0.6132254", "0.6117193", "0.6115436", "0.61118764", "0.6104289", "0.60331726", "0.6029771", "0.6013058", "0.6007341", "0.5999919", "0.5988586",...
0.6879671
0
extract server price in revenue
function extractServerRevenuePrice(parent,year){ var revenue = []; var revenueInfo={}; if($scope.viewBy.type == 'unit'){ revenueInfo.totalContactsRevenue = Math.round(parent.distributedVolume[year].unit * parent.distributedVolume[year].volume) * 12; } if($scope.viewBy.type == 'rev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractServerUnitPrice(parent,year){\r\n \tvar unitPrice = [];\r\n \tvar unitInfo={};\r\n\r\n \tif($scope.viewBy.type == 'unit'){\r\n \t\tunitInfo.totalContactsUnitPrice = $scope.serviceDeskInfo.contact.children[0].distributedVolume[year].unit;\r\n\r\n\t \tfor(var k = 0;k < parent.children....
[ "0.64576143", "0.61757576", "0.6030058", "0.6025676", "0.5909396", "0.58780724", "0.5828677", "0.5804046", "0.5761096", "0.57579416", "0.5743918", "0.57426345", "0.57333696", "0.5682107", "0.56434476", "0.5636387", "0.5620804", "0.56188655", "0.5607174", "0.56006336", "0.5572...
0.7683043
0
createOption Creates an element with the specified text and value and marks it as selected if that value matches the currentValue.
function createOption(text, value, currentValue) { const option = document.createElement('option'); option.selected = value === currentValue; option.value = value; option.text = text; return option; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectedOption (element, textContent, disabled, selected, optionValue) {\n const option = document.createElement(element);\n option.textContent = textContent;\n const disable = document.createAttribute(disabled);\n const select = document.createAttribute(selected);\n option.setAttributeNode...
[ "0.7174909", "0.7009729", "0.6980844", "0.6801682", "0.6756946", "0.67342246", "0.65661395", "0.643995", "0.6346416", "0.62850326", "0.6167355", "0.6165347", "0.6145491", "0.60340744", "0.5992092", "0.59805876", "0.59663", "0.5951997", "0.593596", "0.59155923", "0.58909994", ...
0.8630201
0
Sorting records and trigger `geSortApply` action.
sortingFunction() { let records = this.get('content'); if (isArray(records) && records.length > 1) { let sorting = this.get('sorting') || []; if (sorting.length === 0) { sorting = [{ propName: 'id', direction: 'asc' }]; } for (let i = 0; i < sorting.length; i++) { let so...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_sortCallback(sortDataFields, sortOrders, sortDataTypes) {\r\n const that = this,\r\n dataSource = that.dataSource;\r\n\r\n if (!dataSource.virtualDataSource) {\r\n dataSource._sort(that.dataSource.boundSource, sortDataFields, sortOrders, sortDataTypes, that.sort);\r\n ...
[ "0.69595826", "0.6672418", "0.6672418", "0.6601031", "0.6576149", "0.6519338", "0.65110534", "0.65044224", "0.64844406", "0.6465743", "0.6453948", "0.64484084", "0.64125377", "0.6400317", "0.63945436", "0.63191915", "0.6258991", "0.6258991", "0.6255023", "0.6247878", "0.62460...
0.6898973
1
Redirect to original URL given short URL
async function redirect(req, res) { const route = req.params.route; const instance = await URL.findOne({short_url: route}); if (instance) { return res.redirect(`${instance.original_url}`); } else { return res.json({ error: 'invalid url' }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getShortUrl(req, res) {\n resolveShortUrl(req, res).then(function (shortUrl) {\n logger.debug('Redirecting to', shortUrl.url);\n res.redirect(shortUrl.url);\n });\n }", "function redirect(req, res, next){\n var hash_code = req.param('hash_code');\n var id = hashe...
[ "0.73484796", "0.68529356", "0.6773387", "0.6750265", "0.6625791", "0.6513453", "0.6488261", "0.64849406", "0.6482154", "0.6455024", "0.6454322", "0.6432224", "0.6421738", "0.63963497", "0.6395616", "0.6394918", "0.63864166", "0.63839114", "0.6332687", "0.6329594", "0.6322169...
0.71636575
1
wordMap = new Map() wordList = document.split() largestCount = 0;
function wordCountEngine(doc) { const map = new Map(); const wordList = doc.split(' '); let largestCount = 0; // for i from 0 to wordList.length-1: // # convert each token to lowercase // word = wordList[i].toLowerCase() for (let i = 0; i < wordList.length; i++) { const word = wordList[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addContent(name, content) {\n //@TODO\n let word_map = new Map();\n let word_count = new Map();\n\t let map_filename = new Map();\n this.words(content);\n\n map3.set(name,content);\n\n let word_offset = [];\n let match;\n\n\n while(match = WORD_REGEX.exec(content)){\n if(!this.noise_w...
[ "0.7240675", "0.7182973", "0.7076235", "0.69694155", "0.6968048", "0.6854881", "0.67676026", "0.67450607", "0.67230046", "0.6722389", "0.67034894", "0.6644022", "0.66326916", "0.6605184", "0.651224", "0.6483102", "0.64559984", "0.64379513", "0.62875533", "0.6275256", "0.62398...
0.79637897
0
get a users borrowed items
function userBorrowed(req,res,next) { db.any(`SELECT * from items inner join users on items.borrower_id=users.user_id where user_id=$1;`, [req.params.id]) .then(data => { res.rows = data; next(); }) .catch( error=> { console.log('Error ', error) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBorrowed(user) {\n var sheet = SpreadsheetApp.openById(ssId).getSheets()[0];\n var row = 3;\n var column = 11;\n\n var items = sheet.getRange(row, column, sheet.getLastRow()).getValues().clean('');\n var borrower = sheet.getRange(row, column+1, sheet.getLastRow()).getValues().clean('');\n\n if (!...
[ "0.7188505", "0.6234489", "0.62218547", "0.60702366", "0.601539", "0.6001999", "0.5999388", "0.59890366", "0.5984483", "0.59503317", "0.5939727", "0.59026146", "0.58669776", "0.5837039", "0.5836722", "0.5828357", "0.58269644", "0.5763519", "0.5731133", "0.57003343", "0.568377...
0.66064906
1
if a startid and endid is provided, create array of individual ids within that range if a fromlog file is provided, parse the csv file to create the array of ids
function getKittenIds() { let ids = []; if (args.startId && args.endId) { for(let id = parseInt(args.startId); id <= parseInt(args.endId); id++) { ids.push(id); } } else if (args.fromLog) { let file = fs.readFileSync(args.fromLog, 'utf8'); let rows = file.split('\...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sliceIds(begin, end) {\n let ids = [];\n let idsWithDates = this.idsWithDates;\n for (let i = begin; i < end; i++) {\n ids.push(idsWithDates[i].id);\n }\n return ids;\n }", "function getArticleIdsFromFile( finished ) {\n var file = new lineByLineReader( 'articles' );\n\n file.on( 'erro...
[ "0.5693837", "0.54594666", "0.5156457", "0.5145429", "0.5111487", "0.5105646", "0.506105", "0.5059065", "0.49941102", "0.49666044", "0.48772362", "0.48699492", "0.48548475", "0.48529485", "0.4845714", "0.48427266", "0.48276222", "0.4820804", "0.47800687", "0.47692296", "0.474...
0.6333366
0
Manager function that removes an item from the list and save the new list to loacl storage
function removeItem(id){ var result = list.remove(id); localStorage.setItem(list.key,JSON.stringify(list)); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteList(listID){\n let index = _store.State.lists.findIndex(list => list.id == listID)\n _store.State.lists.splice(index, 1)\n _store.saveState()\n }", "function deleteList(){\n\tlocalStorage.removeItem(list.key); // <===== SAVING TO LOCAL STORAGE\n\tlist = new signUpList(\"list\",\"signUpList\");\n...
[ "0.70364934", "0.69584596", "0.6953836", "0.69403964", "0.6875647", "0.68685794", "0.68464243", "0.6831634", "0.6806447", "0.6784767", "0.6774181", "0.6771027", "0.66987604", "0.66823184", "0.6677086", "0.6595351", "0.6591081", "0.65726805", "0.6519551", "0.6519266", "0.65081...
0.6991457
1
Manager function that calls the list objects print function to update the page with changes in the list
function updateList(){ document.getElementById('output').innerHTML = list.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleListUpdate(changes){ \n changes.forEach(function(change){\n var newObject = change.object;\n newObject.showTo('#product-list', startNumProd, finishNumProd); \n });\n }", "function lists() {\n\t$.post(\"listobject.hrd\", function(data) {\n\t\t$(\"#...
[ "0.7066011", "0.67341214", "0.66938716", "0.66377103", "0.65236896", "0.65028906", "0.6393118", "0.63741255", "0.6260342", "0.62597954", "0.62369865", "0.6174669", "0.6167293", "0.61575997", "0.6154239", "0.61355", "0.61177236", "0.6083963", "0.60750914", "0.6066114", "0.6062...
0.75088006
0
Disable links to other pages if offline. Warning! Enabling offline for iOS can cause issues To allow offline functionality delete the next 7 lines
function returnFalse(){ var detectHREF = $(this).attr('href'); if(detectHREF.match(/.html/)){ isOffline(); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnFalse(){ var detectHREF = $(this).attr('href'); if(detectHREF.match(/.html/)){isOffline(); return false; } }", "function go_offline()\n{\n\tif (server_info == null) {\n\t\tshow_error_page(\"Sorry, the system is down.\");\n\t\treturn;\n\t}\n\n\tif (!server_info.offline) {\n\t\tserver_info.offline ...
[ "0.7136381", "0.66493404", "0.6546967", "0.6509016", "0.64594126", "0.6417489", "0.62619114", "0.6213292", "0.6205641", "0.61050993", "0.60617214", "0.60574204", "0.60538435", "0.6032311", "0.6027563", "0.60079646", "0.5971575", "0.5971086", "0.5943972", "0.59374475", "0.5915...
0.67461586
1
getShirtUrls (url to scrape) Crawl the entrypoint for URLs to the shirts we want to scrape. 1. We'll make a request to the entrypoint, getting all HTML out in Jquery form. 2. URLs will be found in the href of the first link in the .products classes. 3. All URLs will be added to the shirtUrls array. 4. Once the length o...
function getShirtUrls (url) { console.log('Getting shirt URLs from ' + url); //start the crawler at url urlCrawler.direct({ uri: url, skipEventRequest: false, callback : function (error, response) { //proceed if no errors if (response.statusCode === 200 && !error) { var shirtUrls = []; //empty ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scrapeShirts (shirtUrls) {\n\tconsole.log('Scraping shirts.');\n\n\tvar rootUrl = entrypoint.replace(/\\/[^/]+\\/?$/, \"\"); //the root of the entrypoint, for further use\n\tvar shirts = []; //empty array for storing shirt objects\n\n\t//loop thru all shirtUrls\n\tshirtUrls.forEach (function (shirtUrl) {\...
[ "0.8096808", "0.7116396", "0.7075037", "0.6844881", "0.6831568", "0.6544944", "0.64422977", "0.63084173", "0.6276427", "0.6162709", "0.59389997", "0.5805143", "0.57756895", "0.57196236", "0.56774676", "0.5637396", "0.56372595", "0.5627526", "0.562216", "0.5564002", "0.5524919...
0.8610445
0
scrapeShirts (array of URLs to scrape) Scrape each shirt for the information we're after. 1. We'll make a request to each shirtUrl from getShirtUrls, getting all HTML in Jquery form. 2. A shirt object for each shirtUrl will be pushed to the shirts array. 3. All shirt info will be gathered from both the DOM and other so...
function scrapeShirts (shirtUrls) { console.log('Scraping shirts.'); var rootUrl = entrypoint.replace(/\/[^/]+\/?$/, ""); //the root of the entrypoint, for further use var shirts = []; //empty array for storing shirt objects //loop thru all shirtUrls shirtUrls.forEach (function (shirtUrl) { //start the craw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getShirtUrls (url) {\n\tconsole.log('Getting shirt URLs from ' + url);\n\n\t//start the crawler at url\n\turlCrawler.direct({ \n\t\turi: url,\n\t\tskipEventRequest: false,\n\t\tcallback : function (error, response) {\n\t\t\t\n\t\t\t//proceed if no errors\n\t\t\tif (response.statusCode === 200 && !error) {...
[ "0.78149056", "0.73404914", "0.7197656", "0.71448195", "0.6916004", "0.6681658", "0.65938795", "0.6589885", "0.65424067", "0.6385337", "0.6170957", "0.59998816", "0.5871136", "0.5583325", "0.55632", "0.5543932", "0.5530488", "0.5506574", "0.5481832", "0.546624", "0.5458632", ...
0.8719305
0
writeToFile(array of objects to write) Write all the scraped shirts to a csv file. 1. We'll check for /data directory for storing the files, and create if needed. 2. The filename will be named after the current date. 3. The json2scv module will convert our array of objects to SCV format. 4. When this is done, the file ...
function writeToFile (shirts) { console.log("Writing shirts to file."); //check if the data folder is present const dataDir = "./data"; if (!fs.existsSync(dataDir)){ //no, it's not fs.mkdirSync(dataDir); //so create it console.log(dataDir + " folder not found, created."); } else { //yes, it is console.log(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeCSVFile(shirtsData){\n\n \tvar dataFields = ['title', 'price', 'picture', 'url', 'time'];\n\n var csv = json2csv({ \n \t\t\tdata: shirtsData, \n \t\t\tdataFields: dataFields \n \t\t});\n\n var nameOfTheFile = new Date().toISOString().slice(0, 10);\n\n fs.writeFile('./data/' + name...
[ "0.774277", "0.7591787", "0.6912329", "0.66825336", "0.6675004", "0.64328325", "0.63880545", "0.6174219", "0.61483777", "0.5982072", "0.5979714", "0.5978521", "0.59050095", "0.5882463", "0.5871682", "0.585886", "0.58393055", "0.5824529", "0.5799026", "0.5782544", "0.57688236"...
0.8168333
0
Controlador de eventos para cuando se hace clic en una fecha
function date_click(event) { //document.getElementById('horaCita').innerHTML = "";//limpiar hora hecho por evelyn ban=1; $("#dialog").hide(250); //muestra el apartado de horario $(".events-container").hide(250); // ocultar contendio var datee = new Date(); // Date() imprime la fecha actual hora y día. var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constroiEventos(){}", "function IniciarEventos(){\n\t$('#guardar').click(guardardatos)\n\t$('#cancelar').click(function(){window.history.back()})\n\tshowmessage()\n}", "setOldEventsToShow(){\n \n var aujourdhui = this.today.toLocaleDateString();\n \n\n ...
[ "0.6993524", "0.6183129", "0.6075365", "0.60420537", "0.60420144", "0.60116273", "0.60090584", "0.6001691", "0.59412116", "0.59330577", "0.5924884", "0.5912682", "0.5894461", "0.5810704", "0.5804352", "0.57621866", "0.5752009", "0.5743232", "0.57369024", "0.5734294", "0.57336...
0.6516879
1
Parses local IP part of the netstat output. TODO: Add/test on macOS.
function parseLocalIp(stdoutLines) { let ipRe switch (process.platform) { case 'win32': ipRe = /TCP\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\:(\d+)\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\:(\d+)/ break default: return [] } let ips = [] stdoutLines.forEach(line => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_local_ip_addresses(){\n if (ipAddr ) return ipAddr; //only do detecion once..\n ipAddr = [];\n\n console.error(\"Detecting Local IP Addresses..\");\n var ifaces=os.networkInterfaces();//this doesn't work on windows node implementation yet :( - April 5 2012\n for (var dev in ifaces) {\n var ali...
[ "0.6366382", "0.5893008", "0.5727681", "0.5678934", "0.5603237", "0.55135673", "0.5505983", "0.544516", "0.54356575", "0.5398533", "0.53788745", "0.53680587", "0.53502375", "0.5346039", "0.53427064", "0.53403664", "0.5333353", "0.53287715", "0.53038454", "0.52827084", "0.5273...
0.6646946
0
Parses ports from netstat output.
function parsePorts(stdoutLines) { let portsRe switch (process.platform) { case 'win32': portsRe = /TCP\s+(?:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\:(?:\d+)\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\:(\d+)/ break case 'darwin': default: portsRe = /TCP\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizePort(val) {\n if (val === undefined || val.length === 0) {\n return null;\n }\n\n const portNumber = parseInt(val, 10);\n\n if (isNaN(portNumber)) {\n // named pipe\n return [ 'pipe', val ];\n }\n\n if (portNumber >= 0) {\n // port number\n ret...
[ "0.5898671", "0.5814987", "0.57906306", "0.5746365", "0.57151884", "0.5703702", "0.5685864", "0.5680612", "0.5678523", "0.5670338", "0.5669658", "0.56627715", "0.56562924", "0.56530184", "0.5645814", "0.5639705", "0.56377923", "0.56263286", "0.56263286", "0.56205934", "0.5613...
0.69753665
0
Builds a libpcap filter.
function buildFilterString(ports) { let pcapFilter = `ip proto \\tcp and (` ports.forEach((port, i) => { if (i !== 0) pcapFilter += ' or ' pcapFilter += `port ${port}` }) pcapFilter += ')' return pcapFilter }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createLPInputFilter() {\n lpInputFilter = audioContext.createBiquadFilter();\n lpInputFilter.frequency.value = 2048;\n return lpInputFilter;\n}", "_createFilter() {\n const oldFilter = this._filter;\n const freq = this.toFrequency(this._frequency);\n const t = 1 / (2 * Math...
[ "0.58017594", "0.563255", "0.54436785", "0.54183334", "0.5410044", "0.53199965", "0.51799345", "0.5146148", "0.5122426", "0.51057446", "0.5102965", "0.509799", "0.5048573", "0.50465333", "0.49561137", "0.49449438", "0.49449438", "0.4944492", "0.49076194", "0.490047", "0.48987...
0.5664531
1
Gets information about the process with given PID. Returns list of ip, ports & relevant libpcap filter.
function getProcessInfo(pid) { switch (process.platform) { case 'darwin': return new Promise((resolve, reject) => { exec(`lsof -p ${pid} | grep TCP`, (err, stdout, stderr) => { if (err) return reject(err) if (stderr) return reject(stderr) cons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_pdata(pid) {\r\n var pinfo;\r\n for (patient in pdata) {\r\n if (pdata[patient].pid == pid) {\r\n pinfo = pdata[patient];\r\n }\r\n }\r\n return pinfo;\r\n}", "function getProcessIdOnPort(port) {\n return child_process_1.execSync(`lsof -i:${port} -P -t -sTCP:LISTEN`, execOptions)\n...
[ "0.5180221", "0.49204126", "0.48881972", "0.48791823", "0.48257962", "0.4681538", "0.45810872", "0.4513023", "0.4471367", "0.4445282", "0.44035748", "0.43497306", "0.43491992", "0.42850462", "0.42536494", "0.4231491", "0.41774487", "0.4146709", "0.41430578", "0.41428307", "0....
0.77610224
0
Listar Estudiantes Para editar
function ListarEstudiantes(estudiante){ //creamos los datos $.ajax({ type: 'POST', url: 'controlador/listarEstudianteEditar.php', data:{'estudiante':estudiante}, success: function(respuesta) { $('#EditEst').html(respuesta); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listarTudo() {\n\t\t\tImpostoService.listarTudo().then(function sucess(result) {\n\t\t\t\tvm.impostos = result.data;\n\t\t\t}, function error(response) {\n\t\t\t\tvm.mensagemErro(response);\n\t\t\t});\n\t\t}", "function habilitoLista (){\n\t\t\t$scope.verListado = true;\n\t\t}", "function listarInstru...
[ "0.6660378", "0.6553832", "0.6423224", "0.6332533", "0.63267875", "0.63041335", "0.6293415", "0.62731826", "0.62547964", "0.61875564", "0.6122357", "0.6102362", "0.6095444", "0.6089286", "0.60807294", "0.6079585", "0.6067684", "0.6030529", "0.60112184", "0.60029036", "0.60028...
0.666605
0
build the todo list
function buildTodoList(todos) { $("#todoList").empty(); var todo = {}; for (var i = 0; i < todos.length; i++) { todo = todos[i]; var formattedDate = formatDate(todo.due_date); var currStatus = todo.status_name; var string = ''; var dueT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildTaskList()\n{\n\tconst body = $(\"body\");\n const spoonTypes = body.data(\"spoonTypes\");\n const spoonEmoji = body.data(\"spoonEmoji\"); // will need this to account for emoji mode on page load\n const spoonDifficulties = body.data(\"spoonDifficulties\");\n\t// create the task list\n\tconst task...
[ "0.73468816", "0.7237912", "0.7138429", "0.7033337", "0.69897115", "0.6865806", "0.6824969", "0.6804505", "0.67740047", "0.67619276", "0.67391616", "0.6679897", "0.6663258", "0.6647752", "0.66355085", "0.66319925", "0.66254485", "0.6604706", "0.6565165", "0.65598994", "0.6555...
0.7503897
0
add jqueryui datepicker to DOM
function addDatePicker() { $("#dueDate").datepicker(); } // end function addDatePicker
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDatePickerComponent() {\n $(\"#datepicker\").datepicker({\n format: \"yyyy-mm-dd\",\n language: \"fr\",\n autoclose: true,\n clearBtn: true,\n todayHighlight: true,\n todayBtn: \"linked\"\n });\n}", "function addDatepicker(){\n\t$('#startdateinput')....
[ "0.73070574", "0.73063266", "0.7030338", "0.69193065", "0.6873902", "0.68330514", "0.68330514", "0.6733321", "0.65855753", "0.6580248", "0.6482979", "0.64236414", "0.6405169", "0.6397169", "0.62433386", "0.62294984", "0.62248945", "0.6222509", "0.621244", "0.621244", "0.61879...
0.7490045
0
This constructor sets the nbBadge and the nbBadgePerChannel to a new Map. nbBadge represents the total number of unread messages nbBadgePerChannel represents the nubmer of unread messages per channel (key: channel id, value: number of unread messages)
constructor() { this.nbBadge = 0; this.nbBadgePerChannel = new Map(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onNotifCount (event, count, badgeDataUrl) {\n log('on renderer notif-count', count, !!badgeDataUrl || null);\n this.notifManager.unreadCount = count;\n\n // Set icon badge\n if (prefs.get('show-notifications-badge')) {\n if (platform.isWindows) {\n if (count) {\n const image = nati...
[ "0.5118669", "0.5097277", "0.49733236", "0.4941114", "0.4891299", "0.48847947", "0.4851033", "0.484107", "0.47878692", "0.4785095", "0.47795767", "0.4765529", "0.47528228", "0.47212636", "0.47106537", "0.4664467", "0.46541303", "0.46524432", "0.46277606", "0.4627129", "0.4600...
0.80738264
0
Run a phase sequence
function run_phases(phasearr, idx) { // Check if we have something to do if (idx >= phasearr.length) return; // Get and run the function with a callback to trigger next phase var self = this; var fn = phasearr[idx]; fn(function(){ setTimeout(function(){ self.run_phases(phasearr, idx+1); }, 1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "begin() {\n //for (let [, arr] of this.arrangements.filter(a => a.at === this.iterations && a.when === \"start\")) arr.exe();\n this.engine.phases.current = this;\n this.engine.events.emit(this.name, this);\n }", "step() { }", "async function runPhase(phase, context) {\n for (let i =...
[ "0.63644934", "0.6308493", "0.62544185", "0.6154895", "0.6125565", "0.6091976", "0.6084027", "0.6026817", "0.59167403", "0.58663", "0.57998645", "0.5776867", "0.5701579", "0.565721", "0.5628686", "0.562024", "0.55877656", "0.5567115", "0.5496237", "0.5476517", "0.5456528", ...
0.72883934
0
Demo tinhDienTich(3,4,5) .then(result => console.log(result)) .catch(err=>console.log(err))
async function tinhDienTichDongBo(a,b,h){ let tong = await cong(a,b) let tich = await nhan(tong,h) let thuong = await chia(tich,2) return thuong }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function prosess (){\r\n try{\r\n console.log(\"Proses 1\");\r\n console.log(\"Proses 2\");\r\n console.log(\"Proses 3\");\r\n const result = await cariHariKerja(\"senin\")\r\n console.log(result);\r\n console.log(\"Proses 4\");\r\n console.log(\"Proses...
[ "0.6575752", "0.6165776", "0.5821164", "0.5814716", "0.5801234", "0.57684547", "0.5745332", "0.57260966", "0.56873465", "0.5679894", "0.5679786", "0.5649602", "0.5641162", "0.56192523", "0.5611263", "0.5605616", "0.5597303", "0.5587752", "0.55806255", "0.555728", "0.5554704",...
0.6828333
0
webServiceRequest(url, data) This function is responsible to make web service request returns: This function returns nothing.
function webServiceRequest(url, data) { let params = ""; // Build URL parameters from data object for (let key in data) { // For each key in data object if (data.hasOwnProperty(key)) { if (params.length == 0) { params += "?"; //Since first parameter starts with '?' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function webServiceRequest(url, data) {\n\t// Build URL parameters from data object.\n\tlet params = \"\";\n\t// For each key in data object...\n\tfor (let key in data) {\n\t\tif (data.hasOwnProperty(key)) {\n\t\t\tif (params.length == 0) {\n\t\t\t\t// First parameter starts with '?'\n\t\t\t\tparams += \"?\";\n\t\...
[ "0.7638255", "0.59819347", "0.59204143", "0.590574", "0.5797219", "0.5773251", "0.57048845", "0.56472385", "0.5626366", "0.55795145", "0.5574041", "0.5562127", "0.5553895", "0.5531705", "0.5531066", "0.5498302", "0.54959524", "0.5485408", "0.5460712", "0.5378357", "0.53783226...
0.7276057
1
getAirportData() This function is responsible to get the airport data out of the API. It calls the web service request with the url of airport and the country selected by the user to come up with the data of the airports of that country. returns: This function returns nothing.
function getAirportData() { country = countryRef.value let url = "https://eng1003.monash/OpenFlights/airports/"; let data = { country: `${country}`, callback: "viewAllRoutes" } webServiceRequest(url, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAirportData() {\n\t// get reference to the selected country\n\tlet countryRef = document.getElementById(\"country\");\n\tlet country = countryRef.value;\n\n\t// define data object that will be passed on as parameters to the webServiceRequest function\n\tlet data2 = {\n\t\tcountry: country,\n\t\tcallbac...
[ "0.8771939", "0.6874291", "0.6605042", "0.6506051", "0.6480845", "0.6452366", "0.6279749", "0.6261844", "0.62338454", "0.6162121", "0.61413455", "0.59934205", "0.5927687", "0.589814", "0.58455825", "0.5784416", "0.57558495", "0.5755619", "0.5737973", "0.5735288", "0.5682657",...
0.8276694
1
getRouteData() This function is responsible to get the airport route data once the airport is selected out of the ROUTES API. That's one of the difference between the viewallroutes and viewroutes4.js. It calls the web service request with the url of route and the airport selected. returns: This function returns nothing...
function getRouteData(airportId) { let url = "https://eng1003.monash/OpenFlights/routes/"; let data = { sourceAirport: `${airportId}`, callback: "showRoutes" } webServiceRequest(url, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRouteData() {\n\t// get reference to the selected country\n\tlet countryRef = document.getElementById(\"country\");\n\tlet country = countryRef.value;\n\n\t// define data object that will be passed on as parameters to the webServiceRequest function\n\tlet data1 = {\n\t\tcountry: country,\n\t\tcallback:...
[ "0.8096923", "0.684336", "0.6836209", "0.66310465", "0.6558908", "0.655866", "0.63530403", "0.62123615", "0.62032884", "0.61840254", "0.61638683", "0.61576986", "0.6126833", "0.6098911", "0.60038453", "0.595234", "0.5891509", "0.5851288", "0.5837483", "0.5836", "0.58197993", ...
0.77070934
1
panToAirport() This function is created to pan to the selected airport. We are getting the selected airports by "airports" id and getting it's value. We've called the removeMarkers function to remove all the markers and then we add the marker for the selected airport inside of the for loop returns: This function return...
function panToAirport() { let airportList = document.getElementById("airports"); let airportVal = airportList.value; if (airportVal != 0){ removeMarkers() for (let i = 0; i < airports.length; i++) { if (airportVal == airports[i].name) { let marker = n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAllAirports(data) {\n\n\t// redefining the map\n\tmapboxgl.accessToken = \"pk.eyJ1IjoidGVhbTEyNiIsImEiOiJja2ZwNXZ4cnQwN3diMnhyNWV4ejJpNWFwIn0.tR6rWRqLKTIXWxPaXCO5rQ\";\n\tlet map = new mapboxgl.Map({\n\t\tcontainer: 'map',\n\t\tcenter: [-74.5, 40], // starting position\n\t\tzoom: 5,\n\t\tstyle: 'mapbo...
[ "0.5522045", "0.5342138", "0.53195804", "0.52658564", "0.5190864", "0.5129762", "0.50891626", "0.49828413", "0.49136236", "0.48933607", "0.48662615", "0.48597422", "0.48494017", "0.4849235", "0.48291644", "0.48248017", "0.48177007", "0.48045495", "0.47815922", "0.4773201", "0...
0.7326682
0
removeLayerWithId(idToRemove) This function is responsible to remove the id passed into this function. It gets the layer from the map. returns: This function returns nothing.
function removeLayerWithId(idToRemove) { let hasPoly = map.getLayer(idToRemove); //? if (hasPoly !== undefined) { map.removeLayer(idToRemove); map.removeSource(idToRemove); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clean(id) {\n if(typeof map.getLayer(id) !== 'undefined') {\n map.removeLayer(String(id));\n map.removeSource(String(id));\n }\n}", "remove(map, {srcId, layerId}) {\n map.removeSource(srcId);\n map.removeLayer(layerId);\n }", "function removeLayer() {\n map.removeLayer(tcLa...
[ "0.77376825", "0.7224308", "0.7136476", "0.70256686", "0.68523526", "0.6793441", "0.6783198", "0.6783198", "0.66543204", "0.6555415", "0.64675796", "0.6336247", "0.63033456", "0.6290804", "0.6234562", "0.6228644", "0.6211688", "0.62007874", "0.6198464", "0.61904144", "0.61898...
0.9091967
0
planPage() This function plans the trips by setting the country and updating the local storage of the trip. returns : This function returns nothing.
function planPage() { country = countryRef.value; localStorage.setItem(COUNTRY_KEY, country); let userTrip = new Trip("0"); //intializes a new object of Trip class and later gets overwritten updateLocalStorageTrip(userTrip); window.location = "tripPlanner.html"; // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goTravelPlans() {\n\t// load active travel plans\n\tvar activeTravelPlans = getActiveTravelPlans();\n\t$(\"#active-travel-plans-list\").empty();\n\tif (activeTravelPlans.length == 0) addNoDataCard(\"#active-travel-plans-list\");\n\tactiveTravelPlans.forEach((plan) => {\n\t\tloadTravelPlan(\"#active-travel...
[ "0.6705694", "0.60318524", "0.5871379", "0.5832001", "0.57378954", "0.5733826", "0.567337", "0.56487197", "0.5632373", "0.5631287", "0.5512549", "0.54469097", "0.5436335", "0.54278654", "0.53816545", "0.5379373", "0.5342923", "0.5326999", "0.5326049", "0.5277202", "0.5266064"...
0.798481
0
Thanks to the following link for help with this function. This function is called when google maps is ready to be loaded. (this is the callback when the map is loaded asynchronously. / Uses geocoder to obtain lat and lng values for the location of interest. Passes the location info to getBookstores, which queries Fours...
function loadMap() { infowindow = new google.maps.InfoWindow({}); infowindow.isOpen = false; // property of global infowindow variable that holds the open state of the infowindow. // Request latitide and longitude of Fisherman's wharf, SanFrancisco, CA. var geocoder = new google.maps.Geocoder(); var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBookstores(geocoderSearchResult) {\n\n return new Promise(function(resolve, reject) {\n if (geocoderSearchResult.geometry.location) {\n map.setCenter(geocoderSearchResult.geometry.location);\n // Create a list and display all the results.\n var cll = geocoderS...
[ "0.6732959", "0.6450263", "0.6447244", "0.6389049", "0.63353837", "0.6314434", "0.6270626", "0.62503666", "0.6226774", "0.6217126", "0.6161743", "0.6151148", "0.6127009", "0.6104412", "0.6094749", "0.60681593", "0.6062703", "0.6055088", "0.6029222", "0.6009491", "0.60017127",...
0.8025763
0
Set up ignored sites root menu callback. Can only add documents to the root node.
function ignoredSitesRootMenu(action, el){ isnode = el.context.dtnode; // Get the current Node isFolder = false; // This is a folder. switch(action) // Do something based on action { case 'add': $('#addIgnored').dialog('open'); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ignoredSitesDocumentMenu(action, el){\n isnode = el.context.dtnode; // Get the current Node\n isFolder = false; // This is not a folder.\n switch(action) // Do something based on action\n {\n case 'edit':\n $('#editIgnored #name').val(isnode.data.title);\n $('#e...
[ "0.6678536", "0.5750104", "0.55354536", "0.55332243", "0.546378", "0.5455136", "0.54217654", "0.5336396", "0.52809256", "0.5277986", "0.52711457", "0.5249641", "0.5242909", "0.5214066", "0.5190101", "0.51222014", "0.51184845", "0.5115955", "0.5101435", "0.5097177", "0.5073250...
0.6596402
1
add attributes from an element to the given object 'dict' if prefix === true, the attribute name is prefixed with the elements nodeName
function el_getattributes(node, dict, prefix = false) { if (node.nodeType == 1) { // element // fetch attributes if (node.attributes.length > 0) { let tagname = node.nodeName + "_"; for (let i = 0; i < node.attributes.length; i++) { let attribute = node.attributes.item(i); let node...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fixAttrs(element, suffix, attrs) {\n for (var i in attrs)\n if (element.hasAttribute(attrs[i]))\n element.setAttribute(attrs[i], element.getAttribute(attrs[i]) + suffix);\n }", "function updateElementIndex(elem, prefix, ndx) {\n var idRegex = ne...
[ "0.6133497", "0.5928521", "0.59274596", "0.5874785", "0.5852624", "0.5849253", "0.5849253", "0.5829183", "0.582748", "0.58270776", "0.58270776", "0.5794588", "0.5777298", "0.57628983", "0.574844", "0.57444537", "0.5725721", "0.57137525", "0.57113636", "0.5695382", "0.569433",...
0.7205059
0
channel area, Format DVBViewer Logos/das%20erste%20hd.png
function ms_channel_entry(ch) { // attributes nr="-25" name="Das Erste HD (deu)" EPGID="562954315180093" flags="24" ID="2359890582721931325" let result = {} if (ch.nodeType == 1) { // element // fetch attributes el_getattributes(ch, result); result['logo'] = el_gettext(ch, 'logo', true); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatHexChannel(arg) {\n return snapHexChannel(arg).toString(16).padStart(2, '0');\n }", "function drawGroupChannel(channel) {\n document.getElementById('channel_list').innerHTML += `\n <a href=\"#\" class=\"list-group-item list-group-item-action\" id=\"channel-${ channel.url }\" onclick=...
[ "0.5229666", "0.5218425", "0.52153754", "0.5163202", "0.51063424", "0.50370085", "0.49421546", "0.49149677", "0.49146852", "0.4870352", "0.4858978", "0.48529395", "0.48222756", "0.481037", "0.48011437", "0.47862837", "0.47768766", "0.47755986", "0.4772104", "0.4761104", "0.47...
0.5388851
0
target, thisArg, argsArray > obejct
function Construct(target, thisArg, argsArray) { if(!(this instanceof Construct)) return new Construct(target, thisArg, argsArray); else Call.call(this, target); Object.defineProperties(this, { "thisArg": { value: thisArg }, "argsArray": { value: argsArray } }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Apply(target, thisArg, argsArray) {\n if(!(this instanceof Apply)) return new Apply(target, thisArg, argsArray);\n else Call.call(this, target);\n\n Object.defineProperties(this, {\n \"thisArg\": {\n value: thisArg\n },\n \"argsArray\": {\n value: argsArray\n }\n...
[ "0.68811053", "0.6556219", "0.63204557", "0.6294315", "0.62163657", "0.618972", "0.5986387", "0.59057546", "0.5885015", "0.58069193", "0.5798712", "0.57579654", "0.5703641", "0.5634709", "0.5613902", "0.5604775", "0.5603086", "0.55889356", "0.5581025", "0.55528986", "0.552960...
0.659439
1
connects to the web socket server if there not already is a connection open and sends the username of the logged in user
function connectSocket(user) { username = user; //console.log(username); //console.log(socket); if (socket == null) { //check if socket already is connected console.log("opening socket"); try{ socket = new WebSocket(webSocketUrl); } catch(err){ con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function connect() {\n var serverUrl;\n var scheme = \"ws\";\n\n // If this is an HTTPS connection, we have to use a secure WebSocket\n // connection too, so add another \"s\" to the scheme.\n\n if (document.location.protocol === \"https:\") {\n scheme += \"s\";\n }\n serverUrl = scheme + \"://\" + myHos...
[ "0.68990004", "0.6885399", "0.68382454", "0.68321115", "0.68285364", "0.678924", "0.6768881", "0.67598444", "0.6751165", "0.6723459", "0.67034215", "0.66664565", "0.66609687", "0.66588897", "0.66187894", "0.65965384", "0.6572367", "0.6572367", "0.65248513", "0.65155846", "0.6...
0.7164013
0
creating a curve to simulate a logarithmic curve with setValueCurveAtTime.
function logarithmic(length, base, rotation) { var curve = new Float32Array(length), index, x = 0, i; for (i = 0; i < length; i++) { //index for the curve array. index = rotation > 0 ? i ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logarithmic(length, base, rotation) {\n\t var curve = new Float32Array(length),\n\t index,\n\t x = 0,\n\t i;\n\t\n\t for (i = 0; i < length; i++) {\n\t //index for the curve array.\n\t index = rotation > 0 ? i : length - 1 - i;\n\t\n\t x = i / length;\n\t ...
[ "0.5999945", "0.5976482", "0.5953484", "0.581326", "0.5789041", "0.5467852", "0.54176694", "0.5386275", "0.5343985", "0.53316087", "0.5301014", "0.52403414", "0.5210506", "0.5193545", "0.51792556", "0.5149014", "0.5138695", "0.5137008", "0.5133014", "0.5133014", "0.51128155",...
0.6002651
0
Add to batch cache
function addToBatchCache() { THREE.WebGLBatchCompiler.batchCache.push( new THREE.WebGLBatchCompiler.batchCacheObject( geometry, materials, mesh.webGLBatches, mesh.webGLIsTransparent )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addTileToCache(tile) {\n this._cache.add(this, tile, (tileset, tileToAdd) => tileset._addTileToCache(tileToAdd));\n }", "function _cache(x, t) {\n\t var c = this._cache,\n\t cross = c[x._id] || (c[x._id] = {c: [], f: false});\n\t cross.c.push(t);\n\t}", "function addToCache(keyword, values)\n{\n// c...
[ "0.6555446", "0.6228096", "0.6151399", "0.61302197", "0.6116458", "0.6093607", "0.6071162", "0.6063491", "0.6036693", "0.59601253", "0.59497166", "0.5876008", "0.58417785", "0.57894164", "0.57527864", "0.5752243", "0.5749846", "0.57385314", "0.5728771", "0.5721377", "0.567447...
0.7437019
0
A function to draw ellipses over the detected keypoints
function drawKeypoints() { // Loop through all the poses detected for (let i = 0; i < poses.length; i++) { // For each pose detected, loop through all the keypoints let pose = poses[i].pose; for (let j = 0; j < pose.keypoints.length; j++) { // A keypoint is an object describing a body part (like rightArm or ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawKeyPoints() {\n // Loop through all the poses detected\n for (let i = 0; i < poses.length; i++) {\n // For each pose detected, loop through all the keypoints\n for (let j = 0; j < poses[i].pose.keypoints.length; j++) {\n // A keypoint is an object describing a body part (like rightArm or...
[ "0.7425972", "0.74124557", "0.7397488", "0.73935694", "0.7379602", "0.7379602", "0.7379602", "0.73524517", "0.72884274", "0.7270288", "0.72594684", "0.72468245", "0.7189053", "0.7170529", "0.6978378", "0.68844825", "0.6851931", "0.677421", "0.67279595", "0.66331005", "0.66281...
0.7440121
0
getChild() takes an object (data) and returns a child from within the object. The path traversed is in dotnotation. For example, the path "hof3.iv08" will first find the child "hof3" and then its child "iv08", which will then be returned.
function getChild(data, path) { parts = path.split("."); for (i=0; i<parts.length; i++) { data = data[parts[i]]; } return data }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "traverse(obj, path) {\n if (path == null) return undefined;\n let pelems = path.split('.');\n let res = obj;\n pelems.forEach(function (item) {\n res = item === 'this' ? obj : res[item];\n });\n return res;\n }", "function getDescendantProperty(obj, path) {...
[ "0.6497294", "0.6490548", "0.6455445", "0.62923944", "0.62489134", "0.62489134", "0.62489134", "0.62489134", "0.62489134", "0.62489134", "0.62489134", "0.62489134", "0.62489134", "0.61751026", "0.61276126", "0.61225986", "0.6109413", "0.6070568", "0.6070568", "0.6070568", "0....
0.7588012
0
Reduce point density by ensuring a minimum interval between points
function reducePointDensity(points, desiredNumberOfPoints) { console.log("removing points"); var startTime = points[0][0]; console.log("startTime: "+startTime); var endTime = points[points.length-1][0]; console.log("endTime: "+endTime); var desiredInterval = (endTime - startTime) / desiredNumberOfPoints;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static ClosestPointToDisc() {}", "function dist_func_real(x){\n var ret = 0;\n var addr_down = Math.floor( 100*(x-min_y)/(max_y-min_y) );\n var addr_up = -Math.floor( -100*(x-min_y)/(max_y-min_y) );\n var fract = 100*(x-min_y)/(max_y-min_y) - addr_down;\n\n if(0<=addr_up && addr_down <= 100)...
[ "0.5899379", "0.58171016", "0.5645264", "0.5613737", "0.5605184", "0.55690575", "0.55690575", "0.55565983", "0.554514", "0.554514", "0.55241233", "0.55241233", "0.55241233", "0.55241233", "0.55241233", "0.55241233", "0.55241233", "0.54737145", "0.54611146", "0.54611146", "0.5...
0.6908894
0
Remove all but one of the points older than maxAge (in seconds)
function removeOldPoints(points, maxAge) { var endTime = points[points.length-1][0]; var desiredStartTime = endTime - (maxAge*1000); for (i=1; i<points.length; i++) { if (points[i][0] > desiredStartTime) { return points; } points.shift(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PurgeRooms() {\n let compare = 36000;//36000 //for every 10 hours 1 hour inactive//compare is in SECONDS NOT miliseconds\n let now = Math.round(Date.now() / 1000);\n for (let index = 0; index < Object.keys(players).length; index++) {\n if (players[Object.keys(players)[index...
[ "0.5945248", "0.59099615", "0.5788214", "0.5766637", "0.57599366", "0.57453203", "0.57163554", "0.5633162", "0.5615311", "0.559137", "0.5559792", "0.5555963", "0.5506554", "0.5437273", "0.5400579", "0.53837585", "0.53271484", "0.53074867", "0.5281457", "0.52722555", "0.524396...
0.852932
0
Interface: Manual PID button
function onClickManualPIDBtn() { $("#ConfigurePID_ContainerNewSetPoint").show(); $("#ConfigurePID_ContainerNewRampTarget").hide(); $("#ConfigurePID_ContainerNewOutput").hide(); writeCommand("manual"); function pausecomp(millis) { var date = new Date(); var curDate = null; do { curDate = new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shellActive ()\n{\n _StdIn.putText(krnActivePIDS()); \n}", "function onClickManualOutputBtn() {\n $(\"#ConfigurePID_ContainerNewSetPoint\").hide();\n $(\"#ConfigurePID_ContainerNewRampTarget\").hide();\n $(\"#ConfigurePID_ContainerNewOutput\").show();\n\n writeCommand(\"manual\");\n\nfu...
[ "0.64802563", "0.61667794", "0.59314716", "0.5866375", "0.5823894", "0.5806258", "0.58024085", "0.5791509", "0.57813334", "0.578104", "0.57792395", "0.5735169", "0.5724466", "0.57159233", "0.5710894", "0.57072186", "0.5691765", "0.5691012", "0.5682277", "0.5673832", "0.566688...
0.7347856
0
Interface: Manual Output button
function onClickManualOutputBtn() { $("#ConfigurePID_ContainerNewSetPoint").hide(); $("#ConfigurePID_ContainerNewRampTarget").hide(); $("#ConfigurePID_ContainerNewOutput").show(); writeCommand("manual"); function pausecomp(millis) { var date = new Date(); var curDate = null; do { curDate = new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onButton(){\n input();\n output();\n\n}", "onOutput () {}", "setOutput(output){\r\n this.output = document.getElementById(output);\r\n }", "output() {\n }", "function handleOnButtonClick(asBtn) {\r\n switch (asBtn) {\r\n case 'SAVE':\r\n saveOutputOption();\r\n ...
[ "0.7411191", "0.65467304", "0.64249194", "0.63863534", "0.6365728", "0.63507223", "0.6344318", "0.6279807", "0.6178972", "0.6104012", "0.6103996", "0.6087305", "0.60608524", "0.6040774", "0.60328054", "0.6025194", "0.5960241", "0.5933793", "0.5905189", "0.5896635", "0.5885369...
0.6642408
1
fromMultisigPreImg takes multisig parameters and returns a 32 byte typed array public key, representing an address that identifies the "exact group, version, and public keys" that are required for signing. Hash("MultisigAddr" || version uint8 || threshold uint8 || PK1 || PK2 || ...) Encoding this output yields a human ...
function fromMultisigPreImg({version, threshold, pks}) { if (version !== 1 || version > 255 || version < 0) { // ^ a tad redundant, but in case in the future version != 1, still check for uint8 throw INVALID_MSIG_VERSION; } if (threshold === 0 || pks.length === 0 || threshold > pks.length ||...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromMultisigPreImgAddrs({version, threshold, addrs}) {\n const pks = addrs.map(addr => {\n return decodeAddress(addr).publicKey;\n });\n return encodeAddress(fromMultisigPreImg({version, threshold, pks}));\n}", "makeMultiSig(sourceWallet, secondWallet, fundingWallet = null, threshold = 2...
[ "0.7091281", "0.5347485", "0.52871007", "0.52871007", "0.5276722", "0.5264358", "0.5259381", "0.51111245", "0.508334", "0.5010207", "0.5010207", "0.49807873", "0.48735747", "0.47925952", "0.47047523", "0.47007474", "0.47007474", "0.4694764", "0.46739686", "0.46648538", "0.466...
0.81646013
0