Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
next two functions build our query params based on element classes and ids
function find_query_params() { //these need to be formatted to allow multiple values var multiples = ['category-type','party-type', 'gender-type']; var search_params = {} , data_types = []; $('.search-item').each(function(i,item){ if($(item...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQueryString(idsArray){\n\tif(!isNull(idsArray)){\n\t\tvar strQuery=\"\";\n\t\tif(idsArray.constructor == Array){\n\t\t\tfor(var i=0;i<idsArray.length;i++){\n\t\t\t\tif(idsArray[i].indexOf('.')==0){//class\n\t\t\t\t\t$(idsArray[i]).each(function(){\n\t\t\t\t\t\tstrQuery=_getQueryStringByObj($(this),strQ...
[ "0.61160344", "0.5947005", "0.5919604", "0.5632946", "0.5542136", "0.54960686", "0.54771286", "0.5376662", "0.53013206", "0.5289417", "0.528811", "0.52780044", "0.52592325", "0.5254949", "0.52442825", "0.5239061", "0.5227898", "0.52092415", "0.52044106", "0.5182694", "0.51613...
0.6195886
0
this version of the dashboard only allowed alerts on crime data, so we don't show option on other data types
function allowed_alert(query) { var filtered_alert = []; var not_allowed = ['voter','health','property','realestate']; var pieces = query.split('|'); var data_types = pieces.pop().split('-'); var allowed = data_types.filter( function(data_type) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function raiseCrimeEmergency() {\n\temergencyType = 'crime';\n\t\n}", "getAlert() {\n if (this.props.alerts.category === \"error-adding-employee\") {\n return \"alert alert-danger\"\n }\n if (this.props.alerts.category === \"success-adding-employee\") {\n return \"alert...
[ "0.55335814", "0.5369706", "0.5361401", "0.5311112", "0.5228457", "0.50983816", "0.5063406", "0.50476915", "0.504552", "0.50384325", "0.50316316", "0.50201184", "0.5013565", "0.50039184", "0.49995175", "0.49973136", "0.49778658", "0.4977371", "0.49637732", "0.4958944", "0.495...
0.6280029
0
calls various functions to display the data returned by a query
function show_data(data, query){ var have_no_data = true; $('#data-tables').empty(); for (data_type in data.results) { if(data.results[data_type].data.length > 0) { have_no_data = false; if(data.results[data_type].detail) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayQueryResults() {\n\t\t\t$scope.resultsAvailable = true;\n\t\t\tresultsOffset = 0;\n\t\t\t$scope.getNextResultsPage();\n\n\t\t}", "function display_results() {\n}", "function displayResults (data) {\n displayList(data);\n initMap(data);\n unhideHtml();\n}", "function displayProducts()...
[ "0.69700736", "0.68605155", "0.68193424", "0.68178344", "0.67785704", "0.6758682", "0.6743914", "0.6685354", "0.6663885", "0.66450536", "0.66295624", "0.65855366", "0.65829974", "0.65817523", "0.655391", "0.6503631", "0.6502663", "0.649604", "0.64835113", "0.64772934", "0.647...
0.6117691
98
uses url and config file to get county
function find_county() { var county_re = /org\/([^\/]+)\//; var county_match = county_re.exec(location.href); return county_match[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateCounties() {\n\tvar searchCounty = \"\";\n\trequest_url = COUNTIES_URL;\n\n\trequest_params = ACTION_TYPE + \"=\" + ACTION_QUERY + \"&\" + SEARCH_KEY + \"=\"\n\t\t\t+ searchCounty + \"&\" + RESULT_FORMAT + \"=\" + RESULT_FORMAT_DROPDOWN;\n\n\trequest_intent = INTENT_QUERY_COUNTIES;\n\n\tsendPOSTHt...
[ "0.6250843", "0.619184", "0.6079864", "0.5813255", "0.57673883", "0.57164806", "0.57126445", "0.562844", "0.56257683", "0.5621308", "0.5610339", "0.5593879", "0.55932796", "0.5567233", "0.55190027", "0.55140144", "0.5493279", "0.5462891", "0.5447858", "0.54459745", "0.5378840...
0.6831744
0
we need to remove and then add a click listener to ensure that it remains if the table or graph changes
function make_items_clickable(data_type){ $('.dd-detail').unbind('click'); $('.dd-detail').bind('click', function(){ build_detail_query($(this).data('key'), $(this).data('source')); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deinitExistingRows() {\n var view = null;\n removeAllChildren($.mediumSwatchRefinement);\n _.each(listenerViews, function(view) {\n view.removeEventListener('click', onViewClick);\n });\n}", "function releaseClick() {\n if (isMarkerClicked) {\n clickedMarker.setIcon(unselect...
[ "0.6383792", "0.63665706", "0.63242483", "0.6304999", "0.61211056", "0.6106563", "0.61040676", "0.6088348", "0.6088348", "0.60646564", "0.6052755", "0.6032708", "0.60235846", "0.60018325", "0.60018325", "0.59572846", "0.59550864", "0.5953009", "0.59410113", "0.5911028", "0.59...
0.0
-1
used to make a query for a detailed result, which shows pretty much all available data for a single record
function build_detail_query(key, data_source) { var detail_param = '|detail|1|'; var search_types = { 'incidents': 'incidents', 'accidents': 'traffic-accidents', 'arrests': 'arrests', 'citations': 'citations', 'rr': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getData() {\n var queryParams = {\n propertySelection: \"179,7,10888003,8,\" + $scope.cfg.fieldIdToDisplay,//, // ids of fields to fetch\n queryExpression: \"'7' != 3\" //Status is not rejected\n //quer...
[ "0.6420386", "0.6334024", "0.6327388", "0.62523496", "0.61108476", "0.60975313", "0.6075862", "0.6035495", "0.60296524", "0.60296524", "0.6021655", "0.6011411", "0.6005139", "0.5996193", "0.59949315", "0.5960616", "0.59519196", "0.592619", "0.5912845", "0.59050536", "0.590239...
0.575009
38
calls various functions to build a google data table that shows returned results
function build_table(data_type, data_content, page_size){ var data_source = data_content.data_source, formatted_table_data = format_data(data_content, data_source), table_data_holder = {}; if(data_type === 'arrests' || data_type === 'incidents' || data_type === 'a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDataTable(data,tableType){\n\t\tvar dataTable = new google.visualization.DataTable();\n \tdata = JSON.parse(data);\n\n // When logged in we have results page\n if (tableType == \"semi\"){\n \t dataTable.addColumn('string','Name');\n \t dataTable.addColumn('number','MAP');\...
[ "0.726065", "0.68508947", "0.6829504", "0.68122476", "0.672947", "0.66788584", "0.6609811", "0.65833485", "0.657779", "0.65735084", "0.6555956", "0.6526345", "0.65143514", "0.6476975", "0.64449745", "0.6436285", "0.6430043", "0.63955677", "0.63817656", "0.6368671", "0.6320166...
0.6829533
2
formats the data, including removing specific items we don't want to show, dates, etc.
function format_data(data, data_source) { var headings = [] ,rows = [] ,row , heading_indexes = [] , headings = data.headings.filter(function(h,i) { if(h === 'lat' || h === 'lon' || h === 'Order') { r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formatData(data) {\n if(data && data.feed.entry) {\n data.feed.entry = data.feed.entry.slice(0,100);\n }\n return data;\n }", "function dataFormatter(formatData) {\n var formattedData = formatData.map(function(item){\n // Converts string dates from json into date objects for analysis and displ...
[ "0.6774577", "0.6392472", "0.61274093", "0.589953", "0.5857062", "0.58301944", "0.5788053", "0.5787582", "0.5783979", "0.5757005", "0.57406133", "0.5652768", "0.56381834", "0.56135935", "0.55927664", "0.55851245", "0.55783355", "0.55782896", "0.5577194", "0.55692494", "0.5567...
0.6065999
3
alert stuff starts here
function create_alert(query) { var email = get_cookie('dd-email'); if(!email) { show_login_register(query); } else { add_alert(email, query); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleAlertOK() {\n console.log('the frob should be blitzened here');\n }", "function tryAlert() {\n alert(\"GO TRY THE LES PAUL!\");\n }", "function issue_called(text_for_alert){\n window.alert(text_for_alert);\n}", "function alert(args) {\n\tconsole.log('calling from all...
[ "0.7079923", "0.702602", "0.6901008", "0.6832749", "0.67899823", "0.67448485", "0.6700717", "0.66621006", "0.66333777", "0.65909815", "0.6579931", "0.65308815", "0.65123475", "0.6511571", "0.65093", "0.64982176", "0.64968216", "0.6496412", "0.6483684", "0.6469967", "0.6456894...
0.6453625
21
alert stuff ends here widget stuff starts here
function hide_widget_wizard() { $('#open-nc-widget').remove(); $('#dd-form, #data-tables').show('slow'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endEarlyButton() {\n endEarlyDetails();\n}", "function okAlertDialog () {\n\terrorspan\n\t}", "function handleAlertOK() {\n console.log('the frob should be blitzened here');\n }", "function initAlerts() {\n $('.twc-alert .twc-alert-text:first').prepend('<a class=\"twc-icon twc-alert-clo...
[ "0.6338023", "0.63090795", "0.6229725", "0.6045195", "0.60167956", "0.5981826", "0.5946614", "0.5931794", "0.5904798", "0.58985597", "0.58968544", "0.5854487", "0.58209366", "0.5803942", "0.57990265", "0.57627845", "0.5752245", "0.5750319", "0.5714381", "0.5703856", "0.568837...
0.0
-1
in an ideal world, this function would be broken up. Sorry! :)
function show_available_graphs(table_data, data_type, county) { var skip_labels = ['Record ID', 'View report'] , skip_labels_table = ['Record ID'] , headings = [] , table_headings = [] , skip_indexes = [] , too_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "static final private internal ...
[ "0.6485678", "0.6274993", "0.5964755", "0.58215815", "0.58157754", "0.57421845", "0.56286156", "0.55998397", "0.5569067", "0.54962456", "0.53169876", "0.5293211", "0.52195174", "0.52008545", "0.5200548", "0.51396394", "0.5112495", "0.50968516", "0.5084736", "0.50760645", "0.5...
0.0
-1
used to make various items more humanfriendly in the output
function find_source(county, data_type, headings, data){ var crime = ['incidents', 'arrests', 'accidents', 'citations'] , agencyIndex , source; var others = { 'realestate': ' County Tax Office', 'property': ' County Tax Office', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "build() {\n\n\t\tlet evString = '';\n\t\tObject.keys(this.evs).forEach(stat => {\n\t\t\tif(this.evs[stat] > 0) {\n\t\t\t\tevString += this.evs[stat] + ' ' + stat + ' / '\n\t\t\t}\n\t\t});\n\n\t\tlet ivString = '';\n\t\tObject.keys(this.ivs).forEach(stat => {\n\t\t\tif(this.ivs[stat] < 31) {\n\t\t\t\tivString += th...
[ "0.6467407", "0.6284628", "0.6284628", "0.62501794", "0.62162155", "0.62028337", "0.6162689", "0.61502075", "0.6100209", "0.60757446", "0.6060611", "0.60444397", "0.60372514", "0.6030158", "0.6030158", "0.6030158", "0.6030158", "0.60132855", "0.5986136", "0.5977729", "0.59456...
0.0
-1
show headings to pick
function group_on(field, data_type, headings, data, options) { var index = index_wanted(field, headings) , date_labels = [] , grouped = {} , grouped_array = [[field,"Count"]] , msg , max = 50; var options = optio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAllHeaders(heading) {\n vm.toggle('section', heading);\n heading.forEach(function (heading_item) {\n vm.isHeader = vm.isExpanded('heading', heading_item);\n // alert( vm.isHeader);\n if (toggle('heading', heading_item)) {\n\n }\n\n });\n // vm.isExpanded...
[ "0.6879025", "0.64942", "0.6299947", "0.6243881", "0.6217175", "0.6151061", "0.60977066", "0.6047154", "0.59486926", "0.591836", "0.5890794", "0.58145255", "0.5789055", "0.57797337", "0.57382846", "0.5729165", "0.5724086", "0.5710336", "0.56937", "0.56927", "0.56514853", "0...
0.0
-1
make a google data table
function make_table(table_data, table_headings, skip_indexes){ var table_data_rows = table_data.rows.map( function(row) { var new_row = []; row.c.forEach(function (data, index) { if(skip_indexes.indexOf(index) === -1){ new_row.push(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dataTableFromTable(t) {\n\t\tvar tbl = new google.visualization.DataTable(),\n\t\t\tcol_type = \"string\";\n\n\t\t$(t).find(\"thead th\").each(function(i){\n\t\t\tif (1 === i) {\n\t\t\t\tcol_type = \"number\";\n\t\t\t}\n\t\t\ttbl.addColumn(col_type, $(this).text() );\n\t\t});\n\n\t\t$(t).find(\"tbody tr\"...
[ "0.7258507", "0.7165129", "0.7101242", "0.70232767", "0.6948727", "0.6817569", "0.68114257", "0.67794985", "0.677479", "0.6749317", "0.6749146", "0.67464805", "0.6715073", "0.6686118", "0.6683095", "0.6660432", "0.66298974", "0.6622397", "0.6580734", "0.6561973", "0.6553112",...
0.6187759
83
optinos we'll use to build graphs
function init_options(field, data_type) { var colors = ['#ADCD9E','#8E7098','#F3D469','#E1755F','#7EBEE4']; var options = { title: capitalizeFirstLetter(data_type) + ' by ' + field.toLowerCase(), width: 700, height: 400, legend: { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateIdeaData()\n{\n createGraph();\n \n}", "function createGraph()\n\t{\n\t\tgraph = that.add('graph', {\n\t\t\tw: that.size,\n\t\t\th: that.size,\n\t\t\tinputCount: that.inputCount,\n\t\t\teq: [{eq:that.eq.eq, color: style.eqColor}],\n\t\t\txRange: that.axis.x,\n\t\t\tyRange: that.axis.y,\n\t\t\t...
[ "0.6428455", "0.6198997", "0.6102972", "0.60500807", "0.60464627", "0.6021001", "0.60155725", "0.5983642", "0.59097606", "0.5868572", "0.5805873", "0.57347274", "0.5715527", "0.5697223", "0.5688523", "0.5681544", "0.5659985", "0.56232995", "0.5621771", "0.5595686", "0.5537162...
0.0
-1
builds google api graphs
function show_graph(graph_config, graph_div) { var graph_type = graph_config.graph_type || "ColumnChart"; if(graph_type === 'Table') { var data = new google.visualization.DataTable(graph_config.data); data = new google.visualization.DataView(data); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genChart(){\n var colors=[\"#3366cc\",\"#dc3912\",\"#ff9900\",\"#109618\",\"#990099\",\"#0099c6\",\"#dd4477\",\"#66aa00\",\"#b82e2e\",\"#316395\",\"#994499\",\"#22aa99\",\"#aaaa11\",\"#6633cc\",\"#e67300\",\"#8b0707\",\"#651067\",\"#329262\",\"#5574a6\",\"#3b3eac\",\"#b77322\",\"#16d62...
[ "0.6460798", "0.6177332", "0.6123438", "0.6120774", "0.60946035", "0.6053559", "0.60459906", "0.6018539", "0.6014501", "0.5981714", "0.59684986", "0.5948522", "0.5935739", "0.5920047", "0.591077", "0.58911604", "0.5890946", "0.5883558", "0.5844216", "0.5806493", "0.5781001", ...
0.0
-1
widget stuff ends here data formatting functions
function format_date(date_string, data_source) { var date = new Date(date_string); return {v: date, f: date_string}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onWPDataChange() {\n var format = wp.data.select( 'core/editor' ).getPostEdits().format || wp.data.select('core/editor').getCurrentPostAttribute('format');\n if ( format !== lastFormat ) {\n lastFormat = format;\n if( typeof format === 'undefined' ){\n ...
[ "0.5816247", "0.57522196", "0.5750937", "0.57476544", "0.57476544", "0.572909", "0.57017225", "0.5692485", "0.5676529", "0.5675915", "0.56651115", "0.5663924", "0.56575394", "0.56471336", "0.5613766", "0.5613766", "0.5610505", "0.5595114", "0.55680156", "0.55670756", "0.55577...
0.0
-1
truncates longer table field values so they display correctly
function truncate(string,length) { string = string.length > length ? string.substr(0,length-1) + ' ...': string; return string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truncate_values(selector, max) {\n\t\tvar rows = $(selector);\n\t\t$.each(rows, function(index, value){\n\t\t\t//alert($(value).text());\n\t\t\tvar length = max;\n\t\t\tvar myString = $(value).text();\n\t\t\tvar myTruncatedString = myString.substring(0, length);\n\t\t\t$(value).text(evaluate_length(myTrun...
[ "0.6315066", "0.6031959", "0.5778235", "0.5765752", "0.5713794", "0.56419694", "0.56317586", "0.56147164", "0.5551349", "0.55188394", "0.54979444", "0.5453163", "0.54368436", "0.54271495", "0.5398277", "0.5386444", "0.53567946", "0.5347373", "0.5345064", "0.5316332", "0.52828...
0.0
-1
! Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at THIS CODE IS PROVIDED ON AN AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITH...
function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "function getClientVersion() { return '0.14.4'; }", "_getPageMetadata() {\n return undefined;\n }", "createObjectContext2() {\n console.log('deprecated')\n return C.extension\n }", "function test_crosshair_op_azone_azure() {}"...
[ "0.5056609", "0.5025995", "0.49691767", "0.49641037", "0.49539134", "0.4946476", "0.4898183", "0.4889951", "0.48588082", "0.48160192", "0.48160192", "0.47858885", "0.47547024", "0.47488227", "0.4732353", "0.4731256", "0.4727353", "0.4717535", "0.4710059", "0.4710059", "0.4710...
0.0
-1
Show progress when loading comments
onLoadingCommentsChange(val) { if (this.vssue.comments) { if (val) { this.progressStart(); } else { this.progressDone(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadComments() {\n loadCommentTexts().then(amount => {loadCommentAvatars(amount)});\n }", "function showComments() {\n\t//let listOfComments = {};\n\t// Check if there are comments\n\tif (1 === 2) {\n\t\t//(listOfComments.length === 0) {\n\t\t$('.comments-list').removeClass('loading').addClass...
[ "0.70197105", "0.6723162", "0.66820586", "0.66766787", "0.6614289", "0.6596365", "0.6522517", "0.6498374", "0.6472939", "0.6403063", "0.6351329", "0.62870866", "0.62603444", "0.62389576", "0.62325984", "0.6230341", "0.6194995", "0.61860293", "0.6132468", "0.61212945", "0.6112...
0.7154639
0
the key of access token for local storage
get accessTokenKey() { return this.API ? `Vssue.${this.API.platform.name.toLowerCase()}.access_token` : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get accessToken() {\n return this.get(ACCESS_TOKEN_STORAGE_KEY);\n }", "function jwtTokenGetter() {\n return localStorage.getItem('id_token');\n}", "getToken() {\n return localStorage.getItem(\"id_token\");\n }", "getToken() {\n return localStorage.getItem('id_token');\n }", "getAccessToken(...
[ "0.71737283", "0.7144212", "0.7125755", "0.71038365", "0.70768785", "0.7057199", "0.704394", "0.7017428", "0.7008326", "0.69589794", "0.6931953", "0.6931953", "0.6891745", "0.6882986", "0.6867327", "0.68387634", "0.6833887", "0.68064725", "0.6804424", "0.6776865", "0.67316955...
0.7143467
2
Set options of Vssue
setOptions(options) { this.options = Object.assign({ labels: ['Vssue'], state: 'Vssue', prefix: '[Vssue]', admins: [], perPage: 10, proxy: (url) => `https://cors-anywhere.herokuapp.com/${url}`, issueContent: ({ url }) => url, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onOptionsChange(options) {\n this.vssue.setOptions(options);\n }", "set options(value) {}", "setOptions(options) {\n this.options = options;\n }", "SetOption() {\n\n }", "SetOption(string, Variant) {\n\n }", "setOptions(options) {\n if (typeof options !== 'undefined') {\n ...
[ "0.8126078", "0.75242805", "0.69729537", "0.6653635", "0.65757966", "0.64859563", "0.6397796", "0.63370836", "0.6324549", "0.6302831", "0.6263526", "0.6177816", "0.61703485", "0.6143575", "0.6104407", "0.6040682", "0.6014527", "0.59428644", "0.59404206", "0.5900116", "0.58860...
0.7378413
2
Post a new issue
async postIssue() { if (!this.API || !this.options || this.issue || this.issueId) return; // login to create issue if (!this.isLogined) { this.login(); } // only owner/admins can create issue if (!this.isAdmin) return; try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createIssue( issue) {\n return db('issues').insert(issue);\n}", "function createIssue() {\n console.log(\"Proceeding to create issue from the ticket\");\n getTicketDetails(\n function (ticketData) {\n checkAndCreateIssue(\n ticketData.ticket.id,\n function () {\n // The...
[ "0.72030634", "0.71377623", "0.7026403", "0.69685763", "0.68660265", "0.6848155", "0.68215996", "0.6706412", "0.660682", "0.6475841", "0.63896173", "0.63110095", "0.6250365", "0.61857605", "0.61753386", "0.61609167", "0.60602605", "0.6014827", "0.5986371", "0.59318125", "0.59...
0.8016778
0
Get comments of this vssue according to the issue id
async getComments() { try { if (!this.API || !this.issue || this.isLoadingComments) return; this.isLoadingComments = true; const comments = await this.API.getComments({ accessToken: this.accessToken, issueId: this.issue.id, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getComments(id, userID){\n //Only give comments if that person is registered or the course is public\n const course = await Course.findOne({\"comments\": id});\n const person = await User.findOne({\"_id\": userID});\n if ((!person.courses.includes(course._id)) && !course.public){\n ...
[ "0.64346343", "0.6376028", "0.6327159", "0.6303045", "0.6249977", "0.6244307", "0.622643", "0.61438745", "0.61418116", "0.60369754", "0.60030574", "0.5995623", "0.59792656", "0.5965008", "0.5935135", "0.5902242", "0.58991945", "0.5881069", "0.5880272", "0.5855647", "0.5851955...
0.65629244
0
Post a new comment
async postComment({ content, }) { try { if (!this.API || !this.issue || this.isCreatingComment) return; this.isCreatingComment = true; const comment = await this.API.postComment({ accessToken: this.accessToken, content, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitComment(e) {\n e.preventDefault();\n let newCommentData = { text: newComment, userId: user.id, postId: postId }\n console.log(newCommentData);\n\n API.Comment.createComment(newCommentData)\n .then(res => {\n console.log(\"Comment created!\");\n ...
[ "0.82281476", "0.7614856", "0.7537748", "0.7494348", "0.74447864", "0.74202317", "0.7411921", "0.7403035", "0.7350227", "0.73379296", "0.7319855", "0.73164487", "0.7313843", "0.7251709", "0.7242156", "0.72261757", "0.71562266", "0.7124032", "0.7091622", "0.7084181", "0.707174...
0.702497
24
Delete a new comment
async deleteComment({ commentId, }) { try { if (!this.API || !this.issue) return; const success = await this.API.deleteComment({ accessToken: this.accessToken, issueId: this.issue.id, commentId, }); r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete() {\n $(`comment-${this.config['id']}`).remove();\n }", "function deleteComment() {\n\t\tlet courseId = $(this).attr('data-target');\n\t\tlet commentId = $(this).attr('data-id');\n\n\t\tcommentsService.deleteComment(commentId)\n\t\t\t.then(() => {\n\t\t\t\tshowInfo('Comment deleted.');\n\t\t\t\t...
[ "0.79631746", "0.79614204", "0.7856894", "0.76673305", "0.76646954", "0.7591446", "0.75788414", "0.7509396", "0.74879503", "0.72908986", "0.7249715", "0.710706", "0.70778596", "0.7056309", "0.70431054", "0.7007813", "0.6996892", "0.6957112", "0.69452155", "0.69452155", "0.693...
0.6581918
42
Get reactions of a comment
async getCommentReactions({ commentId, }) { try { if (!this.API || !this.issue) return; const reactions = await this.API.getCommentReactions({ accessToken: this.accessToken, issueId: this.issue.id, commentId, });...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function api_get_comments(req, res) {\n Message.find({type : 'comment', parent : req.param('msg_id')}).sort({time:-1}).exec(function(err, messages) {\n\tif(!err && messages) {\n\t\tvar m = new Array();\n\n\t\tfor (var i = 0; i < messages.length; i++) {\n\t\t\tvar r = messages[i].toObject();\n\t\t\tr.id = messages...
[ "0.6051861", "0.59545755", "0.5944434", "0.5938125", "0.59123594", "0.5881141", "0.5832794", "0.57631546", "0.5749717", "0.5709326", "0.5688512", "0.5684795", "0.567931", "0.5677499", "0.5646348", "0.56340903", "0.561997", "0.5617875", "0.56017053", "0.5543842", "0.5538276", ...
0.8014663
0
Create a new reaction to a certain comment
async postCommentReaction({ commentId, reaction, }) { try { if (!this.API || !this.issue) return false; const success = await this.API.postCommentReaction({ accessToken: this.accessToken, issueId: this.issue.id, commentId, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async createReaction({params, body}, res){\n try {\n const thoughtbyIdReactionAdded = await Thought.findOneAndUpdate(\n { _id: params.thoughtId},\n { $push: { reactions:body } },\n { new: true }\n )\n .populate({path: 'reactions',...
[ "0.6288646", "0.6130453", "0.6079466", "0.60585314", "0.60226536", "0.6017115", "0.59861714", "0.5984228", "0.59690446", "0.59676284", "0.59543675", "0.5920043", "0.5914276", "0.59028757", "0.5823225", "0.5774705", "0.5763428", "0.57264334", "0.57046336", "0.5692427", "0.5680...
0.6082781
2
Redirect to the platform's authorization page
login() { if (!this.API) return; this.API.redirectAuth(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redirectAuthorised() {\n\t$.ajax({\n\t\turl : 'rest/user/authorized',\n\t\ttype : \"GET\",\n\t\tdataType : \"json\",\n\t\tstatusCode : {\n\t\t\t200 : function() {\n\t\t\t\twindow.location.replace(\"index.html\")\n\t\t\t},\n\t\t\t401 : function() {\n\t\t\t}\n\t\t}\n\t});\n}", "function doAuthRedirect() {...
[ "0.72306097", "0.7190217", "0.71078086", "0.70686424", "0.70577586", "0.7057325", "0.6895016", "0.68302053", "0.68213046", "0.67542213", "0.66717565", "0.6658923", "0.66449755", "0.66427845", "0.662515", "0.6616245", "0.66124076", "0.6571929", "0.64770633", "0.6434078", "0.64...
0.6268655
35
Clean the access token stored in local storage
logout() { this.setAccessToken(null); this.user = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearStorage() {\n window.localStorage.removeItem('access_token');\n window.localStorage.removeItem('expires');\n window.localStorage.removeItem('ts_expires');\n }", "clear() {\n currentAccessToken = null;\n store.removeItem('__refresh_data__');\n }", "clear() {\n currentAc...
[ "0.8205862", "0.80067474", "0.80067474", "0.7916693", "0.79060286", "0.76336265", "0.7615507", "0.76044744", "0.7485891", "0.7438038", "0.7361818", "0.7352514", "0.73335963", "0.7300698", "0.7300698", "0.7300698", "0.7300698", "0.7300698", "0.72954994", "0.7280282", "0.726991...
0.6757289
57
Handle authorization and set access_token
async handleAuth() { if (!this.API) return; // handle authorize and try to get the access_token const accessToken = await this.API.handleAuth(); if (accessToken) { // new access_token this.setAccessToken(accessToken); this.user = await this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setToken({ access_token, refresh_token }) {\n localStorage.setItem('accessToken', access_token);\n localStorage.setItem('refreshToken', refresh_token);\n\n Http.defaults.headers.common['Authorization'] = `Bearer ${access_token}`;\n}", "function setToken(token) {\n access_token = token;\n ...
[ "0.72392255", "0.71181744", "0.69876176", "0.687503", "0.6740098", "0.6639418", "0.6544337", "0.65291923", "0.6422646", "0.63851863", "0.6382787", "0.63400334", "0.6313195", "0.6309193", "0.6301891", "0.6286644", "0.62770104", "0.6241989", "0.62377983", "0.62315404", "0.62177...
0.7067093
2
Get access token from local storage
getAccessToken() { this.accessToken = window.localStorage.getItem(this.accessTokenKey); return this.accessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GetAccessToken() {\n return localStorage.getItem(\"access_token\");\n }", "getAccessToken () {\n const accessToken = localStorage.getItem('access_token')\n if (!accessToken) {\n throw new Error('No access token found')\n }\n return accessToken\n }", "static getTokenFromLS() {\n c...
[ "0.8347008", "0.814289", "0.8010351", "0.78628546", "0.7576702", "0.75711805", "0.75521505", "0.75155383", "0.74290824", "0.740371", "0.740371", "0.73959345", "0.73603207", "0.7345088", "0.73404557", "0.73295027", "0.73217857", "0.731691", "0.72713524", "0.7260278", "0.724508...
0.7766014
4
Save access token to local storage
setAccessToken(token) { if (token === null) { window.localStorage.removeItem(this.accessTokenKey); } else { window.localStorage.setItem(this.accessTokenKey, token); } this.accessToken = token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async saveAccessToken(data) {\n this.accessToken = data.access_token\n this.refreshToken = data.refresh_token\n this.tokenExpiryDate = data.created_at + data.expires_in // todo calculate time\n try {\n await AsyncStorage.setItem(\n '@TvTracker:token',\n JSON.stringify({\n ac...
[ "0.7710192", "0.75040084", "0.747064", "0.7255129", "0.7235556", "0.720539", "0.7190752", "0.71388596", "0.7115037", "0.7109523", "0.7076551", "0.70234805", "0.70026976", "0.69954556", "0.696535", "0.6951654", "0.6926921", "0.6892979", "0.6889511", "0.6875261", "0.6864415", ...
0.700874
12
Set options of Vssue if `options` prop is changed
onOptionsChange(options) { this.vssue.setOptions(options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "slottedOptionsChanged(prev, next) {\n super.slottedOptionsChanged(prev, next);\n this.setProxyOptions();\n this.updateValue();\n }", "optionsUpdateHook() { }", "setOptions(options) {\n this.options = Object.assign({\n labels: ['Vssue'],\n state: 'Vssue',\n pref...
[ "0.69700027", "0.6960738", "0.68784904", "0.6818698", "0.6740375", "0.6698144", "0.66418946", "0.65532136", "0.6414065", "0.64096755", "0.6340614", "0.6323658", "0.630339", "0.6172472", "0.61213285", "0.6114115", "0.6096769", "0.6079886", "0.6041286", "0.60149455", "0.6008348...
0.84322524
0
Section: UI and Event Handling
setupUI () { this.html.canvas.width = this.canvasWidth this.html.canvas.height = this.canvasHeight // Prevent "touch and hold to open context menu" menu on touchscreens. this.html.canvas.addEventListener('touchstart', stopEvent) this.html.canvas.addEventListener('touchmove', stopEvent) this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleEvents() {\n }", "onEvent() {\n \n }", "function UI(){}", "function UI(){}", "function UI() {}", "function UI() {}", "function UI() {}", "function UI() {\n }", "function events() {\r\n\taddition();\r\n\tcounter();\r\n\tcheckForm();\r\n}", "setupUI () {\n this.html.canvas.width = thi...
[ "0.667846", "0.6513373", "0.6471523", "0.6471523", "0.64587957", "0.64587957", "0.64587957", "0.6451923", "0.63879734", "0.6318555", "0.6301311", "0.6293149", "0.62524045", "0.6226258", "0.6221423", "0.6206986", "0.61615753", "0.61130214", "0.6063016", "0.6054845", "0.6053662...
0.64312387
8
Section: Gameplay / Start the game. Triggers when game loads, or reloads.
startGame (resetScore = true) { if (resetScore) { this.lives = STARTING_LIVES this.score = 0 } this.difficulty = 0 this.entities = [] this.luckyBeast = new LuckyBeast(this) this.entities.push(this.luckyBeast) this.friend = new Friend(this) this.entities.pu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function on_load()\n{\n\tgame.start();\n}", "function startGame() { }", "start() {\n this._state = 'RUNNING'\n this._start_time = _.now()\n Logger.info('Enabling the game modes')\n _.forEach(this._games, (game) => game._enable())\n Logger.info(`The game(${this._id}) has started as ${moment(this....
[ "0.77753866", "0.7462072", "0.74482137", "0.7406115", "0.7401724", "0.7385688", "0.7366109", "0.7343834", "0.73157793", "0.730668", "0.7305704", "0.72998667", "0.72939575", "0.72839814", "0.72662073", "0.7260339", "0.7256036", "0.7228679", "0.72235614", "0.7217781", "0.721644...
0.0
-1
Stop the game after dropping a bun (losing a life).
stopGame () { if (this.paused) return // Don't trigger this more than once this.lives = Math.max(0, this.lives - 1) this.paused = true this.pauseTimer = MINIMUM_PAUSE_DURATION }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stop() {\n isGameActive = false;\n }", "function stop(){\n clearInterval(bombId)\n clearInterval(fireBombId)\n clearInterval(invaderId)\n }", "die(){\n this.alive = false;\n this.unstageUnit();\n }", "function drop() {\r\n // Get current timestamp\r\n ...
[ "0.7152112", "0.7063203", "0.6965422", "0.69400275", "0.6862828", "0.68380517", "0.6827237", "0.67682296", "0.67585313", "0.6758501", "0.67236614", "0.67135954", "0.67103857", "0.6691689", "0.66330844", "0.6596943", "0.6591116", "0.6588444", "0.6588181", "0.65754133", "0.6559...
0.6467747
25
Continue the game after game is paused.
continueGame () { if (this.pauseTimer > 0) return if (this.lives > 0) { this.startGame(false) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pause() {\n _isGamePaused = true;\n\n Frogger.observer.publish(\"game-paused\");\n }", "function gamePause() {\n drawPauseState();\n resumeCountdown = 3;\n gameState = \"gamePaused\";\n}", "function userTouchedContinue() {\n TileSum.game.state.start('Play');\n }", "function c...
[ "0.77735484", "0.77268076", "0.76095647", "0.75505704", "0.7522317", "0.7464823", "0.74525636", "0.7433339", "0.74223626", "0.7411579", "0.7367625", "0.7345384", "0.73270655", "0.7276461", "0.7261384", "0.7250646", "0.7179251", "0.7169549", "0.7169549", "0.7124511", "0.711269...
0.8014371
0
Difficulty increases every time Lucky Beast delivers buns
increaseDifficulty () { this.difficulty++ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "upgradeDifficulty(times) {\n if (times === undefined) {\n times = 1;\n }\n let downgrade = false;\n if (times < 0) {\n downgrade = true;\n times = Math.abs(times);\n }\n\n for (let i = 0; i < times; i++) {\n if (downgrade) {\n if (this.challenge > 0) {\n this.c...
[ "0.68604", "0.6776701", "0.6750687", "0.6627515", "0.6341341", "0.6267898", "0.6218961", "0.6136474", "0.6067896", "0.60449684", "0.6012378", "0.5990995", "0.59779924", "0.59684044", "0.5956982", "0.5952683", "0.5910324", "0.588898", "0.58732945", "0.58690816", "0.585662", ...
0.6018015
10
Used to show/hide element
function showhide(id) { $(id).toggleClassName('active'); $(id+'_content').toggle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "show() {\n this.updateObject();\n if (this.needsElemUpdate) this.setKVPairElems();\n this.elem.classList.remove(\"hiding\");\n this.elem.classList.remove(\"noDisplay\");\n this.isHidden = false;\n }", "show () {\n this.showing = true\n this.element ? this.element.update(this) : null\n }", ...
[ "0.78100383", "0.7778523", "0.7682069", "0.766336", "0.7623453", "0.7596493", "0.75784063", "0.7577753", "0.7538668", "0.75365853", "0.7505229", "0.7504209", "0.7495149", "0.7484629", "0.7435546", "0.742399", "0.740281", "0.7373312", "0.73728544", "0.7369985", "0.73178416", ...
0.0
-1
Setup the dnd listeners.
function handleDragEnter(evt) { evt.stopPropagation(); evt.preventDefault(); var formDrop = document.getElementById("formDrop"); //dropZone.classList.add('is-dragover'); formDrop.className += " " + "box is-dragover"; evt.dataTransfer.dropEffect = 'copy'; // Explicitly sh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_setupEvents () {\n\t\tvar self = this\n\n\t\tthis._logger.debug('Setting up Telnet communication events...')\n\n\t\tthis._connection.on('ready', function (prompt) {\n\t\t\tself._logger.debug(`Telnet connection ready!`)\n\n\t\t\tself._logger.info(`Obtaining version from MD-DM at ${self.host}...`)\n\n\t\t\tself._co...
[ "0.6942303", "0.6905415", "0.6813542", "0.6447625", "0.64151347", "0.63376075", "0.62635046", "0.6239472", "0.6234424", "0.61675954", "0.61640966", "0.61277896", "0.6082406", "0.6068044", "0.6045595", "0.6035996", "0.6034944", "0.6031602", "0.60168284", "0.5999381", "0.597385...
0.0
-1
Access the device camera and stream to cameraView
function cameraStart() { var flagCamera = true; navigator.mediaDevices .getUserMedia(constraints) .then(function (stream) { track = stream.getTracks()[0]; cameraView.srcObject = stream; localStream = track; }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cameraStart() {\n cameraView = document.querySelector(\"#webcam\");\n navigator.mediaDevices\n .getUserMedia(constraints)\n .then(function(stream) {\n cameraView.srcObject = stream;\n })\n .catch(function(error) {\n console.error(\"Oops. Something is broken.\", erro...
[ "0.7588642", "0.75434047", "0.7543398", "0.7518907", "0.75124526", "0.75124526", "0.7512331", "0.7512331", "0.74428725", "0.74009633", "0.7094426", "0.6949083", "0.693574", "0.68988067", "0.68735445", "0.68558675", "0.68173355", "0.6794401", "0.6764679", "0.6755679", "0.67533...
0.70922565
11
var UploadButton = document.getElementById('Upload');
function uploadImage(imageToSend) { if (imageToSend == "") { alert("please choose image"); return; } imageToSend = setToBase64(imageToSend); document.getElementById('loading').hidden = false; document.getElementById('formDrop').hidden = true; windo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readUploadedFile(){\n\tvar uploadedFile = document.getElementById(\"uploadFile\");\n}", "function UploadBtn(){\n const fileInput = document.getElementById('fileinput');\n var filename = document.getElementById('filename').value\n handleUpload(fileInput.files[0], filename);\n}", "function fileUpload...
[ "0.71455044", "0.71217334", "0.70043427", "0.6716503", "0.6643933", "0.6518086", "0.6447542", "0.64141953", "0.64026546", "0.63910365", "0.6360517", "0.62499076", "0.62133557", "0.6182362", "0.6181916", "0.61455476", "0.6128736", "0.61091536", "0.6078754", "0.6063966", "0.604...
0.0
-1
This function calls all auxiliary functions and returns an ordered list of all moves ranked by most damage to least damage TODO: Test out with array of numbers or something like that
function moveCalculator(Moves, AtkPokemon, DefPokemon){ //Array of the damage of every move. Retains the same index as the passed in Moves object move_Damage = [] for (move in Moves){ //Calculate Move power damage = calculateDamage(move, AtkPokemon, DefPokemon) move_Damage.push(damag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortMoves (options) {\n var searchCount\n var goodCount = 5\n var moveCount = options.moves.length\n if (options.context.depth < 2) {\n searchCount = (searchFirstMoves <= moveCount) ? searchFirstMoves : moveCount\n } else if (options.context.depth < 4) {\n searchCount = 2\n } else {\n searc...
[ "0.6661331", "0.6408151", "0.6380538", "0.6377528", "0.61389947", "0.6105095", "0.6003708", "0.5986237", "0.5943134", "0.59334046", "0.592625", "0.59182537", "0.5907904", "0.5902311", "0.5897822", "0.58928794", "0.5887842", "0.58620375", "0.5860151", "0.5858107", "0.58363706"...
0.73295295
0
This function calculates the damage for each move
function calculateDamage(move, AtkPokemon, DefPokemon){ power = move.power ad = 0 //idk how this one is calculated exactly modifier = 0 //this ones complicated damage = (((2*AtkPokemon.level/5 + 2)*power*ad)/50 + 2)*modifier }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "computeDamage(){\n return this._units.reduce((accum, curUnit) => accum + curUnit.computeDamage(), 0.0);\n }", "function getDamageUser(userMove, userMoveName){\n damage = 10;\n for (var i = 0; i < wildPokemonType.length; i++) {\n var multiplier = pokeTypesEffect[userMove][pokeTypes[wild...
[ "0.6821802", "0.672971", "0.663389", "0.6477635", "0.6465782", "0.64205885", "0.63370055", "0.6307988", "0.621663", "0.6206573", "0.6197662", "0.6197429", "0.61855006", "0.6175565", "0.6173215", "0.6158049", "0.61408097", "0.61278045", "0.6110575", "0.6110226", "0.609165", ...
0.7855347
0
When the user clicks on the button, scroll to the top of the document
function topFunction() { document.body.scrollTop = 0; // For Safari document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scrollToTop () {\n //getting the currentPosition position of the button\n let currentPosition = document.documentElement.scrollTop || document.body.scrollTop;\n //if the position is greater than 0 then we'll scroll to the top of the page\n if (currentPosition > 0) {\n ...
[ "0.8499684", "0.8493862", "0.8238682", "0.80306077", "0.80239034", "0.80125797", "0.7994999", "0.79572564", "0.79508185", "0.7945779", "0.7924484", "0.7909982", "0.79083693", "0.7896633", "0.7890989", "0.78718835", "0.7841969", "0.7820104", "0.781835", "0.7801471", "0.7772324...
0.0
-1
rickshawChartCtrl Controller for data for all Rickshaw chart used in Rickshaw chart view
function rickshawChartCtrl() { /** * Data for simple chart */ var simpleChartSeries = [ { color: '#1ab394', data: [ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 30 }, { x: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chart(){\n\t\tthis.init();\n\t}", "function DefaultDashboardChartsCtrl() {\n var colors = pxDemo.getRandomColors();\n\n // Morris chart\n //\n\n this.morrisData = [\n { day: '2014-03-10', v: pxDemo.getRandomData(20, 5) },\n { day: '2014-03-11', v: pxDemo.getRandomData(20, 5) },\n ...
[ "0.59784395", "0.5791186", "0.5745781", "0.5711525", "0.56895494", "0.5550361", "0.5493095", "0.54540294", "0.54478866", "0.5434883", "0.54318196", "0.5412601", "0.53833354", "0.5382824", "0.5382824", "0.53543824", "0.5342001", "0.5338363", "0.5334101", "0.5330514", "0.532842...
0.78623426
0
Checks if it has the basic requirements of an address
function isValidAddress(address) { return /^(0x)?[0-9a-f]{40}$/i.test(address); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isAddress(address) {\n if (!/^(0x)?[0-9a-f]{40}$/i.test(address)) {\n // check if it has the basic requirements of an address\n return false;\n } else if (/^(0x)?[0-9a-f]{40}$/ || /^(0x)?[0-9A-F]{40}$/) {\n // If it's all small caps or all all caps, return true\n return true;\n } \n }...
[ "0.7509324", "0.7262313", "0.69586074", "0.67353886", "0.66800505", "0.6673336", "0.65638983", "0.6546375", "0.6463799", "0.64564145", "0.644204", "0.64165384", "0.6386652", "0.632271", "0.63178706", "0.6308315", "0.62989604", "0.6281093", "0.6266848", "0.62640643", "0.624865...
0.6640416
7
Basic validation of amount. Bigger than 0 and typeof number
function isValidAmount(amount) { return amount > 0 && typeof Number(amount) == "number"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidAMOUNTValue(amount) {\n return amount != '' && /^\\d*$/.test(amount)\n}", "validateValue (value) {\n return TypeNumber.isNumber(value) && !isNaN(value)\n }", "function checkAmountInput(amount) {\r\n let regexpattern = new RegExp(\"^\\\\d+\\.?\\\\d*$\");\r\n return regexpattern.test(amo...
[ "0.7295838", "0.72336286", "0.71550167", "0.7090135", "0.7001713", "0.6999125", "0.6959789", "0.6947407", "0.6906659", "0.6894528", "0.6884079", "0.6851791", "0.6833957", "0.68192554", "0.6787838", "0.67211574", "0.6718045", "0.67101383", "0.67035824", "0.66831416", "0.667569...
0.81704795
1
This sample demonstrates how to Lists all of the streaming jobs in the specified resource group.
async function listAllStreamingJobsInAResourceGroupAndDoNotUseTheExpandODataQueryParameter() { const subscriptionId = "56b5e0a9-b645-407d-99b0-c64f86013e3d"; const resourceGroupName = "sjrg6936"; const credential = new DefaultAzureCredential(); const client = new StreamAnalyticsManagementClient(credential, subs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function listAllStreamingJobsInAResourceGroupAndUseTheExpandODataQueryParameterToExpandInputsOutputsTransformationAndFunctions() {\n const subscriptionId = \"56b5e0a9-b645-407d-99b0-c64f86013e3d\";\n const expand = \"inputs,outputs,transformation,functions\";\n const resourceGroupName = \"sjrg3276\";\n c...
[ "0.6987504", "0.680709", "0.57248485", "0.57102036", "0.56097895", "0.55474937", "0.5544842", "0.54930073", "0.5461369", "0.5384108", "0.5361914", "0.53143847", "0.5257139", "0.52520525", "0.5249781", "0.5153864", "0.5153419", "0.5044646", "0.5019459", "0.50182074", "0.501010...
0.75091195
0
This sample demonstrates how to Lists all of the streaming jobs in the specified resource group.
async function listAllStreamingJobsInAResourceGroupAndUseTheExpandODataQueryParameterToExpandInputsOutputsTransformationAndFunctions() { const subscriptionId = "56b5e0a9-b645-407d-99b0-c64f86013e3d"; const expand = "inputs,outputs,transformation,functions"; const resourceGroupName = "sjrg3276"; const options = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function listAllStreamingJobsInAResourceGroupAndDoNotUseTheExpandODataQueryParameter() {\n const subscriptionId = \"56b5e0a9-b645-407d-99b0-c64f86013e3d\";\n const resourceGroupName = \"sjrg6936\";\n const credential = new DefaultAzureCredential();\n const client = new StreamAnalyticsManagementClient(cre...
[ "0.75089025", "0.680574", "0.5722185", "0.57077336", "0.5607997", "0.55447465", "0.5542588", "0.5492776", "0.5459304", "0.5381888", "0.5359087", "0.5311721", "0.52552724", "0.5249444", "0.5247645", "0.5151398", "0.5151179", "0.50424767", "0.5019714", "0.5016066", "0.5009312",...
0.6987579
1
const SmokeSensor = require('../webthing/frameworks'); global.temp
function initSensorData() { // let dbRes = getAllRoomInfo(); // dbRes.promise.then(res => { // if (res.rowCount > 0) { // let roomList = res.rows; // roomList.forEach(item => { var room_no = 1; sensorDataMap[room_no] = { roomNo: +ro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function learnModules() {\n const sth=require('./app.js').something;\n \n console.log(sth);\n \n }", "function yFirstLightSensor()\n{\n return YLightSensor.FirstLightSensor();\n}", "function Temp() {}", "function Temp() {}", "function Temp() {}", "function Temp() {}", "function Temp() {...
[ "0.5742728", "0.5571687", "0.54815745", "0.54815745", "0.54815745", "0.54815745", "0.54815745", "0.54815745", "0.54815745", "0.5412375", "0.53171027", "0.5308531", "0.5302874", "0.5292707", "0.52721155", "0.52397674", "0.52348894", "0.52143574", "0.5178238", "0.5165658", "0.5...
0.0
-1
Fetch via AJAX the lists from a board
loadHotels ({ commit }, { filters }) { commit(types.FETCH_HOTELS_REQUEST) service.fetchHotels(filters) .then(hotels => { commit(types.FETCH_HOTELS_SUCCESS, { hotels }) let min = Number.POSITIVE_INFINITY let max = Number.NEGATIVE_INFINITY hotels.docs.map((hotel) => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllBoardstates()\n {\n ajaxHelper(boardsUri,'GET').done(function(data)\n {\n self.boards(data);\n });\n }", "function fetchList(param = '') {\n param = param ? `?${param}` : '';\n\n $.ajax({\n type: \"GET\",\n url: `../back/api/list.php${param...
[ "0.68793917", "0.68093586", "0.66139716", "0.65999025", "0.65794367", "0.65743136", "0.6570986", "0.65368164", "0.65207523", "0.6489026", "0.6449314", "0.6415282", "0.64035285", "0.64031553", "0.6397144", "0.6372346", "0.63376135", "0.6330734", "0.6321945", "0.6304085", "0.62...
0.0
-1
For values that are not persisted
getTransient(key) { this._checkKey(key); return this._settings[key]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getValue_unavailable() {}", "get values() {\n return Support_1.defined(this.getAdditionalProperties());\n }", "getValue() {\n return {};\n }", "get values() {\n return Object.values(this.raw());\n }", "persistentValues() {\n var names = this.persistentProperties();\n va...
[ "0.66501415", "0.59055775", "0.5903622", "0.57365125", "0.56694734", "0.5650895", "0.56494236", "0.5636952", "0.56364536", "0.56364536", "0.56364536", "0.56364536", "0.56364536", "0.56364536", "0.56364536", "0.56364536", "0.56364536", "0.56319785", "0.5618494", "0.56121594", ...
0.0
-1
For values that are not persisted
setTransient(key, value) { //logger.debug('StateStore#setTransient', key, value); this._checkKey(key); this._settings[key] = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getValue_unavailable() {}", "get values() {\n return Support_1.defined(this.getAdditionalProperties());\n }", "getValue() {\n return {};\n }", "get values() {\n return Object.values(this.raw());\n }", "persistentValues() {\n var names = this.persistentProperties();\n va...
[ "0.6649991", "0.59023565", "0.5902353", "0.5735057", "0.56686103", "0.56484294", "0.5648143", "0.56364524", "0.56336874", "0.56336874", "0.56336874", "0.56336874", "0.56336874", "0.56336874", "0.56336874", "0.56336874", "0.56336874", "0.5631101", "0.56160975", "0.5611515", "0...
0.0
-1
Hides the date of a message
function hideDate(id){ document.getElementById(id).style.display ="none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fixDateVisibility() {\n\tlastDate = false;\n\tfor (var i=0; i<messages.length; i++) {\n\t\tvar message = messages[i];\n\t\tfixItemDateVisibility(message);\n\t}\n}", "function cancelMessage() {\n var msgElem2 = document.getElementById('birthdateMessage');\n msgElem2.style.display = 'none';\n}", "...
[ "0.69393355", "0.6851471", "0.67888314", "0.6578252", "0.6230589", "0.59774536", "0.5954598", "0.59114724", "0.5868073", "0.5861596", "0.5803301", "0.5793455", "0.579291", "0.5762918", "0.57094574", "0.5691069", "0.5688381", "0.5688014", "0.56766486", "0.56384814", "0.5622119...
0.6300756
4
Formates the date of a message from the timestamp given
function createDate(a){ var timestamp = a; var date = new Date(timestamp * 1000); //Gets year var year = date.getFullYear(); //Gets month var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var month ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transformDate(timestamp) {\n let datetime = new Date(timestamp)\n return datetime.toLocaleString();\n}", "getReadableDate (timestamp) {\n try {\n const _date = new Date(timestamp * 1000).toISOString().slice(0, 10)\n const _time = new Date(timestamp * 1000).toISOString().slice(11, 19)\...
[ "0.690852", "0.68486166", "0.6660892", "0.6615188", "0.6585212", "0.6526792", "0.65219617", "0.6521092", "0.64993125", "0.64873856", "0.643824", "0.64145005", "0.63678515", "0.6366077", "0.6340426", "0.6315741", "0.63042057", "0.62984675", "0.6290924", "0.62850904", "0.628296...
0.5792531
68
Gets a random integer from a min to max value
function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min + 1) ) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n }", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function getRndInteger(min, max) {\n return Math.flo...
[ "0.8750646", "0.8747283", "0.8747283", "0.8744869", "0.8736546", "0.8733337", "0.8723041", "0.8710155", "0.8710155", "0.8710155", "0.8705146", "0.86969817", "0.8682962", "0.86823857", "0.86822695", "0.8679324", "0.86767817", "0.867572", "0.86755997", "0.8671869", "0.86706537"...
0.86366254
42
! vuex v4.0.0 (c) 2021 Evan You
function s(t){return void 0===t&&(t=null),Object(r["k"])(null!==t?t:i)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFieldVuex() {\n return store.getters.dataField;\n }", "getProfileVuex() {\n return store.getters.dataProfile;\n }", "function vuexInit(){var options=this.$options;// store injection\n\tif(options.store){this.$store=options.store;}else if(options.parent&&options.parent.$store){this.$store=options.par...
[ "0.67986953", "0.66546917", "0.66112286", "0.62891924", "0.6248594", "0.6213041", "0.6213041", "0.6213041", "0.62075526", "0.6162506", "0.6137742", "0.60970867", "0.6055102", "0.6038589", "0.6038589", "0.6038589", "0.6038589", "0.6038589", "0.6034154", "0.60200274", "0.599727...
0.0
-1
! Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT...
function ra(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o);return s>3&&o&&Object.defineProperty(e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WSAPI() {\n }", "private internal function m248() {}", "private public function m246() {}", "createObjectContext2() {\n console.log('deprecated')\n return C.extension\n }", "supportsPlatform() {\n return true;\n }", "function T7(){return typeof window>\"u\"&&(self.window=self),functio...
[ "0.5718292", "0.5127192", "0.5033695", "0.49878177", "0.48940682", "0.48692054", "0.48676282", "0.4866501", "0.4854137", "0.48417315", "0.4839809", "0.4839809", "0.48230094", "0.47671622", "0.47190326", "0.470975", "0.46754074", "0.46754074", "0.46716532", "0.46446538", "0.46...
0.0
-1
asks if they would like to purchase another item
function reprompt() { inquirer.prompt([{ type: "confirm", name: "reply", message: "Would you like to purchase another item?" }]).then(function (ans) { if (ans.reply) { start(); } else { console.log("Thank you. See you soon!"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchaseItem() {}", "function purchase() {\n connection.query(\"SELECT * FROM products\", function (err, res) {\n if (err) throw err;\...
[ "0.7677491", "0.7677491", "0.7677491", "0.7677491", "0.7677491", "0.7677491", "0.765989", "0.74302197", "0.7356811", "0.7270171", "0.7260826", "0.72438437", "0.7237713", "0.71976125", "0.7184088", "0.7160733", "0.7146659", "0.7145603", "0.7144907", "0.7127539", "0.7103004", ...
0.0
-1
Parametros por defecto Podemos establecer ciertos valores que le pasamos a una funcion de forma por defecto Antes es6
function newFunction(name, age, country) { var name = name || 'Eduardo'; var age = age || 27; var country = country || 'MX'; console.log(name, age, country) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nuevaFuncion(nombre = \"Tomas\", edad = \"21\", ciudad = \"Linares\")\n{\n console.log(nombre, edad, ciudad)\n}", "function funcionParametro(fn) {\n\tfn();\n}", "function parametros(nombre = \"Edgar\", apellido = \"Tarquino\", edad = 33) {\n\tvar nombre = nombre;\n\tvar apellido = apellido;\n\tvar ...
[ "0.65660936", "0.6453695", "0.6237122", "0.61106795", "0.60996187", "0.588312", "0.58608735", "0.58391035", "0.5806753", "0.5788951", "0.57863015", "0.5785316", "0.5766767", "0.5761091", "0.5743657", "0.57245106", "0.56916934", "0.56860775", "0.5676951", "0.56730247", "0.5665...
0.56157535
25
endregion This will trigger when user pick e row
function onDragStart(e) { //Mozilla Hack e.dataTransfer.setData("Text", ""); if (!sourceParent) { // Set selected element's parent id sourceParent = tbody.attr('drag-id') ? tbody.attr('drag-id') : void 0; // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleRowSelection(event) {\n this.selectedData = this.template.querySelector('lightning-datatable').getSelectedRows();\n }", "function onSelectRow() {\n // Update selected rows\n if (component.initialized) {\n updateSelectedRows();\n }\n }", "be...
[ "0.74345136", "0.7371821", "0.72647035", "0.69880277", "0.68660605", "0.685489", "0.68005556", "0.66991895", "0.66721225", "0.6635509", "0.6625544", "0.6596605", "0.659388", "0.659388", "0.6591233", "0.6548233", "0.6529084", "0.6503383", "0.6503383", "0.6503383", "0.6503383",...
0.0
-1
This will trigger when user drag source element on another element
function onDragOver(e) { // Prevent Default actions e.preventDefault ? e.preventDefault() : void 0; e.stopPropagation ? e.stopPropagation() : void 0; // This get current elements parent id var targetParent = tbody.attr('drag-id') ? tbody....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drag(e){\ndraggedItem=e.target;\ndragging=true;\n}", "dragEnter(ev) {\n this.dragOver(ev);\n }", "function drag(e) {\r\n draggedItem = e.target;\r\n dragging = true;\r\n}", "function drag(e) {\n draggedItem = e.target\n dragging = true\n}", "drag(ev) {\n // console.log('drag')\n }", ...
[ "0.6774528", "0.6699662", "0.6698794", "0.6692167", "0.66905844", "0.66634417", "0.66102725", "0.65737313", "0.6564569", "0.6564569", "0.6563121", "0.65475684", "0.6466468", "0.64520395", "0.6419546", "0.6397024", "0.6369476", "0.6346376", "0.6343029", "0.6327309", "0.6323911...
0.61474496
55
This will Trigger when user drop source element on target element
function onDrop(e) { // Prevent Default actions e.preventDefault ? e.preventDefault() : void 0; e.stopPropagation ? e.stopPropagation() : void 0; if (typeof attr.ngRepeat === "undefined") return false; // Get this item...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onDrop(source, target) {\n //emits event after piece is dropped\n var room = formEl[1].value\n socket.emit('Dropped', { source, target, room })\n}", "function elementDrop(event) {\n event.preventDefault();\n\n if (event.target.nodeName === 'LI' && event.target.parentNode.id === 'todo-list...
[ "0.71480304", "0.7003888", "0.69867414", "0.6859869", "0.6852879", "0.6850629", "0.6844504", "0.68337107", "0.6805165", "0.67925733", "0.6751524", "0.6697751", "0.6673549", "0.66543794", "0.66379833", "0.65794116", "0.6571899", "0.65166986", "0.65074754", "0.6476401", "0.6435...
0.6428888
21
This will trigger after drag and drop complete
function onDragEnd(e) { //clearing the source sourceParent = ""; sourceIndex = -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_complete() {\n if(this.get('isDestroyed') || this.get('isDestroying')){\n return;\n }\n\n invokeAction(this, 'onDragStop', this.get('model'));\n this.set('isDropping', false);\n this.set('wasDropped', true);\n this._tellGroup('commit');\n }", "_drop() {\n if (!this.element || !this.$(...
[ "0.7602979", "0.7186339", "0.70445913", "0.6843398", "0.6779204", "0.67621076", "0.6730136", "0.67216116", "0.6681596", "0.66757065", "0.66476834", "0.6629526", "0.6618784", "0.65799725", "0.6576534", "0.6576534", "0.6544045", "0.6539686", "0.6526519", "0.6493398", "0.6481165...
0.0
-1
1. Order 6 numbers per screen and place them in an array 2. Display the entire array (all its elements) in the body of the page and in the console 3. Sort and show it 4. Reverse your order and show it 5. Show how many elements the array has 6. Search of a value entered by the user, that tells us if it finds it and its ...
function showArray(elements, customText = ""){ document.write("<h1>Content of array "+customText+"</hl>"); document.write("<ul>"); elements.forEach((element, index) => { document.write("<li>"+element+"</li><br/>"); }); document.write("</ul>"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start() {\n function step1() {\n let res = [];\n for(let i = 0; i < 6; i++){\n let value = parseInt(prompt(`Insert number for array position nº ${i}`, \"0\"));\n res.push(value)\n }\n return res;\n }\n\n let array = step1();\n\n function step2(...
[ "0.6487995", "0.61169386", "0.6027365", "0.5913149", "0.5912669", "0.59002835", "0.580293", "0.57703507", "0.5765655", "0.5761166", "0.5749165", "0.5748379", "0.5743487", "0.5733435", "0.5715324", "0.56752956", "0.56446093", "0.562278", "0.5600403", "0.5585389", "0.5584968", ...
0.0
-1
End load the Image crop the image
cropImage(img) { const width = img.shape[0]; const height = img.shape[1]; const shorterSide = Math.min(img.shape[0], img.shape[1]); // calculate beginning and ending crop points const startingHeight = (height - shorterSide) / 2; const startingWidth = (width - shorterSide) / 2; const endingHe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newCropImageStr(url1){\r\n var imgTemp = new Image(); \r\n imgTemp.src=url1;\r\n imgTemp.addEventListener(\"load\", function() {\r\n aw = imgTemp.naturalWidth;\r\n ah = imgTemp.naturalHeight;\r\n va...
[ "0.67756796", "0.6597544", "0.6459597", "0.6429696", "0.63989794", "0.6283965", "0.6230395", "0.6226401", "0.6186781", "0.6185211", "0.61191624", "0.6017107", "0.60035425", "0.59207195", "0.59020555", "0.58590496", "0.58566624", "0.5855447", "0.5853234", "0.58513385", "0.5822...
0.59257305
13
End resize the Image
resizeImage(image) { return tf.image.resizeBilinear(image, [224, 224]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizeImage() {\n\t\tstopSlideshow();\n\t\t_setShrunk(!_isShrunk());\n\t\t_changeItem();\n\t}", "function end(){\n push();\n resizeCanvas(windowWidth, windowHeight);\n imageMode(CENTER);\n image(endImage,0,0,windowWidth,windowHeight);\n pop();\n}", "resizeEnd() {\n this.options.container.a...
[ "0.73345625", "0.68099934", "0.6747967", "0.67459667", "0.6665018", "0.6601477", "0.6564106", "0.6563032", "0.65330076", "0.6518275", "0.64700115", "0.6466143", "0.6426235", "0.6383337", "0.63368595", "0.62686855", "0.6242434", "0.6187405", "0.6184877", "0.6181936", "0.616010...
0.0
-1
get para of url
function getUrlParam(name){ var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r!=null) return unescape(r[2]); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUrlPara(paraName) {\n\t\tvar sUrl = location.href;\n\t\tvar sReg = \"(?:\\\\?|&){1}\" + paraName + \"=([^&]*)\"\n\t\t\tvar re = new RegExp(sReg, \"gi\");\n\t\tre.exec(sUrl);\n\t\treturn RegExp.$1;\n\t}", "function getParameter(url, name) {\n\t\t// scheme : // [username [: password] @] hostname [: por...
[ "0.66827387", "0.65702796", "0.65255994", "0.6192187", "0.60873127", "0.5996747", "0.5981339", "0.5976057", "0.59460187", "0.59379864", "0.59363383", "0.5932395", "0.591676", "0.59030163", "0.59018964", "0.58618873", "0.58575624", "0.5854617", "0.585364", "0.58430254", "0.584...
0.5603465
90
JavaScript Auto Update Copyright Year(s) OneMadEye (c) September 2007
function y2k(number) { return (number < 1000) ? number + 1900 : number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDynamicCopyrightYear() {\n var anio = (new Date).getFullYear();\n $( '.copyright' ).find( 'span.year' ).text( anio );\n }", "function setCopyrightDate(){\n year = new Date().getFullYear();\n document.write(year);\n }", "function copyrightYear() {\n var year = new Date().getFullY...
[ "0.83681595", "0.81993484", "0.800838", "0.7994451", "0.76189613", "0.74714833", "0.71237594", "0.7056892", "0.7052921", "0.7048354", "0.68925995", "0.6618217", "0.6590437", "0.6574524", "0.6563445", "0.65541273", "0.65399796", "0.65166247", "0.6441601", "0.6399502", "0.63739...
0.0
-1
We'll add interpolator here later on, need to figure it out all over again / color = / Our graph prototype. Call it like > context.sum(selection) Generally, you won't need to specify selection if used with d3(selection).call()
function svCard (selection) { selection.append("h2") .attr("class", "value"); selection.append("span") .attr("class", "title") .text(function(d){ return d.title; }); /*selection.append("span") .attr("class", "timestamp") .text(functio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sum (selection) {\n selection.append(\"h2\")\n .attr(\"class\", \"value\");\n\n selection.append(\"span\")\n .attr(\"class\", \"title\")\n .text(function(d){ return d.title; });\n\n selection.append(\"span\")\n .attr(\"class\", \"timestamp\"...
[ "0.7038808", "0.57874775", "0.5613919", "0.5533003", "0.55198854", "0.5461242", "0.54478955", "0.53756684", "0.5365955", "0.53307194", "0.5311474", "0.5305614", "0.53034335", "0.53034335", "0.53034335", "0.52901286", "0.5288318", "0.5270362", "0.52672035", "0.5254675", "0.524...
0.48314157
85
On next data point
function change (data) { now = Date.now(); range = [new Date(now - step - offset), new Date(now - offset)]; d3.select(that).select(".value") .text(function(){ var value = +data.pop().value; return (d.format || form...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "next(){\n\t\t\tif(this.offset>=this.max_offset){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.offset += this.limit;\n\t\t\tvar container = this.container;\n\t\t\tvar variable = this.variable;\n\t\t\tthis.initializePlot(variable);\n\t\t\tthis.getMeasurements(variable);\n\t\t}", "function _next() {\n _pos ++;\n ...
[ "0.72347593", "0.7003119", "0.65177375", "0.63926667", "0.6313428", "0.62951434", "0.6251961", "0.62164843", "0.6213097", "0.6188585", "0.6174599", "0.61566716", "0.6072114", "0.60704315", "0.60597724", "0.60202014", "0.6019393", "0.6017477", "0.6013113", "0.6011227", "0.6010...
0.0
-1
makes the table environment
function constructTheEnvironment(tableid) { $(tableid).html("<tr><td>34545</td></tr>"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildTable(){\n\n}", "_setTable() {\r\n\r\n\r\n }", "function makeTable() {\n var queryfortable = \"Select * FROM products\";\n connection.query(queryfortable, function(error, results){\n if(error) throw error;\n var tableMaker = n...
[ "0.7241611", "0.7062557", "0.6813639", "0.6768021", "0.673948", "0.65224653", "0.6451969", "0.6406043", "0.63750535", "0.6369763", "0.63077337", "0.6282889", "0.62809575", "0.62401956", "0.6239448", "0.62101966", "0.61985564", "0.6192968", "0.6169367", "0.6157454", "0.6153737...
0.6558696
5
Compare email tokens from extracted jwt and database
static async compare(req, res, next) { const { jwtToken, dbToken } = req.apiResults; try { if (!jwtToken || !req.body || !dbToken) { throw new Error("One or more required data is not supplied!"); } const { token: outerToken } = req.jwtToken || req.bod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validarTk(token){\n return jwt.verify(token, config.jwtSecret);\n \n \n}", "function performVerification(data, verification_data, res) {\n \n console.log(\"Incoming data-------------------------------\");\n console.log(data);\n console.log(\"Verfication data----------------------------...
[ "0.6496294", "0.6309793", "0.62724215", "0.6198814", "0.61530644", "0.61274374", "0.6114635", "0.60752976", "0.6053488", "0.6026647", "0.60140973", "0.5997302", "0.5978375", "0.59454113", "0.5941373", "0.59399974", "0.59330803", "0.5928786", "0.5901193", "0.58985", "0.5888629...
0.7458489
0
Challenge 1. make your own array object. This object does not use the in built array at all. It supports its own version of push and pop. You can also get by index 2. in question 6 make miles impossible to directly alter after creation 1.
function myArray(){ this.size = 0, this.print = function(){ for (let i = 0; i < this.size; i++){ console.log(this[i]); } }, this.push = function(item){ this[this.size] = item; this.size++; }, this.pop = function(){ this[this.size-1] = undefined...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Array() {}", "function main() {\n Array.SIZE_RATIO = 3;\n\n // Create an instance of the Array class\n let arr = new Array();\n\n // Add an item to the array\n arr.push(3);\n console.log(arr);\n /* What is the length, capacity and memory address of \n your array?\n A: Lenght:1, capacity:3, me...
[ "0.60626334", "0.60292697", "0.5944122", "0.5869637", "0.5841565", "0.57512957", "0.5725774", "0.5720602", "0.56908315", "0.5684516", "0.56757987", "0.5657475", "0.5656996", "0.5650779", "0.56447846", "0.56313896", "0.5599728", "0.5566344", "0.55569804", "0.5542811", "0.55421...
0.670923
0
Method to start the Game
start(event){ console.warn("ZOOTYMON GO!"); $('.firstpage').hide(); $('.dino2').hide(); zootyMon.progressbar(); const $name = $('input').val(); $('.nameInput').text($name); zootyMon.increaseAge(); zootyMon.morph(); zootyMon.animateZootymon(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() { }", "function start(){\n\t\t //Initialize this Game. \n newGame(); \n //Add mouse click event listeners. \n addListeners();\n\t\t}", "function startGame() {\n init();\n}", "function start()\r\n{\r\ninit();\r\ngame.start();\r\n}", "function star...
[ "0.8699276", "0.8550787", "0.84207976", "0.84090704", "0.8382538", "0.8369894", "0.83403105", "0.81377643", "0.80770195", "0.80429137", "0.79887116", "0.79851043", "0.79764396", "0.79727095", "0.79067457", "0.7895008", "0.7878577", "0.7874103", "0.7864323", "0.7861308", "0.77...
0.0
-1
Step 3 user can feed,play,or nap with toggle by clicking button A. If the value of the the progress bar reaches 0 or 100 game will end B.
Game() { if ($('#feedProgBar').attr("value") == 0) { $('.dino').hide(); $('.dino2').remove(); $('.nes-balloon').css("display", "initial"); $('.Gameover').css("display", "initial"); } else if ($('#feedProgBar').attr("value") == 100){ $('.dino')....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goalReached() {\r\n\tif(totalProgressPercent >= 100.00) {\r\n\t\talert(\"You did it!\");\r\n\t\tstop = true;\r\n\t\tbreak;\r\n\t}\r\n}", "function progressGame() {\n var result = ticTac.isWinner();\n console.log(\"Result : \" + result);\n if (result === -1) {\n ticTac.nex...
[ "0.6548802", "0.6253175", "0.620491", "0.6199951", "0.6150501", "0.607523", "0.6070541", "0.6062779", "0.6027324", "0.6017122", "0.5988898", "0.59876746", "0.598592", "0.5912125", "0.5860144", "0.58577824", "0.5850864", "0.5847461", "0.5843675", "0.5841786", "0.5826044", "0...
0.56610364
45
Step 5 Morph A. Morph Zootymon when value is equal to 50
morph(){ setInterval(function(){ if(zootyMon.Age >=50){ $('.dino2').show(); $('.dino').hide(); } },1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "effect(){\n return(player.points.pow(0.25).times(0.5).plus(1))\n }", "static transient final internal function m50() {}", "function matchHouses(step) {\n if (step === 0){\n return 0;\n } else {\n return (5 * step) + 1\n }\n}", "levelBump() {\n /...
[ "0.6113802", "0.58164865", "0.5659906", "0.5619494", "0.5572279", "0.55668885", "0.5532059", "0.55002034", "0.5496017", "0.54909545", "0.54804116", "0.546225", "0.54607105", "0.5441042", "0.5367861", "0.53566545", "0.5339075", "0.5335892", "0.5322077", "0.5319101", "0.5306277...
0.50598836
90
User requeste a reset of swimmer counts
function ResetSwimmerCounts() { GetRaceFinisherCounts(); UpdateRacersSwimming(); UpdateRacersFinished(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetCount() {\n this.count = this.initialCount;\n }", "_resetPendingCount() {\n count = updateCount = 0;\n }", "function resetCounts() {\n //e = select, n = anarchy, d = democracy\n return {'a':0,'b':0,'u':0,'l':0,'r':0,'d':0,'s':0,'e':0,'n':0,'m':0};\n}", "resetNumberOfMoves(){\n ...
[ "0.652887", "0.63639283", "0.63512516", "0.62899864", "0.61980027", "0.6164972", "0.6151218", "0.61473167", "0.61407584", "0.6116779", "0.6081976", "0.6066538", "0.6062274", "0.6059453", "0.6055132", "0.6051019", "0.60480124", "0.6047147", "0.6044437", "0.60411954", "0.604086...
0.7792407
0
Update Gauges with new data
function UpdateFinisherCounts(el, pct, fin, swm ) { var inf = el.attr('data-info'); var col = el.attr('data-fgcolor'); el.empty(); el.removeData(); el.attr('data-info', inf); el.attr('data-fgcolor', col); el.attr('data-startdegree', 100); el.attr('data-type', 'half'); el.attr('data-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateGauges() {\n if (i >= 0) {\t// initially use a faster interval and sweep the gauge\n {\n for (var key in gauges) {\n gauges[key].redraw(i);\n }\n if (i === 0) {\n clearInterval(interv0);\n ...
[ "0.69289094", "0.64784956", "0.6445058", "0.6298181", "0.6106525", "0.5999133", "0.5943259", "0.5876624", "0.58045566", "0.57894915", "0.5761326", "0.5711814", "0.56870073", "0.56585014", "0.5651388", "0.5649333", "0.5542313", "0.55039155", "0.55036175", "0.54941493", "0.5485...
0.0
-1
function to call Racer Counts
function GetRaceFinisherCounts() { $.ajax( { url: '/api.php?r=racefinishercount', type: 'get', contentType: 'application/json', dataType: 'json' }) .done (function(data) { //alert (JSON.stringify(data)); /* [{"Swimmers":"70","Finishers":"1"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "count() {}", "function counter() {\n\n}", "function InvocationCounter() {\r\n}", "function startCount() {\r\n setCounter(7, \"#WORKS\", 500);\r\n setCounter(70, \"#Visted\", 60);\r\n setCounter(80, \"#clients\", 50);\r\n setCounter(100, \"#freelancing\", 30);\r\n}", "afterCount(result, params) {\n ...
[ "0.66151494", "0.6498901", "0.64136827", "0.6346966", "0.61888367", "0.6052292", "0.59851253", "0.5969782", "0.5954205", "0.5948379", "0.59306264", "0.59145045", "0.58964634", "0.58941025", "0.5880613", "0.58493364", "0.5837823", "0.5833094", "0.5823668", "0.5820167", "0.5816...
0.0
-1
Get an existing LoadBalancer resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
static get(name, id, state, opts) { pulumi.log.warn("LoadBalancer is deprecated: aws.elasticloadbalancingv2.LoadBalancer has been deprecated in favor of aws.lb.LoadBalancer"); return new LoadBalancer(name, state, Object.assign(Object.assign({}, opts), { id: id })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fromLookup(scope, id, options) {\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_elasticloadbalancingv2_ApplicationLoadBalancerLookupOptions(options);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n ...
[ "0.5522598", "0.50870806", "0.50683665", "0.5020208", "0.497974", "0.4979308", "0.49452266", "0.4873166", "0.4777039", "0.47759315", "0.47578725", "0.47428522", "0.4718318", "0.47073483", "0.46337396", "0.460411", "0.46009836", "0.45933577", "0.45546216", "0.45463532", "0.452...
0.64344645
0
Returns true if the given object is an instance of LoadBalancer. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === LoadBalancer.__pulumiType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === DefaultSubnet.__pulumiType;\n }", "static isBvmAddr(o: Object): boolean {\n return o instanceof BvmAddr;\n }", "static isInstance(obj) {\n if (o...
[ "0.60714763", "0.59347653", "0.5927264", "0.58807206", "0.5715156", "0.56338793", "0.559706", "0.55790573", "0.55687785", "0.5550529", "0.554436", "0.55364865", "0.5497574", "0.54922366", "0.54706335", "0.5448301", "0.5432817", "0.5426557", "0.54164547", "0.54117674", "0.5409...
0.77388185
0
ms store the original boundaryrelative position and set absolute position assumes 'this' is a draggable html element within boundary
function setAbsolutePosition() { var top = $(this).position().top + $boundary.scrollTop(); var width = $(this).innerWidth(); // store current yPos positions.unshift(top); // move to absolute positioning $(this) .css({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onDragMove() {\n if (this.dragging) {\n let newPosition = this.data.getLocalPosition(this.parent);\n this.x = newPosition.x;\n this.y = newPosition.y;\n }\n}", "function positionDrag(e){\n var c = S.content,\n d = S.dimensions,\n coords = S.lib.get...
[ "0.65399164", "0.65307415", "0.64830303", "0.62040544", "0.60920805", "0.6033546", "0.6013784", "0.59830916", "0.5955353", "0.5947887", "0.5925458", "0.5915547", "0.5910726", "0.5910014", "0.59017295", "0.58941066", "0.5888917", "0.58815026", "0.587093", "0.58684766", "0.5865...
0.71722436
0
swap list positions of draggable and target
function swapListItemPositions($target, direction) { var draggableListIndex = $dragging.data('draggable-index'); var targetListIndex = $target.data('draggable-index'); var targetTop; var heightDifference = $target.outerHeight() - $dragging.outerHeight(); if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function swapItems(start, end){\r\n const itemOne = listItems[start].querySelector('.draggable');\r\n const itemTwo = listItems[end].querySelector('.draggable');\r\n\r\n listItems[start].appendChild(itemTwo);\r\n listItems[end].appendChild(itemOne);\r\n}", "function swapItems(fromIndex, toIndex) {\n ...
[ "0.7231079", "0.716105", "0.711074", "0.70794225", "0.7012307", "0.69396716", "0.6886017", "0.675981", "0.6546913", "0.65003824", "0.64486974", "0.62733096", "0.6220087", "0.62106895", "0.62041193", "0.6203026", "0.61464244", "0.6144922", "0.6131415", "0.61286056", "0.6081835...
0.7927537
0
as the draggable moves, we calculate if we need to move it to a new list position
function snapToListPosition(direction) { var $target; var dragElementPositionTop = $dragging.position().top; var dragElementHeight = $dragging.outerHeight(); var targetElementPositionTop; var targetElementHeight; // if the delta is large enough, $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_BoardDragDrop() {\n $(\".connected\").sortable({\n connectWith: \".connected\",\n receive: function (event, ui) {\n var laneType = this.getAttribute(\"data-lane-type\");\n var laneID = this.getAttribute(\"data-id\");\n if ((laneType == 3) || (ui.item....
[ "0.7017928", "0.6969701", "0.6724313", "0.6714002", "0.6689554", "0.66670656", "0.660517", "0.65788555", "0.65407044", "0.64778614", "0.647259", "0.6462633", "0.64410233", "0.64335114", "0.64293015", "0.6425444", "0.6415086", "0.6323047", "0.63137984", "0.6279193", "0.6270522...
0.74062943
0
handle the drag.draggable event
function handleDrag(event, delta, mousepos) { // check $dragging has been initialized properly. if ($dragging) { var direction; var draggableTop = parseInt($dragging.css('top'), 10); var draggableBottom = draggableTop + $dragging.outerHeight(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drag(e) {\r\n draggedItem = e.target;\r\n dragging = true;\r\n}", "function drag(event) {\n draggedItem = event.target;\n dragging = true;\n}", "function handleDrag ( event /*: JQueryEventObject */ ) {\n var dx = event.pageX - $element[0].dragData.lastX,\n dy = event.pageY - $ele...
[ "0.7368034", "0.734305", "0.7329589", "0.72980464", "0.7294612", "0.72847253", "0.7282272", "0.7172527", "0.7062367", "0.69993216", "0.69699067", "0.69699067", "0.69668007", "0.6920279", "0.6894643", "0.6879335", "0.68416655", "0.6823652", "0.6816586", "0.6807045", "0.6772091...
0.6441154
61
reset styles & remove placeholder
function reset() { $boundary .css('height', 'auto') .find('.placeholder') .remove() .end() .find('.draggable') .attr('style', ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetStyles () {\n\t\tthis.selection\n\t\t\t.attr('data-rel', '')\n\t\t\t.attr('data-hidden', '')\n\t}", "function emptyStyle() {\n\t$(\".pick\").each(function(){\n\t\t$(this).empty();\n\t});\n}", "function resetStyles() {\r\n $scope.showForm = true\r\n $scope.showLogo = false\r\n $scope.l...
[ "0.67642915", "0.66990125", "0.66601574", "0.6649406", "0.66291803", "0.66086644", "0.65700173", "0.6561361", "0.65563196", "0.6550202", "0.6534815", "0.6468779", "0.6468098", "0.64427716", "0.64389855", "0.64389855", "0.642152", "0.6417344", "0.63861847", "0.63842124", "0.63...
0.73785084
0
handle the drop.draggable event clear up
function handleDrop() { stopScroll(); // drop draggable in to place smoothly $dragging.animate({'top': positions[$dragging.data('draggable-index')]}, 'fast', reset); $dragging.trigger('drop.dragdroplist'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onRemove() {\n RB.DnDUploader.instance.unregisterDropTarget(this.$el);\n }", "function dropCleanup() {\n\n /////\n // Remove the class from the current element.\n /////\n element.removeClass('sp-form-builder-container-selected');\n\n ...
[ "0.72617227", "0.7234498", "0.71443003", "0.7136711", "0.7135765", "0.7084531", "0.70841855", "0.7074538", "0.7041244", "0.70118415", "0.6972374", "0.69590783", "0.69524246", "0.6913922", "0.68966997", "0.6896543", "0.68820375", "0.68494105", "0.68188083", "0.68188083", "0.68...
0.7102608
5
display in plunker preview
function displayInPreview(string) { var newDiv = document.createElement("div"); var newContent = document.createTextNode(string); newDiv.appendChild(newContent); document.body.appendChild(newDiv) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generatePreview() {\n var ifrm = document.getElementById('preview');\n ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;\n ifrm.document.open();\n ...
[ "0.68687177", "0.67955047", "0.65682685", "0.6412117", "0.60967046", "0.60896116", "0.60896116", "0.60789794", "0.6024117", "0.6016526", "0.59852326", "0.59512705", "0.5946308", "0.59183455", "0.5911248", "0.5908784", "0.5906696", "0.5902545", "0.5902545", "0.5902545", "0.590...
0.555148
51
Draw the preview view from html, css and javascript data.
static render(html, css, javascript, callback) { require('fs').readFile('src/template.html', (err, data) => { let buffer = data.toString(); if ( ! err) { buffer = buffer.replace('#html#', html); buffer = buffer.replace('#css#', css); buffer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generatePreview() {\n var ifrm = document.getElementById('preview');\n ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;\n ifrm.document.open();\n ...
[ "0.6702885", "0.6524357", "0.64603686", "0.645897", "0.6410661", "0.6398509", "0.63590187", "0.61969787", "0.60916847", "0.606896", "0.6067959", "0.6005196", "0.5986134", "0.5962988", "0.5958179", "0.5947845", "0.5924227", "0.58815813", "0.58471763", "0.5841695", "0.58279943"...
0.0
-1
scroll event tofrom top to footer
function initPageScroller(){ $(".text-to-scroll").click(function() { $('html, body').animate({ scrollTop: $(".footer").offset().top }, 1000); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onScrollToTop() {\n ScrollToTop();\n}", "function trackChangeOverviewCart() {\n var offsetHeight = $(window).height() - $('.section-cart-footer').outerHeight();\n\n // when footer hit the view + offset ( height of overview )\n var waypoints = $('#footer').waypoint(function (direc...
[ "0.68651867", "0.67501616", "0.6573184", "0.6552422", "0.65261734", "0.6480102", "0.64500475", "0.64500475", "0.64500475", "0.64500475", "0.64500475", "0.6435302", "0.6434057", "0.6393796", "0.6372105", "0.6336232", "0.63321745", "0.630644", "0.6296039", "0.6290874", "0.62898...
0.6489858
5
this function render the current data to popup
function renderDynamicPopupContent($blockContent){ const $sectionPopupWrapper = jQuery(".modal-wrapper"); $sectionPopupWrapper.find('.js-popup-title').html( $blockContent.find('.inner-title').html() ); $sectionPopupWrapper.find('.js-popup-size').html( $blockContent.find('.sizes').html() ); $sectionPopupWrapper....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n return this.renderPart_popup();\n }", "function makePopup (data) {\n return \"<div><strong><a href='\" + data.url + \"' target='_blank'>\" + data.title + \"</a></strong></div>\"\n + \"<div><strong>Year</strong>: \" + data.year + \"</div>\"\n + \"<div><s...
[ "0.7367818", "0.7030571", "0.6797266", "0.65307176", "0.6461937", "0.64212394", "0.6362811", "0.6342809", "0.6287266", "0.6268293", "0.6250088", "0.62496555", "0.6183345", "0.6168686", "0.6163759", "0.61378604", "0.61360407", "0.61204374", "0.61101305", "0.6104557", "0.609283...
0.0
-1
submit form with vaildation
function handleContactForm () { jQuery("form[name='form-submit']:not(.form-valid)").validate({ onkeyup: function(input){ let enableCount = 0; let checkInputs = ['first_name', 'last_name', 'email', 'phone']; jQuery("form[name='form-submit'] input").each(function(){ const $currentInput = j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function api_call() {\n $('form').submit()\n }", "function formPOST(){\n\n\tthis.submit();\n\n}", "submitForm(e) {\n e.preventDefault();\n window.M.updateTextFields();\n let data = Util.getDataElementsForm(e.target, false);\n\n MakeRequest({\n method: 'post',\n ...
[ "0.7042904", "0.69863474", "0.69626456", "0.6860408", "0.6798858", "0.6789937", "0.6748762", "0.6748762", "0.67202926", "0.6714322", "0.67120427", "0.6679768", "0.6679768", "0.6636568", "0.6636568", "0.66132855", "0.65870833", "0.6576773", "0.6558909", "0.6532109", "0.6507452...
0.0
-1
Register a user with email and password
async function register(email, password, type) { const url = '/api/User'; const data = { mail: email, password, userType: type, }; const response = await fetch(url, { method: 'PUT', mode: 'cors', cache: 'no-cache', credentials: 'same-origin', headers: { 'Content-Type': 'a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerUser(email, password) {\n firebase.auth().createUserWithEmailAndPassword(email, password).then(function(value) {\n\t// log all changes //\n console.log(\"signed up\");\n }).catch(function(error) {\n\n });\n}", "function register(email, password, username) {\n Firebase.goOnline();\n ref.c...
[ "0.80855006", "0.7919443", "0.7830914", "0.7824166", "0.7726333", "0.76350623", "0.7587419", "0.7492104", "0.74570245", "0.74570245", "0.74570245", "0.745406", "0.74431103", "0.7429601", "0.7419074", "0.7416342", "0.74134684", "0.7413001", "0.74085253", "0.74054855", "0.73802...
0.7049422
57
default error color for the labels; scrubber.Class.tables = true; //the form uses a TABLE as opposed to LABELs (just nice to have the option); /get the cookie values
function getCookies() { scrubber.Class.divCookie = document.cookie.substring(document.cookie.indexOf("div=")+4, document.cookie.indexOf(";", document.cookie.indexOf("div=")+4)); scrubber.Class.divHeaderCookie = document.cookie.substring(document.cookie.indexOf("divHeader=")+10, document.cookie.indexOf(";", docume...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setError(field, container) {\n field.classList.add('error');\n field.classList.remove('success');\n container.getElementsByClassName(\"error-label-format\")[0].classList.add('hidden');\n container.getElementsByClassName(\"error-label\")[0].classList.remove('hidden');\n}", "function errorScan...
[ "0.5628879", "0.5551511", "0.5542665", "0.54875106", "0.54667693", "0.5463308", "0.5408946", "0.54020953", "0.53956753", "0.53908515", "0.53756386", "0.53265834", "0.53259385", "0.53241", "0.530867", "0.5263324", "0.5252742", "0.52481276", "0.5236953", "0.52013487", "0.518914...
0.0
-1
Function for unique values (
function onlyUnique(value, index, self) { return self.indexOf(value) === index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unique(arr) {\n /* your code */\n}", "unique() {\n var arr = [];\n for(var i = 0; i < this.length; i++) {\n if(!arr.contains(this[i])) {\n arr.push(this[i]);\n }\n }\n return arr; \n}", "function uniteUnique() {\n var myArray = [];\n for(var element = 0; element...
[ "0.7439365", "0.7105504", "0.70539623", "0.70073926", "0.69828176", "0.69368565", "0.6931821", "0.68889374", "0.68579984", "0.6837546", "0.6819061", "0.68158174", "0.67935055", "0.6777895", "0.6775215", "0.6753344", "0.675017", "0.673639", "0.67174625", "0.6716299", "0.671231...
0.0
-1
Complete the event handler for filter
function runEnter() { // Prevent reloading d3.event.preventDefault(); // Select table and create reference to table var tbody = d3.select("tbody") tbody.html(""); // Select the input element and get value property var inputdate = d3.select("#datetime").property("value"); var inputcoun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterListener(){\n $(\"#colorFilter\").change(function(){\n populateBikeList();\n });\n $(\"#statusFilter\").change(function(){\n populateBikeList();\n });\n }", "_onFilterSelected(event) {\n this.filter = event...
[ "0.7336683", "0.72077817", "0.7009243", "0.69778055", "0.68759763", "0.6839759", "0.67763364", "0.67578703", "0.672049", "0.66921294", "0.6652779", "0.6646172", "0.66205883", "0.65895855", "0.6564143", "0.65209806", "0.6519611", "0.6472715", "0.64683557", "0.64670837", "0.646...
0.0
-1
Complete the event handler for reset
function Reset() { location.reload(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleReset() {\n\n }", "function reset(e){\n \n}", "function onReset() {\n clear();\n}", "function reset() { }", "function reset() {\n\n }", "reset() {\n\t\t//Emit event 'on reset'\n\t\tthis.emit(\"reset\");\n\n\t\tthis.log(\"Reset Stage - \" + this.name);\n\t}", "function pressReset(){\n ...
[ "0.7814039", "0.76189727", "0.7271467", "0.7073026", "0.70218575", "0.6992515", "0.6959856", "0.6942506", "0.69339323", "0.6924995", "0.6881261", "0.6768998", "0.6758715", "0.6710874", "0.6710115", "0.6685897", "0.6666315", "0.666411", "0.66457397", "0.66406935", "0.6629831",...
0.0
-1