text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Add missing Vue.use in test
import Vue from 'vue'; import Vuex from 'vuex'; import component from '~/reports/components/modal_open_name.vue'; import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; Vue.use(Vuex); describe('Modal open name', () => { const Component = Vue.extend(component); let vm; const store = ...
import Vue from 'vue'; import Vuex from 'vuex'; import component from '~/reports/components/modal_open_name.vue'; import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; describe('Modal open name', () => { const Component = Vue.extend(component); let vm; const store = new Vuex.Store({...
Add JSON decoder to Request
// Copyright 2016 Marcel Gotsch. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package goserv import ( "encoding/json" "net/http" ) // A Request represents an HTTP request received by the Server. // // It embeds the native http.Request,...
// Copyright 2016 Marcel Gotsch. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package goserv import ( "net/http" ) // A Request represents an HTTP request received by the Server. // // It embeds the native http.Request, thus all native ...
Fix error handling and pass store onmessage and onclose
export default (init, { prepareAction = action => JSON.stringify({ action }), isWSAT = action => action.wsat !== false, getAction = ({ data }) => { const { action } = JSON.parse(data); return action && Object.assign({ wsat: false }, action); }, } = {}) => { let socket = init(); const { onclose, ...
export default (init, { prepareAction = action => JSON.stringify({ action }), isWSAT = action => action.wsat !== false, getAction = ({ data }) => { const { action } = JSON.parse(data); return action && Object.assign({ wsat: false }, action); }, } = {}) => { let socket = init(); const { onclose, on...
Add program name to parser
#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.prog = 'matador deploy-ticket' parser.add_argument( '-e', '--environment', type=str, required=True, he...
#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.add_argument( '-e', '--environment', type=str, required=True, help='Agresso environment name') def _execu...
Make tests match actual expected format for user-locators EchoAttributeManager::getUserCallable casts to array, which means that even a non-array value (e.g. a simple callback) becomes an array and NotificationController::evaluateUserCallable will handle it just fine. But tests seemed to thing it was wrong. Change-Id...
<?php class NotificationStructureTest extends MediaWikiTestCase { /** * @coversNothing * @dataProvider provideNotificationTypes * * @param string $type * @param array $info */ public function testNotificationTypes( $type, array $info ) { if ( isset( $info['presentation-model'] ) ) { self::assertTrue...
<?php class NotificationStructureTest extends MediaWikiTestCase { /** * @coversNothing * @dataProvider provideNotificationTypes * * @param string $type * @param array $info */ public function testNotificationTypes( $type, array $info ) { if ( isset( $info['presentation-model'] ) ) { self::assertTrue...
Remove extra check of symlinks.
import os import io import json from aiohttp import web class Handler: def __init__(self, *, loop): self.loop = loop self.files = {} def lookup_files(self, path): for obj in os.listdir(path): _path = os.path.join(path, obj) if os.path.isfile(_path): ...
import os import io import json from aiohttp import web class Handler: def __init__(self, *, loop): self.loop = loop self.files = {} def lookup_files(self, path): for obj in os.listdir(path): _path = os.path.join(path, obj) if os.path.isfile(_path) or os.pat...
Fix missing import in contrib script added in [2630]. git-svn-id: 0d96b0c1a6983ccc08b3732614f4d6bfcf9cbb42@2631 af82e41b-90c4-0310-8c96-b1721e28e2e2
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
Change let to const in "Extract EXIF"
import * as ExifParser from "exif-parser"; import Utils from "../Utils.js"; /** * Image operations. * * @author tlwr [toby@toby.codes] * @copyright Crown Copyright 2017 * @license Apache-2.0 * * @namespace */ const Image = { runEXIF(input, args) { try { const bytes = Uint8Array.from(in...
import * as ExifParser from "exif-parser"; import Utils from "../Utils.js"; /** * Image operations. * * @author tlwr [toby@toby.codes] * @copyright Crown Copyright 2017 * @license Apache-2.0 * * @namespace */ const Image = { runEXIF(input, args) { try { let bytes = Uint8Array.from(inpu...
[server] Throw error if basePath or staticPath is missing
import path from 'path' import get from 'lodash/get' import merge from 'lodash/merge' const applyStaticLoaderFix = (wpConfig, sanityConfig) => { // We need to fix the public path, prefixing the server URL for assets such as // images to work in development mode (related to blob's generated by style-loader) const...
import path from 'path' import get from 'lodash/get' import merge from 'lodash/merge' const applyStaticLoaderFix = (wpConfig, sanityConfig) => { // We need to fix the public path, prefixing the server URL for assets such as // images to work in development mode (related to blob's generated by style-loader) const...
Java: Add stream example methods using wildcards.
package p; import java.util.function.*; import java.util.Iterator; import java.util.stream.Collector; public class Stream<T> { public Iterator<T> iterator() { return null; } public boolean allMatch(Predicate<? super T> predicate) { throw null; } public <R> R collect(Supplier<R> ...
package p; import java.util.function.*; import java.util.Iterator; import java.util.stream.Collector; public class Stream<T> { public Iterator<T> iterator() { return null; } // public boolean allMatch(Predicate<? super T> predicate) { // throw null; // } // public <R> R collect(Supp...
Exit process if promise succeeds
#!/usr/bin/env node const colors = require('colors') const git = require('nodegit') const exists = require('../lib/etc').isSite if (!exists()) { console.error('No site in here!'.red) process.exit(1) } const branch = new Promise(function (resolve, reject) { git.Repository.open(process.cwd()).then(function (repo...
#!/usr/bin/env node const colors = require('colors') const git = require('nodegit') const exists = require('../lib/etc').isSite if (!exists()) { console.error('No site in here!'.red) process.exit(1) } const branch = new Promise(function (resolve, reject) { git.Repository.open(process.cwd()).then(function (repo...
Use non-empty value for sha
'use strict'; const fs = require('fs'); const path = require('path'); module.exports = function generate(overrides) { const branchPath = path.join(__dirname, 'branch'); const branchContent = fs.readFileSync(branchPath, 'utf8').trim(); const branch = branchContent.match(/BRANCH=(.*)/)[1]; const buildtime = Dat...
'use strict'; const fs = require('fs'); const path = require('path'); module.exports = function generate(overrides) { const branchPath = path.join(__dirname, 'branch'); const branchContent = fs.readFileSync(branchPath, 'utf8').trim(); const branch = branchContent.match(/BRANCH=(.*)/)[1]; const buildtime = Dat...
Support udp scheme in raven.load
""" raven.conf ~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import urlparse def load(dsn, scope): """ Parses a Sentry compatible DSN and loads it into the given scope. >>> import raven >>> dsn = 'https://publi...
""" raven.conf ~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import urlparse def load(dsn, scope): """ Parses a Sentry compatible DSN and loads it into the given scope. >>> import raven >>> dsn = 'https://publi...
Fix config_drive migration, per Matt Dietz.
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # # 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 # ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # # 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 # ...
Update password functions for Django 1.8
from django.conf.urls import patterns, include, url from django.conf import settings from django.conf.urls.static import static # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^login/$', 'django.contrib.auth...
from django.conf.urls import patterns, include, url from django.conf import settings from django.conf.urls.static import static # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^login/$', 'django.contrib.auth...
Use absolute import for python3
# -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from fto.fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: ")\ ....
# -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from .fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: ")\ .str...
Add console scripts for both examples Now they are callable from console via $ demandlib_power_example and $ demandlib_heat_example when installed bia pip3.
#! /usr/bin/env python """TODO: Maybe add a docstring containing a long description This would double as something we could put int the `long_description` parameter for `setup` and it would squelch some complaints pylint has on `setup.py`. """ from setuptools import setup import os setup(name='demandlib', ...
#! /usr/bin/env python """TODO: Maybe add a docstring containing a long description This would double as something we could put int the `long_description` parameter for `setup` and it would squelch some complaints pylint has on `setup.py`. """ from setuptools import setup import os setup(name='demandlib', ...
Allow transformResultsToCollection to fallback to other props
const { find } = require('lodash') const { transformInvestmentProjectToListItem } = require('../investment-projects/transformers') const { transformContactToListItem } = require('../contacts/transformers') const { buildPagination } = require('../../lib/pagination') const { buildSearchAggregation } = require('./builder...
const { find } = require('lodash') const { transformInvestmentProjectToListItem } = require('../investment-projects/transformers') const { transformContactToListItem } = require('../contacts/transformers') const { buildPagination } = require('../../lib/pagination') const { buildSearchAggregation } = require('./builder...
Fix phpdocs; Remove unused import
<?php /* * This file is part of Bens Penhorados, an undergraduate capstone project. * * (c) Fábio Santos <ffsantos92@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace App\Http\Controllers; /** * This is the t...
<?php /* * This file is part of Bens Penhorados, an undergraduate capstone project. * * (c) Fábio Santos <ffsantos92@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace App\Http\Controllers; use App\Models\Attri...
Fix gulp cannot build all files
var gulp = require('gulp'), concat = require('gulp-concat'); jshint = require('gulp-jshint'); uglify = require('gulp-uglify'); rename = require('gulp-rename'); amdOptimize = require("amd-optimize"); watch = require('gulp-watch'); gulp.task('lint', function () { gulp.src('./src/js/**/*.js') ...
var gulp = require('gulp'), concat = require('gulp-concat'); jshint = require('gulp-jshint'); uglify = require('gulp-uglify'); rename = require('gulp-rename'); amdOptimize = require("amd-optimize"); watch = require('gulp-watch'); gulp.task('lint', function () { gulp.src('./src/js/**/*.js') ...
Add an extra check in that test
import pytest import allegedb @pytest.fixture(scope='function') def orm(): with allegedb.ORM("sqlite:///:memory:") as it: yield it def test_single_plan(orm): g = orm.new_graph('graph') g.add_node(0) orm.turn = 1 g.add_node(1) with orm.plan(): orm.turn = 2 g.add_node(2...
import pytest import allegedb @pytest.fixture(scope='function') def orm(): with allegedb.ORM("sqlite:///:memory:") as it: yield it def test_single_plan(orm): g = orm.new_graph('graph') g.add_node(0) orm.turn = 1 g.add_node(1) with orm.plan(): orm.turn = 2 g.add_node(2...
Reduce threshold until optimization appears to 1s
/* eslint-env browser */ /* global i18n: false */ const OPTIMIZATION_MESSAGE_DISPLAY_THRESHOLD = 1000; // milliseconds // type Canceler = () => Eff Unit // // setMessage :: Unit -> Eff (dom :: DOM) Canceler const setMessage = () => { const message = document.querySelector('.app-loading-screen .message'); if ...
/* eslint-env browser */ /* global i18n: false */ const OPTIMIZATION_MESSAGE_DISPLAY_THRESHOLD = 2000; // milliseconds // type Canceler = () => Eff Unit // // setMessage :: Unit -> Eff (dom :: DOM) Canceler const setMessage = () => { const message = document.querySelector('.app-loading-screen .message'); if ...
Switch to nosetests framework for testing
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() tests_require = [ 'mock >= 1.0.1', 'nose >= 1.3.4', ] install_requires = [ ...
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() tests_require = [ 'mock >= 1.0.1', ] install_requires = [ 'xmltodict >= 0.9.0',...
Add task for pushing code with rsync
#!/usr/bin/env python from fabric.api import env, run, sudo, task from fabric.context_managers import cd, prefix from fabric.contrib.project import rsync_project env.use_ssh_config = True home = '~/jarvis2' @task def pull_code(): with cd(home): run('git pull --rebase') @task def push_code(): rsync...
#!/usr/bin/env python from fabric.api import env, run, sudo, task from fabric.context_managers import cd, prefix env.use_ssh_config = True home = '~/jarvis2' @task def pull_code(): with cd(home): run('git pull --rebase') @task def update_dependencies(): with prefix('workon jarvis2'): run('...
Add support to .jsx files.
'use strict' const webpack = require('webpack') const path = require('path') const configuration = { entry: [ 'webpack-dev-server/client?http://localhost:8080', 'webpack/hot/only-dev-server', path.resolve(__dirname, 'app') ], output: { path: path.resolve(__dirname, 'public'), filename: 'bund...
'use strict' const webpack = require('webpack') const path = require('path') const configuration = { entry: [ 'webpack-dev-server/client?http://localhost:8080', 'webpack/hot/only-dev-server', path.resolve(__dirname, 'app') ], output: { path: path.resolve(__dirname, 'public'), filename: 'bund...
Fix <EditableBasicRow> isn't exported to bundle
import './styles/index.scss'; // Visual elements import BasicRow from './BasicRow'; import EditableBasicRow from './EditableBasicRow'; import Icon from './Icon'; import StatusIcon from './StatusIcon'; import Tag from './Tag'; import Text from './Text'; import EditableText from './EditableText'; import Tooltip from './...
import './styles/index.scss'; // Visual elements import BasicRow from './BasicRow'; import Icon from './Icon'; import StatusIcon from './StatusIcon'; import Tag from './Tag'; import Text from './Text'; import EditableText from './EditableText'; import Tooltip from './Tooltip'; import AnchoredTooltip from './AnchoredTo...
Remove useless dependency in webpack
var webpack = require('webpack'); var precss = require('precss'); var autoprefixer = require('autoprefixer'); module.exports = { entry: [ './src/js/main.js' ], module: { loaders: [ { test: /\.css$/, loader: 'style-loader!css-loader!postcss-loader' }, { test: /\.js$/, exclude: ...
var webpack = require('webpack'); var precss = require('precss'); var autoprefixer = require('autoprefixer'); var postcssGradientFixer = require('postcss-gradientfixer') module.exports = { entry: [ './src/js/main.js' ], module: { loaders: [ { test: /\.css$/, loader: 'style-loader!css-loader!postcss...
Add waitOn to subscription of requests
Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { return Meteor.userId() ? Meteor.subscribe('Notifications', Meteor.userId()) : null } }); Router.route('/', { name: 'projectsList', waitOn: function() { return [...
Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { return Meteor.userId() ? Meteor.subscribe('Notifications', Meteor.userId()) : null } }); Router.route('/', { name: 'projectsList', waitOn: function() { return...
Comment out ftp deploy for now
/** * Gulpfile * -------- * Here are the commands you can run. * gulp * gulp --maps * gulp --ugly * gulp --hint * gulp jshint * gulp jshint --ugly * gulp browserify * gulp browserify --hint * gulp browserify --ugly * gulp handlebars * gulp polyfill * gulp polyfill --ugly * gulp sass * gulp sass --maps * gulp watch (The...
/** * Gulpfile * -------- * Here are the commands you can run. * gulp * gulp --maps * gulp --ugly * gulp --hint * gulp jshint * gulp jshint --ugly * gulp browserify * gulp browserify --hint * gulp browserify --ugly * gulp handlebars * gulp polyfill * gulp polyfill --ugly * gulp sass * gulp sass --maps * gulp watch (The...
Add playerName and playerScore to stats page
class Stats extends Phaser.State { create() { this.totalScore = this.game.state.states['Main'].totalScore this.game.stage.backgroundColor = '#DFF4FF'; let statsHeader = "STATS" let continuePhrase = "Tap to Continue" this.statsHeaderText = this.game.add.text(650, 50, statsHeader, { font: "250px Revali...
class Stats extends Phaser.State { create() { this.totalScore = this.game.state.states['Main'].totalScore this.game.stage.backgroundColor = '#DFF4FF'; let statsHeader = "STATS" let continuePhrase = "Tap to Continue" this.statsHeaderText = this.game.add.text(650, 50, statsHeader, { font: "250px Revali...
Convert to ES5 compatible code
var crypto = require('crypto') // Crockford's Base32 // https://en.wikipedia.org/wiki/Base32 var ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ" function strongRandomNumber() { return crypto.randomBytes(4).readUInt32LE() / 0xFFFFFFFF } function encodeTime(now, len) { var arr = [] for (var x = len; x > 0; x--) { ...
import { randomBytes } from 'crypto'; // Crockford's Base32 // https://en.wikipedia.org/wiki/Base32 const ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ" function strongRandomNumber() { return randomBytes(4).readUInt32LE() / 0xFFFFFFFF } function encodeTime(now, len) { let arr = [] for (let x = len; x > 0; x--) ...
Define extra fields setValue() and getValue() on formelements
<?php /* * Doctrine Admin * Copyright (C) 2013 Bastiaan Welmers, bastiaan@welmers.net * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at...
<?php /* * Doctrine Admin * Copyright (C) 2013 Bastiaan Welmers, bastiaan@welmers.net * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at...
Make atcd depends on atc_thrift package implicitely
#!/usr/bin/env python # # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # # ...
#!/usr/bin/env python # # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # # ...
Fix find function in content manager controller
'use strict'; /** * A set of functions called "actions" for `ContentManager` */ module.exports = { models: async(ctx) => { ctx.body = strapi.models; }, find: async(ctx) => { const model = ctx.params.model; const { limit = 10, skip = 0, sort = '_id' } = ctx.request.query; ...
'use strict'; /** * A set of functions called "actions" for `ContentManager` */ module.exports = { models: async(ctx) => { ctx.body = strapi.models; }, find: async(ctx) => { const model = ctx.params.model; const { limit = 10, skip = 0, sort = '_id' } = ctx.request.query; ...
Remove JSON dependency in POST logic.
import boto3 sdb = boto3.client('sdb') def lambda_handler(data, context): """ Handler for posting data to SimpleDB. Args: data -- Data to be stored (Dictionary). context -- AWS context for the request (Object). """ if data['Password'] and data['Password'] == 'INSERT PASSWORD': try: for person in ['Sharon...
import boto3, json sdb = boto3.client('sdb') def lambda_handler(data, context): """ Handler for posting data to SimpleDB. Args: data -- Data to be stored (Dictionary). context -- AWS context for the request (Object). """ if data['Password'] and data['Password'] == 'INSERT PASSWORD': try: for person in ['...
Add test for model representation
from django.contrib.auth import get_user_model from django.db import DataError from django.db import IntegrityError from django.test import TestCase from yunity.users.factories import UserFactory class TestUserModel(TestCase): @classmethod def setUpClass(cls): super().setUpClass() cls.user = ...
from django.contrib.auth import get_user_model from django.db import DataError from django.db import IntegrityError from django.test import TestCase class TestUserModel(TestCase): @classmethod def setUpClass(cls): super().setUpClass() cls.exampleuser = { 'display_name': 'bla', ...
Make it compatible for updated ImageDTO class.
/** * */ package gov.nih.nci.nbia.dto; import junit.framework.TestCase; /** * @author lethai * */ public class ImageDTOTestCase extends TestCase { public void testAccessors() { String SOPInstanceUID="1.2.3.4.5.6"; String fileName="1.2.3.4.5.6.7.dcm"; Long dicomSize = new Long(514); ...
/** * */ package gov.nih.nci.nbia.dto; import junit.framework.TestCase; /** * @author lethai * */ public class ImageDTOTestCase extends TestCase { public void testAccessors() { String SOPInstanceUID="1.2.3.4.5.6"; String fileName="1.2.3.4.5.6.7.dcm"; Long dicomSize = new Long(514); ...
Remove all has to reflect changes to get next
from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default messages sent ...
from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default messages sent ...
Fix escaping for stricter php7.3. Escaping the minus is the right fix.
<?php declare(strict_types = 1); namespace Soliant\SimpleFM\Client\ResultSet\Transformer; use Litipk\BigNumbers\Decimal; final class NumberTransformer { public function __invoke(string $value) { $cleanedValue = preg_replace_callback( '(^[^\d\-.]*(-?)([^.]*)(.?)(.*)$)', functio...
<?php declare(strict_types = 1); namespace Soliant\SimpleFM\Client\ResultSet\Transformer; use Litipk\BigNumbers\Decimal; final class NumberTransformer { public function __invoke(string $value) { $cleanedValue = preg_replace_callback( '(^[^\d-\.]*(-?)([^.]*)(.?)(.*)$)', functio...
Add get API to user service
var cote = require('cote'), models = require('../models'); var userResponder = new cote.Responder({ name: 'user responder', namespace: 'user', respondsTo: ['create'] }); var userPublisher = new cote.Publisher({ name: 'user publisher', namespace: 'user', broadcasts: ['update'] }); userResp...
var cote = require('cote'), models = require('../models'); var userResponder = new cote.Responder({ name: 'user responder', namespace: 'user', respondsTo: ['create'] }); var userPublisher = new cote.Publisher({ name: 'user publisher', namespace: 'user', broadcasts: ['update'] }); userResp...
Modify PriorityQueue constructor call to be compliant with JDK 7. Was using a JDK 8 only constructor.
package aima.core.search.framework; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.PriorityQueue; import java.util.Queue; /** * Factory class for queues. Changes made here will affect all queue based * search algorithms of this library. * * @a...
package aima.core.search.framework; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.PriorityQueue; import java.util.Queue; /** * Factory class for queues. Changes made here will affect all queue based * search algorithms of this library. * * @a...
Replace double quotes with single
<?php namespace Acd; /** * Request Class * @author Acidvertigo MIT Licence */ class Request { private $headers = []; /** * Check HTTP request headers * @return array list of response headers * @throws InvalidArgumentException if header is null */ public function getRequestHeaders...
<?php namespace Acd; /** * Request Class * @author Acidvertigo MIT Licence */ class Request { private $headers = []; /** * Check HTTP request headers * @return array list of response headers * @throws InvalidArgumentException if header is null */ public function getRequestHeaders...
Remove support of uglify and change path
module.exports = function(grunt) { grunt.initConfig({ jshint: { all: ['Gruntfile.js', 'src/cookie.js', 'tests/spec.js'], options: { browser: true, evil: false, expr: true, supernew: true, eqeqeq: true, eqnull: true, forin: true, smarttabs: true } }, mocha: { all: { ...
module.exports = function(grunt) { grunt.initConfig({ jshint: { all: ['Gruntfile.js', 'cookie.js', 'tests/spec.js'], options: { browser: true, evil: false, expr: true, supernew: true, eqeqeq: true, eqnull: true, forin: true, smarttabs: true } }, mocha: { all: { ...
Fix section listing on Firefox. Support browsers, like Firefox, that don't support innerText function call. They call it textContent there. Weirdos.
function create_section_listing() { $('div#sidebar h3').click(function(e) { window.scrollTo(0, 0); }); $('.section_title').each(function (i, e) { $("div#sidebar #section_listing").append("<a id='" + e.id + "_link'>" + (e.innerText || e.innerContent) + "</a>"); just_added = $("div#sidebar #section_lis...
function create_section_listing() { $('div#sidebar h3').click(function(e) { window.scrollTo(0, 0); }); $('.section_title').each(function (i, e) { $("div#sidebar #section_listing").append("<a id='" + e.id + "_link'>" + e.innerText + "</a>"); just_added = $("div#sidebar #section_listing").children().la...
Add display to game plugin, add redraw method on gsman
import GameStateManager from "./GameStates/GameStateManager"; // import CommandParser from "./Commands/CommandParser"; import GenerateName from "./Generators/NameGenerator"; import display from "./overview/Display.js"; export default { install: (Vue) => { Vue.prototype.$game = { start() { GameState...
import GameStateManager from "./GameStates/GameStateManager"; // import CommandParser from "./Commands/CommandParser"; import GenerateName from "./Generators/NameGenerator"; export default { install: (Vue) => { Vue.prototype.$game = { start() { GameStateManager.StartGame(); }, receiveIn...
Update proxy with a currently-working example
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
Fix notification-center not to close when button clicked.
import { constant, includes } from 'lodash'; import { element } from 'angular'; import uiModules from 'ui/modules'; import registry from 'ui/registry/chrome_nav_controls'; import '../components/notification_center'; import template from './nav_control.html'; import 'ui/angular-bootstrap'; registry.register(constant({ ...
import { constant, includes } from 'lodash'; import { element } from 'angular'; import uiModules from 'ui/modules'; import registry from 'ui/registry/chrome_nav_controls'; import '../components/notification_center'; import template from './nav_control.html'; import 'ui/angular-bootstrap'; registry.register(constant({ ...
Remove GDAL requirement (it's not a direct dependency)
from setuptools import setup setup( name='ncdjango', description='A map server for NetCDF data', keywords='netcdf,django,map server', version='0.4.0', packages=[ 'ncdjango', 'ncdjango.geoprocessing', 'ncdjango.migrations', 'ncdjango.interfaces', 'ncdjango.interfaces.arcgis'...
from setuptools import setup setup( name='ncdjango', description='A map server for NetCDF data', keywords='netcdf,django,map server', version='0.4.0', packages=[ 'ncdjango', 'ncdjango.geoprocessing', 'ncdjango.migrations', 'ncdjango.interfaces', 'ncdjango.interfaces.arcgis'...
Add unit test for Figshare ID in L1 presenter
import parseL1ArticlePresenters from '../../../../lib/repository-mappers/figshare/parseL1ArticlePresenters'; const figshareL1Articles = require('./resources/figshareL1Articles.json'); const convertedArticles = parseL1ArticlePresenters(figshareL1Articles); it('parses all articles figshare returns', () => expect(con...
import parseL1ArticlePresenters from '../../../../lib/repository-mappers/figshare/parseL1ArticlePresenters'; const figshareL1Articles = require('./resources/figshareL1Articles.json'); const convertedArticles = parseL1ArticlePresenters(figshareL1Articles); it('parses all articles figshare returns', () => expect(con...
Fix a typo in Hyperband’s test
from .tuner import Hyperband import unittest class HyperbandTestCase(unittest.TestCase): def test_run(self): observed_ns = [] observed_rs = [] observed_cs = [] def _get(n): observed_ns.append(n) return list(range(n)) def _test(r, c): obse...
from .tuner import Hyperband import unittest class HyperbandTestCase(unittest.TestCase): def test_run(self): observed_ns = [] observed_rs = [] observed_cs = [] def _get(n): observed_ns.append(n) return list(range(n)) def _test(r, c): obse...
Fix Blanket config to ignore generated files
// jscs: disable /* globals blanket, module */ var options = { modulePrefix: 'component-integration-tests', filter: /^component-integration-tests\//, antifilter: [ 'component-integration-tests/initializers/export-application-global', 'component-integration-tests/instance-initializers/app-version', 'c...
// jscs: disable /* globals blanket, module */ var options = { modulePrefix: 'component-integration-tests', filter: /^component-integration-tests\//, antifilter: [ 'component-integration-tests/initializers/export-application-global', 'component-integration-tests/initializers/app-version', 'component-...
Use ">>" for indicating next event, fix bug with indexing
def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) after_context_l...
def parseinfo_context(parseinfo, context_amount = 3): buffer = parseinfo.buffer context_start_line = max(parseinfo.line - 1 - context_amount, 0) before_context_lines = buffer.get_lines(context_start_line, parseinfo.line - 1) lines = buffer.get_lines(parseinfo.line, parseinfo.endline) after_context_l...
Remove propTypes in favor of real tests that verify the same thing.
import React from 'react'; export default class KataGroupsComponent extends React.Component { render() { const {kataGroups} = this.props; return ( <div id="nav" className="pure-u"> <a href="#" className="nav-menu-button">Menu</a> <div className="nav-inner"> <div className="p...
import React from 'react'; import {default as KataGroupsData} from '../katagroups.js'; export default class KataGroupsComponent extends React.Component { static propTypes = { kataGroups: React.PropTypes.instanceOf(KataGroupsData).isRequired }; render() { const {kataGroups} = this.props; return ( ...
TAP5-1126: Add a new validator, "none", used when overriding the @Validate annotation git-svn-id: d9b8539636d91aff9cd33ed5cd52a0cf73394897@940984 13f79535-47bb-0310-9956-ffa450edef68
// Copyright 2010 The Apache Software Foundation // // 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 law o...
// Copyright 2010 The Apache Software Foundation // // 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 law o...
Use bootstrap4 markup for tabs
import React, { Component, Children, PropTypes } from 'react' export function Tab(props, {activeTab, changeTab}) { const onClick = (e) => { e.preventDefault() changeTab(props.for) } let active = props.for === activeTab if (props.render) { return(props.render({active, changeTab: () => changeTab(pr...
import React, { Component, Children, PropTypes } from 'react' export function Tab(props, {activeTab, changeTab}) { const onClick = (e) => { e.preventDefault() changeTab(props.for) } let active = props.for === activeTab if (props.render) { return(props.render({active, changeTab: () => changeTab(pr...
Add reducer to change highlighted state of help button
import { Map } from 'immutable'; const tutorial = ( state = Map({ active: false, current: 0, totalPopUps: 0, highlightHelp: false }), action ) => { switch (action.type) { case 'OPEN_TUTORIAL': return state.merge(Map({ active: true, current: 1 })); case 'CLOSE...
import { Map } from 'immutable'; const tutorial = ( state = Map({ active: false, current: 0, totalPopUps: 0 }), action ) => { switch (action.type) { case 'OPEN_TUTORIAL': return state.merge(Map({ active: true, current: 1 })); case 'CLOSE_TUTORIAL': return s...
Add spinner to upload button Signed-off-by: Walker Crouse <a52c6ce3cf7a08dcbb27377aa79f9b994b446d4c@hotmail.com>
var MAX_FILE_SIZE = 1048576; $(function() { $('#pluginFile').on('change', function() { var alert = $('.alert-file'); var fileName = $(this).val().trim(); var fileSize = this.files[0].size; if (!fileName) { alert.fadeOut(1000); return; } if (f...
var MAX_FILE_SIZE = 1048576; $(function() { $('#pluginFile').on('change', function() { var alert = $('.alert-file'); var fileName = $(this).val().trim(); var fileSize = this.files[0].size; if (!fileName) { alert.fadeOut(1000); return; } if (f...
Fix packaging issue in 0.3 release Signed-off-by: Brennan Ashton <3c2365aa085787349a5327558db844b55eabde30@brennanashton.com>
""" Flask-InfluxDB """ from setuptools import setup setup( name="Flask-InfluxDB", version="0.3.1", url="http://github.com/btashton/flask-influxdb", license="BSD", author="Brennan Ashton", author_email="brennan@ombitron.com", description="Flask bindings for the InfluxDB time series database"...
""" Flask-InfluxDB """ from setuptools import setup setup( name="Flask-InfluxDB", version="0.3", url="http://github.com/btashton/flask-influxdb", license="BSD", author="Brennan Ashton", author_email="brennan@ombitron.com", description="Flask bindings for the InfluxDB time series database", ...
Fix something in the the expected invocation example.
var Ajax = { get: function(uri) { } }; var Updater = Class.create({ initialize: function(bookId) { this.bookId = bookId; }, run: function() { var book = Ajax.get('http://example.com/books/'+this.bookId+'.json'); var title = book.title; $('title').innerHTML = book.title; } }); Moksi.descri...
var Ajax = { get: function(uri) { } }; var Updater = Class.create({ initialize: function(bookId) { this.bookId = bookId; setSample('<div id="title"></div>'); }, run: function() { var book = Ajax.get('http://example.com/books/'+this.bookId+'.json'); var title = book.title; $('title').inne...
Remove "!" from test since it is not sent by a service
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package org.cakesolutions.hello.impl; import org.cakesolutions.hello.api.HelloService; import org.cakesolutions.hello.api.KGreetingMessage; import org.junit.Test; import static com.lightbend.lagom.javadsl.testkit.ServiceTest.defaultSetup; im...
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package org.cakesolutions.hello.impl; import org.cakesolutions.hello.api.HelloService; import org.cakesolutions.hello.api.KGreetingMessage; import org.junit.Test; import static com.lightbend.lagom.javadsl.testkit.ServiceTest.defaultSetup; im...
Put the device lookup code back for Linux
package main import ( "bufio" "fmt" "os" "regexp" ) func findDeviceFromMount (mount string) (string, error) { // stub for Mac devel //return "/dev/xvda", nil var device string = "" // Serious Linux-only stuff happening here... file := "/proc/mounts" v, err := os.Open(file) if err != nil { ...
package main import ( // "bufio" // "fmt" // "os" // "regexp" ) func findDeviceFromMount (mount string) (string, error) { // stub for Mac devel return "/dev/xvda", nil /* var device string = "" // Serious Linux-only stuff happening here... file := "/proc/mounts" v, err := os.Open(file) if err !...
Fix the DeployResources() call args.
// Copyright 2016 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package resourceadapters import ( "github.com/juju/errors" "gopkg.in/juju/charm.v6-unstable" charmresource "gopkg.in/juju/charm.v6-unstable/resource" "github.com/juju/juju/api" "github.com/juju/juju/resource/cmd" ) // ...
// Copyright 2016 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package resourceadapters import ( "github.com/juju/errors" charmresource "gopkg.in/juju/charm.v6-unstable/resource" "github.com/juju/juju/api" "github.com/juju/juju/resource/cmd" ) // DeployResources uploads the bytes f...
Revert "style for None option button on picklists" This reverts commit d46c7325118f53f24ef8e969a01b0673a384a758.
/// <reference path="../../../../../argos-sdk/libraries/ext/ext-core-debug.js"/> /// <reference path="../../../../../argos-sdk/libraries/sdata/sdata-client-debug"/> /// <reference path="../../../../../argos-sdk/libraries/Simplate.js"/> /// <reference path="../../../../../argos-sdk/src/View.js"/> /// <reference path=".....
/// <reference path="../../../../../argos-sdk/libraries/ext/ext-core-debug.js"/> /// <reference path="../../../../../argos-sdk/libraries/sdata/sdata-client-debug"/> /// <reference path="../../../../../argos-sdk/libraries/Simplate.js"/> /// <reference path="../../../../../argos-sdk/src/View.js"/> /// <reference path=".....
Mark event enrichment as func. interface
/* * Copyright 2019, TeamDev. All rights reserved. * * Redistribution and use in source and/or binary forms, with or without * modification, must retain the above copyright notice and the following * disclaimer. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR...
/* * Copyright 2019, TeamDev. All rights reserved. * * Redistribution and use in source and/or binary forms, with or without * modification, must retain the above copyright notice and the following * disclaimer. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR...
Install lib package and script
""" Setup script for PyPI """ from setuptools import setup from yayson import VERSION setup( name='yayson', version=VERSION, license='Apache License, Version 2.0', description='Get colorized and indented JSON in the terminal', author='Sebastian Dahlgren', author_email='sebastian.dahlgren@gmail...
""" Setup script for PyPI """ from setuptools import setup from yayson import VERSION setup( name='yayson', version=VERSION, license='Apache License, Version 2.0', description='Get colorized and indented JSON in the terminal', author='Sebastian Dahlgren', author_email='sebastian.dahlgren@gmail...
Remove unused require of react
'use strict'; var path = require('path'), navigateAction = require('flux-router-component').navigateAction, bodyParser = require('body-parser'), express = require('express'), server = express(), morgan = require('morgan'), logger = require('./logger'), renderOnServer = require('./lib/render...
'use strict'; var path = require('path'), React = require('react'), navigateAction = require('flux-router-component').navigateAction, bodyParser = require('body-parser'), express = require('express'), server = express(), morgan = require('morgan'), logger = require('./logger'), renderOn...
gwt: Use new services.py reply format for login().
package ro.pub.cs.vmchecker.client.service.json; import ro.pub.cs.vmchecker.client.model.AuthenticationResponse; import ro.pub.cs.vmchecker.client.model.User; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONParser; import com.google.gwt.json.client.JSONValue; public class Authenti...
package ro.pub.cs.vmchecker.client.service.json; import ro.pub.cs.vmchecker.client.model.AuthenticationResponse; import ro.pub.cs.vmchecker.client.model.User; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONParser; import com.google.gwt.json.client.JSONValue; public class Authenti...
Fix the track number for the Track model
define(function(require, exports, module) { var uuid = require("lib/uuid"); function Track(options) { this.id = options.id || options._id; this._id = options.id || options._id; this.title = options.title; this.album = options.album; this.artist = options.artist; this.track = optio...
define(function(require, exports, module) { var uuid = require("lib/uuid"); function Track(options) { this.id = options.id || options._id; this._id = options.id || options._id; this.title = options.title; this.album = options.album; this.artist = options.artist; this.data = optio...
Fix bug in integer matrix
/* * Copyright 2010-2015 Allette Systems (Australia) * http://www.allette.com.au * * 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 * * U...
/* * Copyright 2010-2015 Allette Systems (Australia) * http://www.allette.com.au * * 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 * * U...
Update freestyle version to 0.3.3.
/******************************************************************************* * Copyright 2012-present Pixate, Inc. * * 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://w...
/******************************************************************************* * Copyright 2012-present Pixate, Inc. * * 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://w...
Make sure getBeanFactory() is available in access traits.
<?php namespace ampf\skeleton\beanAccess\repos; use \ampf\skeleton\doctrine\repositories\Test; trait Test { protected $__testRepository = null; /** * @return Test */ public function getTestRepository() { if ($this->__testRepository === null) { $this->setTestRepository( $this->getBeanFactory()->ge...
<?php namespace ampf\skeleton\beanAccess\repos; use \ampf\skeleton\doctrine\repositories\Test; trait Test { protected $__testRepository = null; /** * @return Test */ public function getTestRepository() { if ($this->__testRepository === null) { $this->setTestRepository( $this->getBeanFactory()->ge...
Set djangorestframework as a install requirement
# -*- coding: utf-8 -*8- from setuptools import setup, find_packages from todomvc import version setup( name='django-todomvc', version=version.to_str(), description='TodoMVC django app', author='Adones Cunha', author_email='adonescunha@gmail.com', url='https://github.com/adonescunha/django-t...
# -*- coding: utf-8 -*8- from setuptools import setup, find_packages from todomvc import version setup( name='django-todomvc', version=version.to_str(), description='TodoMVC django app', author='Adones Cunha', author_email='adonescunha@gmail.com', url='https://github.com/adonescunha/django-t...
Fix mapping file for zh_Hant
<?php namespace libphonenumber\prefixmapper; /** * A utility which knows the data files that are available for the phone prefix mappers to use. * The data files contain mappings from phone number prefixes to text descriptions, and are * organized by country calling code and language that the text descriptions are ...
<?php namespace libphonenumber\prefixmapper; /** * A utility which knows the data files that are available for the phone prefix mappers to use. * The data files contain mappings from phone number prefixes to text descriptions, and are * organized by country calling code and language that the text descriptions are ...
Add functions to generate timestamp for logfiles & filenames; use localtimezone
import datetime from time import gmtime, strftime import pytz #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time #http://www.epochconverter.com/ #1/6/2015, 8:19:34 AM PST -> 23 hours ago #print HTM(1420561174000/1000) ...
import datetime #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time def HTM(aa): a = int(aa) b = int(datetime.datetime.now().strftime("%s")) c = b - a days = c // 86400 hours = c // 3600 % 24 minu...
Add rest_to_html_fragment to be able to convert just the body part
# -*- coding: utf-8 -*- """ flaskjk.restconverter ~~~~~~~~~~~~~~~~~~~~~ Helper functions for converting RestructuredText This class heavily depends on the functionality provided by the docutils package. See http://wiki.python.org/moin/ReStructuredText for more information :copyright: (...
# -*- coding: utf-8 -*- """ flaskjk.restconverter ~~~~~~~~~~~~~~~~~~~~~ Helper functions for converting RestructuredText This class heavily depends on the functionality provided by the docutils package. :copyright: (c) 2010 by Jochem Kossen. :license: BSD, see LICENSE for more details. "...
Allow registering additional extensions for container
<?php namespace Yolo; use Symfony\Component\DependencyInjection\ContainerBuilder; use Yolo\DependencyInjection\YoloExtension; use Yolo\Compiler\EventSubscriberPass; class Factory { public static function createContainer(array $parameters = [], array $extensions = []) { $container = new ContainerBuild...
<?php namespace Yolo; use Symfony\Component\DependencyInjection\ContainerBuilder; use Yolo\DependencyInjection\YoloExtension; use Yolo\Compiler\EventSubscriberPass; class Factory { public static function createContainer(array $parameters = []) { $container = new ContainerBuilder(); $container...
Make the test window bigger in Java.
/** * Copyright 2010 The PlayN 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 applicable law or agreed ...
/** * Copyright 2010 The PlayN 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 applicable law or agreed ...
Print out the unsupported object when encountered.
// Load the node-ffi extensions require('./ffi-extend') // The main exports is the casting function module.exports = $ $._ = $ // legacy. TODO: remove by 0.1.0 // export the exports from the 'import' module var Import = require('./import') $.import = Import.import $.resolve = Import.resolve // This function accepts...
// Load the node-ffi extensions require('./ffi-extend') // The main exports is the casting function module.exports = $ $._ = $ // legacy. TODO: remove by 0.1.0 // export the exports from the 'import' module var Import = require('./import') $.import = Import.import $.resolve = Import.resolve // This function accepts...
Update str() and add comments
""" operation.py ~~~~~~~~~~~~~ This stores the information of each individual operation in the production line. - name improves readability when printing - machine is the machine in which that operation will be executed - duration is the amount of time in which the operation will be completed - job_model is the rad...
""" operation.py ~~~~~~~~~~~~~ This stores the information of each individual operation in the production line. - machine is the machine in which that operation will be executed - duration is the amount of time in which the operation will be completed - job is the set of operations needed to fully build a radiator ...
Add gulp status on script build
const browserify = require('browserify'); const watchify = require('watchify'); const gulp = require('gulp'); const $ = require('gulp-load-plugins')(); const config = require('../config'); const source = require('vinyl-source-stream'); const buffer = require('vinyl-buffer'); let bundler = browserify(config.scripts.sou...
const browserify = require('browserify'); const watchify = require('watchify'); const gulp = require('gulp'); const $ = require('gulp-load-plugins')(); const config = require('../config'); const source = require('vinyl-source-stream'); const buffer = require('vinyl-buffer'); let bundler = browserify(config.scripts.sou...
Change default eventually timeout to 1 minute [#126989119] Signed-off-by: Chris Piraino <f047703f03f13cc8e1b226aa8ba85c2dfc238f94@pivotal.io>
package helpers import ( "os" "time" "github.com/onsi/gomega" ) var DEFAULT_EVENTUALLY_TIMEOUT = 1 * time.Minute var DEFAULT_CONSISTENTLY_DURATION = 5 * time.Second func RegisterDefaultTimeouts() { var err error if os.Getenv("DEFAULT_EVENTUALLY_TIMEOUT") != "" { DEFAULT_EVENTUALLY_TIMEOUT, err = time.ParseDu...
package helpers import ( "os" "time" "github.com/onsi/gomega" ) var DEFAULT_EVENTUALLY_TIMEOUT = 2 * time.Minute var DEFAULT_CONSISTENTLY_DURATION = 5 * time.Second func RegisterDefaultTimeouts() { var err error if os.Getenv("DEFAULT_EVENTUALLY_TIMEOUT") != "" { DEFAULT_EVENTUALLY_TIMEOUT, err = time.ParseDu...
Fix module name for UMD
import rollupBabel from "rollup-plugin-babel"; const pkg = require("./package.json"); export default { entry: "src/index.js", plugins: [ rollupBabel({ babelrc: false, presets: [ ["env", { modules: false }], "stage-3" ] }) ...
import rollupBabel from "rollup-plugin-babel"; const pkg = require("./package.json"); export default { entry: "src/index.js", plugins: [ rollupBabel({ babelrc: false, presets: [ ["env", { modules: false }], "stage-3" ] }) ...
Fix aspect dropdown on people search page inserted after initial page load
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later var List = { runDelayedSearch: function( searchTerm ) { $.getJSON('/people/refresh_search', { q: searchTerm }, List.handleSearchRefresh ); }, handleSearchRefresh: function( data ) { ...
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later var List = { runDelayedSearch: function( searchTerm ) { $.getJSON('/people/refresh_search', { q: searchTerm }, List.handleSearchRefresh ); }, handleSearchRefresh: function( data ) { ...
Make notices.hide_after column retain timezone information
<?php use Phinx\Migration\AbstractMigration; use Phinx\Util\Literal; class CreateNoticesTable extends AbstractMigration { public function change() { $this->table('notices', ['id' => false, 'primary_key' => 'id']) ->addColumn('id', 'uuid', ['default' => Literal::from('uuid_generate_v4()')]) ->addColumn('messa...
<?php use Phinx\Migration\AbstractMigration; use Phinx\Util\Literal; class CreateNoticesTable extends AbstractMigration { public function change() { $this->table('notices', ['id' => false, 'primary_key' => 'id']) ->addColumn('id', 'uuid', ['default' => Literal::from('uuid_generate_v4()')]) ->addColumn('messa...
Define inserts and deletes on CFs.
# -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = ColumnFamily("daily...
# -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = ColumnFamily("daily...
Update fcn to get an object's native class
'use strict'; // MODULES // var nativeClass = require( '@stdlib/utils/native-class' ); var RE = require( '@stdlib/regex/function-name' ); var isBuffer = require( '@stdlib/utils/is-buffer' ); // CONSTRUCTOR NAME // /** * FUNCTION: constructorName( v ) * Determines the name of a value's constructor. * * @param {*} v...
'use strict'; // MODULES // var specificationClass = require( '@stdlib/utils/specification-class' ); var RE = require( '@stdlib/regex/function-name' ); var isBuffer = require( '@stdlib/utils/is-buffer' ); // CONSTRUCTOR NAME // /** * FUNCTION: constructorName( v ) * Determines the name of a value's constructor. * ...
Add more options to Slack notifier phase
package phases import ( "github.com/Everlane/evan/common" "github.com/nlopes/slack" ) type SlackNotifierPhase struct { Client *slack.Client Channel string Format func(common.Deployment) (*string, *slack.PostMessageParameters, error) } func (snp *SlackNotifierPhase) CanPreload() bool { return false } func (...
package phases import ( "github.com/Everlane/evan/common" "github.com/nlopes/slack" ) type SlackNotifierPhase struct { Client *slack.Client Channel string Format func(common.Deployment) (string, error) } func (snp *SlackNotifierPhase) CanPreload() bool { return false } func (snp *SlackNotifierPhase) Execut...
Fix for links color in latest posts block
<?php /** * @package Last_posts * @category blocks * @author Nazar Mokrynskyi <nazar@mokrynskyi.com> * @copyright Copyright (c) 2014-2016, Nazar Mokrynskyi * @license MIT License, see license.txt */ namespace cs\modules\Blogs; use h; $Posts = Posts::instance(); $posts = $Posts->get( $Posts->get_latest_...
<?php /** * @package Last_posts * @category blocks * @author Nazar Mokrynskyi <nazar@mokrynskyi.com> * @copyright Copyright (c) 2014-2016, Nazar Mokrynskyi * @license MIT License, see license.txt */ namespace cs\modules\Blogs; use h; $Posts = Posts::instance(); $posts = $Posts->get( $Posts->get_latest_...
Update example to generate index.html files
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import { App, Home, About, NotFound } from './App.js'; import { Products, Product, ProductColors, ProductColor, } from './Products.js'; export const routes = ( <Route path='/' title='App' component={App}> <IndexRoute component=...
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import { App, Home, About, NotFound } from './App.js'; import { Products, Product, ProductColors, ProductColor, } from './Products.js'; export const routes = ( <Route path='/' title='App' component={App}> <IndexRoute component=...
Resolve failing test "should allow string input for execution"
;(function(global, factory) { // Use UMD pattern to expose exported functions if (typeof exports === 'object') { // Expose to Node.js module.exports = factory(); } else if (typeof define === 'function' && define.amd) { // Expose to RequireJS define([], factory); } // Expose to global object (...
;(function(global, factory) { // Use UMD pattern to expose exported functions if (typeof exports === 'object') { // Expose to Node.js module.exports = factory(); } else if (typeof define === 'function' && define.amd) { // Expose to RequireJS define([], factory); } // Expose to global object (...
Fix options for check subcommand for staged files and commits
package main import ( "fmt" "github.com/libgit2/git2go" "github.com/urfave/cli" ) func GitSeekretCheck(c *cli.Context) error { err := gs.LoadConfig(true) if git.IsErrorClass(err, git.ErrClassConfig) { return fmt.Errorf("Config not initialised - Try: 'git-seekret config --init'") } if err != nil { return er...
package main import ( "fmt" "github.com/libgit2/git2go" "github.com/urfave/cli" ) func GitSeekretCheck(c *cli.Context) error { err := gs.LoadConfig(true) if git.IsErrorClass(err, git.ErrClassConfig) { return fmt.Errorf("Config not initialised - Try: 'git-seekret config --init'") } if err != nil { return er...
Fix js error: currentType is undefined https://github.com/rancher/rancher/issues/23437
import { get } from '@ember/object'; import { alias } from '@ember/object/computed'; import { inject as service } from '@ember/service'; import Controller from '@ember/controller'; export default Controller.extend({ modalService: service('modal'), globalStore: service(), queryParams: ['type'], currentType: '...
import { get } from '@ember/object'; import { alias } from '@ember/object/computed'; import { inject as service } from '@ember/service'; import Controller from '@ember/controller'; export default Controller.extend({ modalService: service('modal'), globalStore: service(), queryParams: ['type'], currentType: '...
Use filename from css.parse errors. The file we're compiling might not be the same as the file that contains the error.
'use strict'; var gutil = require('gulp-util'); var through = require('through2'); var _ = require('lodash'); var rework = require('rework'); var lastIsObject = _.compose(_.isPlainObject, _.last); module.exports = function () { var args = [].slice.call(arguments); var options = lastIsObject(args) ? args.pop() : {}; ...
'use strict'; var gutil = require('gulp-util'); var through = require('through2'); var _ = require('lodash'); var rework = require('rework'); var lastIsObject = _.compose(_.isPlainObject, _.last); module.exports = function () { var args = [].slice.call(arguments); var options = lastIsObject(args) ? args.pop() : {}; ...
Add sorting by link title to NavigationMenu.
<?php /** * A single navigtion menu * @author Jon Johnson <jon.johnson@ucsf.edu> * @license http://jazzee.org/license.txt * @package foundation * @subpackage navigation */ class Navigation_Menu { /** * The title for this menu * @var string */ public $title; /** * holds the links * @var arr...
<?php /** * A single navigtion menu * @author Jon Johnson <jon.johnson@ucsf.edu> * @license http://jazzee.org/license.txt * @package foundation * @subpackage navigation */ class Navigation_Menu { /** * The title for this menu * @var string */ public $title; /** * holds the links * @var arr...
Revert "Show tampering warning *only* when data has been tampered with :ninja:" The position was intentional. it should be loud until we pull out the fake part of this options method.
import backbone from 'backbone'; import AllocationSource from 'models/AllocationSource'; import globals from 'globals'; import _ from 'underscore'; import allocationSources from 'mockdata/allocationSources.json'; import mockSync from 'utilities/mockSync'; export default backbone.Collection.extend({ model: Alloca...
import backbone from 'backbone'; import AllocationSource from 'models/AllocationSource'; import globals from 'globals'; import _ from 'underscore'; import allocationSources from 'mockdata/allocationSources.json'; import mockSync from 'utilities/mockSync'; export default backbone.Collection.extend({ model: Alloca...
Fix bytes problem on python 3.
# Copyright (c) Calico Development Team. # Distributed under the terms of the Modified BSD License. # http://calicoproject.org/ from jupyter_kernel import Magic import subprocess class ShellMagic(Magic): def line_shell(self, *args): """%shell COMMAND - run the line as a shell command""" command =...
# Copyright (c) Calico Development Team. # Distributed under the terms of the Modified BSD License. # http://calicoproject.org/ from jupyter_kernel import Magic import subprocess class ShellMagic(Magic): def line_shell(self, *args): """%shell COMMAND - run the line as a shell command""" command =...
Use native path separators on Windows
import path from 'path'; import CompositeGitStrategy from '../composite-git-strategy'; import {fsStat, toNativePathSep} from '../helpers'; /** * Locate the nearest git working directory above a given starting point, caching results. */ export default class WorkdirCache { constructor(maxSize = 1000) { this.max...
import path from 'path'; import CompositeGitStrategy from '../composite-git-strategy'; import {fsStat} from '../helpers'; /** * Locate the nearest git working directory above a given starting point, caching results. */ export default class WorkdirCache { constructor(maxSize = 1000) { this.maxSize = maxSize; ...
Make sourceError optional in CallProcessingError
/** Errors @description defines custom errors used for the middleware @exports {class} APIError **/ /** @class APIError @desc given when API response gives error outside of 200 range @param {number} status HTTP Status given in response @param {string} statusText message given along with the error @para...
/** Errors @description defines custom errors used for the middleware @exports {class} APIError **/ /** @class APIError @desc given when API response gives error outside of 200 range @param {number} status HTTP Status given in response @param {string} statusText message given along with the error @para...
Remove extra space in usage message text
#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host', action='append'...
#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host', action='append...
Add missing python import to utility script BUG= R=lrn@google.com Review URL: https://codereview.chromium.org//1226963005.
#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import os import shutil import sys import subprocess import utils def Main(): ...
#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import subprocess import utils def Main(): build_roo...