commit stringlengths 40 40 | subject stringlengths 1 3.25k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | old_contents stringlengths 0 26.3k | lang stringclasses 3
values | proba float64 0 1 | diff stringlengths 0 7.82k |
|---|---|---|---|---|---|---|---|
cce74e19f07b330eff284585fa74fee6bda88515 | remove unused string template | packages/entity-browser/src/routes/detail/modules/sagas.js | packages/entity-browser/src/routes/detail/modules/sagas.js | import {call, put, fork, select, takeLatest, all} from 'redux-saga/effects'
import * as actions from './actions'
import {fetchModel} from '../../../util/api/entities'
import parseUrl from '../../../util/parseUrl'
import doShowBackButton from '../../../util/showBackButton'
import detail from '../../../util/detail'
expo... | JavaScript | 0.000002 | @@ -1011,27 +1011,24 @@
mName =
-%60$%7B
formBase
%7D%60%0A%0A if
@@ -1019,18 +1019,16 @@
formBase
-%7D%60
%0A%0A if (
|
7e5e73dd24dbbc0aa4bbe80ca597cba6962b35ca | use set zoom factor instead | assets/js/plugin-preload.js | assets/js/plugin-preload.js | const { remote } = require('electron')
const ROOT = remote.getGlobal('ROOT')
const MODULE_PATH = remote.getGlobal('MODULE_PATH')
const APPDATA_PATH = remote.getGlobal('APPDATA_PATH')
const config = remote.require('./lib/config')
require('module').globalPaths.push(MODULE_PATH)
require('babel-register')(require(`${ROOT}... | JavaScript | 0 | @@ -588,40 +588,59 @@
%7B%0A
-document.body.style.zoom =
+remote.getCurrentWebContents().setZoomFactor(
value
+)
%0A%7D%0A%0A
|
20566c566838d890673e2de78d53ceaf5af0a4a0 | fix bug of colorless card not showing (#1395) | backend/boosterGenerator.js | backend/boosterGenerator.js | const {getCardByUuid, getSet, getBoosterRules} = require("./data");
const logger = require("./logger");
const weighted = require("weighted");
const {sample, sampleSize, random, concat} = require("lodash");
const makeBoosterFromRules = (setCode) => {
const set = getSet(setCode);
if (!set) {
throw new Error(`${s... | JavaScript | 0 | @@ -2418,28 +2418,24 @@
fCardsToPick
- - n
,%0A %7D;%0A con
|
47f800d303fe747324d0b45921ebdc9eb6977b94 | Add method to kill running service | app/utils/service-runner.js | app/utils/service-runner.js | import EventEmitter from 'events';
import { fork } from 'child_process';
import path from 'path';
export default class ServiceRunner extends EventEmitter {
constructor (name, data) {
super();
this.name = name;
this.data = data || {};
}
start () {
// Set an unused port number.
// process.exec... | JavaScript | 0.000001 | @@ -242,16 +242,95 @@
%7C%7C %7B%7D;%0A
+ this.running = false;%0A this.killed = false;%0A this.theProcess = null;%0A
%7D%0A%0A s
@@ -667,21 +667,31 @@
%60);%0A
-let p
+this.theProcess
= fork(
@@ -734,25 +734,39 @@
null;%0A%0A
-p
+this.theProcess
.on('message
@@ -934,17 +934,31 @@
);%0A%0A... |
747cdd34be505501d1dac3b78ca0de5caf22b063 | Use " instead of ' | app/view/grunt/modernizr.js | app/view/grunt/modernizr.js | /*
* MODERNIZR: Modernizr builder
*/
module.exports = {
prepare: {
devFile: "remote",
outputFile: "lib/tmp/modernizr-custom.js",
extra: {
touch: true,
shiv: true,
cssclasses: true,
load: false
},
extensibility: {
t... | JavaScript | 0.001131 | @@ -87,16 +87,16 @@
le:
-%22
+'
remote
-%22
+'
,%0A
@@ -113,17 +113,17 @@
utFile:
-%22
+'
lib/tmp/
@@ -145,9 +145,9 @@
m.js
-%22
+'
,%0A
|
9cfcb2d3b61a1e56e6caf5c48ceec497e97f5794 | use different columns for literal test | test/model/findAll/order.test.js | test/model/findAll/order.test.js | 'use strict';
var chai = require('chai')
, Sequelize = require('../../../index')
, expect = chai.expect
, Support = require(__dirname + '/../../support')
, DataTypes = require(__dirname + '/../../../lib/data-types')
, dialect = Support.getTestDialect()
, config = require(__dirname + '/../../config/config')... | JavaScript | 0.000034 | @@ -2609,24 +2609,58 @@
e('user', %7B%0A
+ name: DataTypes.STRING
%0A %7D
@@ -4151,18 +4151,20 @@
l('ASC,
-id
+name
DESC')%5D
|
df18cb67e6c36291a9933fdffed1433f347a1d6c | Fix error | src/shared/components/App/bits/mobile-nav.js | src/shared/components/App/bits/mobile-nav.js | import React, { Component } from 'react';
// Utils
import * as _ from "lodash";
// App
export default class MobileNav extends Component {
constructor(props) {
super(props);
this.state = {
}
}
componentDidMount() {
}
render() {
return (
<div>
{/* Mobi... | JavaScript | 0.000004 | @@ -68,16 +68,268 @@
rom
-%22
+'
lodash
-%22
+';%0A%0Aimport %7B Link %7D from 'react-router';%0Aimport Scroll from 'react-scroll';%0Aconst LocalLink = Scroll.Link;%0Aconst Element = Scroll.Element;%0Aconst Events = Scroll.Events;%0Aconst scroll = Scroll.animateScroll;%0Aconst scrollSpy = Scroll.scrollS... |
9efe4a1d05980ce4b944c0eaf876cfe0bb9fc04c | fix localeString issue on 0.10 | test/npm-user-download-counts.js | test/npm-user-download-counts.js | /* global describe, it */
var TopUsers = require('../')
var fs = require('fs')
var nock = require('nock')
var rimraf = require('rimraf')
require('chai').should()
require('tap').mochaGlobals()
rimraf.sync('./output/npm-top-users.json')
rimraf.sync('./output/npm-top-users.md')
describe('DownloadCounts', function () {... | JavaScript | 0.000001 | @@ -1329,16 +1329,17 @@
UK.*200,
+?
000/)%0A%0A
|
7b7b24229cf9c1b7087d3c516a96ee0844c16314 | Streamline export (#957) | telegraf.js | telegraf.js | const debug = require('debug')('telegraf:core')
const Telegram = require('./telegram')
const Extra = require('./extra')
const Composer = require('./composer')
const Markup = require('./markup')
const session = require('./session')
const Router = require('./router')
const Stage = require('./stage')
const BaseScene = req... | JavaScript | 0 | @@ -6641,133 +6641,25 @@
,%0A
-Extra,%0A Markup,%0A Router,%0A Telegram,%0A session%0A%7D)%0A%0Amodule.exports.default = Object.assign(Telegraf, %7B%0A Context,%0A Composer
+default: Telegraf
,%0A
|
347c9faa37de1ca84d9788a1e1c809db6a127b63 | handle no ports | edumotion.js | edumotion.js | import Leap from 'leapjs';
import SP from 'serialport-electron';
let {SerialPort} = SP;
// Store frame for motion functions
var previousFrame = null;
// Setup Leap loop with frame callback function
var controllerOptions = {enableGestures: true};
var serialPort;
SP.list(function (err, ports) {
ports.forEach(function... | JavaScript | 0.000046 | @@ -255,18 +255,25 @@
rialPort
+ = null
;%0A
-
SP.list(
@@ -296,16 +296,83 @@
orts) %7B%0A
+ if(!ports) %7B%0A console.log(%22NO PORTS FOUND!%22);%0A return;%0A %7D%0A
ports.
@@ -571,18 +571,16 @@
);%0A%7D);%0A%0A
-%0A%0A
Leap.loo
@@ -891,16 +891,42 @@
v%3E%22;%0A %0A
+%0A if(!!serialPort) %7B%0A ... |
870f797cc58033c6f7d867a548bdee6c1273efdb | Remove unncessary and wrong way to check for empty or null in js | src/components/Util.js | src/components/Util.js | import React, { Component } from "react";
import LoaderImage from "../assets/img/small-loader.svg";
class Util extends Component {
static Row(label, item, lclass = "col-sm-3 text-sm-right", rclass = "col-sm-21", link="") {
if(Util.isEmpty(item)) {
if (link) {
item = `<a href='${link}:${item}'>${ite... | JavaScript | 0 | @@ -230,27 +230,13 @@
if(
-Util.isEmpty(
item)
-)
%7B%0A
@@ -765,105 +765,8 @@
%7D%0A%0A
- static isEmpty(item) %7B%0A return (item !== 'null' && item !== undefined && item !== '');%0A %7D%0A%0A
st
|
36785120b1055f65f77361e0529d5d765a8581d1 | Fix default for pdf templates | lib/generate/config.js | lib/generate/config.js | var _ = require('lodash');
var path = require('path');
// Default configuration for gitbook
var CONFIG = {
// Folders to use for output
// Caution: it overrides the value from the command line
// It's not advised this option in the book.json
"output": null,
// Generator to use for building
// ... | JavaScript | 0 | @@ -2569,25 +2569,17 @@
%7D,%0A
-
%0A
+
@@ -2693,30 +2693,20 @@
plate%22:
-null,%0A
+%22%22,%0A
%0A
@@ -2821,20 +2821,18 @@
plate%22:
-null
+%22%22
%0A %7D%0A%7D
|
a6bbb333907476c85d6fa2771241afe8b0fa37d2 | Add comment | atmessager/views/message.js | atmessager/views/message.js | var request = require('request');
var promise = require('promised-io/promise');
var logger = require('log4js').getLogger('Unit-Test');
var nconf = require('nconf');
nconf.file('bots', __dirname + '/../config/bots.json')
.file('receviers', __dirname + '/../config/receivers.json');
var vaildMessage = require(__dirn... | JavaScript | 0 | @@ -744,24 +744,64 @@
error'%5D) %7B%0A%0A
+ //Bad Request: Wrong receiver name%0A%0A
case 333
@@ -802,16 +802,16 @@
se 333:%0A
-
re
@@ -835,32 +835,67 @@
;%0A break;%0A%0A
+ //Bad Request: Wrong bot name%0A%0A
case 360:%0A
@@ -925,32 +925,71 @@
;%0A break;%0A%0A
+ //Bad Reques... |
434496b3f7aa73544378f91dfcd6c225d79b8dcf | Add GPS-anti-cheat | routes/coords.js | routes/coords.js | var mongoose = require('lib/mongoose.js');
var HttpError = require('error').HttpError;
var User = require('models/user').User;
var Coords = require('models/coords').Coords;
var Problem = require('models/problem').Problem;
var _ = require('underscore');
var aDistance = require('../config').get("aDistance");
var logger =... | JavaScript | 0.998428 | @@ -1192,32 +1192,696 @@
ess%22%7D)%0A %7D
+%0A%0A // %D0%9F%D1%80%D0%B8%D0%B5%D1%85%D0%B0%D0%BB%D0%B8. %D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D1%8F%D0%B5%D0%BC %D1%87%D0%B8%D1%82%D0%B8%D0%BD%D0%B3:%0A if (user.problemHistory.length != 0) %7B%0A var last = user.problemHistory%5Buser.probl... |
be538b6b40594e7b6785ad9c003493835b1f9599 | add conditional check for dropdown class | app/assets/javascripts/navbar.js | app/assets/javascripts/navbar.js | document.addEventListener('turbolinks:load', function() {
var logoText = document.querySelector('.logo__text')
var navToggle = document.querySelector('.navbar-toggler')
var modalClose = document.querySelector('.close')
var userDropdown = document.querySelector('.dropdown')
// Clears Logo text in modal
nav... | JavaScript | 0 | @@ -308,16 +308,48 @@
n modal%0A
+ if(navToggle && logoText) %7B%0A
navTog
@@ -387,32 +387,34 @@
unction() %7B%0A
+
logoText.classLi
@@ -437,19 +437,27 @@
ded')%0A
+
+
%7D)%0A
+ %7D%0A
%0A // Re
@@ -488,16 +488,37 @@
l close%0A
+ if(modalClose) %7B%0A
modalC
@@ -561,24 +561,26 @@
ion()... |
5a1a6b2de302949cdf63b4d05688e8a299c418da | Add passport bearer to event layer routes | routes/layers.js | routes/layers.js | module.exports = function(app, security) {
var Layer = require('../models/layer')
, Event = require('../models/event')
, access = require('../access')
, api = require('../api')
, layerXform = require('../transformers/layer');
var passport = security.authentication.passport;
app.all('/api/layers*'... | JavaScript | 0 | @@ -2637,24 +2637,61 @@
Id/layers',%0A
+ passport.authenticate('bearer'),%0A
validate
@@ -3372,24 +3372,61 @@
/features',%0A
+ passport.authenticate('bearer'),%0A
validate
|
9c0f572070aa78ccad05f68b66aa2930c43ed464 | handle errors and make into promise | lib/Agent.js | lib/Agent.js | "use strict";
var Promise = require('bluebird')
, winston = require('winston')
, _ = require('lodash')
, os = require('os')
, uuid = require('node-uuid')
, config = require('config-url')
, Request = require('./Request')
, request ... | JavaScript | 0.000003 | @@ -2100,32 +2100,86 @@
n((worker) =%3E %7B%0A
+ return Promise.fromCallback((cb) =%3E %7B%0A
wo
@@ -2229,36 +2229,8 @@
%7B%0A
- // req.pipe()%0A
@@ -2323,42 +2323,46 @@
-// res.write(JSON.stringify(data))
+ let url = 'http://127.0.0.1:' + port
;%0A
@@ -237... |
42ff51af03d6ce9ba573e11ba7d852ab19ea6385 | remove eslint error message | app/components/TreeNode/index.js | app/components/TreeNode/index.js | /**
*
* TreeNode
*
*/
import React from 'react';
import styles from './styles.css';
import shortid from 'shortid';
import _ from 'lodash';
import 'aws-sdk/dist/aws-sdk';
const AWS = window.AWS;
import api from '../../api';
const returnJSONSubTree = function returnJSONSubTree(data, prefix) {
const leafData = [];
c... | JavaScript | 0.000001 | @@ -1237,24 +1237,8 @@
ct%0A
- const request =
new
@@ -4514,24 +4514,8 @@
=%3E
-%7B%0A return (
%3Cdiv
@@ -4587,24 +4587,16 @@
/div%3E);%0A
- %7D);%0A
retu
|
5d754f035bb7650591933ac8e88f45aa77c07f56 | add http:// | ui/index.js | ui/index.js | var _ = require('underscore');
var React = require('react');
var superagent = require('superagent');
var io = require('socket.io-client');
var App = React.createClass({
getInitialState: function () {
return {
running: false,
messages: {}
};
},
propTypes: {
vhost: React.PropTypes.object... | JavaScript | 0 | @@ -4400,16 +4400,28 @@
inkURL =
+ 'http://' +
contain
@@ -4700,16 +4700,28 @@
inkURL =
+ 'http://' +
self.pr
|
a4ce455f0413f43cc451adcfeb1871364686c96b | remove some comments | tasks/sitemap_generator.js | tasks/sitemap_generator.js | /*
* grunt-sitemap-generator
* https://github.com/headcanon/grunt-sitemap-generator
*
* Copyright (c) 2014 Nick Donohue
* Licensed under the MIT license.
*/
'use strict';
var _ = require('lodash'),
request = require('superagent'),
sm = require('sitemap');
module.exports = function(grunt) {
// Please see... | JavaScript | 0 | @@ -302,134 +302,8 @@
%7B%0A%0A
- // Please see the Grunt documentation for more information regarding task%0A // creation: http://gruntjs.com/creating-tasks%0A%0A
gr
|
6de64fdb9aa83e32c491785b71da807cae778f88 | Remove duplicated slmodal properties | app/components/sl-simplemodal.js | app/components/sl-simplemodal.js | import Ember from 'ember';
import ModalMixin from '../mixins/slmodal';
/**
* @module components
* @class sl-simplemodal
*/
export default Ember.Component.extend( ModalMixin, {
/**
* Text string for the "accept" button
* @property {string} acceptText
* @default "Accept"
*/
acceptText: 'A... | JavaScript | 0.000001 | @@ -458,162 +458,16 @@
%5B '
-aria-hidden', 'class', 'role' %5D,%0A%0A /**%0A * %60role%60 attribute value%0A * @property %7Bstring%7D role%0A * @default 'dialog'%0A */%0A role: 'dialog'
+class' %5D
%0A%7D);
|
b5f6c09fec566bd69d71ace4532bfc5ea260f200 | fix clear | src/nodes/image-interlace.js | src/nodes/image-interlace.js | // extends src/nodes/image.js which extends src/node-box-native-view.js
$(function(){
Iframework.NativeNodes["image-interlace"] = Iframework.NativeNodes["image"].extend({
info: {
title: "interlace",
author: "forresto",
description: "interlace images together"
},
initializeModule: func... | JavaScript | 0.000006 | @@ -1078,24 +1078,47 @@
_count = 0;%0A
+ this._added = 0;%0A
this.c
|
158b07c20f431e8dc803556fadc7def69bb670df | Fix watcher still using an hard-coded build folder | lib/helpers/watcher.js | lib/helpers/watcher.js | 'use strict'
const path = require('path')
const chokidar = require('chokidar')
const bs = require('browser-sync').create()
const config = require('../config')
const {assets} = require('../assets')
// -------------------------------------------------------------
// Module.
// -----------------------------------------... | JavaScript | 0 | @@ -585,26 +585,16 @@
server:
-path.join(
config.c
@@ -618,20 +618,8 @@
put,
- './build'),
%0A
@@ -1071,26 +1071,16 @@
older =
-path.join(
config.c
@@ -1103,20 +1103,8 @@
tput
-, './build')
%0A%0A
|
a8325613a9f75d0cdad47b17de3b87c84e60a036 | add small fix | lib/Jokes.js | lib/Jokes.js | const _ = require("lodash");
const Collection = require('json-collections');
class Jokes {
_jokeTo (msg) {
if(!/!joke @([\D\d]*)/.test(msg)) return;
let match = msg.match(/!joke @([\D\d]*)/);
if (!(match && match[1])) return;
let jokes = this.collection.toJSON();
let joke = jokes[_.random(0, this.collect... | JavaScript | 0.000007 | @@ -187,38 +187,43 @@
@(%5B%5CD%5Cd%5D*)/);%0A%09%09
-if (!(
+let name =
match && match%5B1
@@ -215,33 +215,46 @@
atch && match%5B1%5D
-)
+;%0A%0A%09%09if (!name
) return;%0A%0A%09%09let
@@ -374,25 +374,28 @@
urn;%0A%0A%09%09let
-n
+dogN
ame = %22@%22 +
@@ -394,24 +394,20 @@
= %22@%22 +
-match%5B1%5D
+name
... |
6ad6e09efce3699a9496d2b4dd412d422da4e39e | Fix model require within store | lib/Store.js | lib/Store.js | var inflector = require('./utils/inflector');
var merge = require('./utils/merge');
var Model = require('./model');
var Prom = require('es6-promise').Promise;
var Store = function(mapping) {
this.mapping = mapping || {};
this.buckets = {};
};
merge(Store.prototype, {
add: function(namespace, object... | JavaScript | 0 | @@ -108,17 +108,17 @@
uire('./
-m
+M
odel');%0A
|
0e14e6ac2e8d43b4b2acd7ba7c4ac2ae2c06a33c | add alias auth: authorize | lib/alias.js | lib/alias.js | var fs = require('fs')
, path = require('path')
;
var alias = {}
//twei 定义命令.
//alias: 定义命令简称
, tAlias = {
update: 'execute status.update'
, repost: 'execute status.repost'//转发
//转发并评论
, rt: {
alias: 'retweet'
, cmd: 'execute status.repost is_comment=1'
}
, stat... | JavaScript | 0.999274 | @@ -1132,16 +1132,40 @@
ig get'%0A
+ , auth: 'authorize'%0A
%7D%0A ;%0A
@@ -2712,12 +2712,13 @@
pand(alias);
+%0A
|
6daf306a10f85f3a818d73413789b82fdb91cf25 | Use EventEmitter-style errors | lib/amino.js | lib/amino.js | var EventEmitter = require('events').EventEmitter
, BaseDriver = require('./driver.js')
, inherits = require('inherits')
, nconf = require('nconf')
, path = require('path')
, Spec = require('./spec').Spec
;
function Amino() {
Amino.super.call(this);
this._queue = {};
this._drivers = {};
this.confP... | JavaScript | 0 | @@ -4700,27 +4700,40 @@
%7B%0A th
-row
+is.emit('error',
new Error(%22
@@ -4767,16 +4767,17 @@
method)
+)
;%0A
@@ -4941,11 +4941,24 @@
th
-row
+is.emit('error',
new
@@ -4997,24 +4997,25 @@
%22 + pattern)
+)
;%0A %7D%0A%7D;%0A%0A//
|
c3f21494e1cf1183d31ee0be4b375fc5d36df105 | test commit | app/containers/HomePage/index.js | app/containers/HomePage/index.js | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it and remove
* the l... | JavaScript | 0.000001 | @@ -444,16 +444,56 @@
ssages';
+%0Aimport Footer from 'components/Footer';
%0A%0Aexport
@@ -685,16 +685,34 @@
der%7D /%3E%0A
+ %3CFooter/%3E%0A
%3C/
|
38ddd613c0332ee64da5fe9c4a7ac6a3ea0348e6 | validate user mobile number in edit user form. | app/containers/Users/EditUser.js | app/containers/Users/EditUser.js | import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Formsy from 'formsy-react';
import FRC from 'formsy-react-components';
import get from 'lodash.get';
import { Modal } from '../../components/Modal';
import { roles } from '../../Data';
import { s... | JavaScript | 0 | @@ -982,16 +982,40 @@
.props;%0A
+ console.log(groups);
%0A ret
@@ -2121,37 +2121,266 @@
validations=
-%22minLength:1%22
+%7B%7B%0A myCustomIsFiveValidation: (values, value) =%3E %7B%0A return value.match(/%5E%5B%5C+%5D?%5B(%5D?%5B0-9%5D%7B3%7D%5B)%5D?%5B-%5Cs%5C.%5D?%5B0-9%5D%7B3%7... |
0be59775f1c999baa99e9e11cde0b16288a903ae | Use a user's ID not their GH login to determine if they're an owner | app/controllers/crate/version.js | app/controllers/crate/version.js | import { alias, readOnly, gt } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
import ArrayProxy from '@ember/array/proxy';
import { computed, observer } from '@ember/object'... | JavaScript | 0.000001 | @@ -1160,21 +1160,18 @@
entUser.
-login
+id
', funct
@@ -1230,21 +1230,18 @@
findBy('
-login
+id
', this.
@@ -1269,13 +1269,10 @@
ser.
-login
+id
'));
|
ab9e3a9f02d314445ab4deb672c6e4753afeeeb3 | Update computed property used via ember-watson | app/controllers/questions/new.js | app/controllers/questions/new.js | import Ember from 'ember';
export default Ember.Controller.extend({
needs: ['people', 'application'],
selectedPerson: Ember.computed.alias('controllers.people.selectedPerson'),
errorMessage: null,
titleIsValid: function() {
var title = this.get('model.title');
return (!Ember.isEmpty(title) && title.le... | JavaScript | 0 | @@ -204,32 +204,62 @@
%0A titleIsValid:
+ Ember.computed('model.title',
function() %7B%0A
@@ -248,32 +248,32 @@
', function() %7B%0A
-
var title =
@@ -361,49 +361,61 @@
%0A %7D
-.property('model.title'),%0A emailIsValid:
+),%0A emailIsValid: Ember.computed('model.user.email',
fun
@@ -573,49 +573,68 @... |
d1b40b90ea90cb62f314a369364ada1fc66c8b6e | Save user calls by default | app/js/services/confighandler.js | app/js/services/confighandler.js | 'use strict';
/*
* Just a boring ol' data storage for configuration
* DEV VERSION FOR EASE OF USAGE!!!
*/
angular.module('confighandler', [])
.factory('configFactory', function ($log, $window) {
// Set up configuration variables we can use anywhere in Angular
var config = {
production: {
... | JavaScript | 0.000001 | @@ -3167,36 +3167,35 @@
saveCalls:
-fals
+tru
e,%0A
|
980418674b76254961b6f31bfc195e9e892c2c72 | Add new filter parseInt | client/goats/runtime/filters/filters.js | client/goats/runtime/filters/filters.js | goog.provide('goats.runtime.filters');
goog.require('goog.object');
goog.require('goog.string');
goog.require('goog.string.format');
/**
* Outputs debug information to console.
*
* @param {*} input The input.
*/
goats.runtime.filters.debug = function(input) {
window.console.log(input);
};
/**
* Returns the le... | JavaScript | 0.000001 | @@ -58,24 +58,51 @@
g.object');%0A
+goog.require('goog.math');%0A
goog.require
@@ -3405,16 +3405,287 @@
s);%0A%7D;%0A%0A
+/**%0A * Parse integer from string or integer.%0A *%0A * @param %7Bstring%7D val the string or integer.%0A * @returns %7Bstring%7D The result.%0A */%0Agoats.runtime.filters.parseInt = function(va... |
56cec63b698a08675f82a7a283f4f3dde7d5b588 | Fix assumption that config.toUrl() is set | lib/block.js | lib/block.js | const Emoji = require('node-emoji')
const emojiRegex = require('emoji-regex')
const hljs = require('highlight.js')
const util = require('./util')
const emojiByShortcode = require('markdown-it-emoji/lib/data/full.json')
const emojiByCharacter = util.reverseKeyValue(emojiByShortcode)
const hashtagRegex = require('hashtag... | JavaScript | 0.001496 | @@ -5568,16 +5568,30 @@
ig.toUrl
+ %7C%7C ((x) =%3E x)
%0A%0A // E
|
47fcc5f9653d5d2fd20dd99f4aba7022042a5c6d | Implement AlreadyBoughtController | SPAWithAngularJS/module2/module2-solution/js/app.alreadyBoughtController.js | SPAWithAngularJS/module2/module2-solution/js/app.alreadyBoughtController.js | // app.alreadyBoughtController.js
(function() {
"use strict";
angular.module("ShoppingListCheckOff")
.controller("AlreadyBoughtController", AlreadyBoughtController);
function AlreadyBoughtController() {
let alreadyBoughtCtrl = this;
}
})();
| JavaScript | 0.000005 | @@ -170,16 +170,86 @@
ller);%0A%0A
+ AlreadyBoughtController.$inject = %5B%22ShoppingListCheckOffService%22%5D;%0A%0A
functi
@@ -275,16 +275,43 @@
troller(
+ShoppingListCheckOffService
) %7B%0A
@@ -339,16 +339,93 @@
= this;
+%0A%0A alreadyBoughtCtrl.items = ShoppingListCheckOffService.getBoughtItems();
... |
a638d9dbf5288bd6ecc819433367a4904b9f06e1 | fix executable var name typo | lib/build.js | lib/build.js | var spawn = require('child_process').spawn;
var archiver = require('archiver');
var fs = require('fs');
var pathResolve = require('path').resolve;
var _ = require('underscore');
function buildApp(appPath, buildLocaltion, buildOptions, callback) {
buildMeteorApp(appPath, buildLocaltion, buildOptions, function(code) {... | JavaScript | 0.000094 | @@ -602,24 +602,25 @@
var executab
+l
e = %22meteor%22
@@ -1036,16 +1036,17 @@
executab
+l
e = %22cmd
@@ -1160,16 +1160,17 @@
executab
+l
e, args,
|
c146d2187cdcb1c55404352acf5fa500ab607b4a | Update stats.js | app/Container/reducers/stats.js | app/Container/reducers/stats.js | import actions from '../actions';
import { humanSize, computeCpuPercentage } from '../../Tools/statHelper';
const MAX_STATS = 30;
const initialState = null;
/**
* Logs's reducer.
* @param {Object} state Existing logs's state
* @param {Object} action Action dispatched
* @return {Object} New state
*/
ex... | JavaScript | 0.000001 | @@ -35,16 +35,32 @@
import %7B
+ humanSizeScale,
humanSi
@@ -479,24 +479,89 @@
ADD_STAT) %7B%0A
+ const scale = humanSizeScale(action.stat.memory_stats.limit)%0A
const st
@@ -748,16 +748,26 @@
ts.usage
+, 2, scale
),%0A
@@ -822,16 +822,26 @@
ts.limit
+, 0, scale
),%0A
|
7a87c18ba966ace4a587d6c922b357d27b1dfe9f | Clean up VotingMenu props a bit | client/src/components/App/VotingMenu.js | client/src/components/App/VotingMenu.js | import React from 'react';
import { connect } from 'react-redux';
import Cookies from 'js-cookie';
import { submitAnonymousVote, submitRegularVote } from '../../actionCreators/voting';
import { getShuffledAlternatives } from '../../selectors/alternatives';
import { activeIssueExists, getIssue, getIssueId, getOwnVote } ... | JavaScript | 0 | @@ -715,92 +715,8 @@
) %7B%0A
- // Voting is only allowed when you have a key.%0A if (this.props.loggedIn) %7B%0A
@@ -740,26 +740,24 @@
Vote(%0A
-
this.props.i
@@ -764,18 +764,16 @@
ssueId,%0A
-
th
@@ -795,18 +795,16 @@
edVote,%0A
-
th
@@ -830,19 +830,11 @@
-
);%0A
... |
54491c5cf59118a35c13a69dfdf111e547c165e3 | fix sending mandrill templates | lib/email.js | lib/email.js | var url = require('url');
var path = require('path');
var _ = require('underscore');
var nodemailer = require('nodemailer');
var swig = require('swig');
var log = require('./log');
module.exports = function(app) {
var config = app.loadConfig('email');
function createTransport() {
var cfg = config.mailer;
... | JavaScript | 0 | @@ -1912,16 +1912,23 @@
s': app.
+config.
settings
@@ -3218,61 +3218,8 @@
e);%0A
- //console.log(JSON.stringify(response));%0A
|
092794b8a9b368453b903891c1a4ac577dedd857 | Format in event | lib/event.js | lib/event.js | var request = require('request'),
url = require('url'),
rdv = require('rendezvous'),
tocsv = require('./tocsv');
/**
* Request events from Cube considering the given expression and options.
* >> GET /1.0/event/get?expression={expression}
* &start={options.start}
* ... | JavaScript | 0.000357 | @@ -532,16 +532,17 @@
n
+
- cube e
@@ -636,16 +636,17 @@
ost
+
- evalua
@@ -701,16 +701,17 @@
.%5Bstart%5D
+
- star
@@ -789,32 +789,33 @@
+
expression%0A *
@@ -850,16 +850,17 @@
s.%5Bstop%5D
+
- sto
@@ -938,32 +938,33 @@
+
expression%0A *
@@ -10... |
b5632127d7a74e43cf0ac28b2547129317ce0e86 | Comment out http get call for confs | app/scripts/controllers/confs.js | app/scripts/controllers/confs.js | 'use strict';
angular.module('ancorDashboardApp')
.controller('ConfsCtrl', function ($scope) {
$scope.title = 'ANCOR Configurations';
$scope.dashboardVersion = 'v0.0.3';
$scope.version = 'v0.0.1'; // will be replaced by HTTP GET /api/version
$scope.awesomeThings = [
'HTML5 Boilerplate',
'... | JavaScript | 0 | @@ -91,16 +91,136 @@
cope) %7B%0A
+ // $http.get('ancor-api-sample/instances.json').success(function(data) %7B%0A // // get current config%0A // )%7D;%0A%0A
$sco
|
624f3cf64f80f1edd7417858587700d39b88d517 | Add hasNode function | lib/graph.js | lib/graph.js | 'use strict';
var Node = require('./node');
var Edge = require('./edge');
var GraphAttributes = require('./attributes/graph');
var EdgeAttributes = require('./attributes/edge');
var NodeAttributes = require('./attributes/node');
function setAttributes(attributes) {
var attrs = {
graph: new GraphAttributes... | JavaScript | 0.000004 | @@ -1100,24 +1100,117 @@
n node;%0A%7D;%0A%0A
+Graph.prototype.hasNode = function hasNode(id)%7B%0A return this.nodes%5Bid%5D !== undefined;%0A%7D;%0A%0A
Graph.protot
|
211b5134cdd62c4f423387c4b43a5e0d73ff8a25 | Fix === | app/src/core/projects/reducer.js | app/src/core/projects/reducer.js | import { projectActions } from './actions';
const INITIAL_STATE = {
pending: false,
created: false,
projects: []
};
export function projectsReducer(state = INITIAL_STATE, action) {
switch(action.type) {
// Fetch projects
case projectActions.FETCH_PROJECTS_PENDING:
return {
... | JavaScript | 0.000002 | @@ -1084,16 +1084,17 @@
oj.id ==
+=
activeP
|
53b3dc98b47e5598937b34d436c03673a7163615 | Update Javascript lib/index.js file | lib/index.js | lib/index.js | var fs, path, phantomjs, script, spawn;
fs = require('fs');
spawn = require('child_process').spawn;
path = require('path');
phantomjs = require('phantomjs');
script = path.join(__dirname, 'scripts/pdf_a4_portrait.coffee');
exports.create = function(string, options, callback) {
var child, stderr, stdout, timeout... | JavaScript | 0 | @@ -1623,24 +1623,59 @@
;%0A %7D%0A
+ if (!options.filename) %7B%0A
retu
@@ -1715,32 +1715,34 @@
rr) %7B%0A
+
return callback(
@@ -1759,28 +1759,97 @@
r);%0A
+
%7D);%0A
+ %7D else %7B%0A return callback(err, buffer);%0A %7D%0A
%7D);%0A
|
977e968f4808b3dfe6827a6272a86905acc2eb44 | add entry.file | lib/index.js | lib/index.js | var fs = require('fs');
var path = require('path');
var parse = require('./parse');
var tags = require('./tags');
var MyJekyll = function(options) {
this._entries = this._loadEntries(options.dir);
this._tags = tags(this._entries);
};
MyJekyll.prototype.tags = function() {
return Object.keys(this._tags);
};
MyJ... | JavaScript | 0.000003 | @@ -857,20 +857,15 @@
%0A %7D
-.bind(
+,
this)
-)
;%0A%7D;
@@ -907,17 +907,21 @@
unction(
-p
+fileP
ath) %7B%0A
@@ -948,17 +948,21 @@
ileSync(
-p
+fileP
ath, %7B e
@@ -988,26 +988,114 @@
;%0A
-return parse(data)
+var parsed = parse(data);%0A parsed.file = path.basename(filePath, path.extname(filePath));%0... |
be5a29ae12b183e8a27b7415ec4a22af52c0dec0 | Change to createServer with callback | lib/index.js | lib/index.js | /*
* Copyright 2014-2015 Fabian Tollenaar <fabian@starting-point.nl>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless requi... | JavaScript | 0 | @@ -1284,51 +1284,52 @@
%0A%0A
-this.server = http.createServer(this.app);%0A
+createServer(app, function(err, server) %7B%0A
ap
@@ -1339,21 +1339,16 @@
erver =
-this.
server;%0A
@@ -1345,24 +1345,26 @@
= server;%0A
+
+
app.interfac
@@ -1370,24 +1370,26 @@
ces = %7B%7D;%0A
+
+
app.connecti
@@ -14... |
50d3487eb224531087cb04e5c84dcf1f5c37d1a6 | fix window checking in case nodejs | lib/index.js | lib/index.js | import softConstant from './softConstant';
import hardConstant from './hardConstant';
export { softConstant, hardConstant };
const _const = typeof window.Proxy === 'undefined' ? softConstant : hardConstant; // eslint-disable-line fp/no-proxy
export default function constant (obj, options = {}) {
if (obj == nul... | JavaScript | 0.000001 | @@ -123,16 +123,131 @@
nt %7D;%0A%0A%0A
+const getGlbl = function () %7B%0A return this; // eslint-disable-line no-invalid-this%0A%7D;%0A%0A%0Aconst glbl = getGlbl();%0A%0A%0A
const _c
@@ -264,14 +264,12 @@
eof
-window
+glbl
.Pro
|
b8d4242e86417c90581f54f82e5cc4529bf49359 | Add TODO item. | lib/index.js | lib/index.js | /**
* Module dependencies.
*/
var fs = require('fs')
, path = require('path')
, kerouac = require('kerouac')
, middleware = require('./middleware')
, utils = require('./utils');
var DASHED_REGEX = /^(\d+)-(\d+)-(\d+)-(.*)/
, UNDASHED_REGEX = /^(\d{4})(\d{2})(\d{2})-(.*)/
exports = module.exports = functi... | JavaScript | 0 | @@ -937,24 +937,244 @@
s2')());%0A %0A
+ // TODO: implement a news-specific sitemap:%0A // https://support.google.com/webmasters/answer/74288%0A // include it as a separate sitemap-news.xml%0A %0A site.page('/sitemap.xml', require('kerouac-sitemap')());%0A %0A
site.bind(
@@ -1302,16 +1302,45 @@
s.xml'... |
a4d2e7836074b0d44bc75f8ec6cb54c7ae5702b9 | fix missed es6 set | lib/index.js | lib/index.js | 'use strict';
const Fs = require('fs');
const Path = require('path');
const Bossy = require('bossy');
const Items = require('items');
const log = require('itlog');
const internals = {
stopwords: [],
validExts: ['.txt'],
definition: {
h: {
description: 'Show help',
alias: 'h... | JavaScript | 0 | @@ -2519,28 +2519,37 @@
d =
-%5B...new Set(tabbed)%5D
+tabbed.filter(internals.uniq)
;%0A
|
14b8f57908b0b3b526e911f444eeee8dbeec0f15 | Send CancelError when user have canceled | lib/index.js | lib/index.js | 'use strict';
/**
* This object contains all the handlers to use for this providers
*/
var googleapis = require('googleapis');
var config = require('../config/configuration.js');
var async = require('async');
var rarity = require('rarity');
var uploadMail = require('./helpers/upload.js');
var retrieveMails = require('.... | JavaScript | 0 | @@ -124,60 +124,8 @@
');%0A
-var config = require('../config/configuration.js');%0A
var
@@ -178,24 +178,137 @@
('rarity');%0A
+var CancelError = require('anyfetch-provider').CancelError;%0A%0Avar config = require('../config/configuration.js');%0A
var uploadMa
@@ -1025,16 +1025,92 @@
, cb) %7B%0A
+ if(reqParams.e... |
7268957d70301e6a8ba19e65877448fc354c560a | add support for indexeddbshim | lib/index.js | lib/index.js |
/**
* Expose `request()`.
*/
exports = module.exports = request;
/**
* Expose link to `Promise`,
* to enable replacement with different implementations.
*/
exports.Promise = global.Promise;
/**
* Transform IndexedDB request-like object to `Promise`.
*
* - request(req)
* - request(tr) - wait for transactio... | JavaScript | 0 | @@ -795,24 +795,46 @@
872873%0A
+ if (e.preventDefault)
e.preventDe
|
e51ada88bd55351823521b8784f08cc3bf84e91f | add those semicolons | app/assets/javascripts/Bonus.js | app/assets/javascripts/Bonus.js | function Bonus(data) {
data.reason_html = '<span>' + data.reason_html + '<span>';
this.data = data;
}
Bonus.prototype = {
show: function() {
var bonus = this;
var $bonusContainer = $('.highlighted-bonus-container');
$bonusContainer.fadeOut(Util.seconds(1), function() {
bonus.showFamilyA... | JavaScript | 0.999999 | @@ -1630,16 +1630,17 @@
'none'%7D)
+;
%0A $('
@@ -2176,16 +2176,17 @@
image%7D)
+;
%0A %7D,%0A
@@ -2337,16 +2337,17 @@
('src'))
+;
%0A $('
@@ -2376,16 +2376,17 @@
%5D.load()
+;
%0A $('
@@ -2415,16 +2415,17 @@
%5D.play()
+;
%0A %7D,%0A
|
a230f29a598326d3745f090bba0ecea34f19cf06 | fix merge sizes option | lib/index.js | lib/index.js | 'use strict';
const through = require('through2');
const gutil = require('gulp-util');
const config = require('./defaultConfig');
const main = require('./main');
module.exports = opts => {
const resolution = Object.assign({}, config, opts.resolution);
const responsive = Object.assign({}, config, opts.respons... | JavaScript | 0.000002 | @@ -314,24 +314,81 @@
responsive);
+%0A const sizes = Object.assign(%7B%7D, config, opts.sizes);
%0A%0A opts =
@@ -522,16 +522,40 @@
onsive);
+%0A opts.sizes = sizes;
%0A%0A re
|
db1925ccf84daa89383d4fc69ac0693d46a6402b | Disable turbolinks since it breaks the navigation menu | app/assets/javascripts/admin.js | app/assets/javascripts/admin.js | //= require turbolinks
//= require jquery
//= require jquery_ujs
//= require jquery.nested_attributes
// require sb-admin-2/jquery-1.11.0
//= require sb-admin-2/bootstrap.min
//= require sb-admin-2/plugins/metisMenu/metisMenu.min
// require sb-admin-2/plugins/morris/raphael.min
// require sb-admin-2/plugins/morris/mo... | JavaScript | 0.000001 | @@ -1,28 +1,4 @@
-//= require turbolinks%0A%0A
//=
|
b1db44fe9b24526f8ed53dab9a5b75b73058d9c8 | Return the identity function if query is undefined | lib/index.js | lib/index.js | 'use strict';
exports = module.exports = getQueryModifier;
/**
* Manipulates an object representation of a querystring, extracting its
* `mongoose` query operators and returning a function to attach them to a
* `mongoose.Query` object.
*
* Note this function isn't pure and does delete the operators from the `query... | JavaScript | 0.000015 | @@ -1317,16 +1317,46 @@
ions) %7B%0A
+ if(!query) return identity;%0A
if(!op
@@ -2861,16 +2861,54 @@
%7D;%0A%7D%0A%0A
+function identity(x) %7B%0A return x;%0A%7D%0A%0A
var VALI
|
99d524ec34499c0e7ef4254c9d09452db5b94898 | Add commands to completion | lib/index.js | lib/index.js | #!/usr/bin/env node
'use strict';
const yargs = require('yargs');
yargs
.commandDir('commands')
.demandCommand()
.completion('completion', (current, argv) => {
if (argv._.length === 2) {
return ['apps', 'get', 'tail'];
} else {
return [];
}
})
.help().argv;
| JavaScript | 0.000008 | @@ -228,16 +228,39 @@
, 'tail'
+, 'latest', 'latestErr'
%5D;%0A %7D
|
6885e6ee3c4b72a8635bb0ad5fb448053aa39891 | Increase waitVal to 5s | lib/links.js | lib/links.js | /* global casper, document */
/* eslint-disable promise/catch-or-return */
var checked = [];
var baseCheckCount = [];
var currentLink = 0;
var maxDepth = 100;
var maxURLsPerBase = 5;
var baseUrl = casper.cli.options.target;
var links = [baseUrl];
var utils = require('utils');
var OK = 200;
var unchanged = 304;
var ba... | JavaScript | 0.000017 | @@ -1547,17 +1547,17 @@
itVal =
-1
+5
000;%0A c
|
90b11b02c28e311c77d6d8b85fab63a5a40415ac | Add enchant & gems | app/characters/parsing/items.js | app/characters/parsing/items.js | var applicationStorage = require("core/application-storage");
var async = require("async");
module.exports.parse = function (bnetCharacter, callback) {
var logger = applicationStorage.logger;
if (bnetCharacter.items !== undefined) {
var collection = applicationStorage.mongo.collection("character_items... | JavaScript | 0 | @@ -1056,27 +1056,628 @@
evel
-%0A %7D;
+,%0A enchant: bnetCharacter.items%5Bslot%5D.tooltipParams.enchant,%0A %7D;%0A%0A if (bnetCharacter.items%5Bslot%5D.tooltipParams.gem0) %7B%0A items%5Bslot%5D.gems = %5BbnetCharacter.items%5Bslot%... |
838c7854b817097cabe13f0ff67d68b90ab6c9d1 | Decrease overall size of each trip idea's UI | app/components/TripIdeaPanel.js | app/components/TripIdeaPanel.js | 'use strict';
import React, { Component, PropTypes } from 'react';
import { Image, Panel } from 'react-bootstrap';
class TripIdeaPanel extends Component {
render() {
const {
connectDropTarget,
idea,
isViewOnly,
onFocusIdea,
onShowTripIdeaSettingsModal
} = this.props;
// In... | JavaScript | 0 | @@ -563,28 +563,8 @@
%3Cdiv
- style=%7Bstyles.info%7D
%3E%0A
@@ -822,149 +822,51 @@
ck=%7B
-onFocusIdea%7D%0A style=%7Bthis.loadIdeaStyle()%7D%0A %3E%0A %7BinfoSection%7D%0A %7Bidea.comment && (%0A %3Cp%0A onClick=%7B
+() =%3E %7B%0A onFocusIdea();%0A ... |
42d6ca651e865c0d67b0a7b431562441816be92b | change arasaac.json route | app/containers/ApiView/index.js | app/containers/ApiView/index.js | /*
*
* apiView
*
*/
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import SwaggerUi, { presets } from 'swagger-ui'
// import 'swagger-ui/dist/swagger-ui.css'
import View from 'components/View'
import { API_SERVER } from 'services/config'
import... | JavaScript | 0.000002 | @@ -404,81 +404,8 @@
) %7B%0A
- console.log(%60JJJJJJJJJJJJJJJJJJ: $%7BAPI_SERVER%7D/public/arasaac.json%60)%0A
@@ -481,15 +481,8 @@
ER%7D/
-public/
aras
|
41aa23dc767ecdc66a0eb4c7c89c9f3ac622f844 | Ensure facetIsActive return a boolean | app/controllers/records/list.js | app/controllers/records/list.js | var facetsDef = [
{
name: 'type',
label: 'Type de résultat',
valueLabels: {
dataset: 'Jeu de données',
nonGeographicDataset: 'Jeu de données (non géographiques)',
service: 'Service',
map: 'Carte',
other: 'Autre',
none: '... | JavaScript | 0.999999 | @@ -4094,16 +4094,18 @@
return
+!!
_.find($
|
55e4ed8658666af1b7013245347b44005e5955f1 | add use and wdpa to loss widget | app/javascript/components/widgets/widgets/forest-change/tree-loss/config.js | app/javascript/components/widgets/widgets/forest-change/tree-loss/config.js | export default {
widget: 'treeLoss',
title: 'Tree cover loss in {location}',
categories: ['summary', 'forest-change'],
types: ['country', 'geostore'],
admins: ['adm0', 'adm1', 'adm2'],
large: true,
analysis: true,
options: {
forestTypes: ['ifl', 'primary_forest', 'mangroves_2016'],
landCategorie... | JavaScript | 0 | @@ -149,16 +149,31 @@
eostore'
+, 'wdpa', 'use'
%5D,%0A adm
|
5f4a698410600c9fb94157791c56985f07f5102d | Check if #activities element is present first | app/javascripts/compact_mode.js | app/javascripts/compact_mode.js | ActivityFeed = {
collapseAll: function() {
$$('#activities .activity, #activities .thread').invoke("addClassName", "collapsed");
$('activities').addClassName("collapsed");
this.collapsed = true;
},
expandAll: function() {
$$('#activities .activity, #activities .thread').invoke("removeClassName", "... | JavaScript | 0 | @@ -30,32 +30,94 @@
l: function() %7B%0A
+ var activities = $('activities');%0A if (activities) %7B%0A
$$('#activit
@@ -186,35 +186,34 @@
ollapsed%22);%0A
-$('
+
activities').add
@@ -206,18 +206,16 @@
tivities
-')
.addClas
@@ -230,32 +230,34 @@
ollapsed%22);%0A
+
+
this.collapsed =
@@ -2... |
b1ae5736f0a131c04f16d29de3f72541f0145fb3 | fix Reflect.delete fetal | src/config/defaults.js | src/config/defaults.js |
import findPortSync from 'find-port-sync';
import { basename, resolve } from 'path';
import { isObject, isUndefined } from 'lodash';
export default function applyDefaults(config, userConfig, isProd) {
const port = findPortSync(3000);
const cwd = process.cwd();
const { daemon = false } = userConfig;
if (isUndefi... | JavaScript | 0.000003 | @@ -407,16 +407,24 @@
t.delete
+Property
(userCon
|
9e2982dfd49e351a6cc7e0a7a5f89c825298f360 | Fix Safari not supporting nagivator.languages | src/containers/Root.js | src/containers/Root.js | import React, { PropTypes } from 'react';
import { Match, propTypes as RouterPropTypes } from 'react-router';
import { IntlProvider, addLocaleData } from 'react-intl';
import englishLocaleData from 'react-intl/locale-data/en';
import dutchLocaleData from 'react-intl/locale-data/nl';
import GameChallenge from '../com... | JavaScript | 0.000006 | @@ -1445,16 +1445,23 @@
anguage(
+%0A
navigato
@@ -1471,16 +1471,75 @@
anguages
+ %7C%7C (navigator.language && %5Bnavigator.language%5D) %7C%7C %5B%5D%0A
);%0A %7D%0A%0A
|
139a7122920d946d9a80b021ba2a1fafa908397f | Add mongoose post middleware | app/models/user.server.model.js | app/models/user.server.model.js | var mongoose = require('mongoose'),
urlFormatter = require('../../app/models/url_formatter.server.model'),
Schema = mongoose.Schema;
var UserSchema = new Schema({
firstName: String,
lastName: String,
email: {
type: String,
index: true,
match: /.+\@.+\..+/
},
username: {
... | JavaScript | 0.000001 | @@ -1299,16 +1299,187 @@
;%0A%7D;*/%0A%0A
+UserSchema.post('save', function(next) %7B%0A if(this.isNew) %7B%0A console.log('A new user was created.');%0A %7D else %7B%0A console.log('A user updated is details.');%0A %7D%0A%7D);%0A%0A
UserSche
|
c132b7d69083ab70f11fcfd16aff2d609ee1d95b | Correct test case 1 to 2 for AboutMutability.js | koans/AboutMutability.js | koans/AboutMutability.js | describe("About Mutability", function() {
it("should expect object properties to be public and mutable", function () {
var aPerson = {firstname: "John", lastname: "Smith" };
aPerson.firstname = "Alan";
expect(aPerson.firstname).toBe(FILL_ME_IN);
});
it("should understand that constructed proper... | JavaScript | 0.000302 | @@ -242,34 +242,30 @@
tname).toBe(
-FILL_ME_IN
+%22Alan%22
);%0A %7D);%0A%0A
@@ -588,34 +588,30 @@
tname).toBe(
-FILL_ME_IN
+%22Alan%22
);%0A %7D);%0A%0A
|
b9f3d84fbfb410cf4174dcbfbe607e93b42601e7 | remove unnided console.log | app/scripts/controllers/tree.js | app/scripts/controllers/tree.js | /**
* Created by toly on 15.04.14.
*/
angular.module('gtdTreeApp')
.controller('TreeCtrl', function($scope, $rootScope, Trees){
$scope.nodes = [];
$scope.focus_id = null;
$scope.indexes = {};
$scope.get_new_id = function(){
var max_id = 0;
for (var i = 0;... | JavaScript | 0.000001 | @@ -2815,47 +2815,8 @@
()%7B%0A
- console.log($scope.nodes);%0A
|
14da494762d6a831e46fa93135c2e905ae76b95e | set time field if date is set | app/view/js/src/obj-datetime.js | app/view/js/src/obj-datetime.js | /**
* DateTime/Date input combo initalization and handling
*/
bolt.datetimes = function () {
/**
* @typedef InputElements
* @type {Object} data - Element holding the data
* @type {Object} date - Date input element
* @type {Object} time - Time input element
* @type {Object} show - Show dat... | JavaScript | 0.000049 | @@ -3110,18 +3110,136 @@
-time = '';
+if (date !== '') %7B%0A time = '00:00';%0A %7D else %7B%0A time = '';%0A %7D
%0A
|
ce4a320f41f5e8954a74dea9eb6d188515570154 | remove console.log | cla_frontend/assets-src/javascripts/app/js/controllers/eligibility_check.js | cla_frontend/assets-src/javascripts/app/js/controllers/eligibility_check.js | (function(){
'use strict';
angular.module('cla.controllers')
.controller('EligibilityCheckCtrl',
['$scope', 'Category', '$stateParams',
function($scope, Category, $stateParams){
console.log('hello')
$scope.category_list = Category.query();
$scope.warnings = {};
... | JavaScript | 0.000006 | @@ -198,39 +198,8 @@
s)%7B%0A
- console.log('hello')%0A
|
6313c846a34cf30f1ad12ad9c320fa04869ab08e | Fix an error with the ID. | src/alfanous-django/wui/static/shared/js/style_switcher.js | src/alfanous-django/wui/static/shared/js/style_switcher.js | const COOKIE_SKIN_NAME = 'skin';
const SKIN_CSS_ID = '#skin_css';
function change_skin(skin_id,skin_type) {
var $newCSS = $('<link>', {
rel: 'stylesheet',
type: 'text/css',
href: '/static/ltr/css/skins/bootstrap_' + skin_id + '.css'
}).on('load', function() {
$(SKIN_CSS_ID).remove();
$(this).at... | JavaScript | 0.000002 | @@ -51,9 +51,8 @@
= '
-#
skin
@@ -275,16 +275,22 @@
%7B%0A $(
+'#' +
SKIN_CSS
@@ -359,18 +359,19 @@
'head').
-a
p
+re
pend($ne
|
5f0c6f7608bf1706b731beb6c6a4ec777b432b44 | Use DOMPurify to sanitize key/val for display. | corehq/apps/hqwebapp/static/hqwebapp/js/ui_elements/ui-element-input-map.js | corehq/apps/hqwebapp/static/hqwebapp/js/ui_elements/ui-element-input-map.js | hqDefine('hqwebapp/js/ui_elements/ui-element-input-map', [
'jquery',
'hqwebapp/js/main',
], function (
$,
hqMain
) {
'use strict';
var module = {};
var InputMap = function (show_del_button, placeholders) {
var that = this;
hqMain.eventize(this);
if (!placeholders) {
... | JavaScript | 0 | @@ -90,16 +90,48 @@
/main',%0A
+ 'DOMPurify/dist/purify.min'%0A
%5D, funct
@@ -153,16 +153,31 @@
hqMain
+,%0A DOMPurify
%0A) %7B%0A
@@ -3514,32 +3514,142 @@
%7D%0A
+ map_key = DOMPurify.sanitize(map_key);%0A map_val = DOMPurify.sanitize(map_val);%0A
... |
26d6f2fa98fb540d3681ee9e1c402f564976a9e1 | Add weather stories | src/data/news-items.js | src/data/news-items.js | const Immutable = require( "immutable" );
const LOYALTY_NONE = 0;
function createWeatherStory( blurbText, articleText ) {
return Immutable.Map({
loyalty: LOYALTY_NONE,
interesting: true,
blurbText,
articleText
});
}
| JavaScript | 0.00005 | @@ -88,16 +88,18 @@
erStory(
+ %5B
blurbTe
@@ -113,16 +113,18 @@
icleText
+ %5D
) %7B%0A%09re
@@ -226,6 +226,1031 @@
%7D);%0A
-
%7D%0A
+%0Aconst weatherStories = Immutable.Set(%0A%09%5B%0A%09%09%5B%0A%09%09%09%22Skies and temperatures will remain calm today%22,%0A%09%09%09%22Another Sunny Day!%22%0A%09%09%5D,%0... |
0d5e4702d7e51bff02226fa27dba2a39d7d666c7 | disable fullscreen | assets/js/munkireport.comment.js | assets/js/munkireport.comment.js | /*!
* Comments for MunkiReport
* requires bootstrap-markdown.js (http://github.com/toopay/bootstrap-markdown)
*/
$(document).on('appReady', function(e, lang) {
try{
if(serialNumber){}
}
catch(e){
alert('Error: comment.js - No serialNumber');
return;
}
var addComment = function(){
var section = $(thi... | JavaScript | 0.000002 | @@ -621,21 +621,16 @@
rray();%0A
-%09%09%09%09%09
%0A%09%09%09%09%09//
@@ -1912,11 +1912,12 @@
ble:
-tru
+fals
e%7D,%0A
@@ -2946,19 +2946,16 @@
%0A%09%09%09%7D);%0A
-%09%09%09
%0A%09%09%7D);%0A%0A
|
d66b6abbdc321847351fb7d46a4e3c4ff9adb32a | Fix a missing dependency that preventded the 'Quick Add Node' from displaying. | opennms-webapp/src/main/webapp/admin/ng-requisitions/app/scripts/app.js | opennms-webapp/src/main/webapp/admin/ng-requisitions/app/scripts/app.js | /**
* @author Alejandro Galue <agalue@opennms.org>
* @copyright 2014 The OpenNMS Group, Inc.
*/
(function() {
'use strict';
angular.module('onms-requisitions', [
'ngRoute',
'ngCookies',
'ngAnimate',
'ui.bootstrap',
'angular-growl',
'angular-loading-bar'
])
.config(['$routeProvider', ... | JavaScript | 0 | @@ -277,16 +277,34 @@
ing-bar'
+,%0A 'ngSanitize'
%0A %5D)%0A%0A
|
87b13ca14c45bdfef33f9b425a17c9daaeb1c828 | Fix length problem in port | port.js | port.js | 'use strict';
const fs = require('fs');
const portIndex = 2;
let port = '';
process.argv.forEach((val, index, array) => {
if (index === portIndex)
port = val;
});
let indexHtml = fs.readFileSync('./public/index.html', 'utf-8');
const searchString = 'global.PORT';
const jumpLength = searchString.length... | JavaScript | 0.000351 | @@ -444,10 +444,8 @@
rt%7D%22
-;
$%7Bin
@@ -471,65 +471,9 @@
dex+
-1
+9
)%7D%60;
-%0A%0Afs.writeFileSync('./public/index.html', newIndexHtml);
|
edcdf380cd875d59f7d4eb340af7ed0901266176 | Update port.js | port.js | port.js | 'use strict';
const fs = require('fs');
const portIndex = 2;
let port = '';
process.argv.forEach((val, index, array) => {
if (index === portIndex)
port = val;
});
let indexHtml = fs.readFileSync('./index.html', 'utf-8');
const searchString = 'var PORT';
const jumpLength = searchString.length;
const en... | JavaScript | 0.000001 | @@ -208,16 +208,23 @@
Sync('./
+public/
index.ht
@@ -469,8 +469,9 @@
ex+9)%7D%60;
+%0A
|
47bd1265b7bb31630f6672020e0150ec5c4640a2 | Enable "no-floating-decimal" rule, see https://github.com/phetsims/chipper/issues/814 | js/RangeTests.js | js/RangeTests.js | // Copyright 2019-2020, University of Colorado Boulder
/**
* Range tests
*
* @author Chris Klusendorf (PhET Interactive Simulations)
*/
import Range from './Range.js';
QUnit.module( 'Range' );
QUnit.test( 'constructor', assert => {
assert.ok( new Range( 1, 10 ), 'valid range' );
assert.ok( new Range( 10, 10... | JavaScript | 0.000001 | @@ -2223,16 +2223,17 @@
eRange(
+0
.5 );%0A
@@ -2247,16 +2247,17 @@
eRange(
+0
.2 );%0A
@@ -2271,16 +2271,17 @@
eRange(
+0
.2432124
@@ -2755,16 +2755,17 @@
6 ) ===
+0
.5, 'hal
|
0922e5f016fcb1b024c130b1ca175e1ab6ec120f | Update help message | lib/modules/help.js | lib/modules/help.js | module.exports = function () {
var message = '';
message += 'Usage:';
message += '\n';
message += ' jsss style.js Compile JSSS to stdout';
message += '\n';
message += ' jsss style.js style.css Compile JSSS to file';
message += '\n';
message += ' jsss -h, --help display this he... | JavaScript | 0 | @@ -128,16 +128,21 @@
+
Compile
@@ -209,16 +209,19 @@
tyle.js
+-o
style.cs
@@ -222,16 +222,18 @@
yle.css
+
Compile
@@ -284,151 +284,357 @@
+= '
- jsss -h, --help display this help message';%0A message += '%5Cn';%0A message += ' jsss -v
+%5Cn';%0A message += 'Options:'%0A me... |
a3692834923681eb42495aaa7c754673ac1369b5 | correct VRControls from mrdoob/three.js/pull/6380 | js/VRControls.js | js/VRControls.js | /**
* @author dmarcos / https://github.com/dmarcos
* @author mrdoob / http://mrdoob.com
*/
THREE.VRControls = function ( object, onError ) {
var scope = this;
var vrInputs = [];
function gotVRDevices( devices ) {
for ( var i = 0; i < devices.length; i ++ ) {
var device = devices[ i ];
if ( device i... | JavaScript | 0 | @@ -190,21 +190,29 @@
unction
-gotVR
+filterInvalid
Devices(
@@ -223,24 +223,513 @@
ices ) %7B%0A%0A%09%09
+// Exclude Cardboard position sensor if Oculus exists.%0A%0A%09%09var oculusDevices = devices.filter( function ( device ) %7B%0A%0A%09%09%09return device.deviceName.toLowerCase().indexOf('oculus') !== -1;%0A%... |
a5451fb6e32d9c319649e6aed2123e313b8debda | Add possibility to override the Show view | src/docsUtils/index.js | src/docsUtils/index.js | export function getResource(resources, resourceName) {
return resources.find(({name}) => resourceName === name);
}
export function getResourceField(resource, resourceFieldName) {
return resource.fields.find(({name}) => resourceFieldName === name);
}
export function replaceInput(resource, resourceFieldName, replac... | JavaScript | 0 | @@ -1373,32 +1373,123 @@
urce.list;%0A %7D%0A%0A
+ if (undefined !== replaceResource.show) %7B%0A resource.show = replaceResource.show;%0A %7D%0A%0A
if (undefined
|
559a27302ffffec3fe0c242d061fb72699436c37 | Update install.js | automod/javascript/widget/install.js | automod/javascript/widget/install.js | !function() {
/*
@modname Newest Member Today
@version 1.0
@author SSYT
*/
}();
| JavaScript | 0.000002 | @@ -88,14 +88,339 @@
*/%0A %0A
+ if (!window.FA) window.FA = %7B%7D;%0A if (FA.NMT) %7B%0A return false;%0A %7D%0A window.FA.NMT = %7B%0A config:%0A %7B%0A version: '1.0',%0A installed: 1%0A %7D%0A %7D;%0A %0A document.write('%3Cscript type=%22text/javascript%22 src=%22ht... |
c76fadb421bf8744f28f68bb62a788ce892b8bcc | save mode in POST | routes/routes.js | routes/routes.js | 'use strict';
var express = require('express');
var router = express.Router();
var pass = require('./../lib/pass');
var passwordHelper = require('./../lib/passwordHelper');
router.get('/', function(req, res, next) {
res.render('index', { title: 'Topic Model Evaluation Platform', message: req.flash('loginMessage'... | JavaScript | 0 | @@ -5109,32 +5109,61 @@
nalEntityTitle;%0A
+ var mode = %22label_mode%22;%0A
var insert =
@@ -5557,16 +5557,22 @@
Selected
+, mode
%5D);%0A
@@ -5702,16 +5702,22 @@
selected
+, mode
) values
|
33e38b4c4f4bc46c679fb0f0cb3a3c0481f95eaf | test router update | js/app/router.js | js/app/router.js | /* app/router.js */
'use strict';
define([
'exports',
'jquery',
'backbone',
'underscore',
'app/views/chrome',
'utils/spinner'
], function( exports, $, Backbone, _, Chrome, Spinner ) {
var Router = Backbone.Router.extend({
initialize : function() {
_.bindAll( this, 'deb... | JavaScript | 0 | @@ -1012,16 +1012,22 @@
'updated
+ again
')%0A
|
4ad2a0fbb0b64b3035ac90b7b361f2dc5b391532 | Update jwtRedisSession.js | lib/jwtRedisSession.js | lib/jwtRedisSession.js |
var _ = require("lodash"),
jwt = require("jsonwebtoken"),
utils = require("./utils");
module.exports = function(options){
if(!options.client || !options.secret)
throw new Error("Redis client and secret required for jwtRedisSession!");
options = {
client: options.client,
secret: options.secret,
algorith... | JavaScript | 0 | @@ -963,16 +963,17 @@
eq.param
+s
? req.p
@@ -976,16 +976,17 @@
eq.param
+s
(options
|
5c21c26df05d2288d93ed30aa7266ca4c2633e63 | fix result | routes/search.js | routes/search.js | var express = require('express');
var router = express.Router();
//import models
var stock = require('../models/stocks');
var article = require('../models/articles');
/* GET article page. */
router.post('/stocks', function(request, response) {
console.log('render stocks page');
var userQuery = request.body;
userQu... | JavaScript | 0.000001 | @@ -378,210 +378,10 @@
();%0A
-%09console.log(userQuery.userQueryInput);%0A%09console.log(userQuery.userQueryInput.charCodeAt(0));%0A%09console.log((userQuery.userQueryInput.charCodeAt(0)%3E=48)&&(userQuery.userQueryInput.charCodeAt(0)%3C=57));%0A
%09%0A
+
%09if
@@ -1108,18 +1108,9 @@
%0A%09%7D%0A
-%09else%0A%09%7... |
366b65d6f618810f9a7ef6b3d757e877287a2de7 | update for kafka-avro 0.7.0 | lib/kafka-avro-stub.js | lib/kafka-avro-stub.js | /*
* kafka-avro-stub
* Stubs for the kafka-avro library.
* https://github.com/waldophotos/kafka-avro-stub
*
* Copyright © Waldo, Inc.
* Licensed under the MIT license.
*/
var Transform = require('stream').Transform;
var Promise = require('bluebird');
var cip = require('cip');
var sinon = require('sinon');
var a... | JavaScript | 0 | @@ -2577,32 +2577,35 @@
this.kafkaAvro.
+sr.
valueSchemas%5BsrI
@@ -2638,32 +2638,35 @@
this.kafkaAvro.
+sr.
schemaMeta%5BsrIte
@@ -5198,16 +5198,19 @@
fkaAvro.
+sr.
valueSch
@@ -5257,16 +5257,19 @@
fkaAvro.
+sr.
schemaMe
|
f34bb23beb2ec7273e1809a2ad6897cdc64f381f | add notification onclick behavior to open chmi page with detailed data | js/background.js | js/background.js | var chmiPortalWebPageUrl = "http://portal.chmi.cz/files/portal/docs/uoco/web_generator/actual_hour_data_CZ.html"
var chmiPortalJSONUrl = "http://portal.chmi.cz/files/portal/docs/uoco/web_generator/aqindex_cze.json"
var stationCode;
var periodInMinutes = 1
// SCHEDULING START
function onInit() {
updateIcon();
s... | JavaScript | 0 | @@ -1061,16 +1061,120 @@
ation);%0A
+chrome.notifications.onClicked.addListener(function (notificationId) %7B%0A showChmiPortalWebPage();%0A%7D);%0A
// ONCLI
@@ -2221,24 +2221,48 @@
ification();
+
%0A
@@ -2257,24 +2257,32 @@
%0A
+ notif =
chrome.noti
@@ -2338,24 +... |
66e58346d57d6873d21d43ff1687bafbc974d0cd | remove console.log. | layouts/mobile/script.js | layouts/mobile/script.js | "use strict";
var userAgent = window.navigator.userAgent;
var isSafari = userAgent.match(/iPad/i) || userAgent.match(/iPhone/i);
var hideTimeout = false;
function showDrawer(percent)
{
console.log("show "+percent);
$('#drawer-overlay').css('opacity', percent*0.75);
if(hideTimeout)
{
clearTimeout(hideTimeout);
... | JavaScript | 0 | @@ -184,39 +184,8 @@
)%0A%7B%0A
-%09console.log(%22show %22+percent);%0A
%09$('
|
52bf6bf279d9dd30f8da124b6088c5367aaf42a1 | Add spec for replying actions on a state | voting-server/test/reducer_spec.js | voting-server/test/reducer_spec.js | import {Map, fromJS} from 'immutable';
import {expect} from 'chai';
import reducer from '../src/reducer';
describe('reducer', () => {
it('handles SET_ENTRIES', () => {
const initialState = Map();
const action = {type: 'SET_ENTRIES', entries: ['Mr. Nobody']};
const nextState = reducer(initi... | JavaScript | 0 | @@ -1641,13 +1641,534 @@
%0A %7D);
+%0A%0A it('can be used with reduce', () =%3E %7B%0A const actions = %5B%0A %7Btype: 'SET_ENTRIES', entries: %5B'Mr. Nobody', 'First Contact'%5D%7D,%0A %7Btype: 'NEXT'%7D,%0A %7Btype: 'VOTE', entry: 'Mr. Nobody'%7D,%0A %7Btype:... |
ea718c55dbe7be5bdad56a7b8119f77342115a36 | test result | routes/search.js | routes/search.js | var express = require('express');
var router = express.Router();
//import models
var stock = require('../models/stocks');
var article = require('../models/articles');
/* GET article page. */
router.post('/stocks', function(request, response) {
console.log('render stocks page');
var userQuery = request.body;
userQu... | JavaScript | 0.000009 | @@ -1199,32 +1199,62 @@
sult == null)%7B%0A%09
+console.log('result is null');
%09%0A%09response.rend
|
13f624bc9f02c84bddbc3a668bf3d1e46962dfb9 | Refactor arg extraction in prettifyHtml. | prettify.js | prettify.js | // Copyright 2010 Steven Dee. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... | JavaScript | 0 | @@ -2722,66 +2722,36 @@
var
-uglyTags = %5B%5D;%0A var uglyClass = %22%22;%0A if (opt_args) %7B%0A
+args = opt_args %7C%7C %7B%7D;%0A var
ugl
@@ -2754,28 +2754,24 @@
uglyTags =
-opt_
args%5B'uglyTa
@@ -2782,21 +2782,17 @@
%7C%7C
-uglyTags
+%5B%5D
;%0A
-
+var
ugl
@@ -2796,28 +2796,24 @@
uglyClass... |
55c9b6116f5aeb9c669985ffc5ae476e6e4af7e6 | convert to ES6 | src/dsymbols/covers.js | src/dsymbols/covers.js | 'use strict';
var DS = require('./delaney');
var fundamental = require('./fundamental');
var derived = require('./derived');
var generators = require('../common/generators');
var cosets = require('../fpgroups/cosets');
var coverForTable = function coverForTable(ds, table, edgeToWord) {
return de... | JavaScript | 0.999999 | @@ -1,22 +1,15 @@
-'use strict';%0A%0Avar
+import * as
DS
@@ -13,34 +13,29 @@
DS
-= require(
+from
'./delaney')
@@ -33,22 +33,29 @@
delaney'
-)
;%0A
-var
+import * as
fundame
@@ -59,26 +59,21 @@
amental
-= require(
+from
'./funda
@@ -79,22 +79,29 @@
amental'
-)
;%0A
-var
+import * as
derived... |
e63aa274401cbc727ba1319bea1bb1c5c9d42e48 | fix sub function not being async | lib/queue.js | lib/queue.js | const timeout = (fn, s) => {
return new Promise(resolve => setTimeout(() => resolve(fn()), s))
}
/**
* Delay Queue to avoid Rate limits
* Note: Requests are handled through async delay states, not an actual queue list
*/
class Queue {
/**
* Set Queue timings
*/
constructor(options) {
... | JavaScript | 0.002848 | @@ -1698,24 +1698,30 @@
ait timeout(
+async
() =%3E %7B%0A%0A
|
3519e674fdd67a2bae6abf608395a37b3996c557 | Add subscribeCharacteristic + unsubscribeCharacteristic | lib/noble-device.js | lib/noble-device.js | var events = require('events');
var util = require('util');
var GENERIC_ACCESS_UUID = '1800';
var DEVICE_NAME_UUID = '2a00';
function NobleDevice(peripheral) {
this._peripheral = peripheral;
this._services = {};
this._characteristics = {};
this.id = peripheral.id;
... | JavaScript | 0.000003 | @@ -4199,32 +4199,443 @@
%7D%0A %7D);%0A%7D;%0A%0A
+NobleDevice.prototype.subscribeCharacteristic = function(serviceUuid, characteristicUuid, listener, callback) %7B%0A this.notifyCharacteristic(serviceUuid, characteristicUuid, true, listener, callback);%0A%7D;%0A%0ANobleDevice.prototype.unsubscribeCharacteristi... |
be151fb21d36a65f1cc05a9f1671a12712a43577 | Add missing semicolon | lib/less/less-error.js | lib/less/less-error.js |
var LessError = module.exports = function LessError(parser, e, env) {
var input = parser.getInput(e, env),
loc = parser.getLocation(e.index, input),
line = loc.line,
col = loc.column,
callLine = e.call && parser.getLocation(e.call, input).line,
lines = input.split('\n');
... | JavaScript | 0.999999 | @@ -751,16 +751,17 @@
%5D;%0A%7D
+;
%0A%0ALessEr
|
5bfc5b7862942243c6d40a40791366f589c0c913 | Fix return inconsistency. | template.js | template.js | var markdown = require('markdown').markdown;
var nunjucks = require('nunjucks');
var util = require('util');
var env = (new nunjucks.Environment(
new nunjucks.FileSystemLoader('views')
));
env.addFilter('undef', function (thing) {
return thing || '';
});
env.addFilter('activize', function (actual, expect) {
if (e... | JavaScript | 0.000029 | @@ -557,16 +557,19 @@
return
+ ''
;%0A retu
@@ -815,8 +815,9 @@
s = env;
+%0A
|
e3c15564200282c8dec7cd6f6a4ae2288e00cc57 | Change unimplemented super method from no-op to one that throws an error | backbone-super/backbone-super.js | backbone-super/backbone-super.js | // This is a plugin, constructed from parts of Backbone.js and John Resig's inheritance script.
// (See http://backbonejs.org, http://ejohn.org/blog/simple-javascript-inheritance/)
// No credit goes to me as I did absolutely nothing except patch these two together.
(function(Backbone) {
Backbone.Model.extend = Backbon... | JavaScript | 0.000001 | @@ -521,16 +521,102 @@
ild;%0A%09%7D;
+%0A%09var unImplementedSuper = function()%7Bthrow %22Super does not implement this method%22;%7D;
%0A%0A%09var c
@@ -1890,19 +1890,33 @@
ethod =
-cto
+unImplementedSupe
r;%0A%09%09%09%09%09
|
3171ad407cfe55fe4f5175ca678d2e9a39dde8bf | Implement 'Back' pressing in android platform | platform/android/.core.js | platform/android/.core.js | if (navigator.userAgent.indexOf('Android') >= 0) {
log = function(dummy) {
COPY_ARGS(args, 0)
console.log("[QML] " + args.join(" "))
}
log("Android detected")
exports.core.vendor = "google"
exports.core.device = 2
exports.core.os = "android"
//exports.core.keyCodes = {
//}
log("Android initialized")
}
| JavaScript | 0.000026 | @@ -55,90 +55,33 @@
g =
-function(dummy) %7B%0A%09%09COPY_ARGS(args, 0)%0A%09%09console.log(%22%5BQML%5D %22 + args.join(%22 %22))%0A%09%7D
+console.log.bind(console)
%0A%0A%09l
@@ -191,18 +191,16 @@
roid%22%0A%0A%09
-//
exports.
@@ -222,10 +222,692 @@
%7B%0A%09
-//
+%094: 'Back',%0A%09%0913: 'Select',%0A%09%092... |
26889ed002d22c8ae118bac903aebde607cb01d0 | Update forum.js | developer/forum.js | developer/forum.js | //todo write angular scripts for developer page.
var developerKingdomModule = angular.module('app', []).
controller("forumCtrl", function forumCtrl($scope, $window){
$scope.forum = {
threads: [{subject: "blah blah blah", posts: [{user: "user1", time: (new Date()).toLocaleString(), message: "hi how u doing"}... | JavaScript | 0 | @@ -1619,13 +1619,38 @@
t = %22%22;%0A
+%09%09$scope.predicate = '';%0A
%09%7D);%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.