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 |
|---|---|---|---|---|---|---|---|
4a7604daa26d9c79585aa3ba249f879b31f6eaa2 | remove , at end of js. IE8 chokes on this | core/js/config.js | core/js/config.js | /**
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
OC.AppConfig={
url:OC.filePath('core','ajax','appconfig.php'),
getCall:function(action,data,callback){
data.action=action;
$.g... | JavaScript | 0 | @@ -1457,17 +1457,16 @@
pp%7D);%0A%09%7D
-,
%0A%7D;%0A//TO
|
869d7cc762ef7b59846730eff66f2a8130ebb4c0 | fix mapping of log level | tasks/acetate.js | tasks/acetate.js | /*
* grunt-acetate
* https://github.com/patricklocal/grunt-acetate
*
* Copyright (c) 2014 Patrick Arlt
* Licensed under the MIT license.
*/
'use strict';
var Acetate = require('acetate');
var path = require('path');
var _ = require('lodash');
var gaze = require('gaze');
var util = require('util');
module.expor... | JavaScript | 0.000002 | @@ -1417,19 +1417,16 @@
te.log.l
-ogL
evel = o
|
ed83c2da0977dbea08e98d9c74d7a790e5d3c153 | Remove unused function in test | test/PriorityQueue.test.js | test/PriorityQueue.test.js | import { PriorityQueue } from '../src/utilities/PriorityQueue.js';
const nextFrame = () => new Promise( resolve => requestAnimationFrame( resolve ) );
const nextTick = () => new Promise( resolve => process.nextTick( resolve ) );
describe( 'PriorityQueue', () => {
it( 'should run jobs automatically in the correct or... | JavaScript | 0.000001 | @@ -148,86 +148,8 @@
) );
-%0Aconst nextTick = () =%3E new Promise( resolve =%3E process.nextTick( resolve ) );
%0A%0Ade
|
545a3da962f6e7e121059d851f1042ddcda9e149 | fix test | test/compiler/axis.test.js | test/compiler/axis.test.js | 'use strict';
var expect = require('chai').expect;
var axis = require('../../src/compiler/axis'),
Encoding = require('../../src/Encoding');
describe('Axis', function() {
var stats = {a: {distinct: 5}, b: {distinct: 32}},
layout = {
cellWidth: 60, // default characterWidth = 6
cellHeight: 60
... | JavaScript | 0.000002 | @@ -1166,650 +1166,8 @@
);%0A%0A
- describe('labels.scale()', function () %7B%0A // FIXME(kanitw): Jul 19, 2015 - write test%0A %7D);%0A%0A describe('labels.format()', function () %7B%0A // FIXME(kanitw): Jul 19, 2015 - write test%0A %7D);%0A%0A describe('labels.angle()', function () %7B%0A it('should se... |
6186568e7149e799c0652e65eda244e9a7f3c3fe | fix tests | test/compiler/data.spec.js | test/compiler/data.spec.js | 'use strict';
var expect = require('chai').expect;
var data = require('../../src/compiler/data'),
Encoding = require('../../src/Encoding');
describe('data', function () {
describe('for aggregate encoding', function () {
it('should contain two tables', function() {
var encoding = Encoding.fromSpec({
... | JavaScript | 0.000001 | @@ -2986,32 +2986,121 @@
%7D%0A %7D);%0A%0A
+ var stats = %7B%0A Acceleration: %7B%0A min: 0,%0A max: 100%0A %7D%0A %7D;%0A%0A
describe('bi
@@ -3213,35 +3213,43 @@
orm.bin(encoding
+, stats
);%0A
+%0A
expect(t
@@ -3392,16 +3392,54 @@
bins: 15
+,%0A min: 0... |
33056a24182c45157e6bd6aad96fc42691b7e02c | Remove print | test/compiler/time.spec.js | test/compiler/time.spec.js | 'use strict';
var expect = require('chai').expect;
var time = require('../../src/compiler/time'),
Encoding = require('../../src/Encoding');
describe('Time', function() {
var fieldName = 'a',
timeUnit = 'month',
encoding = Encoding.fromSpec({
encoding: {
x: {name: fieldName, type: 'T', timeU... | JavaScript | 0.000016 | @@ -497,41 +497,8 @@
1%5D;%0A
- console.log(data.transform);%0A
|
90a51c00259e79213aeb02025cd3265c29e2671b | delete lively.lang._prevLivelyGlobal for compat with new lively.lang | core/lively/Base.js | core/lively/Base.js | /*
* Copyright (c) 2006-2009 Sun Microsystems, Inc.
* Copyright (c) 2008-2011 Hasso Plattner Institute
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, includin... | JavaScript | 0 | @@ -1502,16 +1502,59 @@
ches();%0A
+ %0A delete lively.lang._prevLivelyGlobal;%0A
%7D)();%0A%0A(
|
24dee001be213846ce220cabcb8e9c5787f5d2d4 | add GSJS helper functions to game object class | src/model/GameObject.js | src/model/GameObject.js | 'use strict';
module.exports = GameObject;
var config = require('config');
var utils = require('utils');
GameObject.prototype.TSID_INITIAL = 'G';
GameObject.prototype.__isGO = true;
/**
* Generic constructor for both instantiating an existing game object
* (from JSON data), and creating a new object.
*
* @par... | JavaScript | 0 | @@ -2680,12 +2680,1172 @@
= true;%0A%7D;%0A
+%0A%0A/**%0A * Helper function originally defined in %3Cgsjs/common.js%3E. All the%0A * functions there should really be added to all game object prototypes%0A * in gsjsBridge (then this here wouldn't be necessary), but that would%0A * require prefixing a zillion calls in ... |
8993e5ad0753ea398c1e16fccde99a186b141c66 | remove console.log | static/js/live_editor.js | static/js/live_editor.js | /* global $ */
(function (window, document, $) {
'use strict';
var LiveEditor = function LiveEditor (params) {
console.log('Live Editor Init...');
this.init(params);
console.log('Live Editor Done...');
}
LiveEditor.prototype.init = function (params) {
this.initVars(par... | JavaScript | 0.000006 | @@ -2306,66 +2306,8 @@
) %7B%0A
- console.log('Getting element path...: ' + elem);%0A%0A
|
e93e7bf4b1715a08311b688a5fa3b51a0a1d3331 | Change `composedUrl` to use the abstracted s/ URL | src/models/HiveModel.js | src/models/HiveModel.js | /**
* HiveModel.js
*/
(function (spiderOakApp, window, undefined) {
"use strict";
var console = window.console || {};
console.log = console.log || function(){};
var Backbone = window.Backbone,
_ = window._,
$ = window.$,
s = window.s;
spiderOakApp.HiveMode... | JavaScript | 0 | @@ -702,119 +702,53 @@
l =
-encodeURI(this.get(%22device_path%22));%0A var urlHead = this.url.replace(%22s%5C/%22,%22%22) + this.get(%22device_encoded%22)
+this.get(%22url%22);%0A var urlHead = this.url
;%0A
|
1c54b2f98991ee98ca357479cacd8e44ad6bd6eb | Remove consoles in frontend | static/scripts/script.js | static/scripts/script.js | function renderVoteData(vote) {
console.log('rendering vote', vote);
var skript = $('#skript-' + vote.id);
skript.find('.vote-number').text(vote.votes);
skript.find('.vote-bar').animate( { width: '' + (vote.votePercentage * 100) + '%'}, 300);
if (vote.channel) {
skript
.find('.channel'... | JavaScript | 0.000001 | @@ -21,32 +21,34 @@
ata(vote) %7B%0A
+//
console.log('ren
@@ -64,24 +64,24 @@
te', vote);%0A
-
var skri
@@ -631,16 +631,18 @@
pt) %7B%0A
+//
console.
@@ -1792,24 +1792,26 @@
Show) %7B%0A
+//
console.log(
@@ -2443,24 +2443,26 @@
(time);%0A
+//
console.log(
@@ -4712,32 +4712,32 @@
if (sho... |
67ff7e31e4fdb03db5558b15dfd660ba7c4ad864 | missing semicolon | src/patterns/bumper.js | src/patterns/bumper.js | define([
"jquery",
"../core/parser",
"../registry"
], function($, Parser, registry) {
var parser = new Parser("bumper");
parser.add_argument("margin", 0);
var _ = {
name: "bumper",
trigger: ".pat-bumper",
init: function($el, options) {
// initialize the ele... | JavaScript | 0.999988 | @@ -1214,24 +1214,25 @@
%7D%0A %7D
+;
%0A registr
|
e4f2399f10749b3e2ddfc3929ab66fc207a8dd4b | create separate module for image features | stitch/js/imgfeatures.js | stitch/js/imgfeatures.js | //imgfeatures
/*///////////////////////////////////////////////////////////////////
Make getters and setters for width and hight in order to make the canvas outside this object
////////////////////////////////////////////////////////////////////*/
(function(_this){
"use strict";
var imgOpt = function(imgsrc){
this... | JavaScript | 0 | @@ -677,48 +677,8 @@
(x);
-%0A%09%09stat.stop(%22load image into browser%22);
%0A%0A%09%09
@@ -5612,16 +5612,60 @@
0, 0);%0A
+%09%09%09 %09%09stat.stop(%22load image into browser%22);%0A
%09%09%09 %09%09st
|
df91fcef732ab2176835f982f6f2d8f293fc0157 | response is suck | listeners/events/app_mention.js | listeners/events/app_mention.js | module.exports = app => {
app.event('app_mention', async ({ event, context }) => {
try {
const result = await app.client.chat.postMessage({
token: context.botToken,
text: `<@${event.user.id}> はーい`
});
console.log(result);
}
catch (error) {
console.error(error);
... | JavaScript | 0.999999 | @@ -178,16 +178,50 @@
tToken,%0A
+ channel: context.channel,%0A
|
a7f32136deb299b0a9a1499f073199b33695707e | Improve geostamp api docs | local_modules/geostamp/index.js | local_modules/geostamp/index.js | /* eslint-disable no-var */
// A HTML markup module for GeoJSON points. In addition to well formatted
// coordinate output, it creates a Wikipedia-favoured link to
// tools.wmflabs.org/geohack
//
// Usage example:
// var p = { type: 'Point', coordinates: [-118.25013445, 34.05394492] }
// var html = geostamp.geohack... | JavaScript | 0.000001 | @@ -748,86 +748,293 @@
%7B%0A
-return (lat %3E= 0) ? 'N' : 'S'%0A%7D%0A%0Aexports.longitudeDirection = function (lng) %7B
+// Parameters%0A // lat%0A // number, latitude%0A //%0A // Return%0A // string in %5B'N', 'S'%5D%0A //%0A return (lat %3E= 0) ? 'N' : 'S'%0A%7D%0A%0Aexports.longitudeDirection = f... |
5ca52c531a0c3fbde5f7fb184a0a564ecd46005e | fix a test order bug, see diff for more | test/discovery_api_test.js | test/discovery_api_test.js | 'use strict';
var chai = require('chai');
var chaihttp = require('chai-http');
var expect = chai.expect;
chai.use(chaihttp);
var server = require('../server.js');
describe('Music Discovery for the win', function() {
it('should search for an artist', function(done) {
chai.request('localhost:3000')
.get('... | JavaScript | 0 | @@ -119,16 +119,18 @@
ihttp);%0A
+//
var serv
@@ -158,16 +158,84 @@
er.js');
+ huh, turns out mocha will run whatever server requires this, first.
%0A%0A%0Adescr
@@ -544,24 +544,83 @@
neration%22);%0A
+ expect(res.body.artists%5B0%5D.popularity).to.eql(65);%0A
done
@@ -885,24 +885,83 @@
eql(%22PSY... |
02b89d816989a401de8b532d084cabb3ced2ce73 | test :: encode & decode longs and ulongs | test/encode.decode.long.js | test/encode.decode.long.js | var fs = require('fs')
, concat = require('concat-stream')
, encoder = require('../lib/encoder')
, decoder = require('../lib/decoder')
, ei = require('../lib/const')
, tap = require('tap')
, test = tap.test
;
test('encode/decode/long', function(t) {
'use strict';
var enc = encoder();
... | JavaScript | 0.000002 | @@ -673,16 +673,920 @@
;%0A%7D);%0A%0A%0A
+test('encode/decode/long-negative', function(t) %7B%0A 'use strict';%0A%0A var enc = encoder();%0A enc.encodeVersion();%0A enc.encodeLong(-3000);%0A%0A enc.pipe(concat(function(data) %7B%0A var dec = decoder(data);%0A%0A t.ok(dec.decodeVersion(), ... |
42f992b66b56a71e58f2114142bb9dca8a3cea44 | Add exporting of root navigation ref and functions | src/navigation/index.js | src/navigation/index.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
export { ROUTES } from './constants';
export { getCurrentRouteName, getCurrentParams } from './selectors';
export { MainStackNavigator } from './Navigator';
| JavaScript | 0 | @@ -217,8 +217,75 @@
gator';%0A
+export %7B RootNavigator, rootNavigatorRef %7D from './RootNavigator';%0A
|
751205be23761f7c8d9e83e3bf2304ed62e6a9e3 | Switch LambdaCD text to pipeline Name. Add link to lambdacd homepage | frontend/src/js/main/Header.es6 | frontend/src/js/main/Header.es6 | import React, {PropTypes} from "react";
import {connect} from "react-redux";
import App from "App.es6";
import logo from "../../img/logo.png";
import "../../sass/header.sass";
import R from "ramda";
export const HeaderLinks = (props) => {
if(!props) {
return null;
}
const {links} = props;
if(!l... | JavaScript | 0 | @@ -1152,16 +1152,65 @@
%22logo%22%3E%0A
+ %3Ca href=%22http://www.lambda.cd/%22%3E%0A
@@ -1281,74 +1281,24 @@
%3C
-span className=%22logoText%22%3ELAMBDA CD%3C/span%3E%0A %3C/div%3E%0A
+/a%3E%0A
-
%3Cspa
@@ -1310,28 +1310,24 @@
ssName=%22
-pipelineName
+logoText
%... |
c7b533e52e25590bb4a81a97b6bddeb109a50c5b | Remove <title> from _document.js | frontend/src/pages/_document.js | frontend/src/pages/_document.js | import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
import JssProvider from 'react-jss/lib/JssProvider';
import getPageContext from '../utils/getPageContext';
class MyDocument extends Document {
render() {
const { pageContext } = this.props;
return (
<html lang... | JavaScript | 0.000011 | @@ -349,41 +349,8 @@
ad%3E%0A
- %3Ctitle%3EMy page%3C/title%3E%0A
|
fdc029eca29f834d8429d014daad1a0bc23ec467 | Fix conversion of string to int | res/main.js | res/main.js | var baseN;
$(function() {
rebuildBase();
$('#base').spinner({
min: 2,
max: alphabets['max'].length,
step: 1,
start: 85,
change: function(event, ui) {
var alphabet = alphabets['max'].substr(0, $("#base").spinner("value"));
$('#alphabet').val(alphabet);
$('#base').val(alphabet.length);
rebuil... | JavaScript | 0.999992 | @@ -330,26 +330,25 @@
%09%09%7D%0A %7D);%0A
-%09
%0A
+
%09$(%22#base%22).
@@ -523,26 +523,25 @@
ase();%0A%09%7D);%0A
-%09
%0A
+
%09$('#maxBits
@@ -666,18 +666,17 @@
%7D);%0A
-%09
%0A
+
%09$(%22#max
@@ -741,26 +741,25 @@
ase();%0A%09%7D);%0A
-%09
%0A
+
%09$('#btnEnco
@@ -963,26 +963,25 @@
);%0A%09%09... |
725a61cb40babb6dacab91f9d60b0c63ced99242 | add info window anchor data | scripted/src/extensions/map/scripts/marker.js | scripted/src/extensions/map/scripts/marker.js | /**
* @fileOverview Utility functions for generating a marker suitable for
* external libraries to use in making a marker.
* @author <a href="mailto:ryanlee@zepheira.com">Ryan Lee</a>
*/
/**
* @class
* @constructor
* @param {Object} icon
* @param {Array} icon.anchor
* @param {Array} icon.size
* @param {Str... | JavaScript | 0 | @@ -3050,24 +3050,162 @@
0%0A %5D;
+%0A%0A markerImage.infoWindowAnchor = (settings.bubbleTip === %22bottom%22) ?%0A %5BhalfWidth, height%5D :%0A %5BhalfWidth, 0%5D;
%0A %7D else
@@ -3465,16 +3465,71 @@
%5D;%0A
+ markerImage.infoWindowAnchor = %5BhalfWidth, 0%5D;%0... |
41948bd48c24576f6a5ef4bde381dba918cffbe2 | make helper functions global #145 | client/devel.js | client/devel.js | var addSelfToGame = function (gameId) {
if (! gameId) { return; }
var path = Router.current().path;
var inviteeId = path.split('?')[1]
Meteor.call("addSelf", {
gameId: gameId,
name: Meteor.user().profile.name
}, function (err) {
if (!err) {
Session.set("joined-game", gameId);
Session.... | JavaScript | 0.000001 | @@ -2457,20 +2457,16 @@
l value%0A
-var
selector
@@ -2781,20 +2781,17 @@
ult;%0A%7D;%0A
-var
+%0A
asNumber
@@ -2972,20 +2972,16 @@
);%0A// %7D%0A
-var
sessionT
|
d6a0ea976b247d76e2a607f099cb82f5ddc09c2e | Add CSS id to login link to aide in test selectors | troposphere/static/js/components/Header.react.js | troposphere/static/js/components/Header.react.js | define(function (require) {
var React = require('react/addons'),
Backbone = require('backbone'),
actions = require('actions'),
modals = require('modals'),
MaintenanceMessageBanner = require('./MaintenanceMessageBanner.react'),
globals = require('globals'),
Router = require('react-router'),
... | JavaScript | 0 | @@ -1852,32 +1852,48 @@
n%22%3E%0A %3Ca
+ id=%22login_link%22
href=%22/login?re
|
3bf0b5b238ae53f717083988f67f7962f41e0f05 | change info text | client/index.js | client/index.js | $(document).ready(function(){
var socket = io();
var attachFastClick = Origami.fastclick;
attachFastClick(document.body);
var DEAD_COLOR = '#eeeeee';
var TEST_DEAD_COLOR = 'rgb(238, 238, 238)';
var USER_COLOR = "#000000".replace(/0/g,function(){return (~~(Math.random()*16)).toString(16);});
window.songj... | JavaScript | 0.000001 | @@ -2884,24 +2884,77 @@
: '
-Place your cells
+Click & drag or tap to place cells, refresh for more when you run out
! Ro
|
fcb8ca7441a200cad3d09cf430307966bda5f573 | Add `yauzl` to the snapshot blacklist | script/lib/generate-startup-snapshot.js | script/lib/generate-startup-snapshot.js | const childProcess = require('child_process')
const fs = require('fs')
const path = require('path')
const electronLink = require('electron-link')
const CONFIG = require('../config')
module.exports = function (packagedAppPath) {
const snapshotScriptPath = path.join(CONFIG.buildOutputPath, 'startup.js')
const coreMo... | JavaScript | 0 | @@ -5169,32 +5169,127 @@
'index.js') %7C%7C%0A
+ requiredModuleRelativePath === path.join('..', 'node_modules', 'yauzl', 'index.js') %7C%7C%0A
required
|
717880fd3e803cbf4ae1fe38d5e8cf0a13ed3692 | fix hostname resolving when using something like Electron (#594) | client/index.js | client/index.js | /* global __resourceQuery */
var url = require('url');
var stripAnsi = require('strip-ansi');
var socket = require('./socket');
function getCurrentScriptSource() {
// `document.currentScript` is the most accurate way to find the current script,
// but is not supported in all browsers.
if(document.currentScript)
r... | JavaScript | 0 | @@ -2674,16 +2674,381 @@
%0A%09%7D%0A%7D;%0A%0A
+var hostname = urlParts.hostname;%0A%0Aif(urlParts.hostname === '0.0.0.0') %7B%0A%09// why do we need this check?%0A%09// hostname n/a for file protocol (example, when using electron, ionic)%0A%09// see: https://github.com/webpack/webpack-dev-server/pull/384%0A%09if(win... |
805f7546c0cafd6e8a5b704eea52fd6b892e4a8c | Add MM size to Button Demo Page (#36) | src/page/button-demo.js | src/page/button-demo.js | import React from 'react';
import { Page, Panel, Button } from 'react-blur-admin';
import {Row, Col} from 'react-flex-proto';
export class ButtonDemo extends React.Component {
render() {
return (
<Page title='Buttons'>
<Row>
<Col>
<Panel title='Large Buttons' size='md'>
... | JavaScript | 0 | @@ -1391,32 +1391,436 @@
%3CCol%3E%0A
+ %3CPanel title='Mini Medium Buttons' size='md'%3E%0A %3CButton type='default' size='mm' /%3E%0A %3CButton type='add' size='mm' /%3E%0A %3CButton type='remove' size='mm' /%3E%0A %3CButton type='info' size='m... |
17b66a9510f3ad0c6a9ff45884d40ecffcda2c0b | update plugin ctx definition | flow/common.js | flow/common.js | declare type MapObject = { [string]: any };
declare type ValidatingVM = {
$validator: Validator
};
declare type PluginContext = {
Validator: Validator,
ErrorBag: ErrorBag,
Rules: Object,
VM: Vue
};
| JavaScript | 0 | @@ -192,19 +192,8 @@
ject
-,%0A VM: Vue
%0A%7D;%0A
|
647aea807a092b552fb6dcf77fe56bdc7e5cf0d1 | Fix silly javascript bug - was using global variables | resources/public/js/fractal-maths.js | resources/public/js/fractal-maths.js | function smoothed_count(
iterations,
final_modulus_squared){
final_modulus = Math.sqrt(final_modulus_squared);
if (final_modulus< 1){
return iterations
}
else{
return iterations - (Math.log(Math.log(final_modulus)) / Math.log(2))
}
}
function mandelbrot_smoothed_iteration... | JavaScript | 0.000021 | @@ -411,24 +411,28 @@
nary)%7B%0A%0A
+var
mod_z = (ini
@@ -501,24 +501,28 @@
nary);%0A%0A
+var
real = initi
@@ -530,24 +530,28 @@
l_real;%0A
+var
imaginary =
@@ -570,24 +570,28 @@
inary;%0A%0A
+var
iterations =
@@ -679,16 +679,20 @@
+var
new_real
|
57116f85e0a99a5c511d18b817fe94efc3fe90bd | fix change PageSize and SrtOrder | public/javascripts/render-voicebanks.js | public/javascripts/render-voicebanks.js | $(function () {
$('.selectpicker').selectpicker({
'selectedText': 'cat'
});
showVoicebanks(page);
});
var showVoicebanks = function(page){
$.ajax({
url: "/json/getAllVoicebanks",
data: {
page: page,
pageSize: $pageSize.val(),
sortCode: $sortOrder.... | JavaScript | 0 | @@ -1532,36 +1532,33 @@
%09showVoicebanks(
-page
+0
);%0D%0A%09 %7D);%0D%0A%09
@@ -1625,20 +1625,17 @@
cebanks(
-page
+0
);%0D%0A%09
|
344055e7da0b4ae061f4b45077ae7c74621a5675 | add instruction for enabling flash player | public/js/p3/widget/HeatmapContainer.js | public/js/p3/widget/HeatmapContainer.js | define([
"dojo/_base/declare", "dojo/_base/lang",
"swfobject/swfobject"
], function(declare, lang,
swfobject){
return declare([], {
flashDom: null,
currentData: null,
initializeFlash: function(domName){
var flashVars = {
showLog: false,
startColor: '0x6666ff',
endColor: '0x00ff00'
};
... | JavaScript | 0.000001 | @@ -588,16 +588,416 @@
rget%22);%0A
+%09%09%09// add alternative text for instruction on enable flash player%0A%09%09%09target.setAttribute(%22class%22, %22msg-box-below-topnav%22);%0A%09%09%09target.innerHTML = %22If you don't see heatmap image, you need to enable Adobe flash player. %3Ca href='https://helpx.adobe.co... |
60992a07c9871a5ee6bb36ed89313d2eee0be4e2 | Change alert text in gender page | public/templates/quiz/quizController.js | public/templates/quiz/quizController.js | angular.module("personaApp")
.controller('quizController', ['$http', function($http){
var quiz = this;
quiz.questionNumber = 0;
quiz.gender = -1;
quiz.questions = [];
quiz.results = [];
quiz.personalityCounters = [0,0,0,0,0,0,0,0,0];
quiz.highest = 0;
quiz.isGenderPage = function(){
... | JavaScript | 0.000001 | @@ -1160,26 +1160,47 @@
lih
-cowo apa cewe dulu
+dahulu gender kamu sebelum melanjutkan.
%22);%0A
|
348c3e4f146d1d3b2bda87a8cd67c036e5e41d14 | Allow https://people.epfl.ch/* | EPFL_People.user.js | EPFL_People.user.js | // ==UserScript==
// @name EPFL People
// @namespace none
// @description A script to improve browsing on people.epfl.ch
// @include http://people.epfl.ch/*
// @version 1.0.7
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/... | JavaScript | 0.000002 | @@ -163,16 +163,57 @@
fl.ch/*%0A
+// @include https://people.epfl.ch/*%0A
// @vers
|
42a1ea44130284d8041c9bcdb3010d2c1d9f9863 | Use async.series instead of nested callbacks | test/functional/run-all.js | test/functional/run-all.js | var path = require('path');
var lodash = require('lodash');
var run = require('../../src/index.js');
var capabilities = [{browserName: 'phantomjs'}];
var driver = 'phantomjs';
var configSeleniumWebdriverJasmine = {
driver: driver,
capabilities: capabilities,
tests: [
path.join(__dirname, 'selenium-webdrive... | JavaScript | 0.000001 | @@ -1,12 +1,42 @@
+var async = require('async');%0A
var path = r
@@ -2430,581 +2430,339 @@
%7D;%0A%0A
-run(configSeleniumWebdriverJasmine, function(error, results) %7B%0A handleErrorCallback(error, results);%0A run(configSeleniumWebdriverJasmineWithHelper, function(error, results) %7B%0A handleErrorCallback(erro... |
e55df06bc4e0d1ed484e54e31687bc13abe0c2b7 | Switch templates correctly | gatsby-node.js | gatsby-node.js | /**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
const path = require('path')
const fs = require('fs')
const fetch = require('node-fetch')
const yaml = require('js-yaml')
exports.onCreateWebpackConfig = ({ stage: _stage, actions }) => {
actions.setWebpackConf... | JavaScript | 0.000004 | @@ -2022,25 +2022,42 @@
case '
-reference
+data':%0A case 'classes
':%0A
|
b4b345f9b300afcb6280d9b3e7397bf0dc074fc9 | remove comments | src/plugins/Informer.js | src/plugins/Informer.js | const Plugin = require('./Plugin')
const html = require('yo-yo')
/**
* Informer
* Shows rad message bubbles
* used like this: `core.emit('informer', 'hello world', 'info', 5000)`
* or for errors: `core.emit('informer', 'Error uploading img.jpg', 'error', 5000)`
*
*/
module.exports = class Informer extends Plugin... | JavaScript | 0 | @@ -1047,860 +1047,8 @@
%7D%0A%0A
- // showInformer (msg, type, duration) %7B%0A // this.core.setState(%7B%0A // informer: %7B%0A // isHidden: false,%0A // type: type,%0A // msg: msg%0A // %7D%0A // %7D)%0A%0A // window.clearTimeout(this.timeoutID)%0A // if (duration === 0)... |
8dd6f88ab133ec6aace935c2c3403172fbedc925 | fix test case | test/queries/type-query.js | test/queries/type-query.js | import termQuery from '../../src/queries/type-query'
import {expect} from 'chai'
describe('typeQuery', () => {
it('should create a type query', () => {
let result = termQuery('custom_type')
expect(result).to.eql({
type: {
value: 'custom-type'
}
})
})
})
| JavaScript | 0.000022 | @@ -187,9 +187,9 @@
stom
-_
+-
type
|
e7675253e5ba26c399882b3034d32255d391e79e | Make serialisation methods work with current URL, and use default values | src/probabilitydrive.js | src/probabilitydrive.js | (function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else {
root.probabilitydrive = factory();
}
}(this, function () {
function ProbabilityDrive() {
this.currentUrl;
this.store = {};
this.routeUrls =... | JavaScript | 0 | @@ -2600,26 +2600,98 @@
return
-this.store
+%7B%0A currentUrl: this.currentUrl,%0A store: this.store%0A %7D
;%0A %7D%0A
@@ -2741,32 +2741,102 @@
unction(data) %7B%0A
+ data = data %7C%7C %7B%7D;%0A this.currentUrl = data.currentUrl;%0A
this.sto
@@ -2844,16 +28... |
8a5668c4e0f003f7b5635805ae421e411e8d5afa | update tests of main duck | test/redux/modules/main.js | test/redux/modules/main.js | import test from 'ava';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import mainReducer, {setInterfaceFontSizeScalingFactor, SET_INTERFACE_FONT_SIZE_SCALING_FACTOR,
setAppFont, SET_APP_FONT, setAppLocale, SET_APP_LOCALE, setWriteDelay,
SET_WRITE_DELAY, setIntl, openExternal, ... | JavaScript | 0 | @@ -2271,43 +2271,42 @@
uld
-create an action to get app version
+get app version without any errors
', a
@@ -3660,60 +3660,106 @@
st('
-should get app version without any errors', (t) =%3E %7B
+main reducer should handle action GET_APP_VERSION_SUCCESS', (t) =%3E %7B%0A const appVersion = '0.0.1';
%0A c
@@ -3788... |
d8c4f4bd1920a9353f6708cb71490a0f969464b1 | Update test msg | test/remoteMethods.test.js | test/remoteMethods.test.js | var request = require('supertest');
var loopback = require('loopback');
var expect = require('chai').expect;
var JSONAPIComponent = require('../');
var app, Post;
describe('loopback json api remote methods', function () {
beforeEach(function () {
app = loopback();
app.set('legacyExplorer', false);
var ds... | JavaScript | 0.000001 | @@ -886,32 +886,28 @@
urn
-a 201 CREATED status cod
+remote method messag
e',
@@ -1060,9 +1060,9 @@
t(20
-1
+0
)%0A
|
9ea58e1d191b6ee6f92aba2a443469c29f58a1f2 | update bs.common.spec.js | test/sdk/bs.common.spec.js | test/sdk/bs.common.spec.js | import { common } from '../../src/dove.sdk/bs/common'
describe('SDK.BS.common', () => {
it('Tool getType', () => {
var cbName1 = common._get_callback(function () {}, true)
var cbName2 = common._get_callback(function () {}, true)
expect(cbName1).not.toEqual(cbName2)
})
})
| JavaScript | 0.000001 | @@ -92,20 +92,21 @@
it('
-Tool getType
+_get_callback
', (
@@ -280,12 +280,107 @@
e2)%0A %7D)
+%0A%0A it('getJQuery$', () =%3E %7B%0A var $ = common.getJQuery$()%0A expect($).toBeUndefined()%0A %7D)
%0A%7D)%0A
|
9935fa30c65ed71b5226e9b15ab0182da1cabb7c | Resolve author urls! | get-chapter.js | get-chapter.js | 'use strict'
module.exports = getChapter
var url = require('url')
var cheerio = require('cheerio')
function getChapter (fetch, chapter) {
return fetch(chapter).spread(function (finalURL, html) {
var chapterHash = url.parse(chapter).hash
var parsed = url.parse(finalURL)
var id
if (/^#post/.test(chapte... | JavaScript | 0 | @@ -1045,16 +1045,34 @@
horUrl =
+ url.resolve(base,
author.
@@ -1083,16 +1083,17 @@
('href')
+)
%0A var
|
d214c651f274b977238007c76ee0ad8299644a6d | Fix tests for hash updates | test/spec/renderer/hash.js | test/spec/renderer/hash.js | describe("hash", function () {
var hash, map;
beforeEach(function () {
hash = iD.Hash();
map = {
on: function () { return map; },
off: function () { return map; },
zoom: function () { return arguments.length ? map : 0; },
center: function... | JavaScript | 0 | @@ -41,18 +41,30 @@
ash, map
+, controller
;%0A
-
%0A bef
@@ -369,16 +369,17 @@
: %5B0, 0%5D
+;
%7D,%0A
@@ -450,16 +450,162 @@
: %5B0, 0%5D
+; %7D%0A %7D;%0A controller = %7B%0A on: function () %7B return controller; %7D,%0A off: function () %7B return controller... |
23aa0cc7e071f439a18134fc61522654ed124514 | Fix bug on progress map reduce | server/app/guildKills/guildKillModel.js | server/app/guildKills/guildKillModel.js | "use strict";
var async = require("async");
var applicationStorage = process.require("core/applicationStorage.js");
var validator = process.require("core/utilities/validators/validator.js");
/**
* Upsert a kill
* @param region
* @param realm
* @param name
* @param raid
* @param boss
* @param bossWeight
* @par... | JavaScript | 0 | @@ -5586,32 +5586,59 @@
ce == %22progress%22
+ && values%5Bidx + 1%5D.roster
) %7B%0A
|
a90601e77b027e39ef7a7920c05830978e6f07c4 | Remove the associated PaperScope when a Project is removed. | src/project/Project.js | src/project/Project.js | /*
* Paper.js
*
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
* based on Scriptographer.org and designed to be largely API compatible.
* http://paperjs.org/
* http://scriptographer.org/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* Copyright (c) 2011, Jue... | JavaScript | 0 | @@ -2774,16 +2774,41 @@
ex, 1);%0A
+%09%09%09this._scope.remove();%0A
%09%09%09this.
|
43dc1df23c4660156ad39675679e89ab0cbfa4dd | Fix an indentation | src/public/js/const.js | src/public/js/const.js |
define([], function () {
'use strict';
return {
'tooltip': {
'showDelay': 500, // ms
'hideDelay': 0, // ms
},
};
});
| JavaScript | 0.999961 | @@ -67,17 +67,16 @@
: %7B%0A%0A%09%09%09
-%09
'showDel
@@ -91,17 +91,16 @@
, // ms%0A
-%09
%09%09%09'hide
|
f583e08bb16b4143372a2499d9f9f341bc9b2dc4 | Handle errors in bundle uploads better. | lib/cast-client/commands/bundles/upload.js | lib/cast-client/commands/bundles/upload.js | /*
* Licensed to Cloudkick, Inc ('Cloudkick') under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Cloudkick licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not us... | JavaScript | 0 | @@ -3825,24 +3825,97 @@
request) %7B%0A
+ if (err) %7B%0A callback(err);%0A return;%0A %7D%0A%0A
func
|
9a62d2b43823f25474954b5123adfcc468444719 | fix tests | test/exceptions/exceptionHandler.spec.js | test/exceptions/exceptionHandler.spec.js | var ServiceFactory = require('../../src/common/serviceFactory')
var Config = require('../../src/lib/config')
var TransportMock = require('../utils/transportMock')
describe('ExceptionHandler', function () {
var exceptionHandler
var config
var opbeatBackend
var logger
var transport
beforeEach(function () {
... | JavaScript | 0.002923 | @@ -1967,32 +1967,36 @@
ata', function (
+done
) %7B%0A config.s
@@ -2572,61 +2572,8 @@
) %7B%0A
- expect(logger.warn).not.toHaveBeenCalled()%0A
|
8959203bb1e7f51a102106438938de8a44fbdd6b | reset fake port object for every test | test/frontend/addressbook/google_test.js | test/frontend/addressbook/google_test.js | /*global sinon, chai, GoogleContacts */
/* jshint expr:true, camelcase:false */
var expect = chai.expect;
describe("GoogleContacts", function() {
var sandbox, fakePort, fakeGApi, sampleFeed;
function caller(cb) {
cb();
}
fakePort = {
postEvent: sinon.spy()
};
fakeGApi = {
auth: {
init... | JavaScript | 0 | @@ -232,56 +232,8 @@
%7D%0A%0A
- fakePort = %7B%0A postEvent: sinon.spy()%0A %7D;%0A%0A
fa
@@ -984,24 +984,79 @@
x.create();%0A
+ fakePort = %7B%0A postEvent: sandbox.spy()%0A %7D;%0A
%7D);%0A%0A aft
|
6024fd00e7a56fe027a33768b6867fe51337ee53 | Use prefixName abstraction in nano.use | NanoProxyDbFunctions.js | NanoProxyDbFunctions.js | var NanoProxyDbFunctions = function(nano, prefix) {
this.nano = nano;
this.prefix = prefix;
};
NanoProxyDbFunctions.prototype.create = function(name, callback) {
return this.nano.db.create(prefixName.call(this, name), callback);
};
function prefixName(name) {
return [this.prefix, name].join("_");
}... | JavaScript | 0.000004 | @@ -970,36 +970,34 @@
use(
-%5Bthis.prefix, name%5D.join(%22_%22
+prefixName.call(this, name
));%0D
|
f220a2390d2f597b83d73e29b714408c2948190b | correct gulp config | gulp/config.js | gulp/config.js | var src = './src';
var dest = './dist';
var demo = './demo';
module.exports = {
build: {
src: src,
deps: './node_modules'
dest: dest
},
demo: {
src: {
demo: demo,
build: dest
},
dest: demo + '/build',
watch: [
src + '/**/*',
demo + '/!(build)/**/*.*'
],
... | JavaScript | 0.000003 | @@ -126,16 +126,17 @@
modules'
+,
%0A des
|
a6aa664adf985c03312b8b1c3af55f294180a826 | Update remote origin for deploy github pages | gulp/config.js | gulp/config.js | module.exports = {
// Autoprefixer
autoprefixer: {
// https://github.com/postcss/autoprefixer#browsers
browsers: [
'Explorer >= 10',
'ExplorerMobile >= 10',
'Firefox >= 30',
'Chrome >= 34',
'Safari >= 7',
'Opera >= 23',
'iOS >= 7',
'Android >= 4.4',
'Bla... | JavaScript | 0 | @@ -716,16 +716,40 @@
origin:
+ 'origin2' // default is
'origin
|
97d28e688b0fe58cfd3ba5dd4793c9963b9e1239 | Update namespace | lib/node_modules/@stdlib/iter/lib/index.js | lib/node_modules/@stdlib/iter/lib/index.js | /**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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 a... | JavaScript | 0.000001 | @@ -3399,32 +3399,222 @@
iter/nth' ) );%0A%0A
+/**%0A* @name iterPipeline%0A* @memberof ns%0A* @readonly%0A* @type %7BFunction%7D%0A* @see %7B@link module:@stdlib/iter/pipeline%7D%0A*/%0AsetReadOnly( ns, 'iterPipeline', require( '@stdlib/iter/pipeline' ) );%0A%0A
/**%0A* @name iter
|
a52515ea4f52fc7243b3daeebbf99245b267b725 | introduce failing test case | test/tests/strings_test.js | test/tests/strings_test.js | import virtualizeString from '../../src/strings';
import h from 'snabbdom/h';
describe("#virtualizeString", () => {
it("should convert a single node with no children", () => {
expect(virtualizeString("<div />")).to.deep.equal(
h('div')
);
});
it("should convert nodes with chil... | JavaScript | 0.000003 | @@ -1029,32 +1029,511 @@
);%0A %7D);%0A%0A
+ it(%22should handle control characters in attribute values%22, () =%3E %7B%0A const input = %22%3Ctextarea placeholder='Hey Usher, %5Cn%5CnAre these modals for real?!' class='placeholder-value'%3E%3C/textarea%3E%22;%0A expect(virtualizeString(input))... |
5da3221b53aba88bab50e52c903d3cf355696db1 | Add test for entities in attributes. | test/tests/strings_test.js | test/tests/strings_test.js | import virtualizeString from '../../src/strings';
import h from 'snabbdom/h';
describe("#virtualizeString", () => {
it("should convert a single node with no children", () => {
expect(virtualizeString("<div />")).to.deep.equal(
h('div')
);
});
it("should convert nodes with chil... | JavaScript | 0 | @@ -3387,32 +3387,353 @@
' %5D)%0A );%0A
+ expect(virtualizeString(%22%3Ca href='http://example.com?test=true&something=false'%3ETest%3C/a%3E%22)).to.deep.equal(%0A h('a', %7B%0A attrs: %7B%0A href: 'http://example.com?test=true&something=false'%0A ... |
186b42b08e8b73da19ba639da265b30b2df9f87d | Update test name | test/unformat-usd-tests.js | test/unformat-usd-tests.js | var unFormatUSD = require('../index.js');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, ... | JavaScript | 0.000002 | @@ -664,17 +664,19 @@
exports.
-f
+unF
ormatUSD
|
f8a8de937465426633b56e4c5b209cc4282a9e73 | Rename cesium compinent to hscesium in common_paths for browserify | common_paths.js | common_paths.js | exports.paths = [
__dirname + '/components/toolbar',
__dirname + '/node_modules',
__dirname + '/node_modules/openlayers/dist',
__dirname + '/node_modules/requirejs',
__dirname + '/node_modules/cesium/Build/Cesium',
__dirname + '/node_modules/angular-cookies/angular-cookies',
__dirname + '/no... | JavaScript | 0.000236 | @@ -719,16 +719,18 @@
ponents/
+hs
cesium',
|
e993d5497fd86cdee28ddb5258ce5004fa4c23c4 | Add labelStyle support to native Buttons | shared/common-adapters/button.native.js | shared/common-adapters/button.native.js | /* @flow */
import React, {Component} from 'react'
import {TouchableHighlight, View} from 'react-native'
import {globalColors, globalStyles} from '../styles/style-guide'
import Text from './text'
import ProgressIndicator from './progress-indicator'
import type {Props} from './button'
const Progress = () => (
<View... | JavaScript | 0 | @@ -1501,16 +1501,20 @@
style=%7B
+%7B...
labelSty
@@ -1515,16 +1515,43 @@
belStyle
+, ...this.props.labelStyle%7D
%7D%3E%7Bthis.
|
fc07b9e372be447cc894d5f0ea5a7c6e5220cd01 | reset theme on logout | ui/src/store/modules/user.js | ui/src/store/modules/user.js | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | JavaScript | 0 | @@ -921,16 +921,31 @@
PROJECT,
+ DEFAULT_THEME,
ASYNC_J
@@ -1829,16 +1829,94 @@
onArray%0A
+ %7D,%0A RESET_THEME: (state) =%3E %7B%0A Vue.ls.set(DEFAULT_THEME, 'light')%0A
%7D%0A
@@ -3876,24 +3876,54 @@
_APIS', %7B%7D)%0A
+ commit('RESET_THEME')%0A
Vue.
|
ed46ac1d268437cf576208889b1b91675373b617 | Print version link | gui/all.js | gui/all.js | 'use strict';
(function (document, window) {
document.addEventListener('DOMContentLoaded', function () {
// Multi-checkbox required fix
const form = document.getElementsByTagName('form');
for (let a = 0; a < form.length; a++) {
let sel = 'input[type=checkbox][multiple]';
... | JavaScript | 0 | @@ -1042,32 +1042,300 @@
%7D%0A %7D%0A%0A
+ // Print version%0A const print = document.querySelectorAll('span%5Bdata-act=print%5D');%0A%0A for (let a = 0; a %3C print.length; a++) %7B%0A print%5Ba%5D.addEventListener('click', function () %7B%0A window.print();%0... |
207f59912d811e3f6db873c54f6e677eb4b6220b | Convert js watcher to browserify-only (backend will use nodemon that has its own separate watcher anyway) | gulp/js.js | gulp/js.js | var browserify = require('browserify'),
browserSync = require('browser-sync'),
buffer = require('vinyl-buffer'),
source = require('vinyl-source-stream'),
extend = require('util-extend'),
watchify = require('watchify');
module.exports = function(gulp, plugins) {
var paths = {
'watch': [... | JavaScript | 0.000001 | @@ -1831,27 +1831,16 @@
watch:js
-:browserify
', 'wait
@@ -1890,29 +1890,29 @@
e, then
-' +%0A
+rebuilds ' +%0A
@@ -1933,20 +1933,9 @@
- 'rebuilds
+'
them
@@ -2038,422 +2038,8 @@
;%0A%0A%0A
- // gulp.task('watch:js:serve', 'waits for server-side javascript files to change, then ' +%0... |
4435408cdc5d38f9df4f012dde56306aafa5ea8a | Revert "Add mode" | src/redux/navigation.js | src/redux/navigation.js | const keyMirror = require('keymirror');
const Types = keyMirror({
SET_MODE: null,
SET_SEARCH_TERM: null
});
module.exports.navigationReducer = (state, action) => {
if (typeof state === 'undefined') {
state = '';
}
switch (action.type) {
case Types.SET_MODE:
return action.mode;
... | JavaScript | 0 | @@ -64,28 +64,8 @@
r(%7B%0A
- SET_MODE: null,%0A
@@ -86,16 +86,16 @@
M: null%0A
+
%7D);%0A%0Amod
@@ -244,61 +244,8 @@
) %7B%0A
- case Types.SET_MODE:%0A return action.mode;%0A
@@ -351,94 +351,12 @@
%7D%0A
+
%7D;%0A%0A
-module.exports.setMode = mode =%3E (%7B%0A type: Types.SET_MODE,%... |
dca6f1979dcd78773f75891c8b0345ba8440dc34 | add experimental support for WebSockets to SimpleRestService | src/rest/hooks/index.js | src/rest/hooks/index.js | 'use strict';
const hooks = require('feathers-hooks');
exports.before = {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
};
exports.after = {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
};
| JavaScript | 0 | @@ -51,16 +51,463 @@
oks');%0A%0A
+/*%0Awebsockets requires passing in path vars on the query%0A* so we move them off the query into the params%0A* this might%0A* */%0Aconst socketfix = (hook)=%3E%7B%0A if(hook.params.provider === 'socketio')%7B%0A%0A if(hook.params.query._db)%7B%0A hook.params%5B'_db'%5D=hoo... |
9039f9f0aeedbe0f1a1dab2aa93f6840e12af71f | improve stability of andThen() | src/result.andThen.c.js | src/result.andThen.c.js | 'use strict';
const H = require('../interface/result.h').prototype;
const sym = require('../interface/result-sym.h');
H.andThen = function ($resultEmitter) {
if (this[sym.isOk]) {
this[sym.value] = $resultEmitter(this[sym.value]);
}
return this;
};
| JavaScript | 0.000002 | @@ -14,17 +14,17 @@
%0A%0Aconst
-H
+h
= requi
@@ -50,16 +50,34 @@
sult.h')
+;%0Aconst hProto = h
.prototy
@@ -136,9 +136,14 @@
;%0A%0A%0A
-H
+hProto
.and
@@ -185,12 +185,15 @@
-if (
+return
this
@@ -202,19 +202,16 @@
ym.isOk%5D
-) %7B
%0A
@@ -215,26 +215,20 @@
-this%5Bsym.value%5D =
+? h... |
77c483780744a602696ad198e0908032542438ad | fix to unwrap parens at the repl | src/sc/node-cli/repl.js | src/sc/node-cli/repl.js | "use strict";
var nodeREPL = require("repl");
var vm = require("vm");
var SCScript = require("./scscript");
function isSCObject(obj) {
return obj && typeof obj._ !== "undefined";
}
function toString(obj) {
if (isSCObject(obj)) {
return obj.toString();
}
return obj;
}
var replOptions = {
prompt: "scsc>... | JavaScript | 0 | @@ -368,24 +368,189 @@
callback) %7B%0A
+ // Node's REPL sends the input ending with a newline and then wrapped in%0A // parens. Unwrap all that.%0A input = input.replace(/%5E%5C((%5B%5Cs%5CS%5D*)%5Cn%5C)$/m, %22$1%22);%0A%0A
try %7B%0A
|
91e08d2ff75b26beb5abf5a4ec8503e8fe0372e2 | update backgroundTexture on before render | src/scenes/vgl-scene.js | src/scenes/vgl-scene.js | import { Scene } from 'three';
import VglObject3d from '../core/vgl-object3d';
import { parseFog, parseColor } from '../parsers';
import { string, fog } from '../validators';
/**
* This is where you place objects,
* corresponding [THREE.Scene](https://threejs.org/docs/index.html#api/scenes/Scene).
*
* Properties o... | JavaScript | 0 | @@ -859,16 +859,376 @@
),%0A %7D,%0A
+ methods: %7B%0A setBackgroundTexture() %7B%0A const %7B vglNamespace: %7B textures %7D, inst, backgroundTexture %7D = this;%0A if (backgroundTexture in textures) inst.background = textures%5BbackgroundTexture%5D;%0A %7D,%0A %7D,%0A created() %7B%0A const %7... |
4b812dd917fd825f101705a6335adc15454678a1 | Remove log | src/scripts/prettify.js | src/scripts/prettify.js | ;(() => {
'use strict'
const entityMapObject = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": ''',
'/': '/',
}
const $codeSnippets = document.querySelectorAll('.code-content')
for (let index = 0; index < $codeSnippets.length; index++) {
console.log($codeS... | JavaScript | 0.000001 | @@ -295,122 +295,8 @@
) %7B%0A
- console.log($codeSnippets%5Bindex%5D.parentNode.classList.contains('lang-html'), $codeSnippets%5Bindex%5D.parentNode)%0A
|
e44d89d3eda9410857e7ecf9ed603e19dabec7d8 | Fix localisation plugin sourcemaps | tooling/rollup/rollup-plugin-localise.js | tooling/rollup/rollup-plugin-localise.js | import { createFilter } from '@rollup/pluginutils';
import parseDb from '../i18n/parse-db.js';
import { readFileSync } from 'fs';
const isId = /^[A-Z0-9_]+$/;
const enumerateStrings = function (code, idsInUse, db) {
const locRegex = /\bloc\(\s*['"`]([A-Z0-9_]+)['"`]/g;
return code.replace(locRegex, (_, id) =>... | JavaScript | 0 | @@ -1,16 +1,60 @@
+import parseDb from '../i18n/parse-db.js';%0A%0A
import %7B createF
@@ -100,76 +100,73 @@
ort
-parseDb from '../i18n/parse-db.js';%0Aimport %7B readFileSync %7D from 'fs
+%7B readFileSync %7D from 'fs';%0Aimport MagicString from 'magic-string
';%0A%0A
@@ -230,16 +230,22 @@
nction (
+file,
code... |
264aad1cf7259975ca2a1b1043f28ebc5620ae45 | Fix Ember.merge/assign deprecation warnings | tests/helpers/start-app.js | tests/helpers/start-app.js | import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';
export default function startApp(attrs) {
let application;
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
Ember.run... | JavaScript | 0.000003 | @@ -192,21 +192,22 @@
= Ember.
-merge
+assign
(%7B%7D, con
@@ -241,13 +241,14 @@
ber.
-merge
+assign
(att
|
de25b0f471de1eba87803f3ba3dcc70de72468b7 | Add todos in comments. | tests/highlighting_test.js | tests/highlighting_test.js | /* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of so... | JavaScript | 0 | @@ -2360,16 +2360,165 @@
s();%0A%7D%0A%0A
+//TODO: test highlighting of: replace json value of $tweet(%22created_at%22) with $dateTime;%0A//TODO: check highlighting for true, null, false in JSONiq.%0A
module.e
|
88bb7db54831233056822d84bec037a2ed7dfbc7 | add comba | QCLean-Chrome/qclean.js | QCLean-Chrome/qclean.js | var qclean = qclean || {};
qclean.removeADsLink = function(){
var adsLink = document.getElementsByClassName("adsCategoryTitleLink");
while(adsLink.length>0){
for(var i=0;i<adsLink.length;i++){
var target = adsLink[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNod... | JavaScript | 0.998571 | @@ -136,16 +136,36 @@
Link%22);%0D
+%0A var combo = 0;%0D
%0A%0D%0A w
@@ -524,24 +524,95 @@
tleLink%22);%0D%0A
+ combo++;%0D%0A if(combo%3E3)%7B%0D%0A break;%0D%0A %7D%0D%0A
%7D%0D%0A%7D;%0D%0A%0D
|
3560cb5839514148f05c038639714d766d1e80b1 | Update keycode.js | js/keycode.js | js/keycode.js | (function() {
var mainSpan, shiftSpan, ctrlSpan, altSpan, nameSpan; //, metaSpan
function startup() {
mainSpan = document.getElementById("keydisplay");
nameSpan = document.getElementById("namedisplay");
shiftSpan = document.getElementById("shiftkey");
ctrlSpan = document.getElementById("ctrlkey")... | JavaScript | 0.000001 | @@ -655,17 +655,17 @@
(e.key
-=
+!
= undefi
|
f21cdcf84e306c32b2a1152384f457e4ab40ee55 | add new keyword | interpreter.js | interpreter.js | var Ξ=[],//stack
//I/O functions
ô=i=>document.getElementById('o').value+=i!=[]._?i:(Ξ.shift(),Ξ.shift(),Ξ.join`\n`),//output
ℹ=i=>[i=i!=[]._?document.getElementById("c").value[i]:document.getElementById("c").value,Ξ.push(i)][0],//source
//stack functions
ᵖ=(i=0)=>{Array.prototype.slice.call(arguments).map(x... | JavaScript | 0.000002 | @@ -1966,16 +1966,40 @@
turn ')%0A
+%09%09.replace(/%C5%8B/g,'new ')%0A
%09%09.repla
|
fa64eb8b71d929e3766e3d8c2a011d9bee3588cc | Fix for "Cannot read property 'processName' of undefined" | tasks/json.js | tasks/json.js | /*
* grunt-json
* https://github.com/wilsonpage/grunt-json
*
* Copyright (c) 2012 Wilson Page
*
* Licensed under the MIT license.
*/
"use strict";
module.exports = function (grunt) {
var path = require('path');
var defaultProcessNameFunction = function (name) {
return name;
};
var co... | JavaScript | 0 | @@ -383,16 +383,22 @@
.options
+ %7C%7C %7B%7D
;%0A
@@ -414,27 +414,16 @@
espace =
- options &&
options
@@ -580,19 +580,8 @@
th =
- options &&
opt
|
4b63ce1dba9a695675e102ae8628aa4313a2b927 | add alarm middleware | test/alarm.js | test/alarm.js | var chai = require('chai');
var expect = chai.expect;
var request = require('supertest');
var muk = require('muk');
var connect = require('connect');
var sinon = require('sinon');
var template = require('./supporter').template;
var app = connect();
var APPID = "wxd930ea5d5a258f4f";
var PAYSIGNKEY = "L8LrMqqeGRxST5reo... | JavaScript | 0.000001 | @@ -785,24 +785,13 @@
be('
-bizpaygetpackage
+alarm
', f
|
adcc551bd073efefbb1bc45cda41f7eb314b10b2 | Use assert instead of should | test/index.js | test/index.js |
var http = require('http')
var should = require('should')
var client = require('@request/client')
var purest = require('../')(client)
describe('aliases', () => {
var server
before((done) => {
server = http.createServer()
server.on('request', (req, res) => {
res.end(req.url)
})
server.liste... | JavaScript | 0.000002 | @@ -1,17 +1,14 @@
%0Avar
-http
+t
= requi
@@ -15,25 +15,25 @@
re('
-http
+assert
')%0Avar
-should
+http
= r
@@ -40,22 +40,20 @@
equire('
-should
+http
')%0Avar c
@@ -667,38 +667,33 @@
y) =%3E %7B%0A
-should
+t
.equal(body, '/?
@@ -1071,38 +1071,33 @@
y) =%3E %7B%0A
-should
+t
.equal(body,... |
91204d050b105223e3b59e5d21d134b9686bf296 | Fix bad fixture key | test/index.js | test/index.js | /* global describe, it */
var chai = require('chai');
var expect = chai.expect;
var builder = require('../dist/');
const options = {
template: {
partials: `${__dirname}/fixtures/partials/*`,
helpers: `${__dirname}/fixtures/helpers/*.js`
}
};
describe ('drizzle builder integration', () => {
it ('should r... | JavaScript | 0.000001 | @@ -137,16 +137,17 @@
template
+s
: %7B%0A
|
06e13eade60f390c663f88999e1a29c830e702e1 | Fix listing errors | test/index.js | test/index.js | 'use strict';
var expect = require('chai').expect;
var plugin = require('..');
var sinon = require('sinon');
var child = require('child_process');
describe('plugin', function() {
beforeEach(function() {
var spawn = child.spawn;
sinon.stub(child, 'spawn', function(cmd, args) {
var versionMatch = args[... | JavaScript | 0.000002 | @@ -380,16 +380,17 @@
%5Cd%5D*)%22/)
+;
%0A i
@@ -544,16 +544,17 @@
.12.0'%5D)
+;
%0A %7D
@@ -1099,16 +1099,17 @@
%5B'N/A'%5D)
+;
%0A %7D
@@ -4469,24 +4469,25 @@
l;'%0A %7D)
+;
%0A %7D).done
@@ -4492,18 +4492,20 @@
ne(done)
+;
%0A %7D)
+;
%0A%7D);%0A
|
26a9cad65a7a60ffb31fdea65af26a0d3e72a9dd | Update the path to Amanda in the ‘except.js’ file | tests/validators/except.js | tests/validators/except.js | // Load dependencies
var amanda = require('../../src/amanda.js');
/**
* Test #1
*/
exports['Test #1'] = function(test) {
var count = 0;
var schema = {
required: true,
type: 'string',
except: [
'admin',
'administrator',
'superadmin'
]
};
[
'admin',
'administrator',... | JavaScript | 0 | @@ -46,18 +46,19 @@
/../
-src/amanda
+dist/latest
.js'
|
727b0a148007ee4366bf6d024b3bac7b3e7fc0ce | Update pbckcode.js | dialogs/pbckcode.js | dialogs/pbckcode.js | CKEDITOR.dialog.add('pbckcodeDialog', function (editor) {
"use strict";
var tab_sizes = ["1", "2", "4", "8"];
// CKEditor variables
var dialog;
var shighlighter = new PBSyntaxHighlighter(editor.settings.highlighter);
// ACE variables
var aceEditor, aceSession, whitespace;
// EDITOR p... | JavaScript | 0.000001 | @@ -4998,24 +4998,71 @@
eLine(true);
+%0A aceEditor.setShowInvisibles(true);
%0A%0A
|
d39fcc02438e55a483c050f0db313a68dc0c2bfb | Remove unnecessary Chai lib | test/APITests.js | test/APITests.js | /* eslint-env node, mocha */
import { expect } from 'chai';
// Utils
import {
waitForTransitionsFinished,
waitForTilesLoaded,
removeHGComponent,
} from '../app/scripts/utils';
import {
simpleCenterViewConfig,
} from './view-configs';
import createElementAndApi from './utils/create-element-and-api';
describe... | JavaScript | 0.000092 | @@ -17,57 +17,18 @@
de,
-mocha */%0Aimport %7B expect %7D from 'chai';%0A%0A// Utils
+jasmine */
%0Aimp
@@ -601,25 +601,29 @@
ngth).to
-.be.above
+BeGreaterThan
(0);%0A
@@ -1011,17 +1011,18 @@
).to
-.be.below
+BeLessThan
(0);
@@ -1457,17 +1457,21 @@
).to
-.be.above
+BeGreaterThan
(2);
@@ -1645,19 +1645,20 @... |
160fbf4afbcd696d9f044d1570084444cbf78e35 | fix issue #6: if target is only moving in one direction, hasItem moved failed to detect movement | src/CirclePacker.js | src/CirclePacker.js | import { sendWorkerMessage, processWorkerMessage, isCircleValid, isBoundsValid } from './util.js';
// this class keeps track of the drawing loop in continuous drawing mode
// and passes messages to the worker
export default class CirclePacker {
constructor ( params = { } ) {
this.worker = new Worker( 'src/CirclePac... | JavaScript | 0 | @@ -5690,18 +5690,18 @@
%3E 0.005
-&&
+%7C%7C
%0A%09%09%09%09Ma
|
80e20f6d4315c1a4ce8b4d9bf06d99d556467676 | Fix condition to get animations | core/imagefile.js | core/imagefile.js | function ImageFile(_game) {
this.game = _game;
this.name = new Array();
this.data = new Array();
this.counter = 0;
return this;
};
ImageFile.prototype.image = function(_imageSrc) {
var _name = _imageSrc.substring(0, _imageSrc.length - 4);
if(!this.getImageDataByName(_name)) {
var self = this;
... | JavaScript | 0 | @@ -733,17 +733,16 @@
oaded())
-;
%0D%0A%09%09s.ge
|
b44a8a0f055df687c26364bdf7251195468238c1 | fix get screen sizes on the move | core/move/move.js | core/move/move.js | document.addEventListener('appload', function() {
var currentElement = null;
var cursorOffsetLeft, cursorOffsetTop;
var minOffsetTop = 0, maxOffsetTop = document.documentElement.clientHeight;
var minOffsetLeft = 0, maxOffsetLeft = document.documentElement.clientWidth;
[].forEach.call(document.querySelectorAll('.w... | JavaScript | 0 | @@ -112,19 +112,21 @@
etTop;%0A%09
-var
+const
minOffs
@@ -141,137 +141,24 @@
0, m
-axOffsetTop = document.documentElement.clientHeight;%0A%09var minOffsetLeft = 0, maxOffsetLeft = document.documentElement.clientWidth
+inOffsetLeft = 0
;%0A%0A%09
@@ -1099,24 +1099,155 @@
eturn;%0A%09%09%7D%0A%0A
+%09%09// vars%0A... |
64460694714fba896f64c47dd071ab8eafb25dce | send to proper channel for list rooms | core/socket-io.js | core/socket-io.js | 'use strict';
var
express = require('express'),
ioServer = require('socket.io'),
ioRedis = require('redis'),
passportSocketIo = require('passport.socketio'),
ioRedisStore = require('socket.io/lib/stores/redis'),
RedisStore = require('connect-redis')(express);
exports.name = 'kabam-core-socket-io';
exports... | JavaScript | 0 | @@ -5586,32 +5586,61 @@
/' + arr%5B1%5D%5D) %7B%0A
+ data.channel = arr%5B1%5D;%0A
kernel.io.
@@ -6073,24 +6073,53 @@
arr%5B1%5D%5D) %7B%0A
+ data.channel = arr%5B1%5D;%0A
kernel
|
934c858c8e25fc96fcd9e0d3077a743ddf7b4dff | add test for Redux Store | test/app.spec.js | test/app.spec.js | /** eslint-env mocha */
const { expect } = require('chai')
const React = require('react')
const Search = require('../js/Search')
const ShowCard = require('../js/ShowCard')
const { shallow, mount } = require('enzyme')
const { shows } = require('../public/data')
describe('<Search />', () => {
it('It should render br... | JavaScript | 0 | @@ -164,16 +164,74 @@
owCard')
+%0Aconst %7B store, rootReducer %7D = require('../js/Store.jsx')
%0A%0Aconst
@@ -315,16 +315,17 @@
ata')%0A%0A%0A
+x
describe
@@ -1002,14 +1002,507 @@
2)%0A%0A %7D)
+%0A%0A%7D)%0A%0Adescribe('Store', () =%3E %7B%0A it('Should bootstrap', () =%3E %7B%0A // goes from having noth... |
c5b0e01ff5abacfd455b087bf0c87236550638bc | Use fs-extra to remove outputDir | bin/clean.js | bin/clean.js | #!/usr/bin/env node
import fs from 'fs-extra'
import colors from 'colors'
import { isSite, exists } from '../lib/etc'
import config from '../lib/config'
if (!isSite()) {
console.error('No site in here!'.red)
process.exit(1)
}
if (!exists(config.outputDir)) {
console.error('There\'s a site in here, but it hasn... | JavaScript | 0.000004 | @@ -82,22 +82,33 @@
t %7B
-isSite, exists
+exists, isSite, deleteDir
%7D f
@@ -434,21 +434,17 @@
%0A%7D%0A%0A
-etc.deleteDir
+fs.remove
(con
@@ -462,20 +462,39 @@
ir,
-false, () =%3E
+err =%3E %7B%0A if (err) throw err%0A
con
@@ -533,10 +533,12 @@
'.green)
+%0A%7D
)%0A
|
34595f8bf0f40e412ce2a2b7fc0865bec9ce43d4 | Test against id search | test/app_test.js | test/app_test.js | var spawn = require('child_process').spawn
, request = require('request');
describe('app', function() {
var child;
before(function(done) {
child = spawn('node', ['app.js']);
child.stdout.on('data', function(data) {
setTimeout(done, 50);
});
child.stderr.pipe(proce... | JavaScript | 0 | @@ -757,16 +757,24 @@
st:3000/
+v0.1/ids
',%0A
|
ed4f0e57a9c569ef8116c51dd7662638b4f1cb10 | Test uses _parentFolderPath property | tests/js/testNodeTransaction3.js | tests/js/testNodeTransaction3.js | (function($) {
module("nodeTransaction3");
// Test case : Node Transaction 3
_asyncTest("Node Transaction 3", function()
{
expect(3);
var gitana = GitanaTest.authenticateFullOAuth();
gitana.then(function() {
// create a repository and get the master branch
... | JavaScript | 0.000001 | @@ -595,32 +595,34 @@
+//
var t = Gitana.t
@@ -661,16 +661,18 @@
+//
t.for(br
@@ -1214,32 +1214,38 @@
%22_parent
+Folder
Path%22: %22/%22%0A
@@ -1346,32 +1346,38 @@
%22_parent
+Folder
Path%22: %22/folder1
@@ -1519,32 +1519,38 @@
%22_parent
+Folder
Path%22... |
d69f00b245afc65495abaf39102d3bae89f3d91e | Use standard node for bin | bin/mason.js | bin/mason.js | #!/usr/bin/env babel-node
'use strict'
import Mason from '../lib/index'
import Arguments from '../lib/cli/Arguments'
try {
let input = new Arguments();
Mason.run(input.command(), input.all());
} catch(e) {
console.error('Error: ' + e.message);
console.log(e.stack);
}
Mason.finally(() => {
console.log(' ');
}); | JavaScript | 0.000001 | @@ -12,19 +12,13 @@
env
-babel-
node%0A
+
%0A'us
@@ -32,26 +32,28 @@
t'%0A%0A
-import
+var
Mason
-from
+= require(
'../
@@ -66,15 +66,14 @@
dex'
-%0Aimport
+);%0Avar
Arg
@@ -83,13 +83,18 @@
nts
-from
+= require(
'../
@@ -111,16 +111,18 @@
guments'
+);
%0A%0Atry %7B%0A
@@ -126,11 +126,11 @@
%7B%0A%0... |
86b77a2cca57d6ee6487f482ea6c63e77cd34c78 | Update labs.js | js/labs.js | js/labs.js | ;(function(win,doc,head,body){
if(!('addEventListener' in win)) return;
win.z = function(a){
var x=a.data.length,
b=0,
c=doc.getElementById("repos");
c.removeAttribute("hidden");
for(;x>b;b++){
var e=doc.createElement("div"),
f=a.data[b].homepage?a.data[b].homepage:a.... | JavaScript | 0.000001 | @@ -912,32 +912,39 @@
heets(%5B'https://
+static.
amdouglas.com/as
@@ -964,32 +964,39 @@
s.css','https://
+static.
amdouglas.com/as
@@ -1750,24 +1750,26 @@
;%0A %7D%0A
+/*
%0A if('ser
@@ -1835,32 +1835,36 @@
gister('https://
+www.
amdouglas.com/sw
@@ -2103,24 +2103,26 @@
;%0A %7D%0A
+*/
%0A ... |
980252777fa9ed642b6694ef7ca1d564bb2e897a | Add correct duration params | src/selectors/fridge.js | src/selectors/fridge.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2020
*/
import moment from 'moment';
import { createSelector } from 'reselect';
import { UIDatabase } from '../database';
import { chunk } from '../utilities/chunk';
export const selectSelectedFridgeID = ({ fridge }) => {
const { selectedFridge = {} } = fridg... | JavaScript | 0.000007 | @@ -3506,17 +3506,24 @@
e), 'day
-'
+s', true
);%0A%0A
|
7447889ebaf7f7cb7bbf88b156f195d20907a91c | copy the found courses onto the children of <Student/> | src/screens/student.js | src/screens/student.js | import React, { Component, PropTypes, cloneElement } from 'react'
import DocumentTitle from 'react-document-title'
import { connect } from 'react-redux'
import omit from 'lodash/object/omit'
import Sidebar from './sidebar'
import Loading from '../components/loading'
import getStudentCourses from '../helpers/get-studen... | JavaScript | 0 | @@ -1481,16 +1481,45 @@
ldProps,
+ courses: this.state.courses,
classNa
|
422d71543128be2c0587eab5ad01f81cb708d0ff | Fix prelink script | src/scripts/prelink.js | src/scripts/prelink.js | var fs = require('fs');
var MANIFEST_PATH = process.cwd() + '/android/app/src/main/AndroidManifest.xml';
var PACKAGE_JSON = process.cwd() + '/package.json';
var hasNecessaryFile = fs.existsSync(MANIFEST_PATH) && fs.existsSync(MANIFEST_PATH);
if (!hasNecessaryFile) {
throw 'RNFetchBlob could not found link Android ... | JavaScript | 0.000001 | @@ -1838,16 +1838,19 @@
ing.')%0A
+ //
add OkH
|
2e5f12dfad2cb088c89e9d4f2bde1572250400b2 | switch to prod | updateGroupsFromWordpress.js | updateGroupsFromWordpress.js | var fs = require('fs'),
request = require('request-json'),
argv = require('minimist')(process.argv.slice(2));
if (!argv.f) {
console.log( "You must specify the JSON file that you want to merge with the -f flag!" );
process.exit()
}
fs.readFile(argv.f,{encoding:'utf-8'},function(err, data){
var staff_di... | JavaScript | 0.000001 | @@ -465,18 +465,19 @@
p://
-godwit.lib
+www.library
.vir
|
451849f72393b9750d6b2b1d8e6fea600d995002 | Fix tests | test/env-test.js | test/env-test.js | 'use strict';
/*jshint node: true */
/*globals describe, it */
var _ = require('lodash');
var chai = require('chai');
var sinon = require('sinon');
var env = require('../lib/env');
var expect = chai.expect;
describe('Infra Unit test for env', function () {
var sandbox;
beforeEach(function () {
sandbox = s... | JavaScript | 0.000003 | @@ -902,19 +902,22 @@
.equal('
-mac
+darwin
');%0A
|
4f2650d694226649f01a3a0a37e34c598c046ec1 | remove duplicate points display | tutor/src/screens/task/step/exercise-question.js | tutor/src/screens/task/step/exercise-question.js | import {
React, PropTypes, observer, styled, action,
observable, computed, modelize, runInAction,
} from 'vendor';
import UX from '../ux';
import keymaster from 'keymaster';
import { StepFooter } from './footer';
import { Button } from 'react-bootstrap';
import { Question, AsyncButton } from 'shared';
import { ... | JavaScript | 0.000002 | @@ -612,60 +612,8 @@
me';
-%0Aimport ScoresHelper from '../../../helpers/scores';
%0A%0Aco
@@ -6041,108 +6041,8 @@
s%22%3E%0A
- %3Cstrong%3EPoints: %7BScoresHelper.formatPoints(step.available_points)%7D%3C/strong%3E%0A
|
fb844cc3db94af6ec33d25d1d09bdc30c3c9623b | Replace redirect to pipe image to res, to support MultiMC | Routes/API/Skin/File.js | Routes/API/Skin/File.js | /**
* Created by Indexyz on 2017/4/15.
*/
'use strict';
const db = require('mongoose');
const grid = require('gridfs-stream');
const profileService = require("../../../Db/Service/profileService");
const userService = require("../../../Db/Service/userService");
grid.mongo = db.mongo;
module.exports.get = (req, res,... | JavaScript | 0 | @@ -1470,51 +1470,473 @@
-res.redirect('/resources/' + user.skin.skin
+let gfs = grid(db.connection.db);%0A gfs.exist(%7B%0A _id: db.Types.ObjectId(user.skin.skin)%0A %7D, (err, found) =%3E %7B%0A if (!found %7C%7C err) %7B res.status(404).send()... |
c41eeb1ebadf0c13eeffc7b9e27c0327f444b2a0 | Fix markdown handling | usability/python-markdown.js | usability/python-markdown.js | // Allow Python-code in markdown cells
// Encapsulate using {{...}}
// - You can also return html or markdown from your Python code
// - You can embed images, however they will be sanitized on reload.
"using strict";
var python_markdown_extension = (function() {
var security = IPython.security;
var execu... | JavaScript | 0.000001 | @@ -1207,38 +1207,36 @@
var
-result
+html
= '%3Cimg src=%22da
@@ -1429,22 +1429,20 @@
var
-result
+html
= '%3Cimg
@@ -1576,38 +1576,36 @@
var
-result
+html
= ul%5B'text/html
@@ -1709,22 +1709,20 @@
var
-result
+html
= ul%5B't
@@ -1946,82 +1946,158 @@
-%7D%0A ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.