text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Fix loading for Symfony 3 projects In Symfony 3 the autoload file should always be loaded, and then the cache file This still works for Symfony 2 projects as the bootstrap uses require_once for autoload
<?php namespace Boris\Loader\Provider; class Symfony2 extends AbstractProvider { public $name = 'symfony'; private $env; private $debug; public function __construct($environment = 'dev', $debug = true) { $this->env = $environment; $this->debug = $debug; } pu...
<?php namespace Boris\Loader\Provider; class Symfony2 extends AbstractProvider { public $name = 'symfony'; private $env; private $debug; public function __construct($environment = 'dev', $debug = true) { $this->env = $environment; $this->debug = $debug; } pu...
Add result property to AsyncResult (it blocks if the result has not been previously retrieved, or return the result otherwise)
"""cell.result""" from __future__ import absolute_import from __future__ import with_statement from kombu.pools import producers from .exceptions import CellError, NoReplyError __all__ = ['AsyncResult'] class AsyncResult(object): Error = CellError NoReplyError = NoReplyError def __init__(self, ticket...
"""cell.result""" from __future__ import absolute_import from __future__ import with_statement from kombu.pools import producers from .exceptions import CellError, NoReplyError __all__ = ['AsyncResult'] class AsyncResult(object): Error = CellError NoReplyError = NoReplyError def __init__(self, ticket...
Fix PHP 5.6 compatibility for null driver See https://github.com/laravel/scout/pull/224
<?php namespace Laravel\Scout; use Illuminate\Support\Manager; use AlgoliaSearch\Client as Algolia; use Laravel\Scout\Engines\NullEngine; use Laravel\Scout\Engines\AlgoliaEngine; use AlgoliaSearch\Version as AlgoliaUserAgent; class EngineManager extends Manager { /** * Get a driver instance. * * @...
<?php namespace Laravel\Scout; use Illuminate\Support\Manager; use AlgoliaSearch\Client as Algolia; use Laravel\Scout\Engines\NullEngine; use Laravel\Scout\Engines\AlgoliaEngine; use AlgoliaSearch\Version as AlgoliaUserAgent; class EngineManager extends Manager { /** * Get a driver instance. * * @...
Use forever instead of forever-mac.
var forever = require('forever'); var config = require('./config'); function start () { forever.list('array', function (err, processes) { // stop all forever if (config === 'stop') { if (!processes) { return console.log('no process to stop'); } ...
var forever = require('forever-mac'); var config = require('./config'); function start () { forever.list('array', function (err, processes) { // stop all forever if (config === 'stop') { if (!processes) { return console.log('no process to stop'); } ...
Fix foreign key name for oauth_client_metadata rollback
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateOauthClientMetadataTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('oauth_client_metadata', function (Bluepri...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateOauthClientMetadataTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('oauth_client_metadata', function (Bluepri...
Remove build status from rst for PyPI
from setuptools import setup setup( name='django-cacheops', version='1.3.1', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='A slick ORM cache with automatic granular event-driven invalidation for Django.', long_description=open('README.rst').read().replace('|B...
from setuptools import setup setup( name='django-cacheops', version='1.3.1', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='A slick ORM cache with automatic granular event-driven invalidation for Django.', long_description=open('README.rst').read(), url='h...
Update websocket url to use dynamic host rather than fixed Former-commit-id: f04b7d503048424669a9d139ce67b11c277435ad Former-commit-id: 3e4a3612aa6a7173b17b02119663a1833b285469 Former-commit-id: 558d23de277ed4c459fc917f6574e97f528e0a7c
import { browserHistory } from 'react-router'; const instanceID = Math.floor(Math.random() * 10000) + 1; export const eventTypes = { shownNotification: "SHOWN_NOTIFICATION", shownWarning: "SHOWN_WARNING", changedRoute: "CHANGED_ROUTE", appInitialised: "APP_INITIALISED", requestSent: "REQUEST_SENT"...
import { browserHistory } from 'react-router'; const instanceID = Math.floor(Math.random() * 10000) + 1; export const eventTypes = { shownNotification: "SHOWN_NOTIFICATION", shownWarning: "SHOWN_WARNING", changedRoute: "CHANGED_ROUTE", appInitialised: "APP_INITIALISED", requestSent: "REQUEST_SENT"...
Remove console logs, fix bug
const Octokat = require('octokat') const open = require('open') const Promise = require('bluebird') var octo, organization, repository module.exports = function openNotifications (input, opts, token) { octo = new Octokat({ token: token || process.env.GITHUB_OGN_TOKEN }) var amount = opts.amount || 30 if (...
const Octokat = require('octokat') const open = require('open') const Promise = require('bluebird') var octo, organization, repository module.exports = function openNotifications (input, opts, token) { octo = new Octokat({ token: token || process.env.GITHUB_OGN_TOKEN }) var amount = opts.amount || 30 if (...
Remove file from SharedFileTable seed
<?php use Illuminate\Database\Seeder; use REBELinBLUE\Deployer\SharedFile; class SharedFileTableSeeder extends Seeder { public function run() { DB::table('shared_files')->delete(); SharedFile::create([ 'name' => 'Storage', 'file' => 'storage/', ...
<?php use Illuminate\Database\Seeder; use REBELinBLUE\Deployer\SharedFile; class SharedFileTableSeeder extends Seeder { public function run() { DB::table('shared_files')->delete(); SharedFile::create([ 'name' => 'Storage', 'file' => 'storage/', ...
Fix error if relation empty
var _ = require('lodash'); var inflection = require('inflection'); module.exports = function Deserializer (data, serverRelations) { var clientRelations = data.data.relationships; var result = data.data.attributes || {}; if (_.isPlainObject(clientRelations)) { _.each(clientRelations, function (clientRelation...
var _ = require('lodash'); var inflection = require('inflection'); module.exports = function Deserializer (data, serverRelations) { var clientRelations = data.data.relationships; var result = data.data.attributes || {}; if (_.isPlainObject(clientRelations)) { _.each(clientRelations, function (clientRelation...
Print the time of checking status at github.
import argparse import datetime import json import os import time import requests from tardis import __githash__ as tardis_githash parser = argparse.ArgumentParser(description="Run slow integration tests") parser.add_argument("--yaml", dest="yaml_filepath", help="Path to YAML config file for inte...
import argparse import json import os import time import requests from tardis import __githash__ as tardis_githash parser = argparse.ArgumentParser(description="Run slow integration tests") parser.add_argument("--yaml", dest="yaml_filepath", help="Path to YAML config file for integration tests.")...
Allow castTo to automatically widen the generic bound.
package name.falgout.jeffrey.throwing; import java.util.Objects; import java.util.Optional; import java.util.function.Function; @FunctionalInterface public interface RethrowChain<X extends Throwable, Y extends Throwable> extends Function<X, Optional<Y>> { public static <Y extends Throwable> RethrowChain<Throwab...
package name.falgout.jeffrey.throwing; import java.util.Objects; import java.util.Optional; import java.util.function.Function; @FunctionalInterface public interface RethrowChain<X extends Throwable, Y extends Throwable> extends Function<X, Optional<Y>> { public static <Y extends Throwable> RethrowChain<Throwab...
Update required version of wptrunner.
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup PACKAGE_VERSION = '0.1' deps = ['fxos-appgen>=0.2.7', 'marionette_client>=0.7.1.1'...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup PACKAGE_VERSION = '0.1' deps = ['fxos-appgen>=0.2.7', 'marionette_client>=0.7.1.1'...
Fix gulp live reload for less
var dest = './public/dist'; var src = './client'; var bowerComponents = './bower_components'; module.exports = { adminAssets: { src: src + '/admin/**', dest: dest + '/admin/assets' }, bower: { dest: dest + '/', filename: 'libs.min.js', libs: [ bowerComponents + '/modernizr/modernizr.js'...
var dest = './public/dist'; var src = './client'; var bowerComponents = './bower_components'; module.exports = { adminAssets: { src: src + '/admin/**', dest: dest + '/admin/assets' }, bower: { dest: dest + '/', filename: 'libs.min.js', libs: [ bowerComponents + '/modernizr/modernizr.js'...
Set global path and +1 month expiration date in angular cookies
(function() { 'use strict'; angular .module('app', ['ngMaterial', 'ngMessages', 'ngCookies', 'ngSanitize']) .config(['$mdThemingProvider', '$mdIconProvider', '$httpProvider', '$cookiesProvider', function( $mdThemingProvider, $mdIconProvider, $httpProvider, $cookiesProvider )...
(function() { 'use strict'; angular .module('app', ['ngMaterial', 'ngMessages', 'ngCookies', 'ngSanitize']) .config(['$mdThemingProvider', '$mdIconProvider', '$httpProvider', function($mdThemingProvider, $mdIconProvider, $httpProvider) { $mdThemingProvider.theme('default') ...
Fix Scheduling\Event tests on Windows
<?php use Illuminate\Console\Scheduling\Event; class EventTest extends PHPUnit_Framework_TestCase { public function testBuildCommand() { $quote = (DIRECTORY_SEPARATOR == '\\') ? '"' : "'"; $event = new Event('php -i'); $defaultOutput = (DIRECTORY_SEPARATOR == '\\') ? 'NUL' : '/dev/nu...
<?php use Illuminate\Console\Scheduling\Event; class EventTest extends PHPUnit_Framework_TestCase { public function testBuildCommand() { $event = new Event('php -i'); $defaultOutput = (DIRECTORY_SEPARATOR == '\\') ? 'NUL' : '/dev/null'; $this->assertSame("php -i > '{$defaultOutput}' 2...
Update to have it Uppercase (changed)
// ==UserScript== // @name Anchor tags in Central // @namespace http://central.tri.be/ // @version 0.1 // @description Adds anchor tags to some links in central // @author You // @include /^https:\/\/central.tri.be(\/.*)?/ // @grant none // ==/UserScript== var central_links = {}; ...
// ==UserScript== // @name Anchor tags in Central // @namespace http://central.tri.be/ // @version 0.1 // @description Adds anchor tags to some links in central // @author You // @include /^https:\/\/central.tri.be(\/.*)?/ // @grant none // ==/UserScript== var central_links = {}; ...
Disable i++ error in loops
// https://eslint.org/docs/user-guide/configuring module.exports = { root: true, parserOptions: { parser: "babel-eslint", sourceType: "module" }, env: { browser: true }, // required to lint *.vue files plugins: ["vue"], extends: ["plugin:vue/recommended", "airbnb-base"], // check if impor...
// https://eslint.org/docs/user-guide/configuring module.exports = { root: true, parserOptions: { parser: "babel-eslint", sourceType: "module" }, env: { browser: true }, // required to lint *.vue files plugins: ["vue"], extends: ["plugin:vue/recommended", "airbnb-base"], // check if impor...
Add additional test case for stripping existing hypens, too
QUnit.test( "Slug.transform() defaults", function (assert) { const Slug = mojave.url.Slug; // test defaults const instance = new Slug(); [ ["abc def", "abc-def"], ["ä-ö-ü-ß", "ae-oe-ue-ss"], ["ääää", "aeaeaeae"], [" ", "...
QUnit.test( "Slug.transform() defaults", function (assert) { const Slug = mojave.url.Slug; // test defaults const instance = new Slug(); [ ["abc def", "abc-def"], ["ä-ö-ü-ß", "ae-oe-ue-ss"], ["ääää", "aeaeaeae"], [" ", "...
Change default users roles to 'manager'
<?php class UserTableSeeder extends Seeder { public function run() { // to use non Eloquent-functions we need to unguard Eloquent::unguard(); // All existing users are deleted !!! DB::table('users')->delete(); // add user using Eloquent $user = new User; ...
<?php class UserTableSeeder extends Seeder { public function run() { // to use non Eloquent-functions we need to unguard Eloquent::unguard(); // All existing users are deleted !!! DB::table('users')->delete(); // add user using Eloquent $user = new User; ...
Fix getting wallet service when receiving stealth.
define(['./module', 'darkwallet'], function (controllers, DarkWallet) { 'use strict'; controllers.controller('ReceiveStealthCtrl', ['$scope', 'notify', function($scope, notify) { // function to receive stealth information $scope.receiveStealth = function() { notify.note("stealth", "initializing"); n...
define(['./module', 'darkwallet'], function (controllers, DarkWallet) { 'use strict'; controllers.controller('ReceiveStealthCtrl', ['$scope', 'notify', function($scope, notify) { // function to receive stealth information $scope.receiveStealth = function() { notify.note("stealth", "initializing"); n...
Remove URL from Spotify response
from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): """Retrieve information about a Spotify URI.""" spotify_uris = re.findall(SPOTIFY_URI_REGEX, m....
from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): """Retrieve information about a Spotify URI.""" spotify_uris = re.findall(SPOTIFY_URI_REGEX, m....
[DBAL-407] Implement method in Driver mock class
<?php namespace Doctrine\Tests\Mocks; class DriverMock implements \Doctrine\DBAL\Driver { private $_platformMock; private $_schemaManagerMock; public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) { return new DriverConnectionMock(); ...
<?php namespace Doctrine\Tests\Mocks; class DriverMock implements \Doctrine\DBAL\Driver { private $_platformMock; private $_schemaManagerMock; public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) { return new DriverConnectionMock(); ...
Write tab but don't warn
import ply.yacc from slimit.parser import Parser from js2xml.lexer import CustomLexer as Lexer from js2xml.log import logger lextab, yacctab = 'lextab', 'yacctab' class CustomParser(Parser): def __init__(self, lex_optimize=True, lextab=lextab, yacc_optimize=True, yacctab=yacctab, yacc_debug=Fal...
import ply.yacc from slimit.parser import Parser from js2xml.lexer import CustomLexer as Lexer from js2xml.log import logger lextab, yacctab = 'lextab', 'yacctab' class CustomParser(Parser): def __init__(self, lex_optimize=False, lextab=lextab, yacc_optimize=True, yacctab=yacctab, yacc_debug=Fa...
Fix The bug in createCategory, Now can save subcategories with no problem
/** * Created by meysamabl on 11/1/14. */ $(document).ready(function () { // $('#picture').change(function () { // $("#catForm").ajaxForm({ target: "#image_view" }).submit(); // return false; // }); $("#level2Parent").hide(); $("#level1").change(function (e) { e.preventDefault();...
/** * Created by meysamabl on 11/1/14. */ $(document).ready(function () { // $('#picture').change(function () { // $("#catForm").ajaxForm({ target: "#image_view" }).submit(); // return false; // }); $("#level2Parent").hide(); $("#level1").change(function (e) { e.preventDefault();...
Manage list task priority & urgency bug fix
<?php namespace AppBundle\Form; use AppBundle\Entity\TaskLists; use AppBundle\Entity\Tasks; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Bridge\Doc...
<?php namespace AppBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\HiddenType; use Symfony\Bridge\Doct...
Fix bug with $errors->has(), presumably introduced with Laravel framework package upgrade
@if (App::environment() !== 'production') <div class="row"> <div class="col-lg-12"> <div class="alert alert-warning"> <p><strong>Note:</strong> This installation of OpenDominion is running on <b>{{ App::environment() }}</b> environment and is not meant for pro...
@if (App::environment() !== 'production') <div class="row"> <div class="col-lg-12"> <div class="alert alert-warning"> <p><strong>Note:</strong> This installation of OpenDominion is running on <b>{{ App::environment() }}</b> environment and is not meant for pro...
Set up the factory for the default route
import logging log = logging.getLogger(__name__) from pyramid.config import Configurator from sqlalchemy import engine_from_config from .models import DBSession required_settings = [ 'pyramid.secret.session', 'pyramid.secret.auth', ] def main(global_config, **settings): """ This function...
import logging log = logging.getLogger(__name__) from pyramid.config import Configurator from sqlalchemy import engine_from_config from .models import DBSession required_settings = [ 'pyramid.secret.session', 'pyramid.secret.auth', ] def main(global_config, **settings): """ This function...
Use dev version of Firefox (supports vertical writing-mode) in tests on Sauce Labs
module.exports = function(config) { var commonConfig = (require("./karma-common.conf"))(config); var customLaunchers = { sl_chrome: { base: "SauceLabs", browserName: "chrome", platform: "Windows 8.1" }, sl_firefox: { base: "SauceLabs", ...
module.exports = function(config) { var commonConfig = (require("./karma-common.conf"))(config); var customLaunchers = { sl_chrome: { base: "SauceLabs", browserName: "chrome", platform: "Windows 8.1" }, sl_firefox: { base: "SauceLabs", ...
Stop passing redundant data around
#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f): path = f.name first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if len(s...
#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f, path): first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if len(s) < 2 or s[0...
Fix upgrade: Check for empty items first
/** @namespace H5PUpgrades */ var H5PUpgrades = H5PUpgrades || {}; H5PUpgrades['H5P.Agamotto'] = (function ($) { return { 1: { 3: function (parameters, finished) { // Update image items if (parameters.items) { parameters.items = parameters.items.map( function (item) { ...
/** @namespace H5PUpgrades */ var H5PUpgrades = H5PUpgrades || {}; H5PUpgrades['H5P.Agamotto'] = (function ($) { return { 1: { 3: function (parameters, finished) { // Update image items parameters.items = parameters.items.map( function (item) { // Create new image structure ...
Set check to a lower value in image async component
'use strict'; angular.module('app.components') .directive('imgAsync', ['$timeout', function($timeout) { return { restrict: 'E', replace: true, scope: { ngSrc: '@' }, templateUrl: 'app/components/imgasync/view.html', lin...
'use strict'; angular.module('app.components') .directive('imgAsync', ['$timeout', function($timeout) { return { restrict: 'E', replace: true, scope: { ngSrc: '@' }, templateUrl: 'app/components/imgasync/view.html', lin...
Add Project.first_event to API serializer
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMemberType, Project, Team @register(Project) class ProjectSerializer(Serializer): def get_attrs(self, item_list, user): organization = item_list[0].team.organization ...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMemberType, Project, Team @register(Project) class ProjectSerializer(Serializer): def get_attrs(self, item_list, user): organization = item_list[0].team.organization ...
Use correct section index for EventContextDataProvider We need to pass the index of the rendered section, not the current section. Passing the current section index causes the wrong section to be reported in media events when a video is played that is not in the current section but still visible in the viewport. It a...
import React from 'react'; import Section from './Section'; import {EventContextDataProvider} from './useEventContextData'; export default function Chapter(props) { return ( <div id={`chapter-${props.permaId}`}> {renderSections(props.sections, props.currentSectionIndex, ...
import React from 'react'; import Section from './Section'; import {EventContextDataProvider} from './useEventContextData'; export default function Chapter(props) { return ( <div id={`chapter-${props.permaId}`}> {renderSections(props.sections, props.currentSectionIndex, ...
Use `array_rand()` instead of `mt_rand()`/`count()` to reduce code, optimization, cleaner code
<?php /** * @author Pierre-Henry Soria <hello@ph7cms.com> * @copyright (c) 2018, Pierre-Henry Soria. All Rights Reserved. * @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. * @package PH7 / App / System / Module / Milestone Celebration ...
<?php /** * @author Pierre-Henry Soria <hello@ph7cms.com> * @copyright (c) 2018, Pierre-Henry Soria. All Rights Reserved. * @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. * @package PH7 / App / System / Module / Milestone Celebration ...
Fix nierozpoznawania bledu pierwszego ruchu v.2
from game import Game from input_con import InputCon from output_con import OutputCon class Harness(): def __init__(self, output, inputs): self._game = Game() self._output = output self._inputs = inputs def Start(self): self._output.show_welcome() while True: self._outpu...
from game import Game from input_con import InputCon from output_con import OutputCon class Harness(): def __init__(self, output, inputs): self._game = Game() self._output = output self._inputs = inputs def Start(self): self._output.show_welcome() while True: self._outpu...
Fix SQL column naming conventions
package com.gitrekt.resort.model.entities; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Ta...
package com.gitrekt.resort.model.entities; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Ta...
bii: Make _bii_deps_in_place actually behave like a context manager
# /ciscripts/coverage/bii/coverage.py # # Submit coverage totals for a bii project to coveralls # # See /LICENCE.md for Copyright information """Submit coverage totals for a bii project to coveralls.""" import errno import os from contextlib import contextmanager def _move_ignore_enoent(src, dst): """Move src ...
# /ciscripts/coverage/bii/coverage.py # # Submit coverage totals for a bii project to coveralls # # See /LICENCE.md for Copyright information """Submit coverage totals for a bii project to coveralls.""" import errno import os from contextlib import contextmanager @contextmanager def _bii_deps_in_place(cont): "...
Remove weird bug where clicking certain parts of pages wouldn't cause them to flip
$(function() { var $pages = $('.page'), currPage = 0; function setZIndex(currPage) { $pages.each(function(index) { if (currPage === index) { $(this).css('z-index', 2); } else if (Math.abs(currPage - index) === 1) { $(this).css('z-index', 1...
$(function() { var $pages = $('.page'), currPage = 0; function setZIndex(currPage) { $pages.each(function(index) { if (currPage === index) { $(this).css('z-index', 2); } else if (Math.abs(currPage - index) === 1) { $(this).css('z-index', 1...
Move initializing of Resume sub-objects back to parse so we get that behavior on sync.
define([ 'underscore', 'backbone', 'models/profile', 'models/address', 'collections/item' ], function (_, Backbone, Profile, Address, ItemCollection) { 'use strict'; var ResumeModel = Backbone.Model.extend({ defaults: { name: '' }, hasOne: ['profile', 'address'], hasMany: ['items'...
define([ 'underscore', 'backbone', 'models/profile', 'models/address', 'collections/item' ], function (_, Backbone, Profile, Address, ItemCollection) { 'use strict'; var ResumeModel = Backbone.Model.extend({ defaults: { name: '' }, hasOne: ['profile', 'address'], hasMany: ['items'...
Add worflow validation to prevent user replacement assumptions
(function( $ ) { $.fn.searchify = function() { return this.each(function() { $(this).autocomplete({ source: $(this).data("search-url"), select: function (event, ui) { if (select_url = $(this).data("select-url")) { for (e...
(function( $ ) { $.fn.searchify = function() { return this.each(function() { $(this).autocomplete({ source: $(this).data("search-url"), change: function (event, ui) { if ( $(this).data('value') != $(this).prev().val() ) { ...
Reimplement test method 'testInTerminal' to use serial port event listener
/* *\ ** SICU Stress Measurement System ** ** Project P04 | C380 Team A ** ** EBME 380: Biomedical Engineering Design Experience ** ** ...
/* *\ ** SICU Stress Measurement System ** ** Project P04 | C380 Team A ** ** EBME 380: Biomedical Engineering Design Experience ** ** ...
Fix buglet introduced by longcode clean-up.
from django.conf import settings from vumi.tests.utils import FakeRedis from go.base.tests.utils import VumiGoDjangoTestCase, declare_longcode_tags from go.vumitools.tests.utils import CeleryTestMixIn from go.vumitools.api import VumiApi class DjangoGoApplicationTestCase(VumiGoDjangoTestCase, CeleryTestMixIn): ...
from django.conf import settings from vumi.tests.utils import FakeRedis from go.base.tests.utils import VumiGoDjangoTestCase, declare_longcode_tags from go.vumitools.tests.utils import CeleryTestMixIn from go.vumitools.api import VumiApi class DjangoGoApplicationTestCase(VumiGoDjangoTestCase, CeleryTestMixIn): ...
Update grunt tasks for heroku
"use strict"; module.exports = function (grunt) { grunt.initConfig({ bump: { options: { files: ["package.json"], commit: true, commitMessage: "Release %VERSION%", commitFiles: ["-a"], createTag: true, ...
"use strict"; module.exports = function (grunt) { grunt.initConfig({ bump: { options: { files: ["package.json"], commit: true, commitMessage: "Release %VERSION%", commitFiles: ["-a"], createTag: true, ...
Change getName() => getDisplayName() for Bolt ^3.6 compatibility. Since Bolt 3.6.0-beta, getName() has not been overrideable.
<?php namespace Bolt\Extension\royallthefourth\CodeHighlightBolt; use Bolt\Asset\File\JavaScript; use Bolt\Asset\Snippet\Snippet; use Bolt\Asset\File\Stylesheet; use Bolt\Asset\Target; use Bolt\Extension\SimpleExtension; /** * CodeHighlightBolt extension class. * * @author Royall Spence <royall@royall.us> */ cla...
<?php namespace Bolt\Extension\royallthefourth\CodeHighlightBolt; use Bolt\Asset\File\JavaScript; use Bolt\Asset\Snippet\Snippet; use Bolt\Asset\File\Stylesheet; use Bolt\Asset\Target; use Bolt\Extension\SimpleExtension; /** * CodeHighlightBolt extension class. * * @author Royall Spence <royall@royall.us> */ cla...
Fix for absolute paths when using params
package com.crowdin.cli.commands.functionality; import com.crowdin.cli.properties.CliProperties; import com.crowdin.cli.properties.Params; import com.crowdin.cli.properties.PropertiesBean; import com.crowdin.cli.utils.file.FileReader; import java.io.File; import java.nio.file.Files; public class PropertiesBuilder { ...
package com.crowdin.cli.commands.functionality; import com.crowdin.cli.properties.CliProperties; import com.crowdin.cli.properties.Params; import com.crowdin.cli.properties.PropertiesBean; import com.crowdin.cli.utils.file.FileReader; import java.io.File; import java.nio.file.Files; public class PropertiesBuilder { ...
Fix two left over renames
#!/usr/bin/env python import os import sys import django from django.conf import settings DEFAULT_SETTINGS = dict( INSTALLED_APPS=[ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "account", "pinax.forums", "pinax.forums.tests" ],...
#!/usr/bin/env python import os import sys import django from django.conf import settings DEFAULT_SETTINGS = dict( INSTALLED_APPS=[ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "account", "forums", "forums.tests" ], DATABAS...
Use method in storybook example that wasn't being used that logs actions
import React, { Component } from 'react'; import { action } from '@kadira/storybook'; import { DraftJSEditor, Renderer, defaultBlocks } from '../../src'; const draftRenderer = new Renderer(defaultBlocks); class SetStateExample extends Component { state = { content: { entityMap: {}, blocks: [ ...
import React, { Component } from 'react'; import { action } from '@kadira/storybook'; import { DraftJSEditor, Renderer, defaultBlocks } from '../../src'; const draftRenderer = new Renderer(defaultBlocks); class SetStateExample extends Component { state = { content: { entityMap: {}, blocks: [ ...
Indent two spaces instead of tabs
/** * Functionality for the node info side display panel * * @author Taylor Welter - tdwelter */ (function() 'use strict'; angular .module('nodeproperties', ['ngVis']) .controller('NodeInfoController', NodeInfoController); function NodeInfoController() { var nodeInfo = []; // Howev...
/** * Functionality for the node info side display panel * * @author Taylor Welter - tdwelter */ (function() 'use strict'; angular .module('nodeproperties', ['ngVis']) .controller('NodeInfoController', NodeInfoController); function NodeInfoController() { var nod...
Return env instead of the $_server
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\Framewor...
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\Framewor...
Rewrite to avoid capitalization issues
import binascii import os import pytest from cryptography.bindings import _ALL_APIS from cryptography.primitives.block import BlockCipher def generate_encrypt_test(param_loader, path, file_names, cipher_factory, mode_factory, only_if=lambda api: True, skip_message...
import binascii import os import pytest from cryptography.bindings import _ALL_APIS from cryptography.primitives.block import BlockCipher def generate_encrypt_test(param_loader, path, file_names, cipher_factory, mode_factory, only_if=lambda api: True, skip_message...
Add a feature to detected use of the Dingo API package and assign its router for ease-of-use
<?php namespace SebastiaanLuca\Router\Routers; use Illuminate\Contracts\Routing\Registrar as RegistrarContract; /** * Class BaseRouter * * The base class every router should extend. * * @package SebastiaanLuca\Router\Routers */ abstract class BaseRouter implements RouterInterface { /** * The rout...
<?php namespace SebastiaanLuca\Router\Routers; use Illuminate\Contracts\Routing\Registrar as RegistrarContract; /** * Class BaseRouter * * The base class every router should extend. * * @package SebastiaanLuca\Router\Routers */ abstract class BaseRouter implements RouterInterface { /** * The rout...
Fix script for release file already present case This avoids a: "AttributeError: 'HTTPError' object has no attribute 'message'" Signed-off-by: Ulysses Souza <a0ff1337c6a0e43e9559f5f67fc3acb852912071@docker.com>
from __future__ import absolute_import from __future__ import unicode_literals from configparser import Error from requests.exceptions import HTTPError from twine.commands.upload import main as twine_upload from twine.utils import get_config from .utils import ScriptError def pypi_upload(args): print('Uploading...
from __future__ import absolute_import from __future__ import unicode_literals from configparser import Error from requests.exceptions import HTTPError from twine.commands.upload import main as twine_upload from twine.utils import get_config from .utils import ScriptError def pypi_upload(args): print('Uploading...
Fix machine enable monitoring in js
define('app/views/machine_manual_monitoring', ['app/views/templated', 'ember'], /** * Machine Manual Monitoring View * * @returns Class */ function (TemplatedView) { return TemplatedView.extend({ /** * * Actions * *...
define('app/views/machine_manual_monitoring', ['app/views/templated', 'ember'], /** * Machine Manual Monitoring View * * @returns Class */ function (TemplatedView) { return TemplatedView.extend({ /** * * Actions * *...
Install pycommand.3 manpage with pip
from setuptools import setup import pycommand setup( name='pycommand', version=pycommand.__version__, description=pycommand.__doc__, author=pycommand.__author__, author_email='benjamin@babab.nl', url='https://github.com/babab/pycommand', download_url='http://pypi.python.org/pypi/pycommand/'...
from setuptools import setup import pycommand setup( name='pycommand', version=pycommand.__version__, description=pycommand.__doc__, author=pycommand.__author__, author_email='benjamin@babab.nl', url='https://github.com/babab/pycommand', download_url='http://pypi.python.org/pypi/pycommand/'...
Remove row class and show only 2 columns
<div class="row"> <?php $html = '<div id="shopProducts">'; if(count($items) > 0) { foreach ($items as $item){ $html.= '<div id="'.$item['product'].'-'.$item['id'].'" class="col-md-6"> <div class="thumbnail"> <a href="'.Option::get('siteurl').DS.miniShop::$...
<div class="row"> <?php $html = '<div id="shopProducts" class="row">'; if(count($items) > 0) { foreach ($items as $item){ $html.= '<div id="'.$item['product'].'-'.$item['id'].'" class="col-md-4"> <div class="thumbnail"> <a href="'.Option::get('siteurl').DS...
Use foam.LIB and be a bit lazier.
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.core', name: 'AxiomCloner', documentation: 'An axiom that clones an axiom from another model.', properties: [ { class: 'Class', name: 'from' ...
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.core', name: 'AxiomCloner', documentation: 'An axiom that clones an axiom from another model.', properties: [ { class: 'Class', name: 'from' ...
Add error output to exec error messages e.g. for an error like "env: ‘node’: No such file or directory" the sublime console was only reporting "exited with code 127" which wasn't very helpful in determining the cause.
import os import json import threading import subprocess import sublime class ExecFlowCommand(threading.Thread): """Threaded class used for running flow commands in a different thread. The subprocess must be threaded so we don't lockup the UI. """ def __init__(self, cmd, content): """Initia...
import os import json import threading import subprocess import sublime class ExecFlowCommand(threading.Thread): """Threaded class used for running flow commands in a different thread. The subprocess must be threaded so we don't lockup the UI. """ def __init__(self, cmd, content): """Initia...
Swap back to Fuzzer, no monkey patching
from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer, Interactive from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our controlle...
from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our controller command_lin...
TASK: Fix return typehint for getBuiltinType
<?php namespace Neos\Flow\Reflection; /* * This file is part of the Neos.Flow package. * * (c) Contributors of the Neos Project - www.neos.io * * This package is Open Source Software. For the full copyright and license * information, please view the LICENSE file which was distributed with this * source code. *...
<?php namespace Neos\Flow\Reflection; /* * This file is part of the Neos.Flow package. * * (c) Contributors of the Neos Project - www.neos.io * * This package is Open Source Software. For the full copyright and license * information, please view the LICENSE file which was distributed with this * source code. *...
Use config to cache from composer.json Signed-off-by: Mior Muhammad Zaki <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
<?php namespace Orchestra\Config\Console; use Symfony\Component\Finder\Finder; use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Console\ConfigCacheCommand as BaseCommand; class ConfigCacheCommand extends BaseCommand { /** * Boot a fresh copy of the application configuration. * * ...
<?php namespace Orchestra\Config\Console; use Symfony\Component\Finder\Finder; use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Console\ConfigCacheCommand as BaseCommand; class ConfigCacheCommand extends BaseCommand { /** * Boot a fresh copy of the application configuration. * * ...
Rename oAuthSecret -> secretKey in bearer auth object
<?php namespace Konsulting\JustGivingApiSdk\Support\Auth; class BearerAuth implements AuthValue { /** * The application ID (also known as API key). * * @see https://developer.justgiving.com/apidocs/documentation#AppId * @var string */ protected $appId; /** * The bearer token...
<?php namespace Konsulting\JustGivingApiSdk\Support\Auth; class BearerAuth implements AuthValue { /** * The application ID (also known as API key). * * @see https://developer.justgiving.com/apidocs/documentation#AppId * @var string */ protected $appId; /** * The bearer token...
Use PHP 5.3-compatible traditional array syntax
<?php namespace Liip\RMT\Tests\Functional; use Exception; use Liip\RMT\Context; use Liip\RMT\Prerequisite\TestsCheck; class TestsCheckTest extends \PHPUnit_Framework_TestCase { protected function setUp() { $informationCollector = $this->getMock('Liip\RMT\Information\InformationCollector'); $i...
<?php namespace Liip\RMT\Tests\Functional; use Exception; use Liip\RMT\Context; use Liip\RMT\Prerequisite\TestsCheck; class TestsCheckTest extends \PHPUnit_Framework_TestCase { protected function setUp() { $informationCollector = $this->getMock('Liip\RMT\Information\InformationCollector'); $i...
Change alert color in login page
@extends('theme/main') @section('title') Login - Researchew @endsection @section('content') <div class="am-container"> <div class="am-u-sm-8 am-u-sm-centered"> @if(Session::has('message')) <div class="am-alert am-alert-success" data-am-alert>{{ Session::get('message') }}</div> @endif ...
@extends('theme/main') @section('title') Login - Researchew @endsection @section('content') <div class="am-container"> <div class="am-u-sm-8 am-u-sm-centered"> @if(Session::has('message')) <div class="am-alert am-alert-danger" data-am-alert>{{ Session::get('message') }}</div> @endif ...
Clarify error condition when failing to sync docs
""" sentry.runner.commands.repair ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import os import click from sentry.runner.decorators import configuration @cl...
""" sentry.runner.commands.repair ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import os import click from sentry.runner.decorators import configuration @cl...
Enable doctrine migrations bundle in 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 missed resolve check on converted resolver.
/** * @class SchemaResolver * Class exposing a method to resolve schema references to schema objects in a * schema. */ define([ ], function ( ) { return function(resolvers) { /** * Given the passed subobject walk its properties looking for $refs and * replace them with the loaded sche...
/** * @class SchemaResolver * Class exposing a method to resolve schema references to schema objects in a * schema. */ define([ ], function ( ) { return function(resolvers) { /** * Given the passed subobject walk its properties looking for $refs and * replace them with the loaded sche...
Allow setting invisible for styled features
(function () { "use strict"; $(document).ready(function () { OpenLayers.Feature.prototype.equals = function (feature) { return this.fid === feature.fid; }; OpenLayers.Feature.prototype.isNew = false; OpenLayers.Feature.prototype.isChanged = false; OpenLayers...
(function () { "use strict"; $(document).ready(function () { OpenLayers.Feature.prototype.equals = function (feature) { return this.fid === feature.fid; }; OpenLayers.Feature.prototype.isNew = false; OpenLayers.Feature.prototype.isChanged = false; OpenLayers...
Fix reference to md5 helper in test Fixes reference to md5 helper and removes reference to js client as the md5 function is now provided by utils.
'use strict' var net = require('net') var helper = require(__dirname + '/../test-helper') var Connection = require(__dirname + '/../../../lib/connection') var utils = require(__dirname + '/../../../lib/utils') var connect = function (callback) { var username = helper.args.user var database = helper.args.database ...
'use strict' var net = require('net') var helper = require(__dirname + '/../test-helper') var Connection = require(__dirname + '/../../../lib/connection') var connect = function (callback) { var username = helper.args.user var database = helper.args.database var con = new Connection({stream: new net.Stream()}) ...
Allow base=PeriodicTask argument to task decorator
from celery.task.base import Task from inspect import getargspec def task(**options): """Make a task out of any callable. Examples: >>> @task() ... def refresh_feed(url): ... return Feed.objects.get(url=url).refresh() >>> refresh_feed("http://example...
from celery.task.base import Task from celery.registry import tasks from inspect import getargspec def task(**options): """Make a task out of any callable. Examples: >>> @task() ... def refresh_feed(url): ... return Feed.objects.get(url=url).refresh() ...
Allow multiple configuration files for both rules and attributes
<?php namespace PhpAbac\Manager; use PhpAbac\Loader\YamlAbacLoader; use Symfony\Component\Config\FileLocatorInterface; class ConfigurationManager { /** @var FileLocatorInterface **/ protected $locator; /** @var string **/ protected $format; /** @var array **/ protected $loaders; /** @var...
<?php namespace PhpAbac\Manager; use PhpAbac\Loader\YamlAbacLoader; use Symfony\Component\Config\FileLocatorInterface; class ConfigurationManager { /** @var FileLocatorInterface **/ protected $locator; /** @var string **/ protected $format; /** @var array **/ protected $loaders; /** @var...
Disable width/height resize on image browse selection and use inlnie url for responsive images. Add Download URL to images automatically
(function() { CKEDITOR.plugins.add('concrete5filemanager', { init: function () { CKEDITOR.on('dialogDefinition', function(event) { var editor = event.editor, dialogDefinition = event.data.definition, tabContent = dialogDefinition.contents.l...
(function() { CKEDITOR.plugins.add('concrete5filemanager', { init: function () { CKEDITOR.on('dialogDefinition', function(event) { var editor = event.editor, dialogDefinition = event.data.definition, tabContent = dialogDefinition.contents.l...
Fix the missing `return null;` in `getUserByIdentifier`
<?php namespace Auth0\Login\Repository; use Auth0\Login\Auth0User; use Auth0\Login\Auth0JWTUser; use Auth0\Login\Contract\Auth0UserRepository as Auth0UserRepositoryContract; use Illuminate\Contracts\Auth\Authenticatable; class Auth0UserRepository implements Auth0UserRepositoryContract { /** * @param array $...
<?php namespace Auth0\Login\Repository; use Auth0\Login\Auth0User; use Auth0\Login\Auth0JWTUser; use Auth0\Login\Contract\Auth0UserRepository as Auth0UserRepositoryContract; use Illuminate\Contracts\Auth\Authenticatable; class Auth0UserRepository implements Auth0UserRepositoryContract { /** * @param array $...
Change dateTime validation regex - it is now optional
package seedu.emeraldo.model.task; import seedu.emeraldo.commons.exceptions.IllegalValueException; /** * Represents a Person's address in the address book. * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)} */ public class DateTime { public static final String MESSAGE_ADDRES...
package seedu.emeraldo.model.task; import seedu.emeraldo.commons.exceptions.IllegalValueException; /** * Represents a Person's address in the address book. * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)} */ public class DateTime { public static final String MESSAGE_ADDRES...
Remove resolve in top level
import commonjs from '@rollup/plugin-commonjs'; import glslify from 'rollup-plugin-glslify'; import resolve from '@rollup/plugin-node-resolve'; import copy from "rollup-plugin-copy"; export default { input: ['source/gltf-sample-viewer.js'], output: [ { file: 'dist/gltf-viewer.js', ...
import commonjs from '@rollup/plugin-commonjs'; import glslify from 'rollup-plugin-glslify'; import resolve from '@rollup/plugin-node-resolve'; import copy from "rollup-plugin-copy"; export default { input: ['source/gltf-sample-viewer.js'], output: [ { file: 'dist/gltf-viewer.js', ...
Update P2_combinePDF.py added module reference in docstring
#! python3 """Combine PDFs Combines all the PDFs in the current working directory into a single PDF. Note: * Example PDFs can be downloaded from http://nostarch.com/automatestuff/ * Book uses :py:mod:`PyPDF2`; I'm an overachiever that uses PyPDF4 """ def main(): import PyPDF4, os # Get all the PDF...
#! python3 """Combine PDFs Combines all the PDFs in the current working directory into a single PDF. Note: * Example PDFs can be downloaded from http://nostarch.com/automatestuff/ * Book uses PyPDF2; I'm an overachiever that uses PyPDF4 """ def main(): import PyPDF4, os # Get all the PDF filenames...
Remove unsupported pythons from classifiers
"""setup.py""" from codecs import open as codecs_open from setuptools import setup with codecs_open("README.md", "r", "utf-8") as f: README = f.read() setup( author="Beau Barker", author_email="beauinmelbourne@gmail.com", classifiers=[ "Programming Language :: Python :: 3.5", "Programm...
"""setup.py""" from codecs import open as codecs_open from setuptools import setup with codecs_open("README.md", "r", "utf-8") as f: README = f.read() setup( author="Beau Barker", author_email="beauinmelbourne@gmail.com", classifiers=[ "Programming Language :: Python :: 2.7", "Programm...
Use SlugRelatedField for foreign keys for better readability
import uuid import jsonschema from rest_framework import serializers from .models import ( Api, Consumer, ConsumerKey, Plugin, ) from .schemas import plugins class ConsumerSerializer(serializers.ModelSerializer): class Meta: model = Consumer fields = '__all__' class ConsumerKey...
import uuid import jsonschema from rest_framework import serializers from .models import ( Api, Consumer, ConsumerKey, Plugin, ) from .schemas import plugins class ApiSerializer(serializers.ModelSerializer): class Meta: model = Api fields = '__all__' class ConsumerSerializer(se...
Add a criterion kind for extends/implements. It's not used anywhere yet. An option would be to have separate constants for extends and implements, but that's probably not needed.
package annotator.find; import com.sun.source.util.TreePath; import com.sun.source.tree.Tree; /** * A criterion for locating a program element in an AST. A Criterion does * not actually give a location. Given a location, the isSatisfiedBy * method indicates whether that location is a desired one. */ public inte...
package annotator.find; import com.sun.source.util.TreePath; import com.sun.source.tree.Tree; /** * A criterion for locating a program element in an AST. A Criterion does * not actually give a location. Given a location, the isSatisfiedBy * method indicates whether that location is a desired one. */ public inte...
Support table custom table prefix Laravel automatically adds a table prefix to any table names, so we need to wrap our aliased table in DB::raw.
<?php namespace Flarum\Core\Notifications; use Flarum\Core\Users\User; class NotificationRepository { /** * Find a user's notifications. * * @param User $user * @param int|null $limit * @param int $offset * @return \Illuminate\Database\Eloquent\Collection */ public function ...
<?php namespace Flarum\Core\Notifications; use Flarum\Core\Users\User; class NotificationRepository { /** * Find a user's notifications. * * @param User $user * @param int|null $limit * @param int $offset * @return \Illuminate\Database\Eloquent\Collection */ public function ...
REMOVE unneeded babel/preset in override
module.exports = { presets: [ ['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage' }], '@babel/preset-react', '@babel/preset-flow', ], plugins: [ 'babel-plugin-emotion', 'babel-plugin-macros', '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-res...
module.exports = { presets: [ ['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage' }], '@babel/preset-react', '@babel/preset-flow', ], plugins: [ 'babel-plugin-emotion', 'babel-plugin-macros', '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-res...
Support more general documentation path names.
# encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic import list_detail from sphinxdoc import models from sphinxdoc.views import ProjectSearchView project_info = { 'queryset': models.Project.objects.all().order_by('name'), 'te...
# encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic import list_detail from sphinxdoc import models from sphinxdoc.views import ProjectSearchView project_info = { 'queryset': models.Project.objects.all().order_by('name'), 'te...
Fix bug to display the default snapshot item
// @flow import type {Snapshot, SnapshotItem} from 'redux-ship'; export type State = { logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[], selectedLog: ?number, selectedSnapshotItem: ?SnapshotItem<mixed, mixed>, }; export const initialState: State = { logs: [], selectedLog: null, selectedSnapshotIt...
// @flow import type {Snapshot, SnapshotItem} from 'redux-ship'; export type State = { logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[], selectedLog: ?number, selectedSnapshotItem: ?SnapshotItem<mixed, mixed>, }; export const initialState: State = { logs: [], selectedLog: null, selectedSnapshotIt...
Rename variable from placeName to cityName
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class HomeController extends CI_Controller { public function __construct() { parent::__construct(); $this->load->library('googleAPIProxy'); } public function index() { $data = [ 'search' =>...
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class HomeController extends CI_Controller { public function __construct() { parent::__construct(); $this->load->library('googleAPIProxy'); } public function index() { $data = [ 'search' =>...
Change bad function decorator implementation
import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @classmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod def get_pub...
import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @staticmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod def get_pu...
Fix incorrect import of modules n commonjs env
(function (root, factory) { 'use strict'; /* global define, module, require */ if (typeof define === 'function' && define.amd) { // AMD define(['./lib/Dice', './lib/inventory', './lib/modifiers', './lib/ProtoTree', './lib/random', './lib/requirements'], factory); } else if (typeof exports === '...
(function (root, factory) { 'use strict'; /* global define, module, require */ if (typeof define === 'function' && define.amd) { // AMD define(['./lib/Dice', './lib/inventory', './lib/modifiers', './lib/ProtoTree', './lib/random', './lib/requirements'], factory); } else if (typeof exports === '...
Make it easier to change the default Grunt task
// Configuration module.exports = function(grunt) { // Initialize config grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), }); // Load required tasks from submodules grunt.loadTasks('grunt'); // Default task grunt.registerTask('default', ['dev']); // Development ...
// Configuration module.exports = function(grunt) { // Initialize config grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), }); // Load required tasks from submodules grunt.loadTasks('grunt'); // Default grunt.registerTask('default', [ 'connect', 'localtun...
Add missing handle ipn url
from django.conf.urls import patterns, url from oscar.core.application import Application from systempay import views class SystemPayApplication(Application): name = 'systempay' place_order_view = views.PlaceOrderView cancel_response_view = views.CancelResponseView secure_redirect_view = views.Secu...
from django.conf.urls import patterns, url from oscar.core.application import Application from systempay import views class SystemPayApplication(Application): name = 'systempay' place_order_view = views.PlaceOrderView cancel_response_view = views.CancelResponseView secure_redirect_view = views.Secu...
Use ValidationError rather than ValueError
""" MongoHN.forms - WTForms used by MongoHN """ from MongoHN.models import User from flask.ext.wtf import Form from wtforms import SubmitField, TextField, BooleanField, PasswordField from wtforms.validators import Required, DataRequired, ValidationError class LoginForm(Form): username = TextField('Username', vali...
""" MongoHN.forms - WTForms used by MongoHN """ from MongoHN.models import User from flask.ext.wtf import Form from wtforms import SubmitField, TextField, BooleanField, PasswordField from wtforms.validators import Required, DataRequired class LoginForm(Form): username = TextField('Username', validators = [ Requir...
Fix loading of modules by only their name
var findup = require('findup'), path = require('path'); var local = require('./local'); function find(dir, file, callback) { var name = file.split('/')[0], modulePath = './node_modules/' + name + '/package.json'; findup(dir, modulePath, function (err, moduleDir) { if (err) { return callba...
var findup = require('findup'), path = require('path'); var local = require('./local'); function find(dir, file, callback) { var name = file.split('/')[0], modulePath = './node_modules/' + name + '/package.json'; findup(dir, modulePath, function (err, moduleDir) { if (err) { return callba...
Revert "Test that typo in sources break the CI build" This reverts commit 78e3eda95cfe36ed811aa35ba90424a6f7503f4f.
(function() { 'use strict'; angular .module('afterHeap') .config(routerConfig); /** @ngInject */ function routerConfig($stateProvider, $urlRouterProvider) { $stateProvider .state('city', { abstract: true, url: '/:cityId', template: '<ui-view/>' }) .state('...
(function() { 'use strict'; angular .module('afterHeap') .config(routerConfig); /** @ngInject */ function routerConfig($stateProvider, $urlRouterProvider) { $stateProvider .state('city', { abstract: true, url: '/:cityId', template: '<ui-view/>' }) .state('...
Return catcher value, give catcher the callback.
var slice = [].slice var eject = require('eject') // todo: create strings parser. function Interrupt () { this._types = {} } Interrupt.prototype._populate = function (error, type, vargs) { this._types[type] || (this._types[type] = {}) error.message = error.type = type error.typeIdentifier = this._type...
var slice = [].slice var eject = require('eject') // todo: create strings parser. function Interrupt () { this._types = {} } Interrupt.prototype._populate = function (error, type, vargs) { this._types[type] || (this._types[type] = {}) error.message = error.type = type error.typeIdentifier = this._type...
Include .jpeg in extensions that should trigger a save dialog.
// Stopgap atom.js file for handling normal browser things that atom // does not yet have stable from the browser-side API. // - Opening external links in default web browser // - Saving files/downloads to disk $(document).ready(function() { if (typeof process === 'undefined') return; if (typeof process.version...
// Stopgap atom.js file for handling normal browser things that atom // does not yet have stable from the browser-side API. // - Opening external links in default web browser // - Saving files/downloads to disk $(document).ready(function() { if (typeof process === 'undefined') return; if (typeof process.version...
Allow to set invoker through filesystem decorator
<?php namespace React\Filesystem; use React\EventLoop\LoopInterface; use React\Filesystem\Node; class Filesystem { protected $filesystem; /** * @param LoopInterface $loop * @param AdapterInterface $adapter * @return static * @throws NoAdapterException */ public static function c...
<?php namespace React\Filesystem; use React\EventLoop\LoopInterface; use React\Filesystem\Node; class Filesystem { protected $filesystem; /** * @param LoopInterface $loop * @param AdapterInterface $adapter * @return static * @throws NoAdapterException */ public static function c...
Add new builder to compiler passes
<?php namespace Knp\Rad\AutoRegistration\Bundle; use Knp\Rad\AutoRegistration\DependencyInjection\AutoRegistrationExtension; use Knp\Rad\AutoRegistration\DependencyInjection\Compiler\DefinitionBuilderActivationPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass; use Symfony\Component\Depend...
<?php namespace Knp\Rad\AutoRegistration\Bundle; use Knp\Rad\AutoRegistration\DependencyInjection\AutoRegistrationExtension; use Knp\Rad\AutoRegistration\DependencyInjection\Compiler\DefinitionBuilderActivationPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass; use Symfony\Component\Depend...
Call long_desc instead of the function
import multiprocessing # noqa # stop tests breaking tox from setuptools import find_packages, setup import tvrenamr def long_desc(): with open('README.rst') as f: readme = f.read() with open('CHANGELOG.rst') as f: changelog = f.read() return readme + '\n\n' + changelog setup( nam...
import multiprocessing # noqa # stop tests breaking tox from setuptools import find_packages, setup import tvrenamr def long_desc(): with open('README.rst') as f: readme = f.read() with open('CHANGELOG.rst') as f: changelog = f.read() return readme + '\n\n' + changelog setup( nam...
Update the path and the url
<?php /* * This file is part of the AlphaLemonThemeEngineBundle and it is distributed * under the MIT License. To use this bundle you must leave * intact this copyright notice. * * Copyright (c) AlphaLemon <webmaster@alphalemon.com> * * For the full copyright and license information, please view the LICENSE * f...
<?php /* * This file is part of the AlphaLemonThemeEngineBundle and it is distributed * under the MIT License. To use this bundle you must leave * intact this copyright notice. * * Copyright (c) AlphaLemon <webmaster@alphalemon.com> * * For the full copyright and license information, please view the LICENSE * f...
Make Django to find the pydoc-tool.py script tests
import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnless('All docstri...
import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnless('All docstri...
Add more logging to see what this strange user is
var moment = require('moment'); var userCache = {}; var cacheTimeInMilliseconds = 1000 * 60 * 15; /** * Every time a user posts a message, we update their slack profile so we can stay up to date on their profile * @param {Object} bot * @param {Object} message * @param {Object} controller */ module.exports = fu...
var moment = require('moment'); var userCache = {}; var cacheTimeInMilliseconds = 1000 * 60 * 15; /** * Every time a user posts a message, we update their slack profile so we can stay up to date on their profile * @param {Object} bot * @param {Object} message * @param {Object} controller */ module.exports = fu...
Update StatMoments tests (passing); empty tests to be filled in when the testing data is updated
# Licensed under an MIT open source license - see LICENSE ''' Test functions for Kurtosis ''' import pytest import numpy as np import numpy.testing as npt from ..statistics import StatMoments, StatMoments_Distance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances def test_mom...
# Licensed under an MIT open source license - see LICENSE ''' Test functions for Kurtosis ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import StatMoments, StatMoments_Distance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distance...