commit stringlengths 40 40 | subject stringlengths 1 1.49k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | new_contents stringlengths 1 29.8k | old_contents stringlengths 0 9.9k | lang stringclasses 3
values | proba float64 0 1 |
|---|---|---|---|---|---|---|---|
b926723724dfdd4563ca31b7abfaa16943a2e507 | read api key from environment | server/routes/spotsHW.js | server/routes/spotsHW.js | var express = require('express');
var uuid = require('uuid');
var router = express.Router();
var SPOTS_API_KEY = process.env.SPOTS_API_KEY;
console.log("Using SPOTS_API_KEY = %s", SPOTS_API_KEY)
router.post('/update/:key/:lotID/:spotID/:vacancy/:cardID?', (req, res, next) => {
console.log(req.params);
key = req.p... | var express = require('express');
var uuid = require('uuid');
var router = express.Router();
var SPOTS_API_KEY;
if(process.env.BUILD == 'development') {
SPOTS_API_KEY = '1234';
} else {
SPOTS_API_KEY = uuid();
}
console.log("Using SPOTS_API_KEY = %s", SPOTS_API_KEY)
router.post('/update/:key/:lotID/:spotID/:vacan... | JavaScript | 0 |
370e4f4b2d9c7c7449389f3d47c5d985af8ee4b9 | add event for left arrow | Animals/js/main.js | Animals/js/main.js | //create a new Game instance
//set the game dimensions and set the Phaser.AUTO (OpenGL or Canvas)
var game = new Phaser.Game(640, 360, Phaser.AUTO);
//create a game state (this contains the logic of the game)
var GameState = {
//assets are loaded in this function
preload: function(){
//load ... | //create a new Game instance
//set the game dimensions and set the Phaser.AUTO (OpenGL or Canvas)
var game = new Phaser.Game(640, 360, Phaser.AUTO);
//create a game state (this contains the logic of the game)
var GameState = {
//assets are loaded in this function
preload: function(){
//load ... | JavaScript | 0.000001 |
4ef671e04c87c671bc6c9950cd5e5334553c906d | Fix syntax error according to eslint | modules/core/client/app/init.js | modules/core/client/app/init.js | 'use strict';
//Start by defining the main module and adding the module dependencies
angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);
// Setting HTML5 Location Mode
angular.module(ApplicationConfiguration.applicationModuleName).config(['$loc... | 'use strict';
//Start by defining the main module and adding the module dependencies
angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);
// Setting HTML5 Location Mode
angular.module(ApplicationConfiguration.applicationModuleName).config(['$loc... | JavaScript | 0.000675 |
31e4bddbca6b5e50a4958a956a48bdbf61045086 | Fix lint errors | lib/index.js | lib/index.js | // TODO: ES2015 maybe, baby?
var rollup = require('rollup');
var babel = require('rollup-plugin-babel');
var camelCase = require('camel-case');
var formats = ['es6', 'cjs', 'umd'];
module.exports = function rollupLib(options) {
var rollupOptions = Object.assign({}, options);
var baseConfig = {};
var builds = [... | // TODO: ES2015 maybe, baby?
var rollup = require('rollup');
var babel = require('rollup-plugin-babel');
var camelCase = require('camel-case');
var pkg = require('./package.json');
var name = pkg.name;
var moduleName = 'ReactLibStarterkit';
var formats = ['es6', 'cjs', 'umd'];
module.exports = function(options) {
... | JavaScript | 0 |
6fb41f60c91166c9f72e3f32ac78dafa617bf5a8 | allow remote connections for socket | server/static/js/main.js | server/static/js/main.js | $(document).ready(function(){
var ws = new WebSocket('ws://' + window.location.hostname + ':9010');
ws.onopen = function(){
enableKeys();
$('#socket-status').removeClass('label-default label-success label-danger')
.addClass('label-success')
.text('online');
};
ws... | $(document).ready(function(){
var ws = new WebSocket('ws://127.0.0.1:9010');
ws.onopen = function(){
enableKeys();
$('#socket-status').removeClass('label-default label-success label-danger')
.addClass('label-success')
.text('online');
};
ws.onerror = function(){
... | JavaScript | 0 |
035b23de64769966fc68e28f752311b40f0f11a0 | Flairs should be lowercase | modules/flair/DestinyTheGame.js | modules/flair/DestinyTheGame.js | const base = require( './base.js' );
module.exports = Object.assign( {}, base, {
isDev: function isDev ( user ) {
if ( !user[ this.type ] ) {
return false;
}
for ( const flairString of this.list ) {
if ( user[ this.type ].includes( flairString ) ) {
... | const base = require( './base.js' );
module.exports = Object.assign( {}, base, {
isDev: function isDev ( user ) {
if ( !user[ this.type ] ) {
return false;
}
for ( const flairString of this.list ) {
if ( user[ this.type ].includes( flairString ) ) {
... | JavaScript | 0.999999 |
94abbde4e9a58168089cb802c84f621420e5a2fa | Fix emit name | lib/index.js | lib/index.js | 'use strict';
var rump = module.exports = require('rump');
var configs = require('./configs');
var originalAddGulpTasks = rump.addGulpTasks;
// TODO remove on next major core update
rump.addGulpTasks = function(options) {
originalAddGulpTasks(options);
require('./gulp');
return rump;
};
rump.on('update:main', ... | 'use strict';
var rump = module.exports = require('rump');
var configs = require('./configs');
var originalAddGulpTasks = rump.addGulpTasks;
// TODO remove on next major core update
rump.addGulpTasks = function(options) {
originalAddGulpTasks(options);
require('./gulp');
return rump;
};
rump.on('update:main', ... | JavaScript | 0.000007 |
69c04f13abf149f929c9c248e123cadb3e5b35c2 | Update elite flairs | modules/flair/EliteDangerous.js | modules/flair/EliteDangerous.js | module.exports = {
getFlairs: function getFlairs () {
return this.list;
},
list: [
'bot img',
'cmdr img aduval',
'cmdr img alduval',
'cmdr img alliance',
'cmdr img antal',
'cmdr img cobra',
'cmdr img combat',
'cmdr img coredyn',
... | module.exports = {
getFlairs: function getFlairs () {
return this.list;
},
list: [
'bot img',
'cmdr img alliance',
'cmdr img cobra',
'cmdr img empire',
'cmdr img federation',
'cmdr img sidey',
'cmdr img skull',
'cmdr img viper',
... | JavaScript | 0 |
941049a2cabb292f189a4496589eac834a5cf68f | Improve documentation | panopticon.js | panopticon.js | /*
Example schema:
var personSchema = mongoose.Schema({
name: String,
email: String,
pets: [{
name: String
}]
});
var pn = require('panopticon');
var rules = {
'name': function(newValue) {
this // the document at the point of post-save
},
'email': {
'surname': function() {
... | /*
Example schema:
var personSchema = mongoose.Schema({
name: String,
email: String,
pets: [{
name: String
}]
});
var pn = require('panopticon');
var rules = {
'name': function(newValue) {
this // the document at the point of post-save
},
'email': {
'surname': function() {
... | JavaScript | 0.000004 |
12643745c29f46b214074383b2bd8c3a22b9b8ae | fix bug in usaa scrape/example | service/examples/usaa.js | service/examples/usaa.js | var Nightmare = require('nightmare');
var nightmare = Nightmare({ show: false, frame: false });
var path = require('path');
var getPrivateInfo = require('./getPrivateInfo').usaa;
nightmare
.goto('https://mobile.usaa.com/inet/ent_logon/Logon?acf=1')
.click('#logOnButton a')
.type('input#input_onlineid', getPrivat... | var Nightmare = require('nightmare');
var nightmare = Nightmare({ show: false, frame: false });
var path = require('path');
var getPrivateInfo = require('./getPrivateInfo').usaa;
nightmare
.goto('https://mobile.usaa.com/inet/ent_logon/Logon?acf=1')
.click('#logOnButton a')
.type('input#input_onlineid', getPrivat... | JavaScript | 0 |
183654150e87967e8d94a93fb39157061b5a970d | remove alert | PlatformProject.AdminConsole/app/Controllers/TenantController.js | PlatformProject.AdminConsole/app/Controllers/TenantController.js | angular.module('admin').controller('tenantController', ['$scope', '$window', 'TenantService', 'SharedServices', function ($scope, $window, TenantService, SharedServices)
{
$scope.isFormMode = false;
$scope.isEdit = false;
loadRecords();
//Function to load all Tenant records
function loadRecords() ... | angular.module('admin').controller('tenantController', ['$scope', '$window', 'TenantService', 'SharedServices', function ($scope, $window, TenantService, SharedServices)
{
$scope.isFormMode = false;
$scope.isEdit = false;
loadRecords();
//Function to load all Tenant records
function loadRecords() ... | JavaScript | 0.000001 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.