text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Fix some PHP Strict standards errors in tests.
<?php use Mockery as m; abstract class AcTestCase extends Orchestra\Testbench\TestCase { protected $app; protected $router; public function tearDown() { parent::tearDown(); m::close(); } protected function mock($className) { $mock = m::mock($className); Ap...
<?php use Mockery as m; abstract class AcTestCase extends Orchestra\Testbench\TestCase { protected $app; protected $router; public function tearDown() { parent::tearDown(); m::close(); } protected function mock($className) { $mock = m::mock($className); Ap...
Fix for MRV failing to enter enable mode
"""MRV Communications Driver (OptiSwitch).""" from __future__ import unicode_literals import time import re from netmiko.cisco_base_connection import CiscoSSHConnection class MrvOptiswitchSSH(CiscoSSHConnection): """MRV Communications Driver (OptiSwitch).""" def session_preparation(self): """Prepare ...
"""MRV Communications Driver (OptiSwitch).""" from __future__ import unicode_literals import time import re from netmiko.cisco_base_connection import CiscoSSHConnection class MrvOptiswitchSSH(CiscoSSHConnection): """MRV Communications Driver (OptiSwitch).""" def session_preparation(self): """Prepare ...
Remove slash from chapters partial path The slash must be added to ovPlayerDirectory variable, not directly to the path of the partial
(function(app){ "use strict" /** * Creates a new HTML element ov-index to create an openVeo player * index, with a list of presentation slides. * It requires ovPlayerDirectory global variable to be defined and have * a value corresponding to the path of the openVeo Player * root directory. * ...
(function(app){ "use strict" /** * Creates a new HTML element ov-index to create an openVeo player * index, with a list of presentation slides. * It requires ovPlayerDirectory global variable to be defined and have * a value corresponding to the path of the openVeo Player * root directory. * ...
Update Trove classifier to include Python 3.7
from setuptools import setup setup( name='snappass', version='1.3.0', description="It's like SnapChat... for Passwords.", long_description=(open('README.rst').read() + '\n\n' + open('AUTHORS.rst').read()), url='http://github.com/Pinterest/snappass/', install_requires=['Fla...
from setuptools import setup setup( name='snappass', version='1.3.0', description="It's like SnapChat... for Passwords.", long_description=(open('README.rst').read() + '\n\n' + open('AUTHORS.rst').read()), url='http://github.com/Pinterest/snappass/', install_requires=['Fla...
Hide the affiliate modal in the e2e theme download tests.
/* Tests for themes generation */ describe('Themes', function () { var async = function(arr, delay, done) { var j = 0; var runner = function() { setTimeout(function() { if(j === arr.length) { return done(); } console.log('async ', arr.length - j); arr[j]()...
/* Tests for themes generation */ describe('Themes', function () { var async = function(arr, delay, done) { var j = 0; var runner = function() { setTimeout(function() { if(j === arr.length) { return done(); } console.log('async ', arr.length - j); arr[j]()...
Add a few spaces for easier copy-paste
""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,python_exe='python'...
""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,python_exe='python'...
Replace config() helper for Lumen
<?php namespace Neves\Events; use Illuminate\Support\ServiceProvider; use Illuminate\Contracts\Events\Dispatcher as EventDispatcher; class EventServiceProvider extends ServiceProvider { /** * Register the service provider. * * @return void */ public function register() { $this...
<?php namespace Neves\Events; use Illuminate\Support\ServiceProvider; use Illuminate\Contracts\Events\Dispatcher as EventDispatcher; class EventServiceProvider extends ServiceProvider { /** * Register the service provider. * * @return void */ public function register() { $this...
Remove dubugger; statement from auth controller.
(function() { 'use strict'; angular.module('pub.security.authentication', []) .factory('authentication', [ '$q', '$http', 'securityContext', function($q, $http, securityContext) { var authentication = { requestSecurityContext: function() { if (securityCon...
(function() { 'use strict'; angular.module('pub.security.authentication', []) .factory('authentication', [ '$q', '$http', 'securityContext', function($q, $http, securityContext) { var authentication = { requestSecurityContext: function() { debugger; ...
Fix metadata template import on OS X
import importlib import pkgutil import sys from collections import OrderedDict from inselect.lib.metadata import MetadataTemplate from inselect.lib.utils import debug_print from inselect.lib.templates import dwc, price if True: _library = {} for template in [p.template for p in (dwc, price)]: _libr...
import importlib import pkgutil import sys from collections import OrderedDict from inselect.lib.metadata import MetadataTemplate from inselect.lib.utils import debug_print _library = None def library(): """Returns a list of MetadataTemplate instances """ global _library if not _library: _l...
Enable table controls for WYSIWYG editor
tinyMCE.init({ theme:"advanced", mode:"none", plugins: "contextmenu,paste,spellchecker,style,table", theme_advanced_styles : "Heading 1=mce_header1;Heading 2=mce_header2;Heading 3=mce_header3", theme_advanced_toolbar_location: "top", theme_advanced_toolbar_a...
tinyMCE.init({ theme:"advanced", mode:"none", plugins: "contextmenu,paste,spellchecker,style", theme_advanced_styles : "Heading 1=mce_header1;Heading 2=mce_header2;Heading 3=mce_header3", theme_advanced_toolbar_location: "top", theme_advanced_toolbar_align: ...
[change] Remove first year from footer
import { format } from 'date-fns'; import React from 'react' import { Navigation } from './blocks/Navigation' import styles from './Main.css' const socialLinks = [ { to: 'https://stackoverflow.com/story/usehotkey', title: 'StackOverflow' }, // { // to: 'https://yadi.sk/d/QzyQ04br3HX...
import { format } from 'date-fns'; import React from 'react' import { Navigation } from './blocks/Navigation' import styles from './Main.css' const socialLinks = [ { to: 'https://stackoverflow.com/story/usehotkey', title: 'StackOverflow' }, // { // to: 'https://yadi.sk/d/QzyQ04br3HX...
Hide ITS messages for now unless `showITS` url param Until we get sensible messages from ITS, their demo ones are not helpful. Thy can be seen using `?showITS=true` in the url.
import Immutable from 'seamless-immutable'; import { actionTypes } from '../actions'; import urlParams from '../utilities/url-params'; const initialState = Immutable({ show: false, message: null, explanation: null, leftButton: null, rightButton: null }); const defaultRightButton = { label: "~BUTTON.OK", ...
import Immutable from 'seamless-immutable'; import { actionTypes } from '../actions'; const initialState = Immutable({ show: false, message: null, explanation: null, leftButton: null, rightButton: null }); const defaultRightButton = { label: "~BUTTON.OK", action: "dismissModalDialog" }; export default ...
Fix problem with finding sample name from fastqc_screen output
import sys import os header = ['Sample', 'Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped'] print '\t'.join(header) for fi in sys.argv[1:]: sample = os.path.basename(fi).split('.')[0] if sample[-7:] == '_screen': sample = sample[:-7] with open(fi) as screen_results: results = {...
import sys import os header = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped'] print '\t'.join(header) for fi in sys.argv[1:]: sample = os.path.basename(fi).split('.')[0] with open(fi) as screen_results: results = {} for line in screen_results: fields = line.strip()....
Clear form on form request.
import * as types from './constants'; export function form(config) { const initialState = { id: '', isActive: false, lastUpdated: 0, form: {}, url: '', error: '', }; return (state = initialState, action) => { // Only proceed for this form. if (action.name !== config.name) { ...
import * as types from './constants'; export function form(config) { const initialState = { id: '', isActive: false, lastUpdated: 0, form: {}, url: '', error: '', }; return (state = initialState, action) => { // Only proceed for this form. if (action.name !== config.name) { ...
Fix tests for php < 5.4
<?php class XdgTest extends PHPUnit_Framework_TestCase { /** * @return \ShopwareCli\Services\PathProvider\DirectoryGateway\Xdg */ public function getXdg() { return new \ShopwareCli\Services\PathProvider\DirectoryGateway\Xdg(); } public function testXdgPutCache() { put...
<?php class XdgTest extends PHPUnit_Framework_TestCase { /** * @return \ShopwareCli\Services\PathProvider\DirectoryGateway\Xdg */ public function getXdg() { return new \ShopwareCli\Services\PathProvider\DirectoryGateway\Xdg(); } public function testXdgPutCache() { put...
Fix test to accommodate change of error message.
from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not unique within a pro...
from django.test import TestCase from main.api.serializers import DatasetSerializer from main.tests.api import helpers class TestDatsetSerializer(helpers.BaseUserTestCase): def test_name_uniqueness(self): """ Test that the serializer report an error if the dataset name is not unique within a pro...
ci: Fix failing tests on appveyor
import ci_addons import os import pytest import subprocess from . import captured_lines def test_home(): expected_home = os.path.abspath(os.path.dirname(__file__) + '/..') assert ci_addons.home() == expected_home @pytest.mark.parametrize("addon", ['anyci/noop', 'anyci/noop.py']) def test_path(addon): ...
import ci_addons import os import pytest import subprocess from . import captured_lines def test_home(): expected_home = os.path.abspath(os.path.dirname(__file__) + '/..') assert ci_addons.home() == expected_home @pytest.mark.parametrize("addon", ['anyci/noop', 'anyci/noop.py']) def test_path(addon): ...
Allow leading space in lazy continuation lines.
<?php namespace FluxBB\CommonMark\Parser\Block; use FluxBB\CommonMark\Common\Text; use FluxBB\CommonMark\Node\Blockquote; use FluxBB\CommonMark\Node\Container; use FluxBB\CommonMark\Parser\AbstractBlockParser; class BlockquoteParser extends AbstractBlockParser { /** * Parse the given content. * *...
<?php namespace FluxBB\CommonMark\Parser\Block; use FluxBB\CommonMark\Common\Text; use FluxBB\CommonMark\Node\Blockquote; use FluxBB\CommonMark\Node\Container; use FluxBB\CommonMark\Parser\AbstractBlockParser; class BlockquoteParser extends AbstractBlockParser { /** * Parse the given content. * *...
Remove stray reference to underscore.string
#!/usr/bin/env node 'use strict'; // description: git status across all repositories var async = require('async'); var chalk = require('chalk'); var gift = require('gift'); var path = require('path'); var _ = require('lodash'); var storage = require('../lib/storage.js'); var utilities = require('../lib/utilities.js...
#!/usr/bin/env node 'use strict'; // description: git status across all repositories var async = require('async'); var chalk = require('chalk'); var gift = require('gift'); var path = require('path'); var _ = require('lodash'); _.str = require('underscore.string'); var storage = require('../lib/storage.js'); var u...
Fix test descovery to correctly add test dir to path and import modules rather then files
"""Greencard implementation.""" from functools import wraps TESTS = [] def greencard(func): """ A decorator for providing a unittesting function/method with every card in a librarian card library database when it is called. """ @wraps(func) def wrapped(*args, **kwargs): """Transparen...
"""Greencard implementation.""" from functools import wraps TESTS = [] def greencard(func): """ A decorator for providing a unittesting function/method with every card in a librarian card library database when it is called. """ @wraps(func) def wrapped(*args, **kwargs): """Transparen...
Add function for reading file as array buffer
(function () { var ns = $.namespace('pskl.utils'); var stopPropagation = function (e) { e.stopPropagation(); }; ns.FileUtils = { readFile : function (file, callback) { var reader = new FileReader(); reader.onload = function (event) { callback(event.target.result); }; re...
(function () { var ns = $.namespace('pskl.utils'); var stopPropagation = function (e) { e.stopPropagation(); }; ns.FileUtils = { readFile : function (file, callback) { var reader = new FileReader(); reader.onload = function (event) { callback(event.target.result); }; re...
Add About page to Webpack Dev server.
const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: './src/js/app.js', output: { path: __dirname + '/dist', filename: 'bundle.js' }, devtool: 'inline-source-map', devServer: { contentBase: '.' }, module: { rules: [ ...
const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: './src/js/app.js', output: { path: __dirname + '/dist', filename: 'bundle.js' }, devtool: 'inline-source-map', devServer: { contentBase: '.' }, module: { rules: [ ...
Modify AnalogInput initialization, add exception handling.
""" This module provides classes for interfacing with analog plugins. """ import json from myDevices.plugins.manager import PluginManager from myDevices.utils.logger import info, debug class AnalogInput(): """Reads data from an analog input.""" def __init__(self, adc): """Initializes the analog input...
""" This module provides classes for interfacing with analog plugins. """ import json from myDevices.plugins.manager import PluginManager from myDevices.utils.logger import info class AnalogInput(): """Reads data from an analog input.""" def __init__(self, adc_name): """Initializes the analog input. ...
Mark compatibility with Python 3.6
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='pyaavso', version=__import__('pyaavso').__version__, description='A Python library for working with AAVSO data.', long_description=read('README.rst...
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='pyaavso', version=__import__('pyaavso').__version__, description='A Python library for working with AAVSO data.', long_description=read('README.rst...
Add Camera and Light class. Refact.
package com.gmail.jiangyang5157.cardboard.scene.projection; import android.util.ArrayMap; import android.util.Log; /** * @author Yang * @since 4/12/2016. */ public class IcosphereBuilder { private volatile static IcosphereBuilder uniqueInstance; private ArrayMap<Integer, IcosphereVertex> icosphereVertice...
package com.gmail.jiangyang5157.cardboard.scene.projection; import android.util.ArrayMap; import android.util.Log; /** * @author Yang * @since 4/12/2016. */ public class IcosphereBuilder { private volatile static IcosphereBuilder uniqueInstance = null; private ArrayMap<Integer, IcosphereVertex> icosphere...
Update header user font weight
'use strict'; import React, { Component } from 'react'; import ReactCSS from 'reactcss'; import colors from '../../styles/variables/colors'; import { spacing } from '../../styles/variables/utils'; import { User, Button, Icon } from '../common/index'; class Header extends Component { classes() { return { ...
'use strict'; import React, { Component } from 'react'; import ReactCSS from 'reactcss'; import colors from '../../styles/variables/colors'; import { spacing } from '../../styles/variables/utils'; import { User, Button, Icon } from '../common/index'; class Header extends Component { classes() { return { ...
Extend import statement to support Python 3
# For reasons that I don't fully understand, # unless I include __file__ in here, the packaged version # of this module will just be a .egg file, not a .egg folder. # And if it's just a .egg file, it won't include the necessary # dependencies from MANIFEST.in. # Found the __file__ clue by inspecting the `python setup.p...
# For reasons that I don't fully understand, # unless I include __file__ in here, the packaged version # of this module will just be a .egg file, not a .egg folder. # And if it's just a .egg file, it won't include the necessary # dependencies from MANIFEST.in. # Found the __file__ clue by inspecting the `python setup.p...
Rollback spawn api change. Guess it isn't there yet.
var log = require("../utils/log") module.exports = function exec (cmd, args, env, pipe, cb) { if (!cb) cb = pipe, pipe = false if (!cb) cb = env, env = process.env log(cmd+" "+args.map(JSON.stringify).join(" "), "exec") var stdio = process.binding("stdio") , fds = [ stdio.stdinFD || 0 , stdio....
var log = require("../utils/log") module.exports = function exec (cmd, args, env, pipe, cb) { if (!cb) cb = pipe, pipe = false if (!cb) cb = env, env = process.env log(cmd+" "+args.map(JSON.stringify).join(" "), "exec") var stdio = process.binding("stdio") , fds = [ stdio.stdinFD || 0 , stdio....
Fix auth service tokens url
chipsterWeb.factory('AuthenticationService', ['localStorageService', '$http', 'ConfigService', function (localStorageService, $http, ConfigService) { var service = {}; // Do the authentication here based on userid and password service.login = function (username, password) { //...
chipsterWeb.factory('AuthenticationService', ['localStorageService', '$http', 'ConfigService', function (localStorageService, $http, ConfigService) { var service = {}; // Do the authentication here based on userid and password service.login = function (username, password) { //...
Add a 'project' namespace for custom translations of each project Add a generic namespace where the projects can store custom translations that don't override the preset namespaces of the core Issue edina/fieldtrip-cobweb-project#1
'use strict'; define(function(require) { var i18next = require('ext/i18next'); var i18nextJquery = require('ext/jquery-i18next'); var i18nextXHRbackend = require('ext/i18next-xhr-backend'); i18next .use(i18nextXHRbackend) .init({ debug: false, lng: 'en', ...
'use strict'; define(function(require) { var i18next = require('ext/i18next'); var i18nextJquery = require('ext/jquery-i18next'); var i18nextXHRbackend = require('ext/i18next-xhr-backend'); i18next .use(i18nextXHRbackend) .init({ debug: false, lng: 'en', ...
Add debug.html to build script
var historyApiFallback = require("connect-history-api-fallback"); var dest = "./build"; var src = './src'; module.exports = { browserSync: { server: { // Serve up our build folder baseDir: dest, middleware: [historyApiFallback()] } }, js: { src...
var historyApiFallback = require("connect-history-api-fallback"); var dest = "./build"; var src = './src'; module.exports = { browserSync: { server: { // Serve up our build folder baseDir: dest, middleware: [historyApiFallback()] } }, js: { src...
Move crispy helper to '.form' property
from __future__ import absolute_import from copy import deepcopy from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from django_filters import filterset from .filters import BooleanFilter, IsoDateTimeFilter from .. import compat, utils FILTER_FOR_DBFIELD_D...
from __future__ import absolute_import from copy import deepcopy from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from django_filters import filterset from .filters import BooleanFilter, IsoDateTimeFilter from .. import compat, utils FILTER_FOR_DBFIELD_D...
Deploy Travis CI build 715 to GitHub
#!/usr/bin/env python """Setup script for PythonTemplateDemo.""" import setuptools from demo import __project__, __version__ try: README = open("README.rst").read() CHANGELOG = open("CHANGELOG.rst").read() except IOError: LONG_DESCRIPTION = "Coming soon..." else: LONG_DESCRIPTION = README + '\n' + C...
#!/usr/bin/env python """Setup script for PythonTemplateDemo.""" import setuptools from demo import __project__, __version__ try: README = open("README.rst").read() CHANGELOG = open("CHANGELOG.rst").read() except IOError: DESCRIPTION = "<placeholder>" else: DESCRIPTION = README + '\n' + CHANGELOG s...
MaliciousRequestsMiddleware: Use exception rather than Bad Request view
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed, SuspiciousOperation class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. if settings.MALICIOUS_URL_...
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from django.http import HttpResponseBadRequest class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. ...
Use equal heights in feature segment rows
import Ui from "./Ui"; export default class FeatureContainer { static displayFeatures(features) { let categoryMap = FeatureContainer._createCategoryMap(features); categoryMap.forEach((features, key) => { let container = $("<div class='ui segment'>"); $("<h3>").text(key).app...
import Ui from "./Ui"; export default class FeatureContainer { static displayFeatures(features) { let categoryMap = FeatureContainer._createCategoryMap(features); categoryMap.forEach((features, key) => { let container = $("<div class='ui segment'>"); $("<h3>").text(key).app...
Fix tests for symfony 2.7
<?php namespace Fsv\TypographyBundle\Tests\Form\Extension; use Fsv\TypographyBundle\Form\Extension\TextareaTypeExtension; use Fsv\TypographyBundle\Typograph\MdashTypograph; use Symfony\Component\Form\PreloadedExtension; use Symfony\Component\Form\Test\TypeTestCase; class TextareaTypeExtensionTest extends TypeTestCase...
<?php namespace Fsv\TypographyBundle\Tests\Form\Extension; use Fsv\TypographyBundle\Form\Extension\TextareaTypeExtension; use Fsv\TypographyBundle\Typograph\MdashTypograph; use Symfony\Component\Form\PreloadedExtension; use Symfony\Component\Form\Test\TypeTestCase; class TextareaTypeExtensionTest extends TypeTestCase...
Update dependencies due to botocore critical changes after 0.64.0
#!/usr/bin/env python """ distutils/setuptools install script. """ import os import sys import kotocore try: from setuptools import setup setup except ImportError: from distutils.core import setup packages = [ 'kotocore', 'kotocore.utils', ] requires = [ 'botocore==0.63.0', 'six>=1.4.0...
#!/usr/bin/env python """ distutils/setuptools install script. """ import os import sys import kotocore try: from setuptools import setup setup except ImportError: from distutils.core import setup packages = [ 'kotocore', 'kotocore.utils', ] requires = [ 'botocore>=0.24.0', 'six>=1.4.0...
Add comment explaining details of the dynamic baseUri.
<?php /* * Modified: prepend directory path of current file, because of this file own different ENV under between Apache and command line. * NOTE: please remove this comment. */ defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..')); defined('APP_PATH') || define('...
<?php /* * Modified: prepend directory path of current file, because of this file own different ENV under between Apache and command line. * NOTE: please remove this comment. */ defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..')); defined('APP_PATH') || define('...
Update check on cluster id
import analytics from django.db import InterfaceError, OperationalError, ProgrammingError from tracker.service import TrackerService class PublishTrackerService(TrackerService): def __init__(self, key=''): self.cluster_id = None self.analytics = analytics self.analytics.write_key = key ...
import analytics from django.db import InterfaceError, OperationalError, ProgrammingError from tracker.service import TrackerService class PublishTrackerService(TrackerService): def __init__(self, key=''): self.cluster_id = None self.analytics = analytics self.analytics.write_key = key ...
Add Endashcatredirect as a new item in list of category redirect templates Bug: T183987 Change-Id: I72b6ded1ccab48d5d905f4edd4ce6b9485703563
# -*- coding: utf-8 -*- """Family module for Wikimedia Commons.""" # # (C) Pywikibot team, 2005-2018 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$' from pywikibot import family # The Wikimedia Commons family class Family(family.Wik...
# -*- coding: utf-8 -*- """Family module for Wikimedia Commons.""" # # (C) Pywikibot team, 2005-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$' from pywikibot import family # The Wikimedia Commons family class Family(family.Wik...
Fix lambda service in dev environment when lambda function does not have any events.
// This file gets all lambda functions from the Serverless // config and exports the handlers and endpoint info. import path from 'path' import YAML from 'yamljs' import { has } from 'lodash' const getServerlessConfig = function () { return YAML.load(path.join(__dirname, '..', 'serverless.yml')) } export const get...
// This file gets all lambda functions from the Serverless // config and exports the handlers and endpoint info. import path from 'path' import YAML from 'yamljs' import { has } from 'lodash' const getServerlessConfig = function () { return YAML.load(path.join(__dirname, '..', 'serverless.yml')) } export const get...
Use variadic args in main method
/* * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,...
/* * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,...
Add Python 3 classifiers so users know this supports Python 3.
import os from setuptools import setup def get_version(): """ Get the version from version module without importing more than necessary. """ version_module_path = os.path.join(os.path.dirname(__file__), "eliot", "_version.py") # The version module conta...
import os from setuptools import setup def get_version(): """ Get the version from version module without importing more than necessary. """ version_module_path = os.path.join(os.path.dirname(__file__), "eliot", "_version.py") # The version module conta...
Switch to None based on feedback from @niran
from django.core.exceptions import ImproperlyConfigured from django.views.generic import TemplateView from django.views.generic.list import MultipleObjectMixin from django.utils.translation import ugettext as _ from .models import Well class SimpleWellView(TemplateView): allow_empty = False well_title = None...
from django.core.exceptions import ImproperlyConfigured from django.views.generic import TemplateView from django.views.generic.list import MultipleObjectMixin from django.utils.translation import ugettext as _ from .models import Well class SimpleWellView(TemplateView): allow_empty = False well_title = None...
Restructure fields in post seed data
import moment from 'moment'; import { Posts } from '../../api/collections'; const seedPosts = () => { const post = Posts.findOne(); if (!post) { for (let i = 0; i < 50; i++) { Posts.insert({ userId: 'QBgyG7MsqswQmvm7J', username: 'evancorl', avatar: '/images/avatar.jpg', ...
import moment from 'moment'; import { Posts } from '../../api/collections'; const seedPosts = () => { const post = Posts.findOne(); if (!post) { for (let i = 0; i < 50; i++) { Posts.insert({ userId: 'QBgyG7MsqswQmvm7J', username: 'evancorl', createdAt: moment().utc().toDate(), ...
Fix weight CSV export test
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
KAA-823: Fix topic list hash calculation algorithm.
package org.kaaproject.kaa.client.notification; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.List; import org.kaaproject.kaa.common.endpoint.gen.Topic; public class TopicListHashCalculator { public static final Integer NULL_LIST_HASH = 0; public sta...
package org.kaaproject.kaa.client.notification; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.List; import org.kaaproject.kaa.common.endpoint.gen.Topic; public class TopicListHashCalculator { public static final Integer NULL_LIST_HASH = 0; public sta...
Remove dependency for ReviewedVersionTracker in migrations The base widgy migrations had references to ReviewedVersionTracker, which is not part of the base widgy install. This commit changes the dependency to VersionTracker instead, which is part of the base widgy install.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ('widgy', '...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ('review_qu...
Add off as a noop function to touch editor. Closes #3107
var createTouchEditor = function createTouchEditor() { var noop = function () {}, TouchEditor; TouchEditor = function (el, options) { /*jshint unused:false*/ this.textarea = el; this.win = { document : this.textarea }; this.ready = true; this.wrapping = document....
var createTouchEditor = function createTouchEditor() { var noop = function () {}, TouchEditor; TouchEditor = function (el, options) { /*jshint unused:false*/ this.textarea = el; this.win = { document : this.textarea }; this.ready = true; this.wrapping = document....
Consolidate exit logic for initial value conversion.
import {plugin} from 'postcss'; import has from 'has'; import browserslist from 'browserslist'; import {isSupported} from 'caniuse-api'; import fromInitial from '../data/fromInitial.json'; import toInitial from '../data/toInitial.json'; const initial = 'initial'; export default plugin('postcss-reduce-initial', () => ...
import {plugin} from 'postcss'; import has from 'has'; import browserslist from 'browserslist'; import {isSupported} from 'caniuse-api'; import fromInitial from '../data/fromInitial.json'; import toInitial from '../data/toInitial.json'; const initial = 'initial'; export default plugin('postcss-reduce-initial', () => ...
Refactor to use a single local
import { select, local } from "d3-selection"; var componentLocal = local(), noop = function (){}; export default function (tagName, className){ var render = noop, create, destroy, selector = className ? "." + className : tagName; function component(selection, props){ var update = selection.selectAll...
import { select, local } from "d3-selection"; var stateLocal = local(), renderLocal = local(), noop = function (){}; export default function (tagName, className){ var render = noop, create, destroy, selector = className ? "." + className : tagName; function component(selection, props){ var updat...
Use KDatabaseTableAbstract::getBehavior() to create behaviors using the behavior name instead of the full identifier. Component specific behaviors can now also be loaded using behavior names instead of identifier strings.
<?php /** * @version $Id$ * @category Nooku * @package Nooku_Server * @subpackage Categories * @copyright Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net). * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> * @link http://www.nooku.org */ /** * Categories...
<?php /** * @version $Id$ * @category Nooku * @package Nooku_Server * @subpackage Categories * @copyright Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net). * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> * @link http://www.nooku.org */ /** * Categories...
Remove __webpack_public_path__ for a "gotcha"
import { camelCase } from "lodash"; (async () => { // For minority of browers, bring in heavier polyfills. if (!Object.assign || !Array.from || !window.location.origin) { await import("../polyfills"); } // Iterable list of widget scripts const containers = [...document.querySelectorAll("[data-my-widget]...
// Lazy-loaded modules are assumed on the hosting domain, // so we override the constant at runtime. // __webpack_public_path__ = process.env.NODE_ENV === "production" // ? "https://example.com" // : "http://localhost:3000"; import { camelCase } from "lodash"; (async () => { // For minority of browers, bring in...
Allow passing and inheriting a constructor method, stored as _constructor
'use strict'; var common = require('./common'); var create = function (params) { /* extends -- (optional) list of object prototypes to inherit from implements -- (optional) list of interfaces this prototype implements (besides those that are inherited) create({ extends: [S...
'use strict'; var common = require('./common'); var create = function (params) { /* extends -- (optional) list of object prototypes to inherit from implements -- (optional) list of interfaces this prototype implements (besides those that are inherited) create({ extends: [S...
Add : entry tidy to keep relevant info.
class Parser(object): """ Parser class definition. Takes care of parsing the fail2ban log, either in "all" mode or "realtime". """ def __init__(self, config, mode=None): """ Inits the object by registering the configuration object """ self.config = config if...
class Parser(object): """ Parser class definition. Takes care of parsing the fail2ban log, either in "all" mode or "realtime". """ def __init__(self, config, mode=None): """ Inits the object by registering the configuration object """ self.config = config if...
[SD-1422] Check that the session is the right one
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import bcryp...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import bcryp...
Remove unnecessary use of Promise.resolve
'use strict'; const Path = require('path'); const Glob = require('glob'); async function getFiles(paths, ignored) { const opts = { nodir: true, dot: false, }; if (!Array.isArray(paths)) paths = [paths]; if (ignored) opts.ignore = ignored; return paths.reduce((acc, pattern) => { ...
'use strict'; const Path = require('path'); const Glob = require('glob'); async function getFiles(paths, ignored) { const opts = { nodir: true, dot: false, }; if (!Array.isArray(paths)) paths = [paths]; if (ignored) opts.ignore = ignored; return paths.reduce((acc, pattern) => { ...
Stop validation error notification stack closes #3383 - Calls closePassive() if a new validation error is thrown to display only the latest validation error
/* jshint unused: false */ import ajax from 'ghost/utils/ajax'; import ValidationEngine from 'ghost/mixins/validation-engine'; var ForgottenController = Ember.Controller.extend(ValidationEngine, { email: '', submitting: false, // ValidationEngine settings validationType: 'forgotten', a...
/* jshint unused: false */ import ajax from 'ghost/utils/ajax'; import ValidationEngine from 'ghost/mixins/validation-engine'; var ForgottenController = Ember.Controller.extend(ValidationEngine, { email: '', submitting: false, // ValidationEngine settings validationType: 'forgotten', a...
Disable tests the launch programs with 'watch'
import os import time import subprocess from sniffer.api import select_runnable, file_validator, runnable try: from pync import Notifier except ImportError: notify = None else: notify = Notifier.notify watch_paths = ['mine/', 'tests/'] show_coverage = True @select_runnable('python_tests') @file_validat...
import os import time import subprocess from sniffer.api import select_runnable, file_validator, runnable try: from pync import Notifier except ImportError: notify = None else: notify = Notifier.notify watch_paths = ['mine/', 'tests/'] show_coverage = True @select_runnable('python_tests') @file_validat...
Add key to iterated objects
var React = require('react'); var classNames = require('classnames'); var _ = require('underscore'); var ListItem = require('./ListItem'); var ListItemGroup = require('./ListItemGroup'); var List = React.createClass({ displayName: 'List', propTypes: { className: React.PropTypes.string, items: React.PropT...
var React = require('react'); var classNames = require('classnames'); var ListItem = require('./ListItem'); var ListItemGroup = require('./ListItemGroup'); var List = React.createClass({ displayName: 'List', getDefaultProps: function() { return { className: '' } }, getListItems: function(list)...
Change to navbar-default instead of inverse to allow easier style overrides.
<nav class="navbar navbar-toggleable-md navbar-default fixed-top"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></s...
<nav class="navbar navbar-toggleable-md navbar-inverse fixed-top bg-inverse"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggle...
Add formatting for date value.
(function () { 'use strict'; define(function () { return [ { key: 'Title', labelText: 'Title' }, { key: 'Author', labelText: 'Author', displayValue: function (value) { ...
(function () { 'use strict'; define(function () { return [ { key: 'Title', labelText: 'Title' }, { key: 'Author', labelText: 'Author', displayValue: function (value) { ...
Allow to override strategy getter
from functools import wraps from django.conf import settings from django.core.urlresolvers import reverse from social.utils import setting_name, module_member from social.strategies.utils import get_strategy BACKENDS = settings.AUTHENTICATION_BACKENDS STRATEGY = getattr(settings, setting_name('STRATEGY'), ...
from functools import wraps from django.conf import settings from django.core.urlresolvers import reverse from social.utils import setting_name, module_member from social.strategies.utils import get_strategy BACKENDS = settings.AUTHENTICATION_BACKENDS STRATEGY = getattr(settings, setting_name('STRATEGY'), ...
Fix KeyError when getting fedmsg message info.
#!/bin/env python # -*- coding: utf8 -*- import fedmsg.consumers import fedmsg.encoding import fedimg.uploader class KojiConsumer(fedmsg.consumers.FedmsgConsumer): # To our knowledge, all *image* builds appear under this # exact topic, along with scratch builds. topic = 'org.fedoraproject.prod.buildsys....
#!/bin/env python # -*- coding: utf8 -*- import fedmsg.consumers import fedmsg.encoding import fedimg.uploader class KojiConsumer(fedmsg.consumers.FedmsgConsumer): # To our knowledge, all *image* builds appear under this # exact topic, along with scratch builds. topic = 'org.fedoraproject.prod.buildsys....
Use enum both in titles and datas.
import React from 'react'; import CSSModules from 'react-css-modules'; import styles from './styles.css'; import BidForm from '../BidForm'; class BidTable extends React.Component { constructor(props) { super(props); this.displayName = 'BidTable'; } render() { const tableElements = ['displayName', 'mo...
import React from 'react'; import CSSModules from 'react-css-modules'; import styles from './styles.css'; import BidForm from '../BidForm'; class BidTable extends React.Component { constructor(props) { super(props); this.displayName = 'BidTable'; } render() { const tableTitle = ['Display Name', 'Mone...
Update now creates tmp git ignored dir
<?php namespace SKE\Composer; class Script { public static function install() { $dirs = array( 'resources/cache', 'resources/log', 'tmp', ); foreach($dirs as $dir) { if (!file_exists($dir)) mkdir($dir, 0755, true); ...
<?php namespace SKE\Composer; class Script { public static function install() { $dirs = array( 'resources/cache', 'resources/log', ); foreach($dirs as $dir) { if (!file_exists($dir)) mkdir($dir, 0755, true); else ...
Fix return user ProfileID not accessToken
const profileService = require("../../../Db/Service/profileService"); const errors = require("../Mojang/Errors"); module.exports.joinserver = (req, res, next) => { let accessToken = req.body.accessToken, selectedProfile = req.body.selectedProfile, serverId = req.body.serverId, server = "Un...
const profileService = require("../../../Db/Service/profileService"); const errors = require("../Mojang/Errors"); module.exports.joinserver = (req, res, next) => { let accessToken = req.body.accessToken, selectedProfile = req.body.selectedProfile, serverId = req.body.serverId, server = "Un...
Remove f-string to allow python 3.4 support
from setuptools import setup from setuptools.command.install import install import os import sys VERSION = '0.1.3' class VerifyVersionCommand(install): """Custom command to verify that the git tag matches our version""" description = 'Verify that the git tag matches our version' def run(self): t...
from setuptools import setup from setuptools.command.install import install import os import sys VERSION = '0.1.3' class VerifyVersionCommand(install): """Custom command to verify that the git tag matches our version""" description = 'Verify that the git tag matches our version' def run(self): t...
Fix browser hanging because of fast typing in editor.
define( ["backbone", "backbone.marionette", "communicator", "medium.editor", "jquery", "erfgeoviewer.common", "tpl!template/detail.html"], function( Backbone, Marionette, Communicator, MediumEditor, $, App, Template ) { return Marionette.ItemView.extend( { template: Template, layout:...
define( ["backbone", "backbone.marionette", "communicator", "medium.editor", "jquery", "erfgeoviewer.common", "tpl!template/detail.html"], function( Backbone, Marionette, Communicator, MediumEditor, $, App, Template ) { return Marionette.ItemView.extend( { template: Template, layout:...
Use InlineDAOControllerView as the default view for DAO properties.
/** * @license * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
/** * @license * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
Update related variables when using search
'use strict'; angular.module('sgApp') .directive('sgSection', ['$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) { return { replace: true, restrict: 'A', templateUrl: 'views/partials/section.html', link: function(scope, element, attrs) { function updateC...
'use strict'; angular.module('sgApp') .directive('sgSection', ['$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) { return { replace: true, restrict: 'A', templateUrl: 'views/partials/section.html', link: function(scope, element, attrs) { function updateC...
Add Chats reference to User model
'use strict'; var mongoose = require('mongoose'); var Schema = mongoose.Schema; var UserSchema = new Schema({ profile: { email: String, fname: String, lname: String, username: String, birthdate: {type: Date, default: new Date().toISOString()}, picture: String }, infos: { favorites: {...
'use strict'; var mongoose = require('mongoose'); var Schema = mongoose.Schema; var UserSchema = new Schema({ profile: { email: String, fname: String, lname: String, username: String, birthdate: {type: Date, default: new Date().toISOString()}, picture: String }, infos: { favorites: {...
Fix builder method name for MetricsCollector
package io.rtr.conduit.amqp.impl; import com.rabbitmq.client.MetricsCollector; import io.rtr.conduit.amqp.AMQPConsumerCallback; public class AMQPSyncConsumerBuilder extends AMQPConsumerBuilder<AMQPTransport , AMQPListenProperties ...
package io.rtr.conduit.amqp.impl; import com.rabbitmq.client.MetricsCollector; import io.rtr.conduit.amqp.AMQPConsumerCallback; public class AMQPSyncConsumerBuilder extends AMQPConsumerBuilder<AMQPTransport , AMQPListenProperties ...
Move default value assignments before kwargs
from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_names', 'extras...
from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_names', 'extras...
Increment version for deployment. Update trove classifier.
from setuptools import setup import sys install_requires = ['six'] if sys.version_info[0] == 2 and sys.version_info[1] == 6: install_requires.extend(['ordereddict', 'argparse']) setup( name='pyfaidx', provides='pyfaidx', version='0.3.1', author='Matthew Shirley', author_email='mdshw5@gmail.co...
from setuptools import setup import sys install_requires = ['six'] if sys.version_info[0] == 2 and sys.version_info[1] == 6: install_requires.extend(['ordereddict', 'argparse']) setup( name='pyfaidx', provides='pyfaidx', version='0.3.0', author='Matthew Shirley', author_email='mdshw5@gmail.co...
Trim trailing whitespace with BasicFormatter
import abc import re class Formatter: @abc.abstractmethod def format(self, query): ''' Should return a human-readable version of the query string ''' pass class BasicFormatter(Formatter): ''' Provides a basic default formatting for query strings This formatter provides only in...
import abc import re class Formatter: @abc.abstractmethod def format(self, query): ''' Should return a human-readable version of the query string ''' pass class BasicFormatter(Formatter): ''' Provides a basic default formatting for query strings This formatter provides only in...
Use tick instead of timer. Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
<?php namespace Laravie\Promise; use React\EventLoop\Factory; class AsyncPromises extends Actionable { /** * Create a new collection. * * @return $this */ public static function create($loop = null) { return new static($loop); } /** * Construct async promises. ...
<?php namespace Laravie\Promise; use React\EventLoop\Factory; class AsyncPromises extends Actionable { /** * Create a new collection. * * @return $this */ public static function create($loop = null) { return new static($loop); } /** * Construct async promises. ...
Enable database transactions for these tests
<?php use Mockery as m; use Illuminate\Foundation\Testing\DatabaseTransactions; class RepositoryTest extends TestCase { use DatabaseTransactions; public function setUp() { parent::setUp(); $this->mock = m::mock('App\Models\TestEntity')->makePartial(); $this->app->instance('App\Mo...
<?php use Mockery as m; class RepositoryTest extends TestCase { public function setUp() { parent::setUp(); $this->mock = m::mock('App\Models\TestEntity')->makePartial(); $this->app->instance('App\Models\TestEntity', $this->mock); $this->repository = $this->app->make('App\Repo...
Fix default folder for scripts
const path = require('path'), ProjectType = require('./ProjectType'); module.exports = projectType => { projectType = projectType || ProjectType.FRONTEND; return { "projectType": projectType, "port": 5000, "liveReloadPort": 35729, "bundleFilename": "main", "distribut...
const path = require('path'), ProjectType = require('./ProjectType'); module.exports = projectType => { projectType = projectType || ProjectType.FRONTEND; return { "projectType": projectType, "port": 5000, "liveReloadPort": 35729, "bundleFilename": "main", "distribut...
Fix django-hvad version in requirements
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() import multilingual_survey # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( n...
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() import multilingual_survey # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( n...
Use keys filter in nestedMenuCollection We are accessing `all[label]` here twice - trying to solve this with a variable set through ng-init doesn't work, as ng-init will also resolve after this tag has been processed (at least that's what I think). If we want to access this variable from inside the tag - to use it in ...
"use strict"; angular.module('arethusa.relation').directive('nestedMenuCollection', function() { return { restrict: 'A', replace: 'true', scope: { current: '=', all: '=', property: '=', ancestors: '=', emptyVal: '@', labelAs: "=", change: "&" }, link: fun...
"use strict"; angular.module('arethusa.relation').directive('nestedMenuCollection', function() { return { restrict: 'A', replace: 'true', scope: { current: '=', all: '=', property: '=', ancestors: '=', emptyVal: '@', labelAs: "=", change: "&" }, link: fun...
Remove modern-msyslog that breaks travis build
'use strict'; var fs = require('fs'), morgan = require('morgan'), bunyan = require('bunyan'), stream = require('stream').PassThrough, bunyanMiddleware = require('express-bunyan-logger'), log, loggers = { access: function (config) { var conf = { format: (config && config.form...
'use strict'; var fs = require('fs'), morgan = require('morgan'), bunyan = require('bunyan'), stream = require('stream').PassThrough, bunyanMiddleware = require('express-bunyan-logger'), msyslog = require('modern-syslog'), log, loggers = { access: function (config) { var...
Send master password when pressing enter
// Copyright (c) 2015 Alejandro Blanco <alejandro.b.e@gmail.com> // MIT License /* global sjcl */ import Ember from 'ember'; export default Ember.Component.extend({ errorMessage: '', showModal: Ember.observer('flag', function () { var that = this, $modal; if (this.get('flag')) {...
// Copyright (c) 2015 Alejandro Blanco <alejandro.b.e@gmail.com> // MIT License /* global sjcl */ import Ember from 'ember'; export default Ember.Component.extend({ errorMessage: '', showModal: Ember.observer('flag', function () { var that = this, $modal; if (this.get('flag')) {...
Fix path handling in dependencyLoader
"use strict"; angular.module('arethusa.core').service('dependencyLoader', [ '$ocLazyLoad', '$q', 'basePath', function($ocLazyLoad, $q, basePath) { function expand(p) { if (aU.isUrl(p)) { return p; } else { return basePath.path + '/' + p; } } function expandPath(pat...
"use strict"; angular.module('arethusa.core').service('dependencyLoader', [ '$ocLazyLoad', '$q', 'basePath', function($ocLazyLoad, $q, basePath) { function expand(p) { return basePath.path + '/' + p; } function expandPath(path) { var res = []; if (angular.isArray(path)) { ...
[tests] Remove deprecated "gen" parameter of NoReferencesBot Change-Id: I8140117cfc2278cfec751164a6d1d8f12bcaef84
"""Test noreferences bot module.""" # # (C) Pywikibot team, 2018-2021 # # Distributed under the terms of the MIT license. # import pywikibot from scripts.noreferences import NoReferencesBot from tests.aspects import TestCase, unittest class TestAddingReferences(TestCase): """Test adding references to section.""...
"""Test noreferences bot module.""" # # (C) Pywikibot team, 2018-2020 # # Distributed under the terms of the MIT license. # import pywikibot from scripts.noreferences import NoReferencesBot from tests.aspects import TestCase, unittest class TestAddingReferences(TestCase): """Test adding references to section.""...
Revert to simple class names as default entity names
package com.zakgof.db.velvet.impl.entity; import java.util.Collection; import java.util.List; import java.util.Locale; import com.zakgof.db.velvet.IVelvet.IStoreIndexDef; import com.zakgof.db.velvet.annotation.Kind; import com.zakgof.db.velvet.properties.IProperty; import com.zakgof.db.velvet.properties.IPropertyAcce...
package com.zakgof.db.velvet.impl.entity; import java.util.Collection; import java.util.List; import java.util.Locale; import com.zakgof.db.velvet.IVelvet.IStoreIndexDef; import com.zakgof.db.velvet.annotation.Kind; import com.zakgof.db.velvet.properties.IProperty; import com.zakgof.db.velvet.properties.IPropertyAcce...
Fix argument types in file type registry
<?php namespace Becklyn\AssetsBundle\File; use Becklyn\AssetsBundle\Asset\Asset; use Becklyn\AssetsBundle\File\Type\CssFile; use Becklyn\AssetsBundle\File\Type\FileType; use Becklyn\AssetsBundle\File\Type\GenericFile; use Becklyn\AssetsBundle\File\Type\JavaScriptFile; use Becklyn\AssetsBundle\File\Type\SvgFile; cla...
<?php namespace Becklyn\AssetsBundle\File; use Becklyn\AssetsBundle\Asset\Asset; use Becklyn\AssetsBundle\File\Type\CssFile; use Becklyn\AssetsBundle\File\Type\FileType; use Becklyn\AssetsBundle\File\Type\GenericFile; use Becklyn\AssetsBundle\File\Type\JavaScriptFile; use Becklyn\AssetsBundle\File\Type\SvgFile; cla...
Add window and document to globals for tests
var gulp = require('gulp'), eslint = require('gulp-eslint'), mocha = require('gulp-mocha'), flow = require('gulp-flowtype'), babel = require('babel/register'); gulp.task('lint', function() { return gulp.src(['src/*.js', 'src/__tests__/*.js']) .pipe(eslint()) .pipe(eslint.format()) ...
var gulp = require('gulp'), eslint = require('gulp-eslint'), mocha = require('gulp-mocha'), flow = require('gulp-flowtype'), babel = require('babel/register'); gulp.task('lint', function() { return gulp.src(['src/*.js', 'src/__tests__/*.js']) .pipe(eslint()) .pipe(eslint.format()) ...
Fix crash on reset password page
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <toby.zerner@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Flarum\Forum\Controller; use DateTime; use Flarum\Core\Exception\InvalidConfirmationTok...
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <toby.zerner@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Flarum\Forum\Controller; use DateTime; use Flarum\Core\Exception\InvalidConfirmationTok...
Update lock plugin so admins could write messages
""" Echo plugin example """ import octeon global locked locked = [] PLUGINVERSION = 2 # Always name this variable as `plugin` # If you dont, module loader will fail to load the plugin! plugin = octeon.Plugin() @plugin.message(regex=".*") # You pass regex pattern def lock_check(bot, update): if update.message.chat_i...
""" Echo plugin example """ import octeon global locked locked = [] PLUGINVERSION = 2 # Always name this variable as `plugin` # If you dont, module loader will fail to load the plugin! plugin = octeon.Plugin() @plugin.message(regex=".*") # You pass regex pattern def lock_check(bot, update): if update.message.chat_i...
Add id tot he beacon event dataset
# -*- coding: utf-8 -*- ''' This package contains the loader modules for the salt streams system ''' # Import salt libs import salt.loader class Beacon(object): ''' This class is used to eveluate and execute on the beacon system ''' def __init__(self, opts): self.opts = opts self.beaco...
# -*- coding: utf-8 -*- ''' This package contains the loader modules for the salt streams system ''' # Import salt libs import salt.loader class Beacon(object): ''' This class is used to eveluate and execute on the beacon system ''' def __init__(self, opts): self.opts = opts self.beaco...
Update error message display methods to take formatting arguments
package de.fu_berlin.cdv.chasingpictures.util; import android.content.Context; import android.support.annotation.StringRes; import android.widget.Toast; /** * Class that provides utility methods. * * @author Simon Kalt */ public class Utilities { /** * * @param context The current context * @pa...
package de.fu_berlin.cdv.chasingpictures.util; import android.content.Context; import android.support.annotation.StringRes; import android.widget.Toast; /** * Class that provides utility methods. * * @author Simon Kalt */ public class Utilities { /** * * @param context The current context * @p...
Change help text for parse configuration
// Requires var _ = require('underscore'); function setup(options, imports, register) { var deploy = imports.deploy; var shells = imports.shells; /* Documentation about parse command lien tool can be found at: https://parse.com/docs/cloud_code_guide */ deploy.add({ id: "parse", ...
// Requires var _ = require('underscore'); function setup(options, imports, register) { var deploy = imports.deploy; var shells = imports.shells; /* Documentation about parse command lien tool can be found at: https://parse.com/docs/cloud_code_guide */ deploy.add({ id: "parse", ...
[Fix] Add additional checks for no-hardrcoded-password rule
module.exports = context => { function inspectHardcodedPassword(node, value) { const isHardcoded = value.toLowerCase().includes('passw'); if (isHardcoded) { return context.report({ node, message : 'Do not use hadrcoded password' }); }...
module.exports = context => { function inspectHardcodedPassword(node, value) { const isHardcoded = value.toLowerCase().includes('passw'); if (isHardcoded) { return context.report({ node, message : 'Do not use hadrcoded password' }); }...
Extend page_size on grantor lookup
import Ember from 'ember'; export default Ember.Controller.extend({ store: Ember.inject.service(), contestSortProperties: [ 'organizationKindSort', 'awardQualifier', 'awardPrimary:desc', 'awardAgeSort', 'awardName', ], sortedContests: Ember.computed.sort( 'model.contests', 'contestS...
import Ember from 'ember'; export default Ember.Controller.extend({ store: Ember.inject.service(), contestSortProperties: [ 'organizationKindSort', 'awardQualifier', 'awardPrimary:desc', 'awardAgeSort', 'awardName', ], sortedContests: Ember.computed.sort( 'model.contests', 'contestS...
Include '-' in ID, print IDs separated by ','
import re import sys # $ zmmailbox -z -m username@domain.tld search -l 200 "in:/inbox (before:today)" # num: 200, more: true # # Id Type From Subject Date # ------- ---- -------------------- -------------------------------------------------...
import re import sys # $ zmmailbox -z -m username@domain.tld search -l 200 "in:/inbox (before:today)" # num: 200, more: true # # Id Type From Subject Date # ------- ---- -------------------- -------------------------------------------------...
Revert "Add query response minimizer parameter back" This reverts commit ead7b0d5c99c2e3d9ae14310af8f16bf56bf2a70.
package com.lloydtorres.stately.dto; import android.os.Parcel; import android.os.Parcelable; /** * Created by Lloyd on 2016-01-28. * An object containing text for one of the options in an issue. */ public class IssueOption implements Parcelable { public static final String QUERY = "https://www.nationstates.net...
package com.lloydtorres.stately.dto; import android.os.Parcel; import android.os.Parcelable; /** * Created by Lloyd on 2016-01-28. * An object containing text for one of the options in an issue. */ public class IssueOption implements Parcelable { public static final String QUERY = "https://www.nationstates.net...
Use __name__ from data object to set the test method name, if available. Allows to provide user-friendly names for the user instead of the default raw data formatting.
from functools import wraps __version__ = '0.1.1' MAGIC = '%values' # this value cannot conflict with any real python attribute def data(*values): """ Method decorator to add to your test methods. Should be added to methods of instances of ``unittest.TestCase``. """ def wrapper(func): ...
from functools import wraps __version__ = '0.1.1' MAGIC = '%values' # this value cannot conflict with any real python attribute def data(*values): """ Method decorator to add to your test methods. Should be added to methods of instances of ``unittest.TestCase``. """ def wrapper(func): ...
Revert "enforce including configuration on gae" This reverts commit f60e153b
<?php $config = []; if (in_array('gs', stream_get_wrappers())) { $config = include 'gs://teach-242612.appspot.com/config/config.php'; } return array_merge_recursive([ 'DB' => [ 'CONNECTION' => getenv('DB_CONNECTION'), 'HOST' => getenv('DB_HOST'), 'PORT' => getenv('DB_PORT'), 'D...
<?php $config = []; if (in_array('gs', stream_get_wrappers())) { $config = require 'gs://' . getenv('GOOGLE_CLOUD_PROJECT') .'.appspot.com/config/config.php'; } return array_merge_recursive([ 'DB' => [ 'CONNECTION' => getenv('DB_CONNECTION'), 'HOST' => getenv('DB_HOST'), 'PORT' => gete...
Fix title of swagger api Used swagger options from different project (shame on me). Change title to ‘Microbrew.it Log Server’.
'use strict'; const Glue = require('glue'); const Package = require('../package.json'); const internals = { manifest: { connections: [ { host: process.env.LOG_SERVER_HOST || 'localhost', port: process.env.LOG_SERVER_PORT || 8080, labels: ['api'],...
'use strict'; const Glue = require('glue'); const Package = require('../package.json'); const internals = { manifest: { connections: [ { host: process.env.LOG_SERVER_HOST || 'localhost', port: process.env.LOG_SERVER_PORT || 8080, labels: ['api'],...