text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Remove create device step (not needed?)
from flow import Flow import logging from . import settings LOG = logging.getLogger("flowbot.server") class Server(object): """A connection to Flow.""" def __init__(self): """Initialize a flow server instance.""" self.flow = Flow() self._start_server() self._setup_account()...
from flow import Flow import logging from . import settings LOG = logging.getLogger("flowbot.server") class Server(object): """A connection to Flow.""" def __init__(self): """Initialize a flow server instance.""" self.flow = Flow() self._start_server() self._setup_account()...
Remove trailing slash b/c invite ID has leading one
package co.phoenixlab.discord.api; /** * Contains various useful API URLs and paths */ public class ApiConst { /** * Utility class */ private ApiConst() { } /** * The base URL from which Discord runs */ public static final String BASE_URL = "https://discordapp.com/"; /**...
package co.phoenixlab.discord.api; /** * Contains various useful API URLs and paths */ public class ApiConst { /** * Utility class */ private ApiConst() { } /** * The base URL from which Discord runs */ public static final String BASE_URL = "https://discordapp.com/"; /**...
Remove usage of deprecated "Symfony\Component\Config\Definition\Builder\TreeBuilder::root()"
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Sylius\Bundle\AdminBundle\DependencyInjection; use Symfony\Compon...
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Sylius\Bundle\AdminBundle\DependencyInjection; use Symfony\Compon...
Improve (a tiny bit) validation error message
# coding: utf-8 from django.utils.translation import ugettext as _ from rest_framework import serializers from kpi.constants import ( ASSET_TYPE_COLLECTION, PERM_DISCOVER_ASSET, PERM_VIEW_ASSET ) from kpi.fields import RelativePrefixHyperlinkedRelatedField from kpi.models import Asset from kpi.models impor...
# coding: utf-8 from django.utils.translation import ugettext as _ from rest_framework import serializers from kpi.constants import ( ASSET_TYPE_COLLECTION, PERM_DISCOVER_ASSET, PERM_VIEW_ASSET ) from kpi.fields import RelativePrefixHyperlinkedRelatedField from kpi.models import Asset from kpi.models impor...
Fix typo in follower restrictions
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
Include changelog in package registration. Up version.
# -*- encoding: utf8 -*- from setuptools import setup, find_packages import os read = lambda *names: open(os.path.join(os.path.dirname(__file__), *names)).read() setup( name="aspectlib", version="0.8.0", url='https://github.com/ionelmc/python-aspectlib', download_url='', license='BSD', descript...
# -*- encoding: utf8 -*- from setuptools import setup, find_packages import os setup( name="aspectlib", version="0.7.0", url='https://github.com/ionelmc/python-aspectlib', download_url='', license='BSD', description="Aspect-Oriented Programming toolkit.", long_description=open(os.path.join...
Stop favorite click from triggering card click
import React from "react"; import actions from "actions"; import stores from "stores"; // images import filled_star from "images/filled-star-icon.png"; import empty_star from "images/empty-star-icon.png"; export default React.createClass({ displayName: "CommonBookmark", toggleFavorite: function(e) { e...
import React from "react"; import actions from "actions"; import stores from "stores"; // images import filled_star from "images/filled-star-icon.png"; import empty_star from "images/empty-star-icon.png"; export default React.createClass({ displayName: "CommonBookmark", toggleFavorite: function(e) { e...
Check if file exists in array
<?php class Kwf_Trl_BuildFileMissingException extends Kwf_Exception { public function __construct($message = 'trl build file does not exist') { parent::__construct($message); } public function getSettingsNonStaticTrlException() { $exceptionLocation = null; foreach ($this->ge...
<?php class Kwf_Trl_BuildFileMissingException extends Kwf_Exception { public function __construct($message = 'trl build file does not exist') { parent::__construct($message); } public function getSettingsNonStaticTrlException() { $exceptionLocation = null; foreach ($this->ge...
Fix version numbers of libraries.
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name='ppp_questionparsing_grammatical', version='0.4.7', description='Natural language processing module for the PPP.', url='https://github.com/ProjetPP/PPP-QuestionParsing-Grammatical', author='Projet Pensées Profondes', ...
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name='ppp_questionparsing_grammatical', version='0.4.7', description='Natural language processing module for the PPP.', url='https://github.com/ProjetPP/PPP-QuestionParsing-Grammatical', author='Projet Pensées Profondes', ...
Improve error message for message listeners consistency rules.
package poussecafe.environment; public class MessageListeners { public void include(MessageListener listener) { MessageListenerType priority = listener.priority(); if(priority == MessageListenerType.FACTORY) { if(factoryListener == null) { factoryListener = listener; ...
package poussecafe.environment; public class MessageListeners { public void include(MessageListener listener) { MessageListenerType priority = listener.priority(); if(priority == MessageListenerType.FACTORY) { if(factoryListener == null) { factoryListener = listener; ...
Use os.name to detect OS This is consistent with the rest of the code.
#!/usr/bin/env python """Setup script for MemeGen.""" import os import logging import setuptools from memegen import __project__, __version__ try: README = open("README.rst").read() CHANGELOG = open("CHANGELOG.rst").read() except IOError: DESCRIPTION = "<placeholder>" else: DESCRIPTION = README + '...
#!/usr/bin/env python """Setup script for MemeGen.""" import sys import logging import setuptools from memegen import __project__, __version__ try: README = open("README.rst").read() CHANGELOG = open("CHANGELOG.rst").read() except IOError: DESCRIPTION = "<placeholder>" else: DESCRIPTION = README + ...
Add check for used invites
<?php namespace mpcmf\modules\authex\controllers; use mpcmf\modules\authex\mappers\inviteMapper; use mpcmf\modules\moduleBase\controllers\controllerBase; use mpcmf\modules\moduleBase\exceptions\mapperException; use mpcmf\system\helper\io\codes; use mpcmf\system\pattern\singleton; /** * Class inviteController * * I...
<?php namespace mpcmf\modules\authex\controllers; use mpcmf\modules\authex\mappers\inviteMapper; use mpcmf\modules\moduleBase\controllers\controllerBase; use mpcmf\modules\moduleBase\exceptions\mapperException; use mpcmf\system\helper\io\codes; use mpcmf\system\pattern\singleton; /** * Class inviteController * * I...
Fix CS failure for docblock line length
<?php declare(strict_types=1); namespace PhpSchool\PhpWorkshop\Result; use PhpSchool\PhpWorkshop\Check\CheckInterface; /** * A failure result representing the situation where there were function usage requirements * and they were not met. */ class FunctionRequirementsFailure implements FailureInterface { use...
<?php declare(strict_types=1); namespace PhpSchool\PhpWorkshop\Result; use PhpSchool\PhpWorkshop\Check\CheckInterface; /** * A failure result representing the situation where there were function usage requirements * and they were not met. */ class FunctionRequirementsFailure implements FailureInterface { use...
jf-tooltip-on-overflow: Use the root dir element as the target, not the actual event target.
/* USAGE EXAMPLE: <jf-grid-filter filter-grid="gridOptions" //the name of the grid (grid options) filter-field="fieldName" //the name of the field that should be filtered filter-on-change> //optional - don't use a button for filtering, filter on every change </jf-grid-filter> */ export functi...
/* USAGE EXAMPLE: <jf-grid-filter filter-grid="gridOptions" //the name of the grid (grid options) filter-field="fieldName" //the name of the field that should be filtered filter-on-change> //optional - don't use a button for filtering, filter on every change </jf-grid-filter> */ export functi...
Add an optional second parameter to cache, used to conditionaly enable/disable caching
<?php namespace Gchaincl\LaravelFragmentCaching; class ViewServiceProvider extends \Illuminate\View\ViewServiceProvider { protected $defered = false; public function register() { parent::register(); $this->registerEnvironment(); $this->registerBladeExtensions(); } public f...
<?php namespace Gchaincl\LaravelFragmentCaching; class ViewServiceProvider extends \Illuminate\View\ViewServiceProvider { protected $defered = false; public function register() { parent::register(); $this->registerEnvironment(); $this->registerBladeExtensions(); } public f...
Fix the error that change page after creating project
(function() { 'use strict'; angular .module('vmsFrontend') .controller('CreateProjectController', CreateProjectController); /** @ngInject */ function CreateProjectController( $log, $state, $translate, project, projectHyperlink, PERMISSION_OPTIONS, FROALA_OPTIONS ) { v...
(function() { 'use strict'; angular .module('vmsFrontend') .controller('CreateProjectController', CreateProjectController); /** @ngInject */ function CreateProjectController( $log, $state, $translate, project, projectHyperlink, PERMISSION_OPTIONS, FROALA_OPTIONS ) { v...
Add additional property to pass to weatherCard.
import React, {Component} from 'react'; import $ from 'jquery'; import CurrentWeatherCard from './CurrentWeatherCard'; export default class App extends Component { constructor(){ super() this.state = { location:'', responseData: null, currentData: null, forecastData: null, hourl...
import React, {Component} from 'react'; import $ from 'jquery'; import CurrentWeatherCard from './CurrentWeatherCard'; export default class App extends Component { constructor(){ super() this.state = { location:'', responseData: null, currentData: null, forecastData: null, hourl...
Update RenameFileStorage method to be 1.11 compatible
import hashlib import itertools import os import time from django.conf import settings from django.core.files.storage import FileSystemStorage from storages.backends.s3boto3 import S3Boto3Storage DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage class RenameFileStorage(DjangoStor...
import hashlib import itertools import os import time from django.conf import settings from django.core.files.storage import FileSystemStorage from storages.backends.s3boto3 import S3Boto3Storage DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage class RenameFileStorage(DjangoStor...
Fix assistant get key database
function normalizeName (name) { return capitalizeFirstLetter(name.replace(/\s+/g, '')); } function capitalizeFirstLetter (string) { return string.charAt(0).toUpperCase() + string.slice(1); } function uncapitalizeFirstLetter (string) { return string.charAt(0).toLowerCase() + string.slice(1); } function ge...
function normalizeName (name) { return capitalizeFirstLetter(name.replace(/\s+/g, '')); } function capitalizeFirstLetter (string) { return string.charAt(0).toUpperCase() + string.slice(1); } function getKeyAndUnit (value) { let valueId = ' '; let measureUnit = ''; switch (value) { case 'te...
Disable more plugins to make it work again. Will fix venues parsing later. Signed-off-by: Ville Valkonen <989b9f9979d21943697628c770235933300d59bc@gmail.com>
# -*- coding: utf-8 -*- # Execute this file to see what plugins will be loaded. # Implementation leans to Lex Toumbourou's example: # https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/ import os import pkgutil import sys from typing import List from venues.abstract_venue import ...
# -*- coding: utf-8 -*- # Execute this file to see what plugins will be loaded. # Implementation leans to Lex Toumbourou's example: # https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/ import os import pkgutil import sys from typing import List from venues.abstract_venue import ...
Fix typo on apiKey Variable
<?php namespace Benwilkins\FCM; use GuzzleHttp\Client; use Illuminate\Notifications\Notification; /** * Class FcmChannel. */ class FcmChannel { /** * @const The API URL for Firebase */ const API_URI = 'https://fcm.googleapis.com/fcm/send'; /** * @var Client */ private $client; ...
<?php namespace Benwilkins\FCM; use GuzzleHttp\Client; use Illuminate\Notifications\Notification; /** * Class FcmChannel. */ class FcmChannel { /** * @const The API URL for Firebase */ const API_URI = 'https://fcm.googleapis.com/fcm/send'; /** * @var Client */ private $client; ...
Allow smaller pictures to be declared as valid pictures
<?php namespace Movim\Task; use Clue\React\Buzz\Browser; use Psr\Http\Message\ResponseInterface; class CheckSmallPicture extends Engine { private $_client; public function __construct() { $engine = parent::start(); $browser = new Browser($engine->_loop); $this->_client = $browse...
<?php namespace Movim\Task; use Clue\React\Buzz\Browser; use Psr\Http\Message\ResponseInterface; class CheckSmallPicture extends Engine { private $_client; public function __construct() { $engine = parent::start(); $browser = new Browser($engine->_loop); $this->_client = $browse...
Add custom exception logic to the Directory class If an empty string was passed to the Directory class, then an exception needs to be raised as all of its methods assume a value for the path.
"""Contains a Directory class to represent real directories""" from ..base import _BaseFileAndDirectoryInterface from ..exceptions import InvalidDirectoryValueError class Directory(_BaseFileAndDirectoryInterface): """A class that groups together the (meta)data and behavior of directories""" def __init__...
"""Contains a Directory class to represent real directories""" from ..base import _BaseFileAndDirectoryInterface class Directory(_BaseFileAndDirectoryInterface): """A class that groups together the (meta)data and behavior of directories""" def __init__(self, path): """ Construct the obje...
Enable or disable an inline in accordance with the type of article
$(document).ready(function () { var $id_type = $('#id_type'); $id_type.each(function() { if($(this).val() == 'p'){ $('[id^="publishedinperiodical"]').parents('._inline-group').show(); $('[id^="publishedinevent"]').parents('._inline-group').hide(); } else if($(this).val(...
$(document).ready(function () { var $id_type = $('[id$=type]'); $id_type.each(function() { if($(this).val() == 'p'){ $('[id$=periodical]').parents('.row').show(); $('[id$=date]').parents('.row').show(); $('[id$=event]').parents('.row').hide(); } else if($(th...
Add ID & HASH in CardController
// ---------------------------------------------------------------- // Card Class class CardModel extends SwitchModel { constructor({ name, lsKeyView, triggerSelector, switchSelector, hash = null } = {}) { super({ name: name, lsKeyView: lsKeyView, triggerSelector: trigger...
// ---------------------------------------------------------------- // Card Class class CardModel extends SwitchModel { constructor({ name, lsKeyView, triggerSelector, switchSelector, hash = null } = {}) { super({ name: name, lsKeyView: lsKeyView, triggerSelector: trigger...
Add option for spatial correlation
import numpy as np from scipy.sparse import coo_matrix from sklearn.base import BaseEstimator import scipy as sp class PearsonCorrelation(BaseEstimator): """Pearson correlation estimator """ def __init__(self, assume_centered=False, spatial=False): self.assume_centered = assume_centered s...
import numpy as np from scipy.sparse import coo_matrix from sklearn.base import BaseEstimator class PearsonCorrelation(BaseEstimator): """Pearson correlation estimator """ def __init__(self, assume_centered=False): self.assume_centered = assume_centered def fit(self, X, y=None, connectivity=...
Update annotations count when setting status from dropdown
import React, { Component, PropTypes } from 'react'; import Relay from 'react-relay'; class CreateStatusMutation extends Relay.Mutation { getMutation() { return Relay.QL`mutation createStatus { createStatus }`; } getFatQuery() { var query = ''; switch (this.props.parent_type) { case ...
import React, { Component, PropTypes } from 'react'; import Relay from 'react-relay'; class CreateStatusMutation extends Relay.Mutation { getMutation() { return Relay.QL`mutation createStatus { createStatus }`; } getFatQuery() { var query = ''; switch (this.props.parent_type) { case ...
Use github URL and official license name.
from setuptools import setup, find_packages version = '1.9' setup(name='jarn.viewdoc', version=version, description='Python documentation viewer', long_description=open('README.rst').read() + '\n' + open('CHANGES.rst').read(), classifiers=[ 'Development Status ...
from setuptools import setup, find_packages version = '1.9' setup(name='jarn.viewdoc', version=version, description='Python documentation viewer', long_description=open('README.rst').read() + '\n' + open('CHANGES.rst').read(), classifiers=[ 'Development Status ...
Increase coordinate in building fixtures
<?php namespace AppBundle\DataFixtures\ORM; use AppBundle\Entity\Building; use AppBundle\Entity\Category; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Common\Persistence\ObjectManager; use Symfony\Component\DependencyInjection\ContainerAwareI...
<?php namespace AppBundle\DataFixtures\ORM; use AppBundle\Entity\Building; use AppBundle\Entity\Category; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Common\Persistence\ObjectManager; use Symfony\Component\DependencyInjection\ContainerAwareI...
Fix issue identified by Psalm
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\TextUI\XmlConfiguration; use function sprintf; u...
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\TextUI\XmlConfiguration; use function sprintf; u...
Fix warning on module not found for moment locale
const path = require('path'); const webpack = require('webpack'); module.exports = { entry: { app: path.resolve(__dirname, 'app/Resources/assets/js/app.js') }, output: { path: path.resolve(__dirname, 'web/builds'), filename: 'bundle.js', publicPath: '/builds/' }, mod...
const path = require('path'); const webpack = require('webpack'); module.exports = { entry: { app: path.resolve(__dirname, 'app/Resources/assets/js/app.js') }, output: { path: path.resolve(__dirname, 'web/builds'), filename: 'bundle.js', publicPath: '/builds/' }, mod...
Remove any tooltip on pane change (there is no JS event triggered that would remove the tooltip when the action comes from Android)
// created to start cleaning up "window" interaction // window.show = function(id) { window.hideall(); if (typeof android !== 'undefined' && android && android.switchToPane) { android.switchToPane(id); } switch(id) { case 'full': window.c...
// created to start cleaning up "window" interaction // window.show = function(id) { window.hideall(); if (typeof android !== 'undefined' && android && android.switchToPane) { android.switchToPane(id); } switch(id) { case 'full': window.c...
Fix code climate style issues
var AjaxErrorMessageObj = function() { this.$flash = $('#ajax-error-message'); this.$flash_text = $('#ajax-error-message-text'); this.$flash_close = $('#ajax-error-message > .ajax-error-dismiss'); this.init(); }; AjaxErrorMessageObj.prototype = { init: function() { this.$flash_close ...
AjaxErrorMessageObj = function() { this.$flash = $('#ajax-error-message'); this.$flash_text = $('#ajax-error-message-text'); this.$flash_close = $('#ajax-error-message > .ajax-error-dismiss'); this.init(); } AjaxErrorMessageObj.prototype = { init: function() { this.$flash_close ...
Undo accidental restriction of test suite
var should = require('should'); var webdriverio = require('webdriverio'); var selenium = require('selenium-standalone'); var fs = require('fs'); var path = require('path'); var client = webdriverio.remote({ logLevel: 'command', desiredCapabilities: { browserName: 'phantomjs' } }); describe('Clientside valid...
var should = require('should'); var webdriverio = require('webdriverio'); var selenium = require('selenium-standalone'); var fs = require('fs'); var path = require('path'); var client = webdriverio.remote({ logLevel: 'command', desiredCapabilities: { browserName: 'phantomjs' } }); describe.only('Clientside ...
Install requires pytest 3.6 or greater
import os import io from setuptools import setup, find_packages cwd = os.path.abspath(os.path.dirname(__file__)) with io.open(os.path.join(cwd, 'README.rst'), encoding='utf-8') as fd: long_description = fd.read() setup( name='pytest-tornado', version='0.5.0', description=('A py.test plugin providin...
import os import io from setuptools import setup, find_packages cwd = os.path.abspath(os.path.dirname(__file__)) with io.open(os.path.join(cwd, 'README.rst'), encoding='utf-8') as fd: long_description = fd.read() setup( name='pytest-tornado', version='0.5.0', description=('A py.test plugin providin...
:hammer: Fix for a source-map warning
const path = require('path'); module.exports = { entry: "./src/index.tsx", output: { filename: "bundle.js", path: path.resolve(__dirname, "public/") }, resolve: { // Add '.ts' and '.tsx' as resolvable extensions. extensions: [".ts", ".tsx", ".js", ".json"] }, ...
const path = require('path'); module.exports = { entry: "./src/index.tsx", output: { filename: "bundle.js", path: path.resolve(__dirname, "public/") }, resolve: { // Add '.ts' and '.tsx' as resolvable extensions. extensions: [".ts", ".tsx", ".js", ".json"] }, ...
Convert results to a string before printing
#!/usr/bin/env python import argparse import sys import logging import elasticsearch import elasticsearch.helpers ES_NODES = 'uct2-es-door.mwt2.org' VERSION = '0.1' SOURCE_INDEX = '.kibana' TARGET_INDEX = 'osg-connect-kibana' def get_es_client(): """ Instantiate DB client and pass connection back """ retur...
#!/usr/bin/env python import argparse import sys import logging import elasticsearch import elasticsearch.helpers ES_NODES = 'uct2-es-door.mwt2.org' VERSION = '0.1' SOURCE_INDEX = '.kibana' TARGET_INDEX = 'osg-connect-kibana' def get_es_client(): """ Instantiate DB client and pass connection back """ retur...
Comment has incorrect indentation level 8, expected is 0, indentation should be the same level as line 11. [CommentsIndentation]
package pl.grzeslowski.jsupla.server.ents; import pl.grzeslowski.jsupla.server.SuplaChannel; public abstract class SuplaConnection<T> { private final T t; private final SuplaChannel channel; public SuplaConnection(final T t, final SuplaChannel channel) { // TODO // this.request = r...
package pl.grzeslowski.jsupla.server.ents; import pl.grzeslowski.jsupla.server.SuplaChannel; public abstract class SuplaConnection<T> { private final T t; private final SuplaChannel channel; public SuplaConnection(final T t, final SuplaChannel channel) { // TODO // this.request = requireNo...
Allow newer requests. Still to try out and find any issues.
from setuptools import setup, find_packages from ckanext.qa import __version__ setup( name='ckanext-qa', version=__version__, description='Quality Assurance plugin for CKAN', long_description='', classifiers=[], keywords='', author='Open Knowledge Foundation', author_email='info@okfn.or...
from setuptools import setup, find_packages from ckanext.qa import __version__ setup( name='ckanext-qa', version=__version__, description='Quality Assurance plugin for CKAN', long_description='', classifiers=[], keywords='', author='Open Knowledge Foundation', author_email='info@okfn.or...
Update blog admin index page
@extends('templates.base') @section('title') Blog Admin @stop @section('body') <h1>Blog Admin</h1> <a href="{{ action('BlogAdminController@getPost') }}"><h4>Create post</h4></a> <h4>Posts</h4> <div class="col-md-8 col-lg-6"> <table class="table table-hover"> <tr> ...
@extends('templates.base') @section('title') Blog Admin @stop @section('body') <h1>Blog Admin</h1> <a href="{{ action('BlogAdminController@getPost') }}"><h4>Create post</h4></a> <h4>Posts</h4> <div class="col-md-8 col-lg-6"> <table class="table table-hover"> <tr> ...
Print a quit message when shutting down a bot
from twisted.internet import reactor from Hubbot import Hubbot, HubbotFactory import GlobalVars class BotHandler: botfactories = {} def __init__(self): for (server_with_port,channels) in GlobalVars.connections.items(): server = server_with_port.split(":")[0] port = int(server_w...
from twisted.internet import reactor from Hubbot import Hubbot, HubbotFactory import GlobalVars class BotHandler: botfactories = {} def __init__(self): for (server_with_port,channels) in GlobalVars.connections.items(): server = server_with_port.split(":")[0] port = int(server_w...
Installation: Enable the routing bundles to your kernel
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\Sec...
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\Sec...
Fix tests issues with namespaces changes
function runTests(testType, BABYLON, GUI, INSPECTOR) { console.log("running tests"); describe(testType + ' module tests', function () { it("should have the dependencies loaded", function () { assert.isDefined(BABYLON, "BABYLON should be defined"); assert.isDefined(...
function runTests(testType, BABYLON, GUI, INSPECTOR) { console.log("running tests"); describe(testType + ' module tests', function () { it("should have the dependencies loaded", function () { assert.isDefined(BABYLON); assert.isDefined(GUI); assert.isD...
Fix issue with post with no tag
import needle from 'needle'; import { SiteConf, getDate } from 'base'; export const postsApiHandler = (req, res) => { needle('get', SiteConf.PostsApi) .then(resp => { const data = resp.body; const filter = req.params.filter; const pagination = data.meta.pagination; const posts = PostList...
import needle from 'needle'; import { SiteConf, getDate } from 'base'; export const postsApiHandler = (req, res) => { needle('get', SiteConf.PostsApi) .then(resp => { const data = resp.body; const filter = req.params.filter; const pagination = data.meta.pagination; const posts = PostList...
Fix undefined XHR state on reload success
function adminHandleFieldType(e) { if (ADMIN_FIELD_TIMEOUT) clearTimeout(ADMIN_FIELD_TIMEOUT); ADMIN_FIELD_TIMEOUT = setTimeout(function () { $(e.target).trigger({ type: 'change', _typing: true }); }, 200); } function adminHandlePaneStep(e, name) { name...
function adminHandleFieldType(e) { if (ADMIN_FIELD_TIMEOUT) clearTimeout(ADMIN_FIELD_TIMEOUT); ADMIN_FIELD_TIMEOUT = setTimeout(function () { $(e.target).trigger({ type: 'change', _typing: true }); }, 200); } function adminHandlePaneStep(e, name) { name...
Update CloVal to allow for specifying multiple parameters
from .environment import Environment from viper.parser.ast.nodes import AST, Parameter from typing import List class Value: pass class TupleVal(Value): def __init__(self, *vals: Value): self.vals = list(vals) def __repr__(self) -> str: return f"TupleVal({', '.join(map(str, self.vals))...
from .environment import Environment from viper.parser.ast.nodes import Expr class Value: pass class TupleVal(Value): def __init__(self, *vals: Value): self.vals = list(vals) def __repr__(self) -> str: return f"TupleVal({', '.join(map(str, self.vals))})" class NumVal(Value): def ...
Fix Radio: Use find, select does not return all inputs. getValue didn't work
var $ = require('jQuery'); var fieldRegistry = require('kwf/frontend-form/field-registry'); var Field = require('kwf/frontend-form/field/field'); var kwfExtend = require('kwf/extend'); var Radio = kwfExtend(Field, { initField: function() { this.el.find('input').each((function(index, input) { $(...
var $ = require('jQuery'); var fieldRegistry = require('kwf/frontend-form/field-registry'); var Field = require('kwf/frontend-form/field/field'); var kwfExtend = require('kwf/extend'); var Radio = kwfExtend(Field, { initField: function() { this.el.find('input').each((function(index, input) { $(...
Fix some of the !mdn bugs
<?php namespace Ciarand\PhilipPlugin; use Philip\AbstractPlugin as BasePlugin; use Philip\IRC\Response; use Guzzle\Http\Client; class MdnPlugin extends BasePlugin { public function init() { $client = new Client("http://www.google.com"); $endpoint = "/search?btnI&q=site:developer.mozilla.org+...
<?php namespace Ciarand\PhilipPlugin; use Philip\AbstractPlugin as BasePlugin; use Philip\IRC\Response; use Guzzle\Http\Client; class MdnPlugin extends BasePlugin { protected $guzzleClient; public function init() { $client = new Client("http://www.google.com"); $endpoint = "/search?btnI...
Fix error messages in get_fans
import typing as tp # NOQA from chainer import types # NOQA from chainer import utils class Initializer(object): """Initializes array. It initializes the given array. Attributes: dtype: Data type specifier. It is for type check in ``__call__`` function. """ def __init__(...
import typing as tp # NOQA from chainer import types # NOQA from chainer import utils class Initializer(object): """Initializes array. It initializes the given array. Attributes: dtype: Data type specifier. It is for type check in ``__call__`` function. """ def __init__(...
Move team guard check to the actual use case
<?php namespace Mpociot\Teamwork\Traits; /** * This file is part of Teamwork * * @license MIT * @package Teamwork */ use Exception; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Config; /** * Class UsedByTeams * @package Mpociot\Teamwork\Trait...
<?php namespace Mpociot\Teamwork\Traits; /** * This file is part of Teamwork * * @license MIT * @package Teamwork */ use Exception; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Config; /** * Class UsedByTeams * @package Mpociot\Teamwork\Trait...
Add url rewrite for if a product is added below a grouped product
<?php class GroupedProduct_CatalogueProduct extends DataExtension { private static $has_one = array( "ProductGroup" => "Product" ); public function updateCMSFields(FieldList $fields) { $fields->addFieldToTab( "Root.Settings", DropdownField::create( ...
<?php class GroupedProduct_CatalogueProduct extends DataExtension { private static $has_one = array( "ProductGroup" => "Product" ); public function updateCMSFields(FieldList $fields) { $fields->addFieldToTab( "Root.Settings", DropdownField::create( ...
Add some more placeholder text.
@extends('layouts.default') @section('title') Contact &middot; Indiana Real Estate Exchangors, Inc. @stop @section('content') <div class="content-block"> {{ Form::open(array('url' => 'contact')) }} <dl class="form"> <dt class="input-label"> <label for="name">Name:</label> </dt> ...
@extends('layouts.default') @section('title') Contact &middot; Indiana Real Estate Exchangors, Inc. @stop @section('content') <div class="content-block"> {{ Form::open(array('url' => 'contact')) }} <dl class="form"> <dt class="input-label"> <label for="name">Name:</label> </dt> ...
Stop grabbing password when there is no username
"""Command line interface to the OSF""" import os from .api import OSF CHUNK_SIZE = int(5e6) def _setup_osf(args): # command line argument overrides environment variable username = os.getenv("OSF_USERNAME") if args.username is not None: username = args.username password = None if usern...
"""Command line interface to the OSF""" import os from .api import OSF CHUNK_SIZE = int(5e6) def _setup_osf(args): # command line argument overrides environment variable username = os.getenv("OSF_USERNAME") if args.username is not None: username = args.username password = os.getenv("OSF_PA...
Make AllTests.php without any checkstyle error
<?php /** * AllTests file * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Cop...
<?php /** * AllTests file * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Cop...
Use csync groups when doing a global update.
<?php class SV_Csync2StreamWrapper_CsyncConfig { public function __construct() { //setlocale(LC_CTYPE, "en_US.UTF-8"); //$this->debug_log //$this->csync_database = "/var/lib/csync2"; } public $deferred_count = 0; public $deferred_commit_bulk = false; publ...
<?php class SV_Csync2StreamWrapper_CsyncConfig { public function __construct() { //setlocale(LC_CTYPE, "en_US.UTF-8"); //$this->debug_log //$this->csync_database = "/var/lib/csync2"; } public $deferred_count = 0; public $deferred_commit_bulk = false; publ...
Return default full block bounding box for blocks that don't have one
package com.elmakers.mine.bukkit.utility.platform.modern; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.bukkit.block.Block; import org.bukkit.util.Vector; import org.bukkit.util.VoxelShape; import com.elmakers.mine.bukkit.utility.BoundingBox; import com.elmakers.mine.bukk...
package com.elmakers.mine.bukkit.utility.platform.modern; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.bukkit.block.Block; import org.bukkit.util.Vector; import org.bukkit.util.VoxelShape; import com.elmakers.mine.bukkit.utility.BoundingBox; import com.elmakers.mine.bukk...
Remove dependency on JQuery for binding/triggering hashchange/pushstate events
/** * model/fancy/location.js */ function changePathGen (method) { return function changePath(path) { root.history[method + 'State'](EMPTY_OBJECT, '', path); window.dispatchEvent(new root.Event(method + 'state')); }; } models.location = baseModel.extend({ /** * Example: * var l...
/** * model/fancy/location.js */ function changePathGen (method) { return function changePath(path) { root.history[method + 'State'](EMPTY_OBJECT, '', path); $(root).trigger(method + 'state'); }; } models.location = baseModel.extend({ /** * Example: * var loc = tbone.models.loc...
Fix default value if plugin is not configured
const suffixToRemove = 'Container'; function addDisplayNameStatement(t, varName) { const pos = varName.indexOf(suffixToRemove); const displayName = 0 < pos ? varName.substring(0, pos) : varName; // <VAR>.displayName = '<VAR>'; return t.expressionStatement( // t.assignmentExpression('='...
const suffixToRemove = 'Container'; function addDisplayNameStatement(t, varName) { const pos = varName.indexOf(suffixToRemove); const displayName = 0 < pos ? varName.substring(0, pos) : varName; // <VAR>.displayName = '<VAR>'; return t.expressionStatement( // t.assignmentExpression('='...
Add more detail to unmarshalling errors
package com.dottydingo.hyperion.service.marshall; import com.dottydingo.hyperion.exception.BadRequestException; import com.dottydingo.hyperion.exception.InternalException; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.InputStream; import java.io.OutputStream; /** */ public class EndpointMarshal...
package com.dottydingo.hyperion.service.marshall; import com.dottydingo.hyperion.exception.BadRequestException; import com.dottydingo.hyperion.exception.InternalException; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.InputStream; import java.io.OutputStream; /** */ public class EndpointMarshal...
Make the AppStore an app again (visible in the app store) We are doing this as the appstore will become the new appshare home page
function listApps(args) { /* is_app(true) created_timestamp(-1) base_component_id("listApps") display_name("App Store") description('App to list all the apps') load_once_from_file(true) */ Vue.component('list_apps',{ template: `<div > <div class="card-columns"> ...
function listApps(args) { /* created_timestamp(-1) base_component_id("listApps") display_name("App Store") description('App to list all the apps') load_once_from_file(true) */ Vue.component('list_apps',{ template: `<div > <div class="card-columns"> <div cl...
Remove unused import because Travis is picky
import urlparse import celery import requests from celery.utils.log import get_task_logger from django.conf import settings from framework.tasks import app as celery_app logger = get_task_logger(__name__) class VarnishTask(celery.Task): abstract = True max_retries = 5 def get_varnish_servers(): # TODO...
import urlparse import celery import requests from celery.utils.log import get_task_logger from django.conf import settings from framework.tasks import app as celery_app from framework.tasks.utils import logged logger = get_task_logger(__name__) class VarnishTask(celery.Task): abstract = True max_retries = ...
Update test codes to fit test target.
package net.folab.fo.jast; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; import net.folab.fo.bytecode.ByteArrayClassLoader; import net.folab.fo.jast.AstWriter; import org.junit.After; import org.junit.Before; import org.junit.Test; public class AstWriterTest { private AstWriter wr...
package net.folab.fo.jast; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; import net.folab.fo.bytecode.ByteArrayClassLoader; import net.folab.fo.jast.AstVisitor; import net.folab.fo.jast.AstWriter; import org.junit.After; import org.junit.Before; import org.junit.Test; public class AstW...
Remove unneeded debug cod e
"""Provide a class to load and parse the help file and Provide a simple interface for retrieving help entries""" import json import os class HelpManager(object): _help_dict = {} _last_modified = 0 @staticmethod def get_help(lang, key): """ Retrieve a given commands help text with given lang...
"""Provide a class to load and parse the help file and Provide a simple interface for retrieving help entries""" import json import os class HelpManager(object): _help_dict = {} _last_modified = 0 @staticmethod def get_help(lang, key): """ Retrieve a given commands help text with given lang...
Fix firefox Date.parse() problem with iso dates
'use strict'; angular.module('stockApp') .factory('bitcoinData', function ($http, YAHOO_API, BITCOIN_CSV) { var bitcoinData = { yql: function () { var query = 'select * from csv where url = "' + BITCOIN_CSV + '"'; // yql config var FORMAT = 'json'; var ENV = 'store://data...
'use strict'; angular.module('stockApp') .factory('bitcoinData', function ($http, YAHOO_API, BITCOIN_CSV) { var bitcoinData = { yql: function () { var query = 'select * from csv where url = "' + BITCOIN_CSV + '"'; // yql config var FORMAT = 'json'; var ENV = 'store://data...
Fix SectionLayoutRenderer blockMap prop type.
import React, { Component, PropTypes } from 'react'; import { ContentLayoutEngine, BlockTypeMap } from '../index'; export default class SectionLayoutRenderer extends Component { static renderBlocks(blocks, blockMap) { if (!blocks && !blocks.length) { return null; } // Merge user supplied content b...
import React, { Component, PropTypes } from 'react'; import { ContentLayoutEngine, BlockTypeMap } from '../index'; export default class SectionLayoutRenderer extends Component { static renderBlocks(blocks, blockMap) { if (!blocks && !blocks.length) { return null; } // Merge user supplied content b...
Load value from json field as string.
import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): super()._...
import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): super()._...
Mark workspace app related properties as deprecated
package com.github.seratch.jslack.api.methods.response.oauth; import com.github.seratch.jslack.api.methods.SlackApiResponse; import lombok.Data; import java.util.List; @Data public class OAuthAccessResponse implements SlackApiResponse { private boolean ok; private String warning; private String error; ...
package com.github.seratch.jslack.api.methods.response.oauth; import com.github.seratch.jslack.api.methods.SlackApiResponse; import lombok.Data; import java.util.List; @Data public class OAuthAccessResponse implements SlackApiResponse { private boolean ok; private String warning; private String error; ...
Remove ember 1.10 testing scenario
/*jshint node:true*/ function scenario(emberVersion) { return { name: 'ember-' + emberVersion, bower: { dependencies: { 'ember': '~' + emberVersion + '.0' }, resolutions: { 'ember': '~' + emberVersion + '.0' } } }; } module.exports = { scenarios: [ scenario...
/*jshint node:true*/ function scenario(emberVersion) { return { name: 'ember-' + emberVersion, bower: { dependencies: { 'ember': '~' + emberVersion + '.0' }, resolutions: { 'ember': '~' + emberVersion + '.0' } } }; } module.exports = { scenarios: [ scenario...
Implement new methods for entify phone verified
<?php namespace Listabierta\Bundle\MunicipalesBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * PhoneVerified * * @ORM\Entity * @ORM\Table(name="phone_verified") */ class PhoneVerified { /** * @var integer */ private $id; /** * @var string */ private $phone; /*...
<?php namespace Listabierta\Bundle\MunicipalesBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * PhoneVerified */ class PhoneVerified { /** * @var integer */ private $id; /** * @var string */ private $phone; /** * @var \DateTime */ private $timestamp; ...
Convert invalid hyphens to underscores for Android
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved // Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license const _ = require("lodash"); const xml = require("xml"); module.exports = def => { const o = { resources: def .get("props") .map(prop => { const key...
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved // Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license const _ = require("lodash"); const xml = require("xml"); module.exports = def => { const o = { resources: def .get("props") .map(prop => { const key...
Use json instead of simplejson Signed-off-by: Jan Dvořák <86df5a4870880bf501c926309e3bcfbe57789f3f@mordae.eu>
#!/usr/bin/python3 -tt # -*- coding: utf-8 -*- __all__ = ['KeaAgent'] from os import system from twisted.python import log from json import dump, load from adminator.kea import generate_kea_config, DEFAULTS class KeaAgent(object): def __init__(self, db, template=None, output=None, signal=None): self.db ...
#!/usr/bin/python3 -tt # -*- coding: utf-8 -*- __all__ = ['KeaAgent'] from os import system from twisted.python import log from simplejson import dump, load from adminator.kea import generate_kea_config, DEFAULTS class KeaAgent(object): def __init__(self, db, template=None, output=None, signal=None): se...
Add test to removeCleanApiParameter method
package io.searchbox.indices; import io.searchbox.action.Action; import org.junit.Test; import java.net.URLDecoder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; public class StatsTest { @Test public void testBasicUriGeneration() { Stats stats = new St...
package io.searchbox.indices; import io.searchbox.action.Action; import org.junit.Test; import java.net.URLDecoder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; public class StatsTest { @Test public void testBasicUriGeneration() { Stats stats = new St...
Fix pressurised water render in copper tanks.
package mariculture.core.render; import mariculture.core.tile.TileTankBlock; import net.minecraftforge.fluids.FluidStack; public class RenderCopperTank extends RenderBase { public RenderCopperTank() {} @Override public void renderBlock() { if (!isItem()) { TileTankBlock tank = (TileTa...
package mariculture.core.render; import mariculture.core.tile.TileTankBlock; import net.minecraftforge.fluids.FluidStack; public class RenderCopperTank extends RenderBase { public RenderCopperTank() {} @Override public void renderBlock() { if (!isItem()) { TileTankBlock tank = (TileTa...
Add return to replies so they don't get called multiple times
const logger = require('./logger'); module.exports = ( userService, themeService, clientService ) => { return (templateName, getView, postHandler) => async (request, reply, source, error) => { if (error && error.output.statusCode === 404) { return reply(error); } try { const client = aw...
const logger = require('./logger'); module.exports = ( userService, themeService, clientService ) => { return (templateName, getView, postHandler) => async (request, reply, source, error) => { if (error && error.output.statusCode === 404) { reply(error); } try { const client = await cli...
Add object creation methods for Message
import json class Message: def __init__(self, sender, message_type, content=None): self.message = { 'sender': sender, 'type': message_type, 'content': content } def __str__(self): return json.dumps(self.message) def __repr__(self): retu...
import json class Message: def __init__(self, sender, message_type, content=None): self.message = { 'sender': sender, 'type': message_type, 'content': content } def __str__(self): return json.dumps(self.message) def __repr__(self): retu...
NOJIRA: Clarify comments on how to configure the demo.
/* Copyright 2009 University of Toronto Licensed under the Educational Community License (ECL), Version 2.0. ou may not use this file except in compliance with this License. You may obtain a copy of the ECL 2.0 License at https://source.collectionspace.org/collection-space/LICENSE.txt */ /*global jQuery*/ var demo...
/* Copyright 2009 University of Toronto Licensed under the Educational Community License (ECL), Version 2.0. ou may not use this file except in compliance with this License. You may obtain a copy of the ECL 2.0 License at https://source.collectionspace.org/collection-space/LICENSE.txt */ /*global jQuery*/ var demo...
:green_heart: Set SL currency to 1
const karmaDefault = require('./karma.default'); module.exports = config => { // Browsers to run on Sauce Labs const customLaunchers = { 'SL_Chrome': { base: 'SauceLabs', browserName: 'chrome', platform: 'Windows 10', version: 'latest' }, ...
const karmaDefault = require('./karma.default'); module.exports = config => { // Browsers to run on Sauce Labs const customLaunchers = { 'SL_Chrome': { base: 'SauceLabs', browserName: 'chrome', platform: 'Windows 10', version: 'latest' }, ...
Rename it to Hermes2D GUI
""" The Acme Lab application. """ # Standard library imports. from logging import DEBUG # Enthought library imports. from enthought.envisage.ui.workbench.api import WorkbenchApplication from enthought.pyface.api import AboutDialog, ImageResource, SplashScreen class Acmelab(WorkbenchApplication): """ The Acme L...
""" The Acme Lab application. """ # Standard library imports. from logging import DEBUG # Enthought library imports. from enthought.envisage.ui.workbench.api import WorkbenchApplication from enthought.pyface.api import AboutDialog, ImageResource, SplashScreen class Acmelab(WorkbenchApplication): """ The Acme L...
Fix compatibility with API v19 - use Interpolator from v7 support library instead of using the APIv21 version
package com.reidzeibel.animatedlistadapter.utils; import android.content.Context; import android.support.v4.view.animation.FastOutLinearInInterpolator; import android.support.v4.view.animation.FastOutSlowInInterpolator; import android.support.v4.view.animation.LinearOutSlowInInterpolator; import android.view.animation...
package com.reidzeibel.animatedlistadapter.utils; import android.content.Context; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; import android.view.animation.LinearInterpolator; /** * Created by RidwanAditama on 16/01/2017. */ public class AnimUtils { private AnimUt...
Add docstring to load() method
"""Facility to load plugins.""" import sys import os from importlib import import_module class StraightPluginLoader(object): """Performs the work of locating and loading straight plugins. This looks for plugins in every location in the import path. """ def _findPluginFilePaths(self, namespace)...
"""Facility to load plugins.""" import sys import os from importlib import import_module class StraightPluginLoader(object): """Performs the work of locating and loading straight plugins. This looks for plugins in every location in the import path. """ def _findPluginFilePaths(self, namespace)...
Add height/width URL parameters only if not templated
window.Slapdash = window.Slapdash || {}; Slapdash.Util = { _urlTemplates: { height: '%height%', width: '%width%' }, debug: function(msg){ if (console && console.log) console.log('Slapdash [DEBUG]: ' + msg); }, showError: function(err){ alert(er...
window.Slapdash = window.Slapdash || {}; Slapdash.Util = { _urlTemplates: { height: '%height%', width: '%width%' }, debug: function(msg){ if (console && console.log) console.log('Slapdash [DEBUG]: ' + msg); }, showError: function(err){ alert(er...
Use non-breaking space when book field is null.
/** * Book page */ define([ "underscore", "backbone" ], function(_, Backbone) { var BookPage = Backbone.View.extend({ render: function() { // Fill out existing structure. var fieldsStandardText = ["title", "isbn", "publisher", "notesPublic", "notesPrivate"], ...
/** * Book page */ define([ "underscore", "backbone" ], function(_, Backbone) { var BookPage = Backbone.View.extend({ render: function() { // Fill out existing structure. var fieldsStandardText = ["title", "isbn", "publisher", "notesPublic", "notesPrivate"], ...
Add metadata.tables to mock db.
from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, MockStorage, resiz...
from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, MockStorage, resiz...
Add absolute path for including autoloader
<?php require_once(__DIR__.'/../../../../../public/Bootstrap.php'); //require_once('Bootstrap.php'); /** * Error logging * * default error log path for process "/var/log/httpd/error_log" * to change error log path: * ini_set('error_log', "/var/www/vhosts/dev/api-test/logs/error_log"); */ // Get pass-in Multipro...
<?php require_once('Bootstrap.php'); /** * Error logging * * default error log path for process "/var/log/httpd/error_log" * to change error log path: * ini_set('error_log', "/var/www/vhosts/dev/api-test/logs/error_log"); */ // Get pass-in Multiprocess Object $multiProcess = $argv[1]; $multiProcess = unserializ...
Update blueprints to support addons
module.exports = { afterInstall: function () { return this.addPackagesToProject([ {name: 'redux', target: '^3.4.0'}, {name: 'redux-thunk', target: '^2.0.1'} ]) .then(() => { return this.addAddonsToProject({ packages: [ {name: 'ember-browserify', target: '^1.1.12...
module.exports = { afterInstall: function () { return this.addPackagesToProject([ {name: 'redux', target: '^3.4.0'}, {name: 'redux-thunk', target: '^2.0.1'} ]) .then(() => { return this.addAddonsToProject({ packages: [ {name: 'ember-browserify', target: '^1.1.12...
Fix for vm list ordering
$(function() { $("form :button").each(function(){ var button = $(this); if ($(button).attr('id') == 'cancel') { $(button).click(function(e){ e.preventDefault(); history.back(); }); } else { $(button).click(function(e){ var buttonId = $(button).attr('id'); if (typeof ...
$(function() { $("form :button").each(function(){ var button = $(this); if ($(button).attr('id') == 'cancel') { $(button).click(function(e){ e.preventDefault(); history.back(); }); } else { $(button).click(function(e){ var buttonId = $(button).attr('id'); if (typeof ...
Adjust saving of test taxons
<?php namespace Tests\SitemapPlugin\Controller; use Lakion\ApiTestCase\XmlApiTestCase; use Sylius\Component\Core\Model\Product; use Sylius\Component\Core\Model\Taxon; /** * @author Stefan Doorn <stefan@efectos.nl> */ class SitemapTaxonControllerApiTest extends XmlApiTestCase { /** * @before */ pu...
<?php namespace Tests\SitemapPlugin\Controller; use Lakion\ApiTestCase\XmlApiTestCase; use Sylius\Component\Core\Model\Product; use Sylius\Component\Core\Model\Taxon; /** * @author Stefan Doorn <stefan@efectos.nl> */ class SitemapTaxonControllerApiTest extends XmlApiTestCase { /** * @before */ pu...
Fix length problem in test.
package net.simplestorage.storage.impl.indexed; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.net.URISyntaxException; import static org.junit.Assert.assertEqual...
package net.simplestorage.storage.impl.indexed; import org.junit.Before; import org.junit.Test; import java.io.File; import java.io.FileNotFoundException; import java.net.URISyntaxException; import static org.junit.Assert.*; public class IndexedStorageFileTest { private IndexedStorageFile storageFile; @Be...
Rename transpile label to transpile-app
var gulp = require('gulp'), babel = require('gulp-babel'), watch = require('gulp-watch'), uglify = require('gulp-uglify'), strip = require('gulp-strip-comments'), rename = require('gulp-rename'); // Transpile ES6 app to ES5 using babel gulp.task('transpile-app', function () { retur...
var gulp = require('gulp'), babel = require('gulp-babel'), watch = require('gulp-watch'), uglify = require('gulp-uglify'), strip = require('gulp-strip-comments'), rename = require('gulp-rename'); // Transpile ES6 app to ES5 using babel gulp.task('transpile', function () { return gu...
Remove a blank line, because.
package org.wildfly.swarm.examples.messaging; import org.wildfly.swarm.container.Container; import org.wildfly.swarm.jaxrs.JAXRSDeployment; import org.wildfly.swarm.messaging.MessagingFraction; import org.wildfly.swarm.messaging.MessagingServer; import org.wildfly.swarm.msc.ServiceActivatorDeployment; /** * @author ...
package org.wildfly.swarm.examples.messaging; import org.wildfly.swarm.container.Container; import org.wildfly.swarm.jaxrs.JAXRSDeployment; import org.wildfly.swarm.messaging.MessagingFraction; import org.wildfly.swarm.messaging.MessagingServer; import org.wildfly.swarm.msc.ServiceActivatorDeployment; /** * @author ...
Initialize random sequence of words when starting training, so that words do not repeat
import logging import random DIRECT = 'direct' REVERSE = 'reverse' LOG = logging.getLogger(__name__) class Trainer: def __init__(self, store, kind=DIRECT): self.store = store if kind == DIRECT: self._words = list(store.direct_index.items()) self._plugin = store.meaning_p...
import logging import random DIRECT = 'direct' REVERSE = 'reverse' LOG = logging.getLogger(__name__) class Trainer: def __init__(self, store, kind=DIRECT): self.store = store if kind == DIRECT: self._words = list(store.direct_index.items()) self._plugin = store.meaning_p...
Add missing coma (jshint fix)
var fs = require('fs'); var css = fs.readFileSync(__dirname + '/cache/bootstrap.css').toString(); var CSSOM = require('cssom'); var postcss = require('../build'); var rework = require('rework'); var stylecow = require('stylecow'); var gonzales = require('gonzales'); var gonzalesPe = require('gonzales-...
var fs = require('fs'); var css = fs.readFileSync(__dirname + '/cache/bootstrap.css').toString(); var CSSOM = require('cssom'); var postcss = require('../build'); var rework = require('rework'); var stylecow = require('stylecow'); var gonzales = require('gonzales'); var gonzalesPe = require('gonzales-...
Use to_playlist in the playlist provider
from __future__ import unicode_literals import logging from mopidy import backend import spotify from mopidy_spotify import translator logger = logging.getLogger(__name__) class SpotifyPlaylistsProvider(backend.PlaylistsProvider): def __init__(self, backend): self._backend = backend def create...
from __future__ import unicode_literals import logging from mopidy import backend, models import spotify from mopidy_spotify import translator logger = logging.getLogger(__name__) class SpotifyPlaylistsProvider(backend.PlaylistsProvider): def __init__(self, backend): self._backend = backend de...
Improve error logging in uglify worker
var uglify; try { uglify = require('uglify-js'); } catch (err) { /* NOP */ } process.on('message', function(msg) { var outputFile = msg.output, data = msg.data, sourceMap = msg.sourceMap, warnings = []; try { var warnFunction; try { warnFunction = uglify.AST_Node.warn_function; ...
var uglify; try { uglify = require('uglify-js'); } catch (err) { /* NOP */ } process.on('message', function(msg) { var outputFile = msg.output, data = msg.data, sourceMap = msg.sourceMap, warnings = []; try { var warnFunction; try { warnFunction = uglify.AST_Node.warn_function; ...
Fix button misfires on mobile
import React, { Component } from 'react'; import _ from 'lodash'; import styles from './css/Button.module.css'; export default class Button extends Component { static propTypes = { onClick: React.PropTypes.func.isRequired, disabled: React.PropTypes.bool } constructor (props) { sup...
import React, { Component } from 'react'; import _ from 'lodash'; import styles from './css/Button.module.css'; export default class Button extends Component { static propTypes = { onClick: React.PropTypes.func.isRequired, disabled: React.PropTypes.bool } constructor (props) { sup...
FEAT: Use bulk operation in migration script for performance
const mongoModel = require('./mongo-model'); const sqlModel = require('./sql-model'); function main() { sqlModel.sequelize.sync() .then(() => mongoModel.find({})) .then(users => { console.log('MongoDB query done. Length: ', users.length); let promises = []; for (let user of users) { ...
const mongoModel = require('./mongo-model'); const sqlModel = require('./sql-model'); function main() { sqlModel.sequelize.sync() .then(() => mongoModel.find({})) .then(users => { console.log('MongoDB query done. Length: ', users.length); let promises = []; for (let user of users) { ...
Convert list member addresses to non-unicode strings when possible.
from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', 'reports', ...
from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', 'reports', ...
Correct status output text for Make Map
const webModel = require('../webModel'); const webModelFunctions = require('../webModelFunctions'); const robotModel = require('../robotModel'); async function makeMap() { if (webModel.debugging) { console.log('Make Map'); webModelFunctions.scrollingStatusUpdate('Make Map'); } if (robotMode...
const webModel = require('../webModel'); const webModelFunctions = require('../webModelFunctions'); const robotModel = require('../robotModel'); async function makeMap() { if (webModel.debugging) { console.log('Make Map'); webModelFunctions.scrollingStatusUpdate('Make Map'); } if (robotMode...
Add getter and setter for Patient attribute
package org.pdxfinder.dao; import java.util.HashSet; import org.neo4j.ogm.annotation.GraphId; import org.neo4j.ogm.annotation.NodeEntity; import org.neo4j.ogm.annotation.Relationship; import java.util.Set; /** * Created by jmason on 16/03/2017. */ @NodeEntity public class PatientSnapshot { @GraphId Long i...
package org.pdxfinder.dao; import java.util.HashSet; import org.neo4j.ogm.annotation.GraphId; import org.neo4j.ogm.annotation.NodeEntity; import org.neo4j.ogm.annotation.Relationship; import java.util.Set; /** * Created by jmason on 16/03/2017. */ @NodeEntity public class PatientSnapshot { @GraphId Long i...
Revert "hide worker and coordinator" This reverts commit f73ce955ef6a2562f75f3311de279d43566dba08.
#!/usr/bin/env python import os from setuptools import setup, find_packages name = 'Mikko Korpela' # I might be just a little bit too much afraid of those bots.. address = name.lower().replace(' ', '.')+chr(64)+'gmail.com' setup(name='robotframework-pabot', version='1.2.1', description='Parallel test run...
#!/usr/bin/env python import os from setuptools import setup, find_packages name = 'Mikko Korpela' # I might be just a little bit too much afraid of those bots.. address = name.lower().replace(' ', '.')+chr(64)+'gmail.com' setup(name='robotframework-pabot', version='1.2.1', description='Parallel test run...