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
This is supposed to consolidate common fields w/o revealing them. It takes care of multiple field values. For eg. if name on 3 sites is Joe and 2 others is John, it will create name1: ["site1", "site2", "site3"] name2: ["site4", "site5"]
function calculate_common_fields() { var r = get_all_pi_data(); var vpfvi = pii_vault.aggregate_data.pi_field_value_identifiers; var common_fields = {}; for (f in r) { for (v in r[f]) { var value_identifier = undefined; if (v in vpfvi) { value_identifier = vpfvi[v]; } else { va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_fields2request(includeEmpty) {\n let result = [];\n\n for (const name of this.uniqueFieldNames) {\n var newName = name;\n\n // send clonables as list (even if there's only one field) and other fields as plain values\n let potentialClones = this.fields.filter(f =>\n ...
[ "0.5619916", "0.5287326", "0.5254355", "0.518044", "0.5120531", "0.5117962", "0.5084541", "0.50548285", "0.50227296", "0.5005516", "0.5004088", "0.4993486", "0.4972472", "0.490241", "0.48945016", "0.4890567", "0.48803928", "0.4878614", "0.48611364", "0.4858207", "0.4847248", ...
0.5532337
1
END OF FPI Code START OF Password Code
function calculate_pwd_similarity(grp_name) { var pwd_similarity = pii_vault.current_report.pwd_similarity; var pwd_groups = pii_vault.current_report.pwd_groups; var total_grps = 0; for (var g in pwd_similarity) { pwd_similarity[g].push(0); total_grps++; } pwd_similarity[grp_name] = []; fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writePassword() {}", "function ChangePassword() {\n\t}", "static process_password(passwd){\n return passwd.padEnd(32, passwd) //passwd must be 32 long\n }", "function generate_password() {\n base.emit(\"generate-password\", {\n url: document.location.toString(),\n ...
[ "0.7237239", "0.6846148", "0.6846068", "0.6842233", "0.67410827", "0.66581714", "0.6628844", "0.6591153", "0.65895814", "0.65717775", "0.65686226", "0.6566629", "0.65450615", "0.6509729", "0.64774567", "0.64773583", "0.64615697", "0.6452525", "0.64434993", "0.6443209", "0.643...
0.0
-1
This function is supposed to generate group names such as 'A', 'B', .., 'AA', 'AB', 'AC' ..
function new_group_name(pwd_groups) { //Start at 'A' var init_group = 65; var new_name_detected = false; var new_name_arr = []; new_name_arr.push(init_group); while (!new_name_detected) { var char_new_name_arr = []; for (var i = 0; i < new_name_arr.length; i++) { char_new_name_arr.push(S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateGroupID() {\n\t\treturn (Math.random() * 999).toString();\n\t}", "function prefixCategoryOptionGroups() {\n\tif (!metaData.categoryOptionGroups) return;\n\tfor (var group of metaData.categoryOptionGroups) {\n\t\tgroup.name = currentExport._prefix + \" \" + group.name;\n\t}\n}", "function generateAlphab...
[ "0.6382855", "0.6330292", "0.62532586", "0.6232897", "0.6190578", "0.61847055", "0.61847055", "0.61847055", "0.61847055", "0.6146121", "0.60857606", "0.60857606", "0.60857606", "0.60857606", "0.60857606", "0.60857606", "0.60857606", "0.60857606", "0.60857606", "0.60857606", "...
0.7753008
0
Remember, this pwd is iterated over a million times. Not easy to crack
function get_pwd_group(domain, full_hash, password_strength) { var pwd_groups = pii_vault.aggregate_data.pwd_groups; var previous_group = false; var current_group = false; for (var g in pwd_groups) { if (pwd_groups[g].sites.indexOf(domain) != -1) { previous_group = g; } if (pwd_groups[g].full_h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static process_password(passwd){\n return passwd.padEnd(32, passwd) //passwd must be 32 long\n }", "function randomPwd(){\n var pwdLength = prompt(\"How many characters?\");\n var upperChar = confirm(\"Upper case characters?\");\n var specialChar = confirm(\"Special characters?\");\n var nu...
[ "0.5863184", "0.5790539", "0.5725691", "0.56372494", "0.56322855", "0.56027263", "0.5431453", "0.5406549", "0.5394577", "0.5392844", "0.5294566", "0.5292504", "0.52864057", "0.5273647", "0.5245943", "0.52408904", "0.5240287", "0.52392185", "0.52182263", "0.51995593", "0.51545...
0.0
-1
Calculates entire sha256 hash of the password. iterates over the hashing 1,000,000 times so that its really really hard for an attacker to crack it. Some backoftheenvelope calculations for cracking a password using the same cluster used in arstechnica article (goo.gl/BYi7M) shows that cracking time would be about ~200 ...
function calculate_full_hash(domain, username, pwd, pwd_strength) { var hw_key = domain + "_" + username; if (hw_key in hashing_workers) { console.log("APPU DEBUG: Cancelling previous active hash calculation worker for: " + hw_key); hashing_workers[hw_key].terminate(); delete hashing_workers[hw_key]; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fastHash(password) {\n return crypto.createHash('sha256').update(password.toString()).digest(\"hex\");\n }", "hash(username, password, iterations) {\n return Aes.utils.hex.fromBytes(Sha256.pbkdf2(this.key(username, password, iterations), ByteArray.fromString(password), 1, 32));\n }", "function SH...
[ "0.77472264", "0.74704796", "0.68856514", "0.6854732", "0.6828961", "0.6819471", "0.6819471", "0.68038625", "0.6789471", "0.67773455", "0.6776444", "0.67601156", "0.67274123", "0.67165977", "0.6711122", "0.6705384", "0.6704871", "0.66762346", "0.66523", "0.66523", "0.66430545...
0.64346105
31
First gets a different salt from the last value. Then, Calculates the super short hashsum Only count last 12bits..so plenty of collisions for an attacker
function calculate_new_short_hash(pwd, prev_salt) { //First get a salt that is not equal to prev_salt var curr_salt = prev_salt; while (curr_salt == prev_salt) { var r = Math.floor((Math.random() * 1000)) % 1000; curr_salt = pii_vault.salt_table[r]; } //Now get the short hash using salt calculate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculate_short_hash(pwd, salt) {\n //Now get the short hash using salt calculated\n var salted_pwd = salt + \":\" + pwd;\n var k = sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(salted_pwd));\n var hash_pwd = k.substring(k.length - 3, k.length);\n var rc = {\n\t'short_hash' : hash_pwd, \n ...
[ "0.70807123", "0.69053096", "0.6689671", "0.64896554", "0.64372206", "0.64352554", "0.6383274", "0.638033", "0.63542473", "0.6334163", "0.6296724", "0.62763786", "0.62681717", "0.6258082", "0.62338126", "0.6208083", "0.62007177", "0.6192447", "0.6171485", "0.6152615", "0.6145...
0.73278916
0
Calculates the super short hashsum given a salt Only count last 12bits..so plenty of collisions for an attacker
function calculate_short_hash(pwd, salt) { //Now get the short hash using salt calculated var salted_pwd = salt + ":" + pwd; var k = sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(salted_pwd)); var hash_pwd = k.substring(k.length - 3, k.length); var rc = { 'short_hash' : hash_pwd, } return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculate_new_short_hash(pwd, prev_salt) {\n //First get a salt that is not equal to prev_salt\n var curr_salt = prev_salt;\n while (curr_salt == prev_salt) {\n\tvar r = Math.floor((Math.random() * 1000)) % 1000;\n\tcurr_salt = pii_vault.salt_table[r];\n }\n\n //Now get the short hash using...
[ "0.7265873", "0.6680175", "0.65515584", "0.64110565", "0.632748", "0.63217413", "0.6301112", "0.6293531", "0.62884015", "0.62826186", "0.627014", "0.62294567", "0.6227629", "0.6218043", "0.6198331", "0.6185951", "0.614623", "0.6134158", "0.610319", "0.60551685", "0.6049774", ...
0.74395984
0
END OF Password Code START OF Blacklist Code
function pii_add_blacklisted_sites(message) { var dnt_site = message.dnt_site; var r = {}; if (pii_vault.options.blacklist.indexOf(dnt_site) == -1) { pii_vault.options.blacklist.push(dnt_site); r.new_entry = dnt_site; } else { r.new_entry = null; } console.log("New blacklist: " + pii_vaul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function confirmCode(txt) {\n\t\tvar fullHash = hash(\"Multi-Pass Salt - \"+txt);\n\t\treturn fullHash.substring(fullHash.length-4);\n\t}", "static process_password(passwd){\n return passwd.padEnd(32, passwd) //passwd must be 32 long\n }", "function generatePassword() {\n\n\n\n//prompting the user fo...
[ "0.6026811", "0.5992311", "0.5721471", "0.5712165", "0.57091814", "0.56848127", "0.5673862", "0.56640947", "0.56416243", "0.5571793", "0.55652976", "0.5557384", "0.5556953", "0.5555809", "0.5548888", "0.55458504", "0.5528871", "0.5519436", "0.55165875", "0.5509438", "0.550543...
0.0
-1
END OF Blacklist Code START OF Misc Code Function to see if Appu server is up Also tells the server that this appu installation is still running
function pii_check_if_stats_server_up() { var stats_server_url = "http://woodland.gtnoise.net:5005/" try { var wr = {}; wr.guid = (sign_in_status == 'signed-in') ? pii_vault.guid : ''; wr.version = pii_vault.config.current_version; wr.deviceid = (sign_in_status == 'signed-in') ? pii_vault.confi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRunning(req, res) {\n res.send(\"Its Alive!!!\");\n}", "function checkIfServerIsUp(server_ip_address)\n {\n \tvar is_server_up = false;\n \tconsole.log(\"Invoking a synchronous AJAX call to check for server's status ..\");\n \ttry {\n $.ajax({\n type: \"GET\",\n...
[ "0.6616564", "0.65891254", "0.65401095", "0.6455398", "0.6387666", "0.62745297", "0.6234303", "0.6193202", "0.6179587", "0.6148485", "0.6120712", "0.6115703", "0.6038705", "0.60366625", "0.602341", "0.6019539", "0.5993458", "0.59888405", "0.5969588", "0.5947656", "0.5941883",...
0.7513655
0
END OF Misc Code START OF UpdateStats Code
function init_user_account_sites_entry() { var uas_entry = {}; uas_entry.num_logins = 0; uas_entry.pwd_unchanged_duration = 0; uas_entry.pwd_stored_in_browser = 'donno'; uas_entry.num_logouts = 0; uas_entry.latest_login = 0; //Specifically naming it with prefix "my_" because it was //cre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStats()\n{\n updateGoalAttempts();\n updateShotsOnGoal();\n updateShotsOffGoal();\n updateBlockedShots();\n updateCorners();\n updateOffsides();\n updateGKSaves();\n updateFoulsCommited();\n updateFoulsReceived();\n\n updateCompletePasses();\n updateIncompletePasses(...
[ "0.8194134", "0.7530241", "0.7400833", "0.7087256", "0.7046263", "0.7034952", "0.7024674", "0.70074767", "0.6870079", "0.6845485", "0.67913896", "0.674652", "0.67213464", "0.67183614", "0.6713343", "0.67113453", "0.66795605", "0.6669361", "0.66481775", "0.662707", "0.6601899"...
0.0
-1
Aggregate data is gathered over the time unlike daily reports. Also aggregate data will contain sensitive data such as per_site_pi that is not sent to the server. Only user can view it from "My Footprint"
function initialize_aggregate_data() { var aggregate_data = {}; //When was this created? aggregate_data.initialized_time = new Date(); //Is user aware? How many times is he reviewing his own data? //This could be used as a feedback to the system about user's awareness //(hence an indirect metri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetSummary() {\n var YearQuery = '';\n if (FilterList.DashboardFilterYear === '') {\n YearQuery =\n ' business_year = ' +\n \"'\" +\n moment().utcOffset('+08:00').format('YYYY') +\n \"'\";\n } else {\n YearQuery =\n ' business_year = ' + \"'\" + Filt...
[ "0.5974392", "0.594095", "0.5920378", "0.58689076", "0.57769215", "0.57223976", "0.57133436", "0.5699888", "0.5674575", "0.56137127", "0.5535037", "0.5526437", "0.55062884", "0.5472775", "0.5439763", "0.5424515", "0.5401869", "0.5391098", "0.53871936", "0.5373135", "0.5372979...
0.7445762
0
current_report.input_fields = [ [1, new Date(1354966002000), ' 'test', 'button', 0],
function pii_log_user_input_type(message) { var total_entries = pii_vault.current_report.input_fields.length; var last_index = total_entries ? pii_vault.current_report.input_fields[total_entries - 1][0] : 0; var domain_input_elements = [ last_index + 1, new Date(), tld.getDomain(message.do...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateDefaultDetailsArray()\r\n{\r\n var current_date = new Date() ;\r\n var current_time = current_date.getTime() ;\r\n\r\n var default_form_no = current_date.getFullYear().toFixed( 0 ) ;\r\n Alloy.Globals.ShedModeDetails =\r\n {\r\n \"FORM_NO\": default_form_no , // ToString of th...
[ "0.5637057", "0.5588363", "0.5576377", "0.55255324", "0.55194706", "0.551584", "0.54450744", "0.5440085", "0.5382059", "0.5361598", "0.5327738", "0.52900213", "0.5272739", "0.5270403", "0.52629256", "0.5251821", "0.5246729", "0.5245311", "0.5244439", "0.52371335", "0.52336746...
0.5310902
11
END OF UpdateStats Code START OF Reporting Code
function pii_next_report_time() { var curr_time = new Date(); curr_time.setSeconds(0); // Set next send time after 3 days curr_time.setMinutes( curr_time.getMinutes() + 4320); curr_time.setMinutes(0); curr_time.setHours(0); curr_time.setMinutes( curr_time.getMinutes() + pii_vault.config.rep...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStats()\n{\n updateGoalAttempts();\n updateShotsOnGoal();\n updateShotsOffGoal();\n updateBlockedShots();\n updateCorners();\n updateOffsides();\n updateGKSaves();\n updateFoulsCommited();\n updateFoulsReceived();\n\n updateCompletePasses();\n updateIncompletePasses(...
[ "0.7145684", "0.66246194", "0.64329547", "0.64114493", "0.6381396", "0.6369314", "0.63612884", "0.6293869", "0.62871665", "0.6271742", "0.62272316", "0.6190304", "0.61630094", "0.6144154", "0.6106665", "0.6104366", "0.61037374", "0.60841095", "0.60564554", "0.6044697", "0.604...
0.0
-1
Probably deprecated..also f'king big names..what was I thinking?
function pii_check_if_entry_exists_in_past_profile_list(curr_entry) { for(var i=0; i < pii_vault.past_reports.length; i++) { var past_master_profile_list = pii_vault.past_reports[i].master_profile_list; for(var j = 0; j < past_master_profile_list.length; j++) { if (past_master_profile_list[j] == curr_entry) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "static final private internal function m106() {}", "transient final protected internal function m174() {}", "transient private internal function m185() {}", "protected internal...
[ "0.72012395", "0.70153606", "0.68228614", "0.68015224", "0.6735375", "0.67181647", "0.67007357", "0.66948444", "0.6635623", "0.6424343", "0.6408598", "0.640222", "0.6401879", "0.63362134", "0.6288824", "0.6287156", "0.62778556", "0.62334293", "0.6211442", "0.6134688", "0.6127...
0.0
-1
Probably deprecated..also f'king big names..what was I thinking?
function pii_check_if_entry_exists_in_past_pwd_reports(curr_entry) { var ce = {}; var ce_str = ""; ce.site = curr_entry.site; ce.other_sites = curr_entry.other_sites; ce.other_sites.sort(); ce_str = JSON.stringify(ce); for(var i=0; i < pii_vault.past_reports.length; i++) { var past_report...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "static final private internal function m106() {}", "transient final protected internal function m174() {}", "transient private internal function m185() {}", "protected internal...
[ "0.7200169", "0.70144904", "0.68214345", "0.6801084", "0.6734167", "0.6717289", "0.66999686", "0.66941327", "0.6635343", "0.64238596", "0.6407567", "0.64009297", "0.64007574", "0.6334515", "0.6287966", "0.6286348", "0.62765515", "0.62321544", "0.6210333", "0.6133756", "0.6126...
0.0
-1
Following functions are not really managing current report. Rather they update the displayed current_report on any tab if user is viewing it.
function send_pwd_group_row_to_reports(type, grp_name, sites, strength) { for (var i = 0; i < report_tab_ids.length; i++) { chrome.tabs.sendMessage(report_tab_ids[i], { type: "report-table-change-row", table_name: "pwd_groups", mod_type: type, changed_row: [ grp_name, sites.sort().j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "storeCurrentlyViewedReport() {\n const reportID = this.getReportID();\n updateCurrentlyViewedReportID(reportID);\n }", "function refreshCurrentTab() {\r\n chartAnimationReady = true;\r\n showTab(currentPage, true);\r\n}", "function stock_reports() {\n //\n reset_meat_page();\n /...
[ "0.67155343", "0.6127847", "0.5851364", "0.57509166", "0.57420653", "0.57214427", "0.56491613", "0.5638274", "0.5601469", "0.557395", "0.5543187", "0.54939914", "0.5481291", "0.54346865", "0.5394556", "0.53553957", "0.5354937", "0.53443617", "0.53352153", "0.53268355", "0.532...
0.0
-1
END OF Reporting Code START OF Util Code
function my_log(msg, error) { var ln = error.lineNumber; var fn = error.fileName.split('->').slice(-1)[0].split('/').splice(-1)[0]; console.log(fn + "," + ln + ": " + msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "static private internal function m121() {}", "function DWRUtil() { }", "transient private protected internal function m182() {}", "static final private internal function m106() {}", "t...
[ "0.7060762", "0.6922038", "0.67473304", "0.67428106", "0.6553565", "0.6511141", "0.6493171", "0.6472616", "0.6391483", "0.6388277", "0.6318973", "0.62596005", "0.62387264", "0.62007105", "0.61873996", "0.6160373", "0.6055391", "0.605386", "0.604838", "0.60331804", "0.60331804...
0.0
-1
Only useful for reading extension specific files
function read_file(filename) { var file_data = data.load(filename); return file_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fileExtension(str){\n\n // code goes here\n\n}", "getFileExtension1(filename) {\r\n return /[.]/.exec(filename) ? /[^.]+$/.exec(filename)[0] : undefined;\r\n }", "function getExtension(_filename){\n let extension =_filename.split('.');\n extension=extension[extension.length-1];\n retur...
[ "0.6619774", "0.6478976", "0.6438233", "0.6434032", "0.639619", "0.637693", "0.63752055", "0.63665426", "0.636399", "0.6337162", "0.63250667", "0.6296181", "0.6258504", "0.6244185", "0.6235741", "0.6210412", "0.6177049", "0.6175436", "0.6162403", "0.6150251", "0.61375976", ...
0.0
-1
END OF Util Code START OF Signin Code
function create_account(sender_worker, username, password) { var new_guid = generate_random_id(); var wr = { 'guid': new_guid, 'username': CryptoJS.SHA1(username).toString(), 'password' : CryptoJS.SHA1(password).toString(), 'version' : pii_vault.config.current_version } var r = request({ u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "signIn() {}", "function sign_in() {\n start();\n}", "function interactiveSignIn() {\r\n }", "function signIn(req, res, data) {\n //extract form data\n var dataObj = querystring.parse(data),\n login = dataObj.login, pw = dataObj.pw\n //attempt to sign in registered user\n dbLogin(req, res, login, pw)\...
[ "0.7495852", "0.7359", "0.7138019", "0.7068842", "0.70171005", "0.69556946", "0.6917877", "0.69121355", "0.68189925", "0.68115073", "0.67090774", "0.66729325", "0.66713935", "0.6623656", "0.6615702", "0.6602737", "0.6553545", "0.654584", "0.65361077", "0.6498028", "0.6497812"...
0.0
-1
Initializing each property. TODO: Perhaps a better way is to write a generic function that accepts property_name and property initializer for that property. It will test if property exists. If not, then call the initializer function on that property. It will shorten the code and make it decent.
function vault_init() { var vault_modified = false; my_log("vault_init(): Initializing missing properties from last release", new Error); // All top level values if (!pii_vault.guid) { //Verifying that no such user-id exists is taken care by //Create Account or Sign-in. //However, if there is a ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_initializeProperties() {}", "function init() {\n for (var k in PROPERTY) {\n var p = PROPERTY[k];\n PROPERTY_DECODE[p[0]] = [ k, p[1], p[2] ];\n }\n}", "function fv_helper_addProperties(props) {\n var key;\n\n if (this !== window) {\n for (key in props) {\n if (prop...
[ "0.64612824", "0.5962213", "0.5862964", "0.57617545", "0.57617545", "0.562477", "0.561436", "0.5610648", "0.5585682", "0.5566819", "0.55169815", "0.5485854", "0.5429811", "0.5415591", "0.54136515", "0.5411232", "0.5405818", "0.5343281", "0.5343281", "0.5343281", "0.5343281", ...
0.0
-1
Since this function is getting called async from many different points, ideally it should have a lock to avoid race conditions (and possibly corruption). However, apparently JS is threadless and JS engine takes care of this issue under the hood. So we are safe.
function vault_write(key, value) { if (value !== undefined) { if (key && key == "guid") { //my_log("APPU DEBUG: vault_write(), key: " + key + ", " + value); localStorage[key] = JSON.stringify(value); } else if (key !== undefined) { var write_key = pii_vault.guid + ":" + key; //my_log("APPU DE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Synchronized () {}", "function Synchronized () {}", "function Synchronized () {}", "static async method(){}", "async update_() {\n if (this.lockingUpdate_) {\n if (this.pendingUpdate_) {\n return;\n }\n this.pendingUpdate_ = (async () => {\n while (this.lockingUpdat...
[ "0.6491419", "0.6491419", "0.6491419", "0.5852969", "0.5718579", "0.5672407", "0.5672407", "0.55690384", "0.555606", "0.55317163", "0.5497414", "0.54947996", "0.5466264", "0.54195654", "0.5410075", "0.53771144", "0.5367348", "0.5367348", "0.53202033", "0.5318497", "0.5297434"...
0.0
-1
my_log("Here here: version: " + manifest['version']); my_log("Here here: vault_read is : " + toType(vault.vault_read)); my_log("Here here: site is : " + tld.getDomain('a.b.google.com'));
function init_environ() { //my_log("Here here: initing environ"); var pw = page_worker.Page({ contentScriptFile: [ data.url("thirdparty/voodoo1/voodoo.js"), data.url("get_environ.js") ] }); pw.port.on("got_environ", function(rc) { environ = object.extend(environ, rc); my_log...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logSiteInfo() {\n\t\tvar siteName = $(document.body).data('site-name');\n\t\tvar siteNameStyles = 'font-family: sans-serif; font-size: 42px; font-weight: 700; color: #16b5f1; text-transform: uppercase;';\n\n\t\tvar siteDescription = $(document.body).data('site-description');\n\n\t\tconsole.log('%c%s', sit...
[ "0.5750213", "0.55510026", "0.5546298", "0.5474404", "0.5468204", "0.54242617", "0.5418602", "0.53442836", "0.52644193", "0.51618147", "0.5148425", "0.5123263", "0.5113483", "0.5106254", "0.50965", "0.50959975", "0.5086063", "0.50602496", "0.50314534", "0.50115806", "0.500961...
0.0
-1
Returns a protected route that redirects if not logged in
function ProtectedRoute({ redirectTo, path, component }) { if (!firebase.auth().currentUser) { return <Redirect to={redirectTo}></Redirect>; } else { return <Route exact path={path} component={component}></Route>; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function protectRoute(req, res, next) {\n let isLoggedIn = req.session.user ? true : false;\n if (isLoggedIn) {\n next();\n }\n else {\n res.redirect('/');\n }\n}", "function protectedRoute(req, res, next) {\n if (req.session && req.session.userId) {\n next();\n } else {\n // TODO: redirect us...
[ "0.71365124", "0.7024976", "0.69397354", "0.68692005", "0.68505937", "0.68274766", "0.6802913", "0.67945087", "0.678177", "0.6755551", "0.6747091", "0.67200154", "0.6689696", "0.66874695", "0.6668729", "0.6662668", "0.6598752", "0.6581527", "0.65792596", "0.6579218", "0.65606...
0.65748066
20
var hero = gameBoard.append('circle').classed('player', true) .attr('cx', (240 gameSettings['heroWidth'])/2) .attr('cy', (125 gameSettings['heroHeight'])/2) .attr("r", 25) .attr('width', gameSettings['heroWidth']) .attr('height', gameSettings['heroHeight']) .attr('fill', heroColor) .call(drag);
function dragmove() { d3.select(this).attr('x', d3.event.x) .attr('y', d3.event.y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dragCircle()\n{\n d3.select(this).attr(\"cx\", d3.event.x)\n .attr(\"cy\", d3.event.y);\n}", "function createWorm() \n{\n\n //Create an SVG element for the worm\n var worm = svg.selectAll(\".worm\")\n .data(xyCoords)\n .enter()\n .append(\"circle\")\n .attr(\"class...
[ "0.6684478", "0.6581289", "0.6517211", "0.64990413", "0.6228767", "0.6149783", "0.6146491", "0.6145719", "0.6125714", "0.61183983", "0.603671", "0.6024318", "0.60054815", "0.5986181", "0.597015", "0.59576213", "0.59518576", "0.59331656", "0.59262705", "0.5898942", "0.5869318"...
0.57802695
27
Ticker API for Binance BTC Data
async index({request, response}) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get30DayBTCData() {\r\n\tvar result;\r\n\tvar request = new XMLHttpRequest();\r\n\trequest.open('GET',\r\n\t\t'https://min-api.cryptocompare.com/data/v2/histoday?fsym=BTC&tsym=USD&limit=30&api_key=45419ed9fb65b31861ccb009765d97bb619e9eccedc722044457d066cbfb0a8b', false)\r\n\trequest.send(null);\r\n\tresul...
[ "0.6797348", "0.67624694", "0.6644127", "0.658165", "0.6539851", "0.65306956", "0.64923173", "0.64742863", "0.6467732", "0.6405589", "0.6372627", "0.63693434", "0.6344111", "0.63280475", "0.6306575", "0.62882763", "0.62803525", "0.62518656", "0.6233387", "0.6203707", "0.61963...
0.0
-1
Default value for teamsite
receiveContentProps({ path }) { this.rootUrl = `/${path}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_defaults() {\n return {\n name: \"\",\n teams: []\n };\n }", "function defaultValue(v) { }", "function defaultCurrentSit() {\n \n if(typeof currentSituation == \"undefined\" && availableSituations.length > 0) {\n \n currentSituation = availableSituations[0];\n \n ...
[ "0.74505764", "0.5916384", "0.5887596", "0.58614117", "0.58301574", "0.575466", "0.5727864", "0.5708126", "0.567636", "0.5662723", "0.5660674", "0.5653411", "0.56449294", "0.56347644", "0.56005186", "0.5586645", "0.5571506", "0.5551669", "0.55125725", "0.5482384", "0.54822385...
0.0
-1
TIME COMPLEXITY: O(log N), N = number of nodes in heap SPACE COMPLEXITY: O(N), 2N > O(N) (2N bec recursive call stack?)
insert(val) { this.array.push(val); // push value to end of array (add node to farthest bottom left of tree) this.siftUp(this.array.length - 1); // continuously swap value toward front of array to maintain maxHeap property }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildHeap(A) {\n var n = A.length;\n for (var i = n/2 - 1; i >= 0; i--) {\n heapify(A, i, n);\n }\n}", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n ...
[ "0.68850803", "0.6470579", "0.6470579", "0.63819873", "0.63819873", "0.6373285", "0.63520163", "0.6300878", "0.6250009", "0.6194016", "0.6163549", "0.61485755", "0.6144514", "0.6124655", "0.6123824", "0.6100817", "0.6075846", "0.6018477", "0.6002931", "0.60028577", "0.5980118...
0.0
-1
helper No return value (undefined)
siftUp(idx) { if (idx === 1) return; // no need to siftUp if node is at root let parentIdx = this.getParent(idx); // grab parent node idx if (this.array[idx] > this.array[parentIdx]) { // if node is bigger than parent, we're breaking heap proprty,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnUndefined() {}", "function nothing(){// parameters are optional within functions\n return undefined // will return undefined as a single value of the function\n}", "function emptyReturn() {return;}", "get None() {}", "get None() {}", "get None() {}", "get None() {}", "value() { retu...
[ "0.70224154", "0.6653878", "0.64629", "0.64429504", "0.64429504", "0.64429504", "0.64429504", "0.64039785", "0.633543", "0.6266707", "0.6266707", "0.6266707", "0.62559164", "0.6229695", "0.6223667", "0.6223067", "0.6166459", "0.61376786", "0.61376786", "0.6111398", "0.6020592...
0.0
-1
returns deleted max value (root) in heap TIME COMPLEXITY: O(log N), N = number of nodes in heap SPACE COMPLEXITY: O(N), 2N > O(N) (2N bec recursive call stack?)
deleteMax() { // recall that we have an empty position at the very front of the array, // so an array length of 2 means there is only 1 item in the heap if (this.array.length === 1) return null; // edge case- if no nodes in tree, exit if (this.array.length === 2) return this.array.po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let c...
[ "0.72349405", "0.71611047", "0.7118273", "0.7075563", "0.7045658", "0.70281285", "0.69180804", "0.6905783", "0.68910396", "0.6877944", "0.6812218", "0.6794426", "0.67901075", "0.6739307", "0.6712732", "0.6690238", "0.6684173", "0.6665397", "0.66553473", "0.66267765", "0.65978...
0.828122
0
helper no return value
siftDown(idx) { let ary = this.array; // optional- reference to this.array w/ shorter variable name let leftIdx = this.getLeftChild(idx); // optional- grab left and right child indexes/values (easier to work w/ variable names) let rightIdx = this.getRightChild(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "function Helper() {}", "private internal function m248() {}", "protected internal function m252() {}", "function miFuncion (){}", "static private internal function m121() {}", "function TMP(){return;}", "function TMP(){return;}", "function miFuncion(){}", "fun...
[ "0.66283953", "0.636572", "0.6310107", "0.6245793", "0.6200203", "0.6197235", "0.61281204", "0.61281204", "0.60964346", "0.60964346", "0.60964346", "0.5978248", "0.59720474", "0.5928135", "0.5928135", "0.5928135", "0.5901462", "0.58703816", "0.58673716", "0.5866943", "0.58105...
0.0
-1
42 / \ 32 24 / \ / \ 30 31 20 18 / \ / 2 7 9 console.log(niceHeap.array); //=> [ null, 42, 32, 24, 30, 9, 20, 18, 2, 7 ] niceHeap.insert(31); console.log(niceHeap.array); //=> [ null, 42, 32, 24, 30, 31, 20, 18, 2, 7, 9 ] console.log(niceHeap.deleteMax()); //=> 42 console.log(niceHeap.array); //=> [ null, 32, 31, 24, 3...
function heapSort(array) { let heap = new MaxHeap(); array.forEach(num => heap.insert(num)); // 1) build heap O(N) Amortized Time let sorted = []; while (heap.array.length > 1) { // 2) continously delete max and push deleted...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\...
[ "0.8441638", "0.8383409", "0.83790016", "0.80350906", "0.79281044", "0.77813506", "0.77546066", "0.76377046", "0.7431767", "0.7415624", "0.7386157", "0.73556167", "0.73465705", "0.7266286", "0.7224221", "0.72144055", "0.7195736", "0.71639025", "0.7154635", "0.711052", "0.7098...
0.8260483
3
let arr = [ 0, 5, 1, 3, 2 ]; console.log(heapSort(arr)); //=> [ 5, 3, 2, 1, 0 ] 4) HEAP SORT V2 (Increasing order, O(1) space) 1 convert input array into maxHeap (in place), using heapify helper (similar to MaxHeapsiftDown method). This involves looping from left of array to front/right 2 diff btwn heapify and siftDown...
function heapify(array, n, i) { let leftIdx = 2 * i + 1; // 1) grab left/right indices/values of current val/node let rightIdx = 2 * i + 2; // root index is now 0 instead of 1 (no null placeholder) let left...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\...
[ "0.87359804", "0.81219524", "0.80146706", "0.799659", "0.79832715", "0.795762", "0.794475", "0.7920434", "0.78950447", "0.7670186", "0.76403815", "0.7600905", "0.7582311", "0.7546947", "0.75359094", "0.74537456", "0.7446912", "0.7415225", "0.7366461", "0.7340616", "0.7324018"...
0.7308083
21
0 1 2 3 4 [ 0, 5, 1, 3, 2 ] => [ 0, 1, 2, 3, 5 ]
function heapSortV2(array) { for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper heapify(array, array.length, i); // array length not really used for this part } f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function four(arr){\n for(var i = 0; i < arr.length; i+1){\n var temp = arr[i];\n arr[i] = arr[i+1];\n }\n return arr;\n}", "function number4(array){\n var newElements= array.pop()\n var newArr= array.splice(0,0,newElements)\n return array\n}", "function A(n,t){for(;t+1<n.length;t++)n...
[ "0.63081104", "0.61326754", "0.60628486", "0.5938526", "0.592679", "0.5871714", "0.58418727", "0.5832985", "0.5824122", "0.5813666", "0.5762824", "0.5747658", "0.5744858", "0.573617", "0.5725309", "0.5681897", "0.5673432", "0.5673305", "0.5651774", "0.56306416", "0.5604596", ...
0.0
-1
sortByProcName: This function will sort Secondary Procedures by ascending only.
function sortByProcName(a, b) {//sort by name(display_as) ascending only if (a.DISPLAY_AS.toUpperCase() > b.DISPLAY_AS.toUpperCase()) { return 1; } if (a.DISPLAY_AS.toUpperCase() < b.DISPLAY_AS.toUpperCase()) { return -1; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByProcedure(arr) {\n var procs = arr.map(getProcedure);\n for (var i = 1; i < arr.length; i++) {\n var procNew = procs[i];\n if (procNew < 0)\n continue;\n for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n var token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = ...
[ "0.7111214", "0.7082964", "0.7069585", "0.7069585", "0.7069585", "0.7069585", "0.68992424", "0.60835826", "0.60537666", "0.5901711", "0.5901711", "0.5901711", "0.5762989", "0.57432014", "0.56889117", "0.56843835", "0.56165767", "0.558956", "0.5584798", "0.55671173", "0.556494...
0.7576404
0
ProcedureRequest function will initialize a JSON object needed for sending parameters for mp_exec_std_request script
function ProcedureRequest() { this.procedure_id = 0; this.encounter_id = 0; this.active_ind = 0; this.nomenclature_id = 0; this.procedure_date = ""; this.procedure_date_precision = 0; this.procedure_date_precision_cd = 0; this.free_text = ""; this.update_cnt = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "makeRequest() {\r\n // Get Parameter Values\r\n let requestString = [];\r\n\r\n // Make Request\r\n this.getPrologRequest(requestString, this.handleReply);\r\n }", "function _getParams(funcParamObj, onExecuteComplete) {\r\n\r\n /** default object content of an operation */\r\n va...
[ "0.58154833", "0.5806335", "0.54913676", "0.54202896", "0.52524227", "0.5242344", "0.5211276", "0.51933783", "0.5171736", "0.50880027", "0.5070031", "0.5050982", "0.50502527", "0.5007911", "0.49855408", "0.49679124", "0.4946332", "0.4934465", "0.4902039", "0.4890071", "0.4876...
0.6765716
0
The retrieveContributorSystemCds function will retrieve the codes from code set 89 and store them in the shared resource for future use Since the script call is asynchronous a call back function provided will be executed once the data is retrieved
function retrieveContributorSystemCds(component, callBackFunction) { // Get contributor system codes from shared resource var contributorSystemCdResource = MP_Resources.getSharedResource("contributorSystemCodes"); if (contributorSystemCdResource && contributorSystemCdResource.isResourceAvailable()) { //At this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pollSystemCodes() {\n\t\t// Note we need to return here to allow tests\n\t\t// to hook into the promise\n\t\treturn fetchSystemCodes(options.cmdbApiKey)\n\t\t\t.then(codes => {\n\t\t\t\tvalidSystemCodes = codes.concat(options.validationExceptions);\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\t// If the pol...
[ "0.52447075", "0.5077303", "0.49935552", "0.49673036", "0.49642342", "0.4940104", "0.4933119", "0.4868681", "0.48507965", "0.48246887", "0.4806166", "0.47330528", "0.47272414", "0.46921158", "0.46838936", "0.46752548", "0.46752185", "0.46715802", "0.46340084", "0.4632241", "0...
0.8683864
0
connexion classique mail + mot de passe
function login(){ var email = document.getElementById('email_field').value; var password = document.getElementById('password_field').value; firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) { // An error happened. var errorMessage = error.message; alert("Error : " + err...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendLogin() {\n let email = document.getElementById('emailFieldLogin').value;\n let password = document.getElementById('passwordFieldLogin').value;\n\n if (!validateEmail(email)) {\n showErrorMsg(\"Email invalid\");\n } else if (!password) {\n showErrorMsg(\"Password missing\");\...
[ "0.6103988", "0.59763664", "0.5898663", "0.58332855", "0.58259565", "0.57743156", "0.57723236", "0.5727024", "0.56248724", "0.558681", "0.55587107", "0.55449337", "0.55361825", "0.55269885", "0.55223006", "0.55149406", "0.549034", "0.5486027", "0.54812807", "0.54745513", "0.5...
0.0
-1
recuperation de la liste des offres de jobs
function getJobs(){ var ref2 = firebase.database().ref("job_offers"); ref2.on('value', gotJobs, errData); console.log("ok"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getJobs () {\n }", "function loadJobs() {\n API.getAllJobs()\n .then(data => setJobList(data.data))\n .catch(err => console.log(err));\n }", "static async getAllJobs(data={}) {\n let res = await this.request('jobs/', data);\n return res.jobs;\n }", "get jobs () {\n return this._m...
[ "0.7148418", "0.7025621", "0.69584244", "0.69404244", "0.6911148", "0.6880452", "0.67893255", "0.67444444", "0.6595268", "0.65861154", "0.6584568", "0.6532439", "0.65292734", "0.6502544", "0.64014596", "0.6290411", "0.6269926", "0.6131509", "0.6109898", "0.60503525", "0.60315...
0.55048627
72
recuperation des informations personnelles de l'utilisateur
function gotData(data){ var datas = data.val(); var keys = Object.keys(datas); console.log(keys); for (var i = 0; i<keys.length; i++){ if (keys[i] == userId){ var k = keys[i]; name = datas[k].name; document.getElementById('name').innerHTML = "Name : " + name; jobs = datas[k].jobs; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProfileData() {\n // obtener los datos del usuario al iniciar sesión\n IN.API.Raw(\"people/~:(first-name,last-name,id,num-connections,picture-url,location,positions,summary,public-profile-url)\").result(onSuccess).error(onError); \n }", "function persona(usr,contra,ip,puert) {\n ...
[ "0.62847126", "0.6095938", "0.60652065", "0.5992714", "0.5962982", "0.59618694", "0.5952589", "0.59513587", "0.58936346", "0.58826435", "0.5844063", "0.58405733", "0.57527953", "0.57335365", "0.57237", "0.5664147", "0.56596655", "0.5629717", "0.561217", "0.56054175", "0.56039...
0.0
-1
modification des infos personnelles des utilisateurs
function updateUserData(){ var new_name = document.getElementById('name_change').value; if (new_name == ""){ new_name = name; } var new_jobs = document.getElementById('jobs_change').value; if (new_jobs == ""){ new_jobs = jobs; } var new_contact = document.getElementById('contact_change').value; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editInfo() {\n io.emit('usernames', userNameList);\n socket.emit('updateUser', currentUsers[socket.id]);\n }", "function User_Update_Journaux_Liste_des_journaux0(Compo_Maitre)\n{\n var Table=\"journal\";\n var CleMaitre = Compo_Maitre.getCleVal();\n var NomCleMaitre = DePrefixerChamp(Compo_Maitre...
[ "0.61846715", "0.61479354", "0.6117794", "0.6071993", "0.6060675", "0.6033535", "0.5963548", "0.59511083", "0.59008926", "0.58876836", "0.5845607", "0.5843367", "0.58278704", "0.581477", "0.5812889", "0.5808275", "0.580382", "0.57536566", "0.5745093", "0.57272017", "0.5721978...
0.0
-1
ajout d'une offre de job
function addJobOffer(){ var jobName = document.querySelector('#sample1').value; var jobCity = document.getElementById('sample2').value; var jobDuration = document.getElementById('number').value; var jobStart = document.getElementById('date').value; var jobContact = document.getElementById('sample5').value; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submit() {\n axios.post('/api/jobs', {\n company_name: company,\n job_title: job_title,\n status: status,\n color: color\n })\n .then(res => {\n props.add(res.data);\n props.hide();\n })\n }", "function ajoutPb(){\n\tlet pb=prompt('Signaler un problème ...
[ "0.64774585", "0.6394553", "0.6333703", "0.61653733", "0.6110162", "0.5982311", "0.59495217", "0.5853259", "0.5795006", "0.5778456", "0.5726513", "0.56974155", "0.56930065", "0.5677544", "0.56761664", "0.56411624", "0.5593817", "0.5591097", "0.5568247", "0.556769", "0.5566042...
0.0
-1
countdown function is evoked when page is loaded
function countdown() { if (count === 0) { scoreboard(); } if (count === 1) { scoreboard(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initCountdown() {\n\t\tconsole.log('countdown!');\n\t\tshowElement(countdown);\n\t\tvar sec = 3;\n\t\t$('.countdown h1').text('LOOK HERE!');\n\t\tvar timer = setInterval(function() {\n\t\t $('.countdown h1').animate({\n\t\t opacity: 0\n\t\t }, 1000, function() {\n\t\t $('.countdown h1'...
[ "0.7374361", "0.72822064", "0.72148097", "0.7186722", "0.7177281", "0.7176871", "0.7135527", "0.7130493", "0.71292883", "0.70448345", "0.7040736", "0.69690907", "0.69690514", "0.6960145", "0.69167423", "0.6907455", "0.687414", "0.6863684", "0.68504184", "0.6841362", "0.684051...
0.0
-1
this will stop doubling the timer further when respective hit button is pressed
function timer() { setTimeout("decrement()", 60); if (click === 0) { btn1.removeEventListener("click", timer); } if (click === 1) { btn2.removeEventListener("click", timer); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopClick(){\n clearInterval(intervalId);\n currentTime= 1;\n time.innerHTML= currentTime;\n noDanger();\n next.click();\n}", "function theFinalCountDown(){\n var timerDisplay = $(\"#timerDisplay\");\n var timeCounter= 10;\n var countDownInterval = window.setInterval(function(){\n tim...
[ "0.7086916", "0.7003422", "0.6968046", "0.69316846", "0.6838469", "0.6818079", "0.68083584", "0.67917424", "0.6781963", "0.6781121", "0.6774875", "0.6766777", "0.67615664", "0.6720698", "0.6718187", "0.670676", "0.66962636", "0.6687011", "0.66725296", "0.6663069", "0.6661286"...
0.66042143
35
Returns a random item from a given array when called. Uses Math.floor and Math.random to generate a random number from the array's length.
function getRandomItem (array) { const randomItem = Math.floor(Math.random() * array.length) return array[randomItem] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomItem(array) {\n return array[Math.floor(Math.random() * array.length)];\n }", "function getRandomItem(array) {\n return array[Math.floor(Math.random() * array.length)];\n}", "function randomItem(arr) {\n return arr[Math.floor(arr.length*Math.random())];\n}", "function rando...
[ "0.8589939", "0.8543405", "0.84198713", "0.8411864", "0.8242904", "0.8228494", "0.8228494", "0.81731963", "0.815102", "0.81372774", "0.8111017", "0.81056434", "0.81056434", "0.81027895", "0.80907637", "0.8080127", "0.8078969", "0.80689394", "0.8065756", "0.8063431", "0.805813...
0.8387497
4
Changes the background colors of various elements when called.
function changeColors (arrayOfColors, doc) { const button = document.getElementById('load-quote') const quoteBox = document.getElementById('quote-box') const header = document.getElementById('random-quotes') const buttonHeaderColor = getRandomItem(arrayOfColors) button.style.backgroundColor = buttonHeaderColo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setAllColors(){\n\tfor (i=0; i<squares.length; i++){\n\t\tsquares[i].style.background = pickColor;\n\t}\n\th1.style.background = pickColor;\n}", "function setBackground(elements) {\n elements.each(function (k, element) {\n var element = $(element);\n ...
[ "0.7469339", "0.7369226", "0.69989985", "0.6975701", "0.69386196", "0.6912672", "0.6851615", "0.6847945", "0.6797477", "0.6783347", "0.66997266", "0.66977763", "0.66920155", "0.6676432", "0.6647599", "0.66395426", "0.6634584", "0.6618205", "0.6604011", "0.66025305", "0.659671...
0.0
-1
Prints a random quote and source to the page. Calls the getRandomItemfunction and stores a quote in randomQuote. Prints to the page the random quote with the quote's source, citation, year, and tag if applicable.
function printQuote () { const randomQuote = getRandomItem(quotes) let html = `<p class="quote">${randomQuote.quote}</p> <p class="source">${randomQuote.source}` if (randomQuote.citation && randomQuote.year) { html += `<span class="citation">${randomQuote.citation}</span> <span cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printQuote() {\n\n var quote = getRandomQuote(); // Call getRandomQuote function and put the return into a variable\n\n // presentation structure\n var html = '<p class=\"quote\">' + quote.quote + '</p>';\n html += '<p class=\"source\">' + quote.source;\n if (quote.citation !== \"...
[ "0.76662225", "0.7648948", "0.76363146", "0.75433254", "0.7529829", "0.7508792", "0.74934775", "0.7486076", "0.7458956", "0.7439598", "0.743714", "0.7436879", "0.74291784", "0.74247473", "0.74184126", "0.74169546", "0.73882276", "0.7362797", "0.73611253", "0.7343178", "0.7322...
0.749463
6
Javascript that deletes local storage data so that the name will be asked again if user wants to change it
function new_name(){ localStorage.removeItem('name'); location.reload(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeOldData() {\n\tlocalStorage.clear();\n}", "clear(){\r\n\r\n localStorage.removeItem(this.name)\r\n\r\n }", "function resetLocalStorage(){\n StorageArea.remove(['username', 'freq', 'name', 'gender'], function () {\n console.log('Removed username, name, gender and freq from sto...
[ "0.79943126", "0.78904116", "0.7869835", "0.76576805", "0.76267236", "0.7625369", "0.7500418", "0.74822146", "0.74266934", "0.74051", "0.7399496", "0.7363018", "0.73619837", "0.73619837", "0.7350709", "0.7349437", "0.7339277", "0.73384535", "0.73374176", "0.73310184", "0.7331...
0.7885775
2
private static vis: Visual;
function Visual(options) { console.log('Visual constructor', options); Visual.host = options.host; this.selectionIdBuilder = options.host.createSelectionIdBuilder(); this.target = options.element; thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Object_Visual(data) {\n Object_Visual.__super__.constructor.call(this);\n\n /**\n * Indiciates if the game object is visible on screen.\n * @property visible\n * @type boolean\n */\n this.visible = true;\n\n /**\n * The object's destination rectangle on screen.\n * @property...
[ "0.6412795", "0.63840026", "0.6101102", "0.59558827", "0.59144247", "0.5860045", "0.5819913", "0.58192855", "0.57873297", "0.5782663", "0.577427", "0.5762772", "0.5742079", "0.57368773", "0.5654134", "0.5634488", "0.5607981", "0.55945486", "0.55728716", "0.55708385", "0.55388...
0.6597097
0
! Vue.js v2.4.2 (c) 20142017 Evan You Released under the MIT License.
function i(t){return void 0===t||null===t}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mounted() {\n }", "mounted() {\n\n }", "mounted() {\n\n }", "constructor() {\n this.vue = new Vue();\n }", "mounted() {\n /* eslint-disable no-console */\n console.log('Mounted!');\n /* eslint-enable no-console */\n }", "created () {\n\n }", "created () {...
[ "0.69328445", "0.68909883", "0.6867494", "0.65414625", "0.64629644", "0.63754064", "0.63754064", "0.6326233", "0.63201004", "0.63125116", "0.62708193", "0.6259883", "0.62272424", "0.62232596", "0.6221954", "0.62114173", "0.6200276", "0.61847085", "0.61762", "0.61762", "0.6157...
0.0
-1
This function check if the input has a value
function isInputTextActive () { const mdInput = document.querySelectorAll('.md-form-control .md-input-text'); for (var i = 0; i < mdInput.length; i++) { if (mdInput[i].value.length > 0) { mdInput[i].parentElement.classList.add('focus'); }else { mdInput[i].parentElement.classList.remove('focus');...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasInput_(value) {\n return value.length > 0;\n }", "function inputValueCheck(el) {\n\t \tif (el.value === '') {\n\t \t\treturn false; // If element has no value, return false\n\t \t} else {\n\t \t\treturn true;\n\t \t}\n\t }", "isValueEmpty(input) {\n return input ? true : false\n }", "funct...
[ "0.8111857", "0.78716815", "0.7745731", "0.76705307", "0.76291656", "0.75072837", "0.7404344", "0.73506147", "0.730056", "0.7245602", "0.7172446", "0.714344", "0.711454", "0.70703685", "0.7021145", "0.7003248", "0.6964873", "0.6936055", "0.693212", "0.6874725", "0.67384046", ...
0.0
-1
Toggles the collapse menu of the navbar
toggle() { this.setState({ isOpen: (!this.state.isOpen) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collapse() {\n $('.navbar-toggler').trigger('click');\n }", "function toggleMenu() {\n\t\ttoggle.classList.toggle('navbar-collapsed');\n\t\t// collapse.classList.toggle('mtn-navbar__collapse');\n\t\tcollapse.classList.toggle('in');\n\t}", "toggleMenu(collapse) {\n collapse.classList.toggl...
[ "0.82967776", "0.82390314", "0.7836361", "0.76158655", "0.74567425", "0.7431856", "0.73397756", "0.7267149", "0.7211442", "0.71399754", "0.70945776", "0.7093044", "0.70641786", "0.7049426", "0.70408", "0.7006897", "0.70055026", "0.7003146", "0.69993573", "0.6976472", "0.69709...
0.0
-1
this method works in the case where you insert at the position this.length
insert(index,value) { if (index < 0 || index>this.length){ throw new Error('Index error') } if (this.length >= this._capacity){ this._resize((this.length + 1)*Array.SIZE_RATIO) } Memory.copy(this.ptr+index+1,this.ptr+index,this.le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insert(index_num, value){\n if(index_num<0 || index_num>this.length){\n console.log(\"INSERT - false\");\n return false;\n }\n if(index_num===0){\n this.unshift(value);\n console.log(\"INSERT using UNSHIFT - true\");\n return true;\n ...
[ "0.7203813", "0.6965906", "0.6765198", "0.67382383", "0.672827", "0.66598845", "0.6654216", "0.66512036", "0.6649753", "0.6641324", "0.661329", "0.6609445", "0.6607198", "0.6600132", "0.6597229", "0.6584083", "0.6561471", "0.6547141", "0.6529939", "0.65191644", "0.649897", ...
0.6575339
16
returns array where position i is the product of all array items at position !== i
function products(arr){ let newArr = [] let p ; for (let i=0;i<arr.length;i++){ p=1 for (let j=0;j<arr.length;j++){ if (i !== j){ p = p * arr[j] } } newArr.push(p) } return newArr }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function products(arr){\n let result = [];\n for (let i = 0 ; i < arr.length; i ++ ){\n let prod = 1\n for (let j = 0; j < arr.length; j++){\n if (i !== j){\n prod *= arr[j]\n }\n }\n result.push(prod);\n }\n return result;\n\n}", "function getProductsOfAllIntsExceptAtIndex...
[ "0.7924141", "0.75988436", "0.75666434", "0.7527754", "0.75120986", "0.74601114", "0.739436", "0.7383821", "0.73430246", "0.7331095", "0.72412246", "0.7159923", "0.7079049", "0.7061158", "0.7027686", "0.6867319", "0.6836262", "0.68275666", "0.67885095", "0.6773457", "0.677215...
0.775681
1
Listen on SIGINT, SIGTERM
function controlledShutdown(signal) { console.warn(`Caught ${signal}. Removing pid-file and will then exit.`); FS.unlinkSync(pidFile); process.exit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleExits() {\r\n process.on('SIGINT', () => {\r\n logger.info('Shutting down gracefully...');\r\n this.server.close(() => {\r\n logger.info(colors.red('Web server closed'));\r\n process.exit();\r\n });\r\n });\r\n }", "setupTerminationHandlers() {\n // Process on ex...
[ "0.6797574", "0.6779071", "0.6668288", "0.64953864", "0.64800245", "0.64800245", "0.64800245", "0.64739484", "0.63946885", "0.6386353", "0.62767696", "0.6132052", "0.61204475", "0.6086918", "0.60660744", "0.60128516", "0.5998729", "0.5998729", "0.5993028", "0.59504896", "0.59...
0.0
-1
Chamada de quando o elemento for exibido na tela
componentWillMount() { axios.get(baseUrl,{ crossdomain: true }) .then(resp => { this.setState({ list: resp.data }) /**salvando dentro da lista de requisições */ }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CeEx (){\t\t// Cerrar explicación\n\tif (explicacionMostrando != ''){\n\t\tvar nodo = document.getElementById(explicacionMostrando + '_ex');\n\t\tnodo.parentNode.removeChild(nodo);\n\t}\n}", "function entramosEnEscuderia(e){\n\t\n\testamosDentroEscuderia=true;\n\t/*e.preventDefault();\n\telemento = e.ta...
[ "0.6341398", "0.627739", "0.6101217", "0.6055294", "0.6025185", "0.59946585", "0.59715515", "0.59475726", "0.5936613", "0.59285897", "0.5891073", "0.58023816", "0.5786556", "0.5768657", "0.57285595", "0.572832", "0.57169247", "0.57082736", "0.57082623", "0.56661916", "0.56551...
0.0
-1
Iteration 1: Ordering by year Order by year, ascending (in growing order)
function orderByYear(array) { let newArray = array.map(elm => { return elm }) newArray.sort((a, b) => { if (a.year > b.year) return 1 if (a.year < b.year) return -1 if ((a.year == b.year) && (a.title > b.title)) return 1 if ((a.year == b.year) && (a.title < b.title)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderByYear(someArr){\n const order = someArr.sort((a, b) => a.year > b.year ? 1 : -1)\n return order;\n}", "function orderByYear(arr) {\n let byYear = [...arr].sort((s1, s2) => {\n if (s1.year > s2.year) return 1;\n else return -1\n })\n return byYear\n}", "function order...
[ "0.72275954", "0.7135998", "0.7133108", "0.71112806", "0.7054949", "0.7049193", "0.7022546", "0.7011991", "0.70116156", "0.6954844", "0.69396275", "0.6934575", "0.69301045", "0.69145787", "0.6911264", "0.6902474", "0.68897897", "0.68856317", "0.6878473", "0.68769145", "0.6869...
0.67686546
26
Iteration 2: Steven Spielberg. The best? How many drama movies did STEVEN SPIELBERG direct
function howManyMovies(movieNum) { let dramaMovies = movieNum.filter(elm => elm.genre.includes("Drama") && elm.director === "Steven Spielberg") return dramaMovies.length }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howManyMovies(movies){\n if (movies == 0){}\n else {\n var dramaFilms = [];\n for (var i = 0; i < movies.length; i++){\n for (var j = 0; j < movies[i].genre.length; j++){\n if (movies[i].genre[j] === 'Drama'){\n dramaFilms.push(movies[i])\n }\n }\n}\n var stevenFilms = dramaFilms.filter(...
[ "0.6601088", "0.64523566", "0.63859904", "0.6343344", "0.6334379", "0.63339186", "0.6318041", "0.6316198", "0.62765855", "0.627466", "0.62453973", "0.6232094", "0.61976904", "0.61933565", "0.6190182", "0.6167203", "0.6165928", "0.61546344", "0.6128751", "0.61215264", "0.61038...
0.0
-1
Iteration 3: Alphabetic Order Order by title and print the first 20 titles
function orderAlphabetically(moviesAlph) { let alphArray = moviesAlph.map(elm => { return elm.title }) alphArray.sort((a, b) => { if (a > b) return 1 if (a < b) return -1 if (a == b) return 0 }) return alphArray.slice(0, 20) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderAlphabetically(array){\n let titles = array.map(i=>i.title)\n if (array.length <= 20) {\n for (i = 0; i<array.length; i++) {\n console.log(titles.sort()[i]);\n }\n } else {\n for (i = 0; i<20; i++) {\n console.log(titles.sort()[i]);\n }\n }\n}", "fu...
[ "0.7802424", "0.7719607", "0.7523073", "0.75131094", "0.74586827", "0.7456341", "0.74306804", "0.7410855", "0.74006325", "0.73221534", "0.7291631", "0.7289742", "0.7282026", "0.7262289", "0.7215079", "0.7188504", "0.71582454", "0.7137464", "0.7134475", "0.7132253", "0.7110948...
0.70316327
33
Iteration 4: All rates average Get the average of all rates with 2 decimals
function ratesAverage(avgRate) { if (avgRate.length === 0) { return 0; } let ratesArray = avgRate.reduce((acc, elm) => { return acc + elm.rate }, 0); return number(ratesArray / avgRate.length.toFixed(2)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ratesAverage(arr) {\n var allRates = arr.reduce(function(acc, elem) {\n return (acc += Number(elem.rate));\n }, 0);\n return parseFloat((allRates / arr.length).toFixed(2));\n}", "function ratesAverage(allRates) {\n\n if (allRates.length === 0) {\n return 0;\n }\n\n meanRates = allR...
[ "0.81201476", "0.8045915", "0.8008566", "0.79965955", "0.7941593", "0.7932597", "0.7908035", "0.79006124", "0.7883331", "0.78420365", "0.7804975", "0.7800371", "0.7782459", "0.7768673", "0.77451664", "0.7740817", "0.77304035", "0.7724927", "0.7723992", "0.77208954", "0.769589...
0.78522944
9
Iteration 5: Drama movies Get the average of Drama Movies
function dramaMoviesRate(dMovies) { let dramaMov = dMovies.filter(function (dMovie) { return dMovie.genre.includes("Drama") }) if (dramaMov.length == 0) { return 0; } else { let totalDramaRates = dramaMov.reduce(function (acc, dramaMov) { return acc + dramaMov.rate; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateMovieAverage() {\n\tfor (let i = 0; i < movies.length; i++) {\n\t\tlet sumOfRatings = movies[i].ratings.reduce((a, b) => a + b, 0);\n\t\tmovies[i].average = sumOfRatings / movies[i].ratings.length;\n\t}\n}", "function dramaMoviesRate(movies) {\n let drama = movies.filter(function(elem){\n ...
[ "0.8198215", "0.8126122", "0.80235314", "0.79801685", "0.7953655", "0.79192615", "0.78840476", "0.78715247", "0.7824512", "0.7768616", "0.77648723", "0.775556", "0.7724957", "0.7711103", "0.7704011", "0.7691488", "0.7689545", "0.76855373", "0.7682447", "0.7660273", "0.763618"...
0.0
-1
Iteration 6: Time Format Turn duration of the movies from hours to minutes;
function turnHoursToMinutes(duration) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function turnHoursToMinutes (movie){\n for (var i=0; i<movie.length;i++){\n var horas=parseInt(movie[i].duration.split(\" \")[0].toString().replace('h',''));\n var minutos=parseInt(movie[i].duration.split(\" \")[1].toString().replace('min',''));\n var tiempo=(horas*60)+minutos\n movie[i].dur...
[ "0.8079936", "0.7859964", "0.7851876", "0.78014445", "0.77884597", "0.77884597", "0.77513224", "0.76728314", "0.7625841", "0.762416", "0.76172984", "0.7615136", "0.76059455", "0.7568617", "0.75211906", "0.75048834", "0.7458502", "0.74136585", "0.74086255", "0.74062926", "0.74...
0.68605906
75
This does all the d3 drawing, I wish we could just databind in aurelia but it seems to slow right now.
scaleUpdated() { this.pointCoords = this.data.map(d=>[this.xaxis.scale(d[0]), this.yscale(d[1])]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawCanvas(arrData) {\n const W = +this.elements.$tags.contentWrap.getBoundingClientRect().width;\n const H = +this.panel.svgHeight;\n const dateFrom = this.range.from.clone();\n const dateTo = this.range.to.clone();\n\n // область визуализации с данными (график)\n const margin = this.elements.si...
[ "0.6549076", "0.64834744", "0.6460986", "0.6456793", "0.6455284", "0.6453635", "0.6431173", "0.64093983", "0.6392877", "0.63787854", "0.6356816", "0.63239366", "0.6311759", "0.6289212", "0.62745196", "0.6274105", "0.6241139", "0.6204532", "0.62030774", "0.6201816", "0.6197175...
0.0
-1
When a new async handle is created
function init(uid, handle, provider, parentId) { if (hasContext(parentId || currentUid)) { // This new async handle is the child of a handle with a context. // Set this handles context to that of its parent. contexts.set(uid, contexts.get(parentId || currentUid)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "[kSetHandle](handle) {\n const state = this[kInternalState];\n const current = this[kHandle];\n this[kHandle] = handle;\n if (handle !== undefined) {\n handle.onread = onStreamRead;\n handle[owner_symbol] = this;\n this[async_id_symbol] = handle.getAsyncId();\n state.id = handle.id(...
[ "0.6204729", "0.59472567", "0.5932039", "0.57917786", "0.5751853", "0.56844246", "0.56844246", "0.56794965", "0.56794965", "0.5599177", "0.5566484", "0.55219877", "0.54567814", "0.5456563", "0.5445722", "0.5427156", "0.5422927", "0.54227614", "0.54101485", "0.5377925", "0.537...
0.55969024
10
Before a handle starts
function pre(uid) { currentUid = uid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "preStart() {\n }", "be...
[ "0.6353478", "0.6353478", "0.6353478", "0.6353478", "0.6353478", "0.6353478", "0.6353478", "0.6353478", "0.5956316", "0.59344554", "0.5929525", "0.59088933", "0.5886011", "0.5876046", "0.5837104", "0.57874477", "0.56936026", "0.5689687", "0.5654993", "0.56520075", "0.5633241"...
0.0
-1
After a handle ends
function post() { currentUid = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onEnd() {}", "handleFinish(useful) {\n recordFinish(this.state.currentGuide.id, useful);\n closeGuide();\n }", "async end() { }", "function handleFinished() {\n resolve(Buffer.concat(_this.buffers));\n cleanup();\n }", "function HandleEnd()\n{\n this.device.close(); // clos...
[ "0.68474317", "0.6664979", "0.6641499", "0.65521944", "0.6507137", "0.6491127", "0.63348365", "0.63143176", "0.62901276", "0.6277134", "0.6264915", "0.6178254", "0.6159167", "0.6144463", "0.61310816", "0.61133814", "0.6111553", "0.60959893", "0.6052513", "0.6010353", "0.59932...
0.0
-1
When a handle is destroyed
function destroy(uid) { if (hasContext(uid)) { contexts.delete(uid); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "destroy() {\n if (!this._destroyCallback) {\n throw new Error('Destroying an inactive handle');\n }\n\n // We give the handle rather than set it as the this, because setting it as the this is @#$#@\n // confusing.\n this._destroyCallback(this, this._userData);\n\n // Releasing these will all...
[ "0.8037547", "0.70259666", "0.6890695", "0.67938477", "0.6737528", "0.661633", "0.661633", "0.6615557", "0.6578729", "0.65628374", "0.6530463", "0.652776", "0.6527581", "0.6527581", "0.6527581", "0.64884436", "0.6485455", "0.6485455", "0.6485455", "0.6485455", "0.6485455", ...
0.0
-1
const BASE_COLOR="rgb(52, 73, 94)"; const OTHER_COLOR="7f8c8d";
function handleClick(){ title.classList.toggle(CLICK_CLASS); /*const hasClass=title.classList.contains(CLICK_CLASS); if(hasClass){ title.classList.remove(CLICK_CLASS); } else{ title.classList.add(CLICK_CLASS); }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _named(str) {\r\n var c = __WEBPACK_IMPORTED_MODULE_1__colorValues__[\"COLOR_VALUES\"][str.toLowerCase()];\r\n if (c) {\r\n return {\r\n r: c[0],\r\n g: c[1],\r\n b: c[2],\r\n a: MAX_COLOR_ALPHA\r\n };\r\n }\r\n}", "function color (i){\n...
[ "0.6961668", "0.68916845", "0.6700817", "0.6678551", "0.66782284", "0.66608876", "0.6643742", "0.66131294", "0.66131294", "0.6605643", "0.6589712", "0.657579", "0.6565881", "0.65377825", "0.65377825", "0.6521719", "0.64915735", "0.6485219", "0.6475696", "0.6474047", "0.647404...
0.0
-1
THEN YOU CAN CONSUME THE ABOVE REST ENDPOINT ON THE FRONTEND IN YOUR APP
function userRequest() { $.getJSON('/users/userlist', function (data) { // For each item in our JSON, do something like render some HTML to the DOM $.each(data, function () { // mock up some html }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showEndpoint(response){\n}", "function homepage(req, res) {\n let url = `https://thesimpsonsquoteapi.glitch.me/quotes?count=10`\n\n superagent.get(url).set('User-Agent', '1.0').then(resp =>{\n\nres.render('./pages/index.ejs' , {data: resp.body});\n }).catch(err => console.log(err));\n}", "GET...
[ "0.6349256", "0.62948835", "0.620569", "0.61175245", "0.6066087", "0.60186315", "0.59338164", "0.59224004", "0.5835331", "0.5821035", "0.58198047", "0.58032036", "0.5780124", "0.57164294", "0.57122374", "0.5694852", "0.56575316", "0.56528956", "0.56261426", "0.56086445", "0.5...
0.0
-1
The purpose of mixins is to take one object and mix in the functionalities of another object jquery has its own $.extend() method that is used for the puspose of mixing functionalities
function extend(target){ //target is the target object to which we want to //add the functionalities of other objects to //extend() when invoked should take multiple //parameters...the first param is the target //object and the params starting from index 1 // are the mixin objects //if there are no mixi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Mixin() {}", "function _extend()\n {\n // copy reference to target object\n var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy, copyIsArray;\n\n // Handle a deep copy situation\n if ( typeof target === \"bo...
[ "0.71583384", "0.69417536", "0.69385594", "0.68285346", "0.6706275", "0.6662885", "0.6653502", "0.6639317", "0.6616183", "0.6616183", "0.6616183", "0.6616183", "0.6616183", "0.6616183", "0.66160655", "0.6604702", "0.6592668", "0.65924734", "0.65924734", "0.65924734", "0.65924...
0.6564246
32
Recursively finds the biggest decimal odd that is smaller than num
function findNearestLadderKey(startIndex, endIndex, num) { var middleIndex = startIndex + Math.ceil((endIndex - startIndex)/2); if((middleIndex === 0 && ladderKeys[middleIndex] > num) || (middleIndex === ladderKeys.length - 1 && ladderKeys[middleIndex] < num) || (ladderKeys[middleIndex] < num && num < l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextBigger(n){\n let arr = n.toString().split(\"\") // creates string from number and splits it to an array\n let num = -1\n for (let i = arr.length-1; i >0; i--) { // sets up loop to look for the moment when the digit to the right if \"i\" is larger than \"i\"\n if (arr[i] > arr[i-1]) {\n num ...
[ "0.6730373", "0.66105", "0.6608684", "0.63724303", "0.6371496", "0.6321737", "0.6297459", "0.6284052", "0.6275032", "0.62392884", "0.621486", "0.6196732", "0.61922294", "0.61634904", "0.61601347", "0.6152286", "0.61352134", "0.61269116", "0.6124017", "0.6110064", "0.6101486",...
0.0
-1
Does not render the description unless it is not empty. So, each item in the list will have a different height, depending on whether or not the item has a description.
render () { return (<View key={this.props.id} onLayout={this.handleOnLayout} style={this.props.style}> <Text style={styles.item}>{this.props.name}</Text> {this.props.desc && <Text style={styles.item}>{this.props.desc}</Text> } </View>); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Description(props) {\n if (clothing.desc) {\n return (<div> <SubHeading> <div> Description</div></SubHeading>\n <Desc> {clothing.desc} </Desc></div>\n\n\n );\n } else {\n return (<div></div>);\n }\n }", "function ItemDescription(props) {\n var children = props.children,\...
[ "0.66724217", "0.6530175", "0.6507974", "0.65043104", "0.64899737", "0.64899737", "0.64856285", "0.647921", "0.6452029", "0.6452029", "0.6410688", "0.6345662", "0.6345662", "0.6256617", "0.6251506", "0.6226316", "0.6226316", "0.6223395", "0.6216989", "0.6216294", "0.6212008",...
0.61509806
27
Find nearest cell to that coordinates via minimum of Euclidean distances.
function getNearestCell(x, y, cells) { var min = Infinity; var result; $.each(cells, function(index, cell) { var d = distance(x, y, cell.center_x, cell.center_y); // Update minimum. if (d < min) { min = d; result = cell; } }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nearest(from) {\n\tvar to = indexOfMin(distances[from]);\n\tif (distances[from][to] < infinDist) {\n\t\tdistances[from][to] = distances[to][from]= infinDist;\n\t\treturn to;\n\t}\n\treturn -1;\n}", "function getNeighbor(current, all) {\n 'use strict';\n var closest = -1,\n minDistance = Infinity,...
[ "0.685125", "0.67425996", "0.6669267", "0.6649439", "0.6381675", "0.63721305", "0.6362173", "0.6355284", "0.6316656", "0.6240928", "0.6228612", "0.62226576", "0.6206366", "0.6205011", "0.61719936", "0.61674714", "0.6155445", "0.6140501", "0.61386454", "0.61174345", "0.6116153...
0.82347417
0
Returns true if client is actively mining new blocks.
_mining(){ return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isOnline(lastUsed) {\n return utils.xSecondsAgoUTC(12) < lastUsed ? true : false\n }", "canBlock()\n {\n if(this.blocks < game.settings.maxBlocks)\n {\n return true;\n }\n\n return false;\n\n }", "isAvailable () {\n const lessThanOneHourAgo = (date) => {\n ...
[ "0.5999326", "0.59735894", "0.5895674", "0.5672302", "0.5659759", "0.5626051", "0.56140405", "0.56121016", "0.5603506", "0.55044883", "0.54964226", "0.54964226", "0.54964226", "0.54964226", "0.54964226", "0.54964226", "0.54964226", "0.54964226", "0.54964226", "0.54897654", "0...
0.0
-1
set up the event listener for a card. If a card is clicked: display the card's symbol (put this functionality in another function that you call from this one) add the card to a list of "open" cards (put this functionality in another function that you call from this one) if the list already has another card, check to se...
function shuffledDeck() { let shuffledDeck = shuffle(deck); $('.deck').empty(); for(let card = 0; card < shuffledDeck.length; card++) { $('.deck').append($('<li class="card"><i class="fa fa-' + shuffledDeck[card] + '"></i></li>')) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickCard(event) {\n // discard clicks on already matched or open cards\n if (event.target.nodeName === 'LI'\n && !(event.target.classList.contains(\"match\"))\n && !(event.target.classList.contains(\"open\")) ) {\n\n clickCounter += 1;\n\n if(clickCounter == 1) {\n st...
[ "0.83509505", "0.8140722", "0.80919325", "0.80569696", "0.8001356", "0.79951125", "0.7924273", "0.7889374", "0.78789896", "0.7862501", "0.78373975", "0.77550113", "0.7748669", "0.7738757", "0.7725312", "0.7721494", "0.7714245", "0.7690667", "0.7676613", "0.7667446", "0.765147...
0.0
-1
event handler for clicked card
function clickedCard() { $('li.card').on('click', function() { let openCard = $(this); toggleOpenShow(openCard); if(openCard.hasClass('open show disabled') && allOpenedCards.length < 2) { allOpenedCards.push(openCard); } matchedCard(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cardClicked(e) {\n\n const clickedCard = e.target;\n if (clickedCard.classList.contains('card') && !clickedCard.classList.contains('show')) {\n clickedCard.classList.add('show');\n addToOpenCards(clickedCard);\n }\n }", "function apply_card_event_handlers(){...
[ "0.8312875", "0.81319517", "0.81228703", "0.80927646", "0.79460865", "0.7917277", "0.7762856", "0.7724018", "0.76542777", "0.76164526", "0.75316477", "0.7515705", "0.7494764", "0.74928045", "0.74820167", "0.7470019", "0.74594855", "0.74531555", "0.7408042", "0.7392202", "0.73...
0.7702436
8
toggling open and show class on clicked card
function toggleOpenShow(card) { card.addClass('open show disabled'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openCard() {\n\t\tevent.target.classList.toggle('open');\n\t\tevent.target.classList.toggle('show');\n\t}", "function showCard(clickedCard) {\n $(clickedCard).addClass('open show');\n}", "function clickedCards(card) {\n $(card).addClass('show open');\n}", "function toggleCard() {\n\tthis.classList...
[ "0.8499252", "0.8365504", "0.83585036", "0.82536286", "0.8201574", "0.81460655", "0.8103942", "0.8103942", "0.8098911", "0.809776", "0.80665207", "0.80101484", "0.7970789", "0.7960427", "0.79336786", "0.7920794", "0.78743166", "0.78577405", "0.78483397", "0.78322405", "0.7817...
0.8375648
1
flip cards back over after modal display
function resetCards() { let cardsInDeck = $('.deck li') for(card of cardsInDeck) { card.className = 'card'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flipCardOver (clickedCard) {\n clickedCard.classList.toggle('open');\n clickedCard.classList.toggle('show'); \n}", "function flip(card){\r\ncard.target.classList.add(\"open\");\r\ncard.target.classList.add(\"show\");\r\n\r\n}", "function flip(card) {\n card.classList.toggle('open');\n card.cl...
[ "0.7347733", "0.7144152", "0.7125572", "0.7061022", "0.70547336", "0.7011751", "0.69605386", "0.69433624", "0.6926739", "0.6856992", "0.6850814", "0.68347245", "0.6827213", "0.68114984", "0.6804681", "0.6737662", "0.6736725", "0.6727424", "0.67223996", "0.67174643", "0.670717...
0.0
-1
match first card clicked to second card clicked
function matchedCard() { let firstCard = allOpenedCards[0]; let secondCard = allOpenedCards[1]; if(allOpenedCards.length === 2) { moveCounter(); scoreCheck(); if(firstCard.children().attr('class') === secondCard.children().attr('class')) { firstCard.addClass('match'); secondCard.addClass('match'); all...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function manipulateCard(event) {\n\t// Check if there is any card already clicked\n\tif (firstClickedElement === null){\n\n\t\t// No card clicked yet => store its value (class) into firstCard variable\n\t\tfirstCard = event.target.lastElementChild.getAttribute('class');\n\n\t\t// Show the card\n\t\tshowCard(event)...
[ "0.77947104", "0.7635646", "0.7528747", "0.7339774", "0.73222744", "0.7298105", "0.7261481", "0.72083944", "0.70965254", "0.70963365", "0.70742667", "0.70650405", "0.70599145", "0.70543504", "0.7036428", "0.70251215", "0.7016041", "0.7015723", "0.70014864", "0.6997069", "0.69...
0.6707762
58
count moves user make and update to screen
function moveCounter() { moveCount++; $('.moves').text(moveCount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function increaseMoveCounter() {\n state.totalMoves++;\n document.querySelector('.moves').textContent = state.totalMoves;\n }", "function updateMoves() {\n moves++;\n movesCounter.textContent = moves;\n}", "function moveCounter () {\n moves += 1;\n document.querySelector('.moves').textConten...
[ "0.7853812", "0.7808541", "0.76460904", "0.7616671", "0.7587451", "0.75746083", "0.7565361", "0.7546887", "0.75449276", "0.7528779", "0.7520808", "0.7499674", "0.7475477", "0.7448939", "0.74280125", "0.7410912", "0.7370721", "0.7339002", "0.73389035", "0.73168457", "0.7312919...
0.76627684
2
remove stars based on how many moves user make
function scoreCheck() { if(moveCount === 8 || moveCount === 16 || moveCount === 24) { removeStar(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function starCounter(moves) {\r\n if (moves >= 20 && moves <= 30) {\r\n // stars.innerHTML.remove();\r\n stars.innerHTML = star.repeat(4);\r\n } else if (moves >= 31 && moves <= 40) {\r\n // stars.innerHTML.remove();\r\n stars.innerHTML = star.repeat(3);\r\n } else if (moves >= 41 && moves <= 50) {\...
[ "0.7903617", "0.78775245", "0.7817392", "0.78047484", "0.77238584", "0.76920605", "0.76788247", "0.7649155", "0.7590312", "0.7540466", "0.7526105", "0.74457574", "0.7412945", "0.73602223", "0.7320222", "0.731811", "0.73134935", "0.7310747", "0.7249409", "0.7239241", "0.723015...
0.68883044
36
reset move count back to zero
function resetMoveCount() { moveCount = 0; $('.moves').text(moveCount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetMoves() {\n debug(\"resetMoves\");\n count = document.querySelector('.moves');\n\n count.innerHTML = \"0\";\n }", "resetState() {\n this._movements = 0;\n }", "function resetCounter() {\n numberOfMoves = 0;\n moveCounter.innerHTML = numberOfMoves;\n}", "funct...
[ "0.7635513", "0.7538035", "0.7435507", "0.74042773", "0.7306319", "0.7157502", "0.71389836", "0.7016031", "0.7010484", "0.6892859", "0.685494", "0.67444164", "0.67438745", "0.67438745", "0.67194545", "0.6632518", "0.65582544", "0.65319884", "0.6526455", "0.65249395", "0.64984...
0.7834286
0
remove star based on how many moves user make
function removeStar() { for(star of allStars) { if(star.style.display !== 'none') { star.style.display = 'none'; break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function starCount() {\n if (moveCountNum === 20 || moveCountNum === 35) {\n removeStar();\n }\n}", "function removeStar() {\n const stars = Array.from(document.querySelectorAll('.fa-star'));\n if (moves === 12 || moves === 15 || moves === 18) {\n for (star of stars){\n if (star.style.display !== ...
[ "0.76538664", "0.76076657", "0.7605075", "0.758455", "0.75703126", "0.75592345", "0.7516247", "0.74422425", "0.74289495", "0.7418153", "0.7416017", "0.74063593", "0.7231626", "0.7148592", "0.7124285", "0.7105445", "0.70814943", "0.702841", "0.7028299", "0.700433", "0.6989616"...
0.64332324
41
count how many stars left to display based on how many moves user make
function updateStar() { let starCount = 0; for(star of allStars) { if(star.hidden === false) { starCount++; } } return starCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveCount () {\n var moves = parseInt($(\".moves\").text())\n moves += 1\n $(\".moves\").text(moves)\n stars( moves )\n}", "function countStars() {\n\n if (moves <= 20) {\n stars = 3;\n } else if (moves <= 25) {\n stars = 2;\n } else {\n stars = 1;\n }\n\n display...
[ "0.7933151", "0.79283005", "0.7891076", "0.7783046", "0.77191734", "0.76528335", "0.7643846", "0.7593916", "0.7527442", "0.7516414", "0.75119305", "0.7493098", "0.7484972", "0.74546975", "0.7440623", "0.7417278", "0.7394762", "0.7394098", "0.73380494", "0.73275435", "0.728496...
0.6901675
46
restore stars count to default
function resetStar() { for(star of allStars) { star.style.display = 'inline'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetStarRating() {\n stars[1].classList.remove(\"fa-star-o\");\n stars[1].classList.add(\"fa-star\");\n stars[2].classList.remove(\"fa-star-o\");\n stars[2].classList.add(\"fa-star\");\n rating = 3;\n}", "function resetStarColors() {\n $('.star-rate').css('color', 'black');\n }...
[ "0.7508352", "0.7249987", "0.72125965", "0.7198685", "0.71526194", "0.71423477", "0.71411514", "0.7135055", "0.71320564", "0.70547706", "0.7045222", "0.70349437", "0.6987225", "0.69333035", "0.69304264", "0.69177014", "0.6892717", "0.68557566", "0.68507874", "0.6833608", "0.6...
0.6861697
17
start a timer once the game loads
function startTimer() { time = 0; countUp = setInterval(function () { time++; displayTimer(); }, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startTimer() {\n\tgameData.timer = setInterval(timerData.timeCounter, 1000);\n}", "function start(data) {\n startGameTimer();\n}", "function startGame() {\n timerStat = true;\n showGamePanel();\n runTimer();\n displayImage();\n}", "function gameStart(){\n\t\t\tshuffleCards();\n\t\t\tt...
[ "0.78974557", "0.7727225", "0.76524043", "0.7542344", "0.7488791", "0.7340845", "0.732516", "0.73242277", "0.73122287", "0.73114747", "0.7294211", "0.7273359", "0.7237607", "0.7219074", "0.7194123", "0.71939105", "0.71915674", "0.71911687", "0.71771586", "0.71349347", "0.7090...
0.0
-1
stop timer when user win
function stopTimer() { clearInterval(countUp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopTimer() {\n if (!stoptime) {\n stoptime = true;\n }\n}", "function stopTimer() {\n // check timer is on or off\n if (stopTime == false) {\n stopTime = true;\n }\n }", "function stopTimer(){ clearInterval(interval)}", "function breakTimer() {}", "function stopTimer...
[ "0.73457396", "0.72465724", "0.72084236", "0.7204068", "0.7135043", "0.70913154", "0.7090592", "0.70748055", "0.7052787", "0.7048408", "0.7041365", "0.70258296", "0.69861686", "0.6981033", "0.6980792", "0.6971905", "0.69695824", "0.69453716", "0.6935854", "0.69013435", "0.689...
0.6921759
19
displaying timer with live update
function displayTimer() { let clock = $('.timer').text(time); let mins = Math.floor(time / 60); let secs = time % 60; if(secs < 10) { clock.text(`${mins}:0${secs}`); } else { clock.text(`${mins}:${secs}`); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTimerDisplay(){\n // Update current time text display.\n $('#current-time').text(formatTime( player.getCurrentTime() ));\n $('#duration').text(formatTime( player.getDuration() ));\n }", "function updateTimerDisplay(){\n // Update current time text display.\n $('#curre...
[ "0.8108987", "0.8053087", "0.79875094", "0.78876555", "0.7877026", "0.7836753", "0.77575207", "0.76473975", "0.76145405", "0.75946945", "0.75683683", "0.7521375", "0.7513487", "0.7442374", "0.740356", "0.73958313", "0.7374653", "0.7365908", "0.7354137", "0.7297008", "0.728948...
0.6841012
81
reset the timer to start counting time from the beginning
function resetTimer() { stopTimer(); timeStart = true; time = 0; displayTimer(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetTimer() {\n this.timeSelected = 0;\n this.completeElapsed = 0;\n this.complete = false;\n }", "reset() {\n this.stop();\n $(this._timerElemjQuery).text(\"00\");\n this._start = null;\n this._duration = 0;\n }", "reset() {\n this.stop();\n ...
[ "0.8165589", "0.8099327", "0.8099327", "0.7967145", "0.7961562", "0.79461545", "0.79386926", "0.7879661", "0.78262764", "0.7717204", "0.7717105", "0.7710925", "0.7660638", "0.76589066", "0.76543236", "0.75742245", "0.75660044", "0.7560766", "0.75526357", "0.7541143", "0.75276...
0.79940706
3
toggle modal on or off
function toggleModal() { $('.modal-results').toggleClass('show-modal'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggle() {\r\n setModal(!modal)\r\n }", "toggleModal () {\n\t\tthis.model.toggleModalState();\n\t\tthis.view.toggleModal( this.model.isModalOpen )\n\t}", "toggle() {\n this.setState({\n modal: !this.state.modal\n });\n }", "toggle() {\n this.setState({\n ...
[ "0.8614924", "0.78581", "0.7577401", "0.7509253", "0.7509253", "0.7470424", "0.7466745", "0.74192214", "0.74085176", "0.73702323", "0.732111", "0.732111", "0.72533655", "0.7232697", "0.72234124", "0.72224724", "0.7196147", "0.7166964", "0.7128359", "0.7122359", "0.7122359", ...
0.7193635
17
update modal with results
function updateModal() { let newTime = $('.timer').text(); let newStars = updateStar(); $('.modal-time').text(`Time: ${newTime}`); $('.modal-moves').text(`Moves: ${moveCount}`); $('.modal-stars').text(`Stars: ${newStars}`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function view_update_modal(id_table, url) {\n $(`#${id_table} tbody`).on('click', '.btn-info', function() {\n const id = $(this).data('id');\n const response = get(`${url}${id}`);\n response.then((res) => {\n load_preloader_container(res.form.id, 10);\n $('#modal_updat...
[ "0.70432013", "0.67155415", "0.6565725", "0.6510939", "0.64728963", "0.6413299", "0.63912356", "0.6362877", "0.63580984", "0.6355751", "0.6333586", "0.6310187", "0.6285229", "0.62677604", "0.6260749", "0.62368536", "0.62367016", "0.6213442", "0.61973274", "0.6185287", "0.6164...
0.65053934
4
function to reset game
function restartGame() { allOpenedCards.length = 0; resetTimer(); resetMoveCount(); resetStar(); resetCards(); toggleModal(); init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetGame() {\n resetClockAndTime();\n resetMoves(); \n resetRatings();\n startGame();\n}", "function resetGame() {\n resetClockAndTime();\n resetMoves();\n resetStars();\n initGame();\n activateCards();\n startGame();\n}", "function reset() {\n //Reset the game\n c...
[ "0.8925137", "0.8868678", "0.8839611", "0.88265324", "0.87974507", "0.87514013", "0.8715469", "0.8713044", "0.8680245", "0.8623561", "0.8620319", "0.8616942", "0.85936975", "0.8580226", "0.8546222", "0.85140723", "0.85026693", "0.84723043", "0.84667", "0.8462359", "0.8455414"...
0.0
-1
function to stop the game once the user win and toggle the modal to show result
function gameOver() { stopTimer(); updateModal(); toggleModal(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winGame() {\n stopTimer();\n toggleModal();\n}", "function continueGame() {\n // clear modal\n $(\".modal\").removeClass(\"bg-modal\");\n $(\".modal-inner\").removeClass(\"modal-content\").html(\"\");\n // has endgame condition been reached\n if (selectedGlyphs.l...
[ "0.79958755", "0.7674914", "0.7590692", "0.7562863", "0.75202096", "0.7463216", "0.74332577", "0.7370642", "0.736813", "0.73266023", "0.7278763", "0.7268241", "0.7261297", "0.72610885", "0.7241172", "0.72255564", "0.72160333", "0.72023773", "0.7202213", "0.7199982", "0.719157...
0.73718977
7
TODO: Clean this crap up
async reAuthorize(user, pass, options) { return new Promise((resolve, reject) => { puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']}).then(async browser => { try { const page = await browser.newPage(); try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "static private internal function m121() {}", "transient protected internal function m189() {}", "static final private internal ...
[ "0.6629856", "0.64722884", "0.6315378", "0.59493625", "0.58367836", "0.58133566", "0.5773609", "0.57577735", "0.5658787", "0.5511058", "0.5473137", "0.54320234", "0.5384917", "0.53504694", "0.53492665", "0.53312796", "0.5299023", "0.52425486", "0.5214896", "0.5134584", "0.510...
0.0
-1
TODO: OBJECT FOR MAPPING OWNERS TO TEAM
mapTeamData(team, ownersList) { const owners = ownersList.filter(owner => owner.team.id == team.id).map(ownerObj => { const owner = Object.assign({}, ownerObj); const name = owner.name.split(' '); owner.isLeagueManager = owner.commissioner == 1; owner.displayName ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get owners() {\r\n return new Owners(this);\r\n }", "function getProjectMembersOrTenderers() {\n $scope.membersList = $rootScope.getProjectMembers(people);\n $scope.tags = [];\n _.each($rootScope.currentTeam.fileTags, function(tag) {\n $scope.tags.push({name: tag, select...
[ "0.6072791", "0.60671264", "0.5977277", "0.58441657", "0.5806571", "0.572325", "0.57117057", "0.57033056", "0.57033056", "0.56819993", "0.56730604", "0.5668324", "0.5668324", "0.5668324", "0.5668324", "0.5668324", "0.5668324", "0.5668324", "0.5668324", "0.5668324", "0.5668324...
0.6414082
0
P R I V A T E
async getAllTokens(page, options) { const tokens = []; let teamsList = await page.$$(`${CbsAPI.teams.prefixSelector}${options.sport}${CbsAPI.teams.suffixSelector}`); console.log(`[cbs api] - found ${teamsList.length} team(s)`); const hrefs = []; for (let i = 0; i < teamsList.leng...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient protected internal function m189() {}", "static private internal function m121() {}", "transient private protected internal fun...
[ "0.6497584", "0.6456844", "0.60105735", "0.6008095", "0.5982573", "0.59378886", "0.5866038", "0.5724313", "0.5679906", "0.564659", "0.5587861", "0.55853236", "0.55626935", "0.55626935", "0.55626935", "0.55626935", "0.55626935", "0.55626935", "0.55626935", "0.55626935", "0.556...
0.0
-1
Function plots cartesian coordiate system
function plotCartesian(x,y,z, target){ let hoverlabel = ["X: "+x[0]+", Y: "+y[0]+", Z: "+z[0],"X: "+x[1]+", Y: "+y[1]+", Z: "+z[1]]; var data = [{ type: 'scatter3d', mode: 'lines', x: x, y: y, z: z, hoverinfo: 'text', hovertext: hoverlabel, opacity: 1, line: { width: 6, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawCartesianOverlay() {\n \"use strict\";\n //Draw heavier black lines for grid\n ctx.beginPath();\n ctx.moveTo(0.5, 300.5);\n ctx.lineTo(800.5, 300.5);\n ctx.moveTo(400.5, 0.5);\n ctx.lineTo(400.5, 600.5);\n ctx.strokeStyle = 'black';\n ctx.lineWidth = 1.0;\n ctx.stroke();\...
[ "0.606524", "0.58996356", "0.5816983", "0.5802485", "0.5684464", "0.56714755", "0.5637831", "0.5623183", "0.55911744", "0.55853385", "0.5572179", "0.55446523", "0.553017", "0.5528281", "0.5513845", "0.5494181", "0.54765886", "0.5468272", "0.5444749", "0.5409388", "0.54050297"...
0.5585903
9
Function plots Cylindrical coordiate system
function plotCylindrical(r,theta,z, target){ console.log(r,theta,z,target); let hoverlabel = ["R: "+r[0]+", Θ: "+theta[0]+", Z: "+z[0],"R: "+r[1]+", Θ: "+theta[1]+", Z: "+z[1]]; var data = [{ type: 'scatter3d', mode: 'lines', x: r, y: theta, z: z, hoverinfo: 'text', hovertext: hoverla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "plotCyclists() {\n for (let c of this.mapCyclists) {\n if (c.cyclist.id.id == \"0_ghost\" || c.cyclist.id.id == \"ghost\") {\n c.plotGhost(this.map);\n } else {\n c.plotMarker(this.map);\n }\n }\n }", "axisPlot() {\n this.ctx ...
[ "0.5888707", "0.5736098", "0.56165415", "0.5589112", "0.55744106", "0.55394167", "0.5459294", "0.5414624", "0.5414624", "0.5370074", "0.53614116", "0.5356966", "0.53366965", "0.5328876", "0.5309544", "0.53041136", "0.5301971", "0.5296474", "0.5284543", "0.5255541", "0.5231733...
0.5288344
18
Function plots Spherical coordiate system
function plotSpherical(r, theta, phi, target){ let hoverlabel = ["R: "+r[0]+", Θ: "+theta[0]+", Φ: "+phi[0],"R: "+r[1]+", Θ: "+theta[1]+", Φ: "+phi[1]]; var data = [{ type: 'scatter3d', mode: 'lines', x: r, y: theta, z: phi, hoverinfo: 'text', hovertext: hoverlabel, opacity: 1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSphere(gl) {\n\tdrawCircle(gl);\n\tdrawMarks(gl);\n}", "function drawSphere() {\n setMV();\n Sphere.draw();\n}", "function drawSphere() {\n setMV();\n Sphere.draw();\n}", "function spherical(cartesian) {\n return [Object(__WEBPACK_IMPORTED_MODULE_1__math__[\"g\" /* atan2 */])(cartes...
[ "0.64300853", "0.631371", "0.631371", "0.6163995", "0.60776424", "0.6008311", "0.59189767", "0.58383954", "0.58289444", "0.5808101", "0.5748349", "0.5744434", "0.56139386", "0.56059897", "0.5590826", "0.5570486", "0.55594295", "0.5548546", "0.5505314", "0.54518604", "0.544912...
0.6640652
0
\ ROUTE MAP /\
function checkDataForInsert(req, res, next) { let data = req.body if (!req.user.id || !data.topic_id || !data.msg) { res.resp(403, errmsg.MISSING_DATA) } else { if (data.msg.match(regex.string_blank)) { res.resp(403, errmsg.BLANK_STRING) } if (data.msg.length > global.limit.msg) { res.resp(403, errmsg....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function map() {\n\n}", "function MAP() {\n\n}", "function Map() {}", "function Map() {\n\t\n}", "function Map() {\n\t\n}", "function PathMapper() {\n\t}", "function PathMapper() {\n\t}", "function ParamMap() { }", "function ParamMap() { }", "function ParamMap() {}", "function ParamMap() {}", ...
[ "0.68645376", "0.6628688", "0.65455055", "0.6352502", "0.6352502", "0.6338502", "0.6338502", "0.63022685", "0.63022685", "0.62968117", "0.62968117", "0.61751074", "0.6137952", "0.6093293", "0.60596484", "0.6041014", "0.5973534", "0.59055483", "0.5819673", "0.5810476", "0.5810...
0.0
-1
Getter for quantity If _value is an instance of Quantity, will return object with properties number and unit Otherwise return null;
get quantity() { if (this._observation.dataValue && this._observation.dataValue.value instanceof Quantity) { return { number: this._observation.dataValue.value.number.decimal, unit: this._observation.dataValue.value.units.coding.codeValue.value, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get valueQuantity () {\r\n\t\treturn this._valueQuantity;\r\n\t}", "get valueQuantity () {\r\n\t\treturn this.__valueQuantity;\r\n\t}", "get quantity() {\n\t\treturn this.__quantity;\n\t}", "get quantity() {\n\t\treturn this.__quantity;\n\t}", "get quantity() {\n\t\treturn this.__quantity;\n\t}", "functi...
[ "0.73006326", "0.7286378", "0.70620376", "0.70620376", "0.70620376", "0.6507041", "0.64678663", "0.6447228", "0.64377165", "0.6419223", "0.6379325", "0.63425386", "0.6100222", "0.6005071", "0.58844334", "0.5869871", "0.5835774", "0.583076", "0.58057064", "0.57182", "0.5714805...
0.8323964
0