text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Fix test run on buildserver. Though that way we don have a coverage overview after each manual run...
module.exports = function (config) { 'use strict' config.set({ frameworks: ['jspm', 'mocha', 'chai', 'sinon'], jspm: { config: 'src/jspm.conf.js', loadFiles: [ 'node_modules/core-js/client/core.js', 'test/**/*.spec.js' ], serveFiles: [ 'src/**/*.js', ...
module.exports = function (config) { 'use strict' config.set({ frameworks: ['jspm', 'mocha', 'chai', 'sinon'], jspm: { config: 'src/jspm.conf.js', loadFiles: [ 'node_modules/core-js/client/core.js', 'test/**/*.spec.js' ], serveFiles: [ 'src/**/*.js', ...
Reconfigure progress report record type calculation
/*jslint browser: true, undef: true, white: false, laxbreak: true *//*global Ext,Slate*/ Ext.define('SlateAdmin.model.person.ProgressReport', { extend: 'Ext.data.Model', fields: [ 'AuthorUsername', 'Subject', { name: 'ID', type: 'integer', useNull: tru...
/*jslint browser: true, undef: true, white: false, laxbreak: true *//*global Ext,Slate*/ Ext.define('SlateAdmin.model.person.ProgressReport', { extend: 'Ext.data.Model', fields: [ 'AuthorUsername', 'Subject', { name: 'ID', type: 'integer', useNull: tru...
Add new jpf test cases
package org.joda.time.field; import org.joda.time.DateTimeFieldType; import org.joda.time.chrono.IslamicChronology; public class DriveDividedDateTimeField { static DividedDateTimeField rdtf = new DividedDateTimeField( DateTimeFieldType.dayOfMonth().getField(IslamicChronology.getInstance()), ...
package org.joda.time.field; import org.joda.time.DateTimeFieldType; import org.joda.time.chrono.IslamicChronology; public class DriveDividedDateTimeField { static DividedDateTimeField rdtf = new DividedDateTimeField( DateTimeFieldType.dayOfMonth().getField(IslamicChronology.getInstance()), ...
Add parameter to only email output from scheduled commands if it exists
<?php namespace App\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { /** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return v...
<?php namespace App\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { /** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return v...
Set only PhantomJS as the test browser for TravisCI.
module.exports = function(config) { config.set({ basePath: '../', frameworks: ['jasmine'], autoWatch: false, browsers: ['PhantomJS'], files: [ // angular libs 'bower_components/jquery/dist/jquery.js', 'bower_components/angular/angular.js', 'bower_components/boots...
module.exports = function(config) { config.set({ basePath: '../', frameworks: ['jasmine'], autoWatch: false, browsers: ['Chrome', 'PhantomJS'], files: [ // angular libs 'bower_components/jquery/dist/jquery.js', 'bower_components/angular/angular.js', 'bower_compon...
Set methods that don't use any fields as static
package com.alexstyl.specialdates.contact; import android.content.ContentResolver; import android.database.Cursor; import android.provider.ContactsContract; import com.alexstyl.specialdates.DisplayName; class DeviceContactFactory { private final ContentResolver resolver; DeviceContactFactory(ContentResolve...
package com.alexstyl.specialdates.contact; import android.content.ContentResolver; import android.database.Cursor; import android.provider.ContactsContract; import com.alexstyl.specialdates.DisplayName; class DeviceContactFactory { private final ContentResolver resolver; DeviceContactFactory(ContentResolve...
Add a big, fat warning message that scrap will delete the entire folder. Closes #39.
<?php namespace Studio\Console; use Studio\Package; use Studio\Config\Config; use Studio\Shell\Shell; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Filesystem\Filesystem; class ScrapCommand extends BaseCommand { protected $config; public function __construct(Config $config) ...
<?php namespace Studio\Console; use Studio\Package; use Studio\Config\Config; use Studio\Shell\Shell; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Filesystem\Filesystem; class ScrapCommand extends BaseCommand { protected $config; public function __construct(Config $config) ...
Add BMP files to supported list
#!/usr/bin/env python # -*- coding: utf-8 -*- import os def is_image_file(f): known_extensions = ('.bmp', '.jpg', '.jpeg', '.png') return os.path.isfile(f) and f.lower().endswith(known_extensions) def get_files_list(paths, recursive): result = [] for path in paths: if os.path.isdir(path): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os def is_image_file(f): known_extensions = ('.jpg', '.jpeg', '.png') return os.path.isfile(f) and f.lower().endswith(known_extensions) def get_files_list(paths, recursive): result = [] for path in paths: if os.path.isdir(path): ...
Fix issue with creating new document
import React from "react"; import styled from "styled-components"; import AddIcon from "@atlaskit/icon/glyph/add"; import ListIcon from "@atlaskit/icon/glyph/list"; import Button, { ButtonGroup } from "@atlaskit/button"; import { updateSelectionAndCreateNewDoc, updateSelectionAndSwitchToList } from "../actions"; c...
import React from "react"; import styled from "styled-components"; import AddIcon from "@atlaskit/icon/glyph/add"; import ListIcon from "@atlaskit/icon/glyph/list"; import Button, { ButtonGroup } from "@atlaskit/button"; import { updateSelectionAndCreateNewDoc, updateSelectionAndSwitchToList } from "../actions"; c...
Remove lxml requirement b/c it is not easily easy_installable
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='FastPt', version=version, description="Really fast well-formed xml templates", long_description="""Are you tired of the slow performance of Genshi? But you still long for the assurance that your output is we...
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='FastPt', version=version, description="Really fast well-formed xml templates", long_description="""Are you tired of the slow performance of Genshi? But you still long for the assurance that your output is we...
Fix a path of manifest file
const path = require('path'); const webpack = require('webpack'); const ManifestPlugin = require('webpack-manifest-plugin'); module.exports = { entry: './resources/assets/js/app.js', output: { filename: './assets/app.[hash].js', path: path.join(__dirname, '/public'), }, module: { ...
const path = require('path'); const webpack = require('webpack'); const ManifestPlugin = require('webpack-manifest-plugin'); module.exports = { entry: './resources/assets/js/app.js', output: { filename: './assets/app.[hash].js', path: path.join(__dirname, '/public'), }, module: { ...
Change hasattr check to isinstance check because it's faster.
from discord.ext.commands import Bot, CommandInvokeError from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument class BeattieBot(Bot): async def reply(self, ctx, message): return await ctx.send(f'{ctx.message.author.mention}\n{message}') async def handle_error(self, ex...
from discord.ext.commands import Bot from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument class BeattieBot(Bot): async def reply(self, ctx, message): return await ctx.send(f'{ctx.message.author.mention}\n{message}') async def handle_error(self, exception, ctx): ...
Fix __unicode__ for DataPoint model
import numpy import ast from django.db import models class DataPoint(models.Model): name = models.CharField(max_length=600) exact_name = models.CharField(max_length=1000, null=True, blank=True) decay_feature = models.CharField(max_length=1000, null=True, blank=True) created = models.DateTimeField(aut...
import numpy import ast from django.db import models class DataPoint(models.Model): name = models.CharField(max_length=600) exact_name = models.CharField(max_length=1000, null=True, blank=True) decay_feature = models.CharField(max_length=1000, null=True, blank=True) created = models.DateTimeField(aut...
Set date when creating event, not when it's require'd
define(['backbone', 'marionette'], function(Backbone, Marionette) { return Backbone.View.extend({ template: '#event-creation', events: { 'click button.create-event': 'create_event' }, initialize: function() {}, render: function() { var rendered_temp...
define(['backbone', 'marionette'], function(Backbone, Marionette) { return Backbone.View.extend({ template: '#event-creation', events: { 'click button.create-event': 'create_event' }, initialize: function() {}, render: function() { var rendered_temp...
Check for Predis\Client existance before running tests.
<?php namespace Doctrine\Tests\Common\Cache; use Doctrine\Common\Cache\Cache; use Doctrine\Common\Cache\PredisCache; use Predis\Client; use Predis\Connection\ConnectionException; class PredisCacheTest extends CacheTest { private $client; public function setUp() { if (!class_exists('Predis\Client...
<?php namespace Doctrine\Tests\Common\Cache; use Doctrine\Common\Cache\Cache; use Doctrine\Common\Cache\PredisCache; use Predis\Client; use Predis\Connection\ConnectionException; class PredisCacheTest extends CacheTest { private $client; public function setUp() { $this->client = new Client(); ...
Make it possible to include the ID in the name mask For example an entry mask could be "Boat #%id%" and the result would be "Boat #5"
<?php namespace Concrete\Core\Express\Entry\Formatter; use Concrete\Core\Entity\Express\Entry; use Concrete\Core\Express\Formatter\FormatterInterface; class LabelFormatter implements EntryFormatterInterface { /** @var \Concrete\Core\Express\Formatter\FormatterInterface */ protected $formatter; public f...
<?php namespace Concrete\Core\Express\Entry\Formatter; use Concrete\Core\Entity\Express\Entry; use Concrete\Core\Express\Formatter\FormatterInterface; class LabelFormatter implements EntryFormatterInterface { /** @var \Concrete\Core\Express\Formatter\FormatterInterface */ protected $formatter; public f...
Add the README as the long description.
#!/usr/bin/env python # Copyright Least Authority Enterprises. # See LICENSE for details. import setuptools _metadata = {} with open("src/txkube/_metadata.py") as f: exec(f.read(), _metadata) with open("README.rst") as f: _metadata["description"] = f.read() setuptools.setup( name="txkube", version=_...
#!/usr/bin/env python # Copyright Least Authority Enterprises. # See LICENSE for details. import setuptools _metadata = {} with open("src/txkube/_metadata.py") as f: exec(f.read(), _metadata) setuptools.setup( name="txkube", version=_metadata["version_string"], description="A Twisted-based Kubernete...
Add Azure SQL Server "connection lost" message
<?php namespace Illuminate\Database; use Throwable; use Illuminate\Support\Str; trait DetectsLostConnections { /** * Determine if the given exception was caused by a lost connection. * * @param \Throwable $e * @return bool */ protected function causedByLostConnection(Throwable $e) ...
<?php namespace Illuminate\Database; use Throwable; use Illuminate\Support\Str; trait DetectsLostConnections { /** * Determine if the given exception was caused by a lost connection. * * @param \Throwable $e * @return bool */ protected function causedByLostConnection(Throwable $e) ...
Allow a user’s widget data to be null on the settings page.
import React from 'react' import PropTypes from 'prop-types' import WidgetSettings from './WidgetSettingsContainer' import SettingsChildWrapper from '../SettingsChildWrapperComponent' import FullScreenProgress from 'general/FullScreenProgress' class WidgetsSettings extends React.Component { constructor (props) { ...
import React from 'react' import PropTypes from 'prop-types' import WidgetSettings from './WidgetSettingsContainer' import SettingsChildWrapper from '../SettingsChildWrapperComponent' import FullScreenProgress from 'general/FullScreenProgress' class WidgetsSettings extends React.Component { constructor (props) { ...
Add data change to updates string only if new value is not None in order to preserve scraped data, that user decided to hide.
from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format(attr, val) d...
from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format(attr, val) d...
Switch Array.indexOf to determine if event string exists
import MCStoreBus from './mcstorebus'; export const EVTYPE = { EVUPDATE: 'EVUPDATE', EVREMOVE: 'EVREMOVE', EVADD: 'EVADD' }; const _KNOWN_EVENTS = _.values(EVTYPE); function isKnownEvent(event) { return _KNOWN_EVENTS.indexOf(event) !== -1; } export class MCStore { constructor(initialState) { ...
import MCStoreBus from './mcstorebus'; export const EVTYPE = { EVUPDATE: 'EVUPDATE', EVREMOVE: 'EVREMOVE', EVADD: 'EVADD' }; const _KNOWN_EVENTS = _.values(EVTYPE); function isKnownEvent(event) { return _.findIndex(_KNOWN_EVENTS, event) !== -1; } export class MCStore { constructor(initialState) ...
Make sure we always get the selection list with a default value. (Cleans up error on startup.)
adjectiveArray = [{name: "happy"},{name:"sad"},{name:"angry"},{name:"afraid"}]; if (Meteor.isClient) { Template.adjectives.adjective = function() { return adjectiveArray; }; Template.adjectives.events({ 'click li.adjective': function() { var selectedAdjectives = Sessio...
adjectiveArray = [{name: "happy"},{name:"sad"},{name:"angry"},{name:"afraid"}]; if (Meteor.isClient) { Template.adjectives.adjective = function() { return adjectiveArray; }; Template.adjectives.events({ 'click li.adjective': function() { var selectedAdjectives = Sessio...
Make sure the tifffile.py is installed.
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup, Extension import numpy import re with open('README.rst') as f: readme = f.read() with open('tifffile.py') as f: text = f.read() version = re.search("__version__ = '(.*?)'", text).groups()[0] setup( name='tifffile', ve...
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup, Extension import numpy import re with open('README.rst') as f: readme = f.read() with open('tifffile.py') as f: text = f.read() version = re.search("__version__ = '(.*?)'", text).groups()[0] setup( name='tifffile', ve...
Validate Model function to allow permission
from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_role_for(self, ob...
from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_role_for(self, ob...
Fix a copy and paste error
/* @flow */ import ConversionContext from './ConversionContext'; export type Options = { ignore?: boolean; assert?: boolean; warn?: boolean; annotate?: boolean; suppressComments?: string[]; suppressTypes?: string[]; // deprecated decorate?: boolean; }; export default function createConversionContext ...
/* @flow */ import ConversionContext from './ConversionContext'; export type Options = { ignore?: boolean; assert?: boolean; warn?: boolean; annotate?: boolean; suppressComments?: string[]; suppressTypes?: string[]; // deprecated decorate?: boolean; }; export default function createConversionContext ...
Test sync return for Twisted too
from __future__ import absolute_import, division, print_function import pytest pytest.importorskip("twisted") from twisted.internet.defer import Deferred, succeed, fail from prometheus_async import tx class TestTime(object): @pytest.inlineCallbacks def test_decorator_sync(self, fo, patch_timer): "...
from __future__ import absolute_import, division, print_function import pytest pytest.importorskip("twisted") from twisted.internet.defer import Deferred, succeed, fail from prometheus_async import tx class TestTime(object): @pytest.inlineCallbacks def test_decorator(self, fo, patch_timer): """ ...
Update joke of day: Fix for moved SpinnerThread
from plugin import plugin, require import requests from colorama import Fore @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke daily' to use """ def __call__(self, jarvis, s): ...
from plugin import plugin, require import requests from colorama import Fore from plugins.animations import SpinnerThread @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke daily' to use ...
Fix icon class of share this page services Use same icon class with social network icon classes
<?php namespace Concrete\Core\Sharing\ShareThisPage; class ServiceList { protected static function getServices() { return array( array('facebook', 'Facebook', 'fab fa-facebook'), array('twitter', 'Twitter', 'fab fa-twitter'), array('linkedin', 'LinkedIn', 'fab fa-li...
<?php namespace Concrete\Core\Sharing\ShareThisPage; class ServiceList { protected static function getServices() { return array( array('facebook', 'Facebook', 'facebook'), array('twitter', 'Twitter', 'twitter'), array('linkedin', 'LinkedIn', 'linkedin-in'), ...
Remove pylint disables (for now)
# Generated by Django 3.2.6 on 2021-08-23 18:33 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='SiteVisit', fields=[ ...
# Generated by Django 3.2.6 on 2021-08-23 18:33 # pylint:disable=line-too-long # pylint:disable=missing-module-docstring # pylint:disable= from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = ...
Add keys iterator for ``TypeParameter``
from hoomd.parameterdicts import AttachedTypeParameterDict class TypeParameter: def __init__(self, name, type_kind, param_dict): self.name = name self.type_kind = type_kind self.param_dict = param_dict def __getitem__(self, key): return self.param_dict[key] def __setitem_...
from hoomd.parameterdicts import AttachedTypeParameterDict class TypeParameter: def __init__(self, name, type_kind, param_dict): self.name = name self.type_kind = type_kind self.param_dict = param_dict def __getitem__(self, key): return self.param_dict[key] def __setitem_...
Add missing semicolons and wrapped the line to 80 columns
var config = require('yaml-config') .readConfig(__dirname + '/../config/config.yml') , mail = require('../config/mail')(config) , emailTemplates = require('email-templates') , nodemailer = require('nodemailer'); // send mail with templates exports.sendMail = function (name, to, subject, data, callback) { var...
var config = require('yaml-config').readConfig(__dirname + '/../config/config.yml') , mail = require('../config/mail')(config) , emailTemplates = require('email-templates') , nodemailer = require('nodemailer'); // send mail with templates exports.sendMail = function (name, to, subject, data, callback) { var t...
Add simple test for token on landig with redirect on app
(() => { 'use strict'; angular .module('app') .controller('LoginController', LoginController); LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints', '$localStorage']; function LoginController(growl, $window, $http, $routeSegment, TokenSe...
(() => { 'use strict'; angular .module('app') .controller('LoginController', LoginController); LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints']; function LoginController(growl, $window, $http, $routeSegment, TokenService, Endpoints)...
Update import path method to reflect behaviour
from __future__ import unicode_literals from optparse import make_option import os from csv import reader from codecs import BOM_UTF8 import pickle from django.utils.six import string_types, PY3 from django.core.management.base import BaseCommand, CommandError from ...models import Path class Command(BaseCommand): ...
from __future__ import unicode_literals from optparse import make_option import os from csv import reader from codecs import BOM_UTF8 import pickle from django.utils.six import string_types, PY3 from django.core.management.base import BaseCommand, CommandError from ...models import Path class Command(BaseCommand): ...
Extend AbstractTestCase instead of TestBase when creating and using your own mainWindow svn changeset:22078/svn branch:6.7
package com.vaadin.tests.components.treetable; import com.vaadin.terminal.ExternalResource; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.Link; import com.vaadin.ui.TreeTable; import com.vaadin.ui.Window; public class DisappearingComponents extends AbstractTestCase { @Override pub...
package com.vaadin.tests.components.treetable; import com.vaadin.terminal.ExternalResource; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Link; import com.vaadin.ui.TreeTable; import com.vaadin.ui.Window; public class DisappearingComponents extends TestBase { @Override protected void setu...
Update syntax on SHOUTcast authhash form.
<?php use App\Entity\StationMount; $form_config = require __DIR__ . '/generic.php'; $form_config['groups']['basic_info']['elements']['name'][1]['validator'] = function ($text) { $forbidden_paths = ['listen', 'admin', 'statistics', '7.html']; foreach ($forbidden_paths as $forbidden_path) { if (stripo...
<?php use App\Entity\StationMount; $form_config = require __DIR__.'/generic.php'; $form_config['groups']['basic_info']['elements']['name'][1]['validator'] = function($text) { $forbidden_paths = ['listen', 'admin', 'statistics', '7.html']; foreach($forbidden_paths as $forbidden_path) { if (stripos($te...
Fix Customer Group Type and RuleChecker
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Component\Core\Promotion\Checker\Rule; use Sylius\Component\Core\Model\CustomerInter...
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Component\Core\Promotion\Checker\Rule; use Sylius\Component\Core\Model\CustomerInter...
Use a valid port from env
require('../../../support/test_helper.js'); var _ = require('underscore'); var assert = require('assert'); var cartodbServer = require('../../../../lib/cartodb/server'); var serverOptions = require('../../../../lib/cartodb/server_options'); describe('windshaft', function() { it('should have valid global environ...
require('../../../support/test_helper.js'); var _ = require('underscore'); var assert = require('assert'); var cartodbServer = require('../../../../lib/cartodb/server'); var serverOptions = require('../../../../lib/cartodb/server_options'); describe('windshaft', function() { it('should have valid global environ...
Add the to_dependency method to ProjectPackage
from poetry_core.semver import VersionRange from poetry_core.semver import parse_constraint from poetry_core.version.markers import parse_marker from .package import Package from .utils.utils import create_nested_marker class ProjectPackage(Package): def __init__(self, name, version, pretty_version=None): ...
from poetry_core.semver import VersionRange from poetry_core.semver import parse_constraint from poetry_core.version.markers import parse_marker from .package import Package from .utils.utils import create_nested_marker class ProjectPackage(Package): def __init__(self, name, version, pretty_version=None): ...
Add unit test for daily email
package models import ( "testing" "socialapi/config" . "github.com/smartystreets/goconvey/convey" ) func TestTemplateRender(t *testing.T) { uc := UserContact{} Convey("Daily email", t, func() { Convey("Should load a correct config", func() { So(func() { config.MustRead("./test...
package models import ( "testing" "socialapi/config" . "github.com/smartystreets/goconvey/convey" ) func TestTemplateRender(t *testing.T) { uc := UserContact{} Convey("Daily email", t, func() { Convey("Should load a correct config", func() { So(func() { config.MustRead("./tes...
Fix typo in message name constraints
package seedu.agendum.model.task; import seedu.agendum.commons.exceptions.IllegalValueException; /** * Represents a Task's name in the to do list. * Guarantees: immutable; is valid as declared in {@link #isValidName(String)} */ public class Name { public static final String MESSAGE_NAME_CONSTRAINTS = "Task na...
package seedu.agendum.model.task; import seedu.agendum.commons.exceptions.IllegalValueException; /** * Represents a Task's name in the to do list. * Guarantees: immutable; is valid as declared in {@link #isValidName(String)} */ public class Name { public static final String MESSAGE_NAME_CONSTRAINTS = "Task na...
Change BindTextureRenderNode to make fewer GL calls when the texture scale is None.
""" bind_texture """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from OpenGL import GL from mcedit2.rendering.scenegraph import rendernode from mcedit2.rendering.scenegraph.rendernode import RenderstateRenderNode from mcedit2.rendering.scenegraph.scenenode impor...
""" bind_texture """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from OpenGL import GL from mcedit2.rendering.scenegraph import rendernode from mcedit2.rendering.scenegraph.rendernode import RenderstateRenderNode from mcedit2.rendering.scenegraph.scenenode impor...
Change one more CAPTIVA to Intelligent Capture
import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: f...
import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: f...
Check whether six has been installed before running tests
#!/usr/bin/env python from __future__ import unicode_literals import os, sys try: import six from django.conf import settings except ImportError: print("Django has not been installed.") sys.exit(0) if not settings.configured: settings.configure( INSTALLED_APPS=["jstemplate"], DAT...
#!/usr/bin/env python from __future__ import unicode_literals import os, sys import six try: from django.conf import settings except ImportError: print("Django has not been installed.") sys.exit(0) if not settings.configured: settings.configure( INSTALLED_APPS=["jstemplate"], DATABAS...
Rename isAlive method to is_alive Python 3.9 compatibility fix
import threading from . import pypofetch def __timeout(func, timeout_duration, default, args, kwargs): class InterruptableThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.result = default def run(self): self.result = func(*arg...
import threading from . import pypofetch def __timeout(func, timeout_duration, default, args, kwargs): class InterruptableThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.result = default def run(self): self.result = func(*arg...
Revert back not replacing content for general likes directive
angular.module('codebrag.commits') .directive('generalLikes', function (authService) { return { restrict: 'E', scope: { author: '=', likesCollection: '=', submitLike: '&' }, templateUrl: 'generalLikes', ...
angular.module('codebrag.commits') .directive('generalLikes', function (authService) { return { restrict: 'E', replace: true, scope: { author: '=', likesCollection: '=', submitLike: '&' }, templateU...
Use /base in the SVG path Unfortunatly we need that.
define(["sugar-web/graphics/icon"], function (icon) { describe("icon", function () { var wasLoaded; var iconUrlResult; it("should be able to change icon more than once", function () { var elem = document.createElement('div'); var iconUrl; function callba...
define(["sugar-web/graphics/icon"], function (icon) { describe("icon", function () { var wasLoaded; var iconUrlResult; it("should be able to change icon more than once", function () { var elem = document.createElement('div'); var iconUrl; function callba...
Add another user in fixture code
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Flask from flask_restful import Api from .db import configure_database class Application: def __init__(self): self.flask_app = Flask(__name__) self.api = Api(self.flask_app) self.import_configuration() self.configur...
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Flask from flask_restful import Api from .db import configure_database class Application: def __init__(self): self.flask_app = Flask(__name__) self.api = Api(self.flask_app) self.import_configuration() self.configur...
Add missing title to navigation options in payment info screen
import React, { Component } from 'react'; import { View, Alert } from 'react-native'; import { Text, ListItem, Thumbnail, Body, Left, Form, Content, Button } from 'native-base'; import paymentInfoScreenStyle from './paymentInfoScreenStyle'; const alertMessage1 = 'För Kortet .... .... .... 4499\n'; const alertMessage2 ...
import React, { Component } from 'react'; import { View, Alert } from 'react-native'; import { Text, ListItem, Thumbnail, Body, Left, Form, Content, Button } from 'native-base'; import paymentInfoScreenStyle from './paymentInfoScreenStyle'; const alertMessage1 = 'För Kortet .... .... .... 4499\n'; const alertMessage2 ...
Use settings.containerClass and settings.paginatorClass on ajax call otherwise we can't use multiple pagemore buttons and containers inside the same page
(function($) { $.fn.pagemore = function(options) { var settings = $.extend( { containerClass: 'pagemore-container', paginatorClass: 'pagemore-paginator', pageRequested: function(e) { e.paginator.hide(); }, pageCompleted: function(e)...
(function($) { $.fn.pagemore = function(options) { var settings = $.extend( { containerClass: 'pagemore-container', paginatorClass: 'pagemore-paginator', pageRequested: function(e) { e.paginator.hide(); }, pageCompleted: function(e)...
Fix cannot get branch name
'use babel'; import SaveTabsWithBranchView from './save-tabs-with-branch-view'; import { CompositeDisposable } from 'atom'; function getBranch() { const repos = atom.project.getRepositories(); if (!repos || repos.length === 0) { return ''; } const repo = repos[0]; return repo.getShortHead(); } export d...
'use babel'; import SaveTabsWithBranchView from './save-tabs-with-branch-view'; import { CompositeDisposable } from 'atom'; function getBranch() { const repos = atom.project.getRepositories(); if (!repos || repos.length === 0) { return ''; } const repo = repos[0]; return repo.getUpstreamBranch(); } exp...
Fix for using NAG Fortran 95, due to James Graham <jg307@cam.ac.uk>
import os import sys from numpy.distutils.cpuinfo import cpu from numpy.distutils.fcompiler import FCompiler class NAGFCompiler(FCompiler): compiler_type = 'nag' version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)' executables = { 'version_cmd' : ["f95", "-V"], ...
import os import sys from numpy.distutils.cpuinfo import cpu from numpy.distutils.fcompiler import FCompiler class NAGFCompiler(FCompiler): compiler_type = 'nag' version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)' executables = { 'version_cmd' : ["f95", "-V"], ...
Use cacheDirectory options to cache Babel build
/* eslint-disable no-var, prefer-template */ var webpack = require("webpack"); module.exports = function webpackConfig(opts) { var env = JSON.stringify(opts.args.production ? "production" : "development"); var config = { entry: { background: __dirname + "/app/scripts/background.js", options: __dir...
/* eslint-disable no-var, prefer-template */ var webpack = require("webpack"); module.exports = function webpackConfig(opts) { var env = JSON.stringify(opts.args.production ? "production" : "development"); var config = { entry: { background: __dirname + "/app/scripts/background.js", options: __dir...
Use get() instead of setdefault().
class ObservableMemory: def __init__(self, subject=None): if subject is None: subject = 0x10000 * [0x00] self._subject = subject self._read_subscribers = {} self._write_subscribers = {} def __setitem__(self, address, value): callbacks = self._write...
class ObservableMemory: def __init__(self, subject=None): if subject is None: subject = 0x10000 * [0x00] self._subject = subject self._read_subscribers = {} self._write_subscribers = {} def __setitem__(self, address, value): callbacks = self._write...
Use Component/Type and PolyCollectionType for blocks
<?php namespace Enhavo\Bundle\ShopBundle\Block; use Enhavo\Bundle\BlockBundle\Model\BlockInterface; use Enhavo\Bundle\ShopBundle\Entity\ProductListBlock; use Enhavo\Bundle\ShopBundle\Factory\ProductListBlockFactory; use Enhavo\Bundle\ShopBundle\Form\Type\ProductListBlockType as ProductListBlockFormType; use Enhavo\Bu...
<?php namespace Enhavo\Bundle\ShopBundle\Block; use Enhavo\Bundle\BlockBundle\Model\BlockInterface; use Enhavo\Bundle\ShopBundle\Entity\ProductListBlock; use Enhavo\Bundle\ShopBundle\Factory\ProductListBlockFactory; use Enhavo\Bundle\ShopBundle\Form\Type\ProductListBlockType as ProductListBlockFormType; use Enhavo\Bu...
Add some error handling in the crawler The crawler will silently return nothing if it's disabled or if fetch or parser error happen.
<?php /** * Created by PhpStorm. * User: Nabeel * Date: 2015-10-16 * Time: 6:42 PM */ namespace app\components; use yii\base\Component; use yii\log\Logger; class Crawler extends Component { public $enabled = true; public function readTitle($url) { if (!$this->enabled) ...
<?php /** * Created by PhpStorm. * User: Nabeel * Date: 2015-10-16 * Time: 6:42 PM */ namespace app\components; use yii\base\Component; class Crawler extends Component { public function readTitle($url) { $content = $this->fetchUrl($url); $crawler = new \Symfony\Compo...
Add support for different time units in the response time attribute
package io.undertow.attribute; import io.undertow.server.HttpServerExchange; import java.util.concurrent.TimeUnit; /** * The response time * * This will only work if {@link io.undertow.UndertowOptions#RECORD_REQUEST_START_TIME} has been set */ public class ResponseTimeAttribute implements ExchangeAttribute { ...
package io.undertow.attribute; import io.undertow.server.HttpServerExchange; /** * The response time * * This will only work if {@link io.undertow.UndertowOptions#RECORD_REQUEST_START_TIME} has been set */ public class ResponseTimeAttribute implements ExchangeAttribute { public static final String RESPONSE_T...
Add bulleted and numbered list to CKEditor Closes #180
from .util import get_settings, load_local_settings, load_secret_key from . import base settings = get_settings(base) load_local_settings(settings, "local_settings") load_secret_key(settings) if not settings["DEBUG"] and settings["JWT_AUTH"]["JWT_SECRET_KEY"] == "kerrokantasi": raise ValueError("Refusing to run o...
from .util import get_settings, load_local_settings, load_secret_key from . import base settings = get_settings(base) load_local_settings(settings, "local_settings") load_secret_key(settings) if not settings["DEBUG"] and settings["JWT_AUTH"]["JWT_SECRET_KEY"] == "kerrokantasi": raise ValueError("Refusing to run o...
Decrease sensitivity of dark ground checking.
class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) elif...
class Rule(object): def __init__(self, trigger, actions): self.trigger = trigger print "trigger: %s" % trigger self.code = [] time = 0 for a in actions: print "action: %s" % a if a == 'back': action = ('reverse', 40) elif...
Add classifiers for py35 and py36
#!/usr/bin/env python3 from setuptools import find_packages, setup setup( name='django-afip', description='AFIP integration for django', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/django-afip', license='ISC', packages=find_packages(), ...
#!/usr/bin/env python3 from setuptools import find_packages, setup setup( name='django-afip', description='AFIP integration for django', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/django-afip', license='ISC', packages=find_packages(), ...
Add mongo hq authentication for heroku
package pw.scho.battleship.persistence.configuration; import com.mongodb.DB; import com.mongodb.MongoURI; import com.mongodb.ServerAddress; import org.mongolink.MongoSession; import org.mongolink.MongoSessionManager; import org.mongolink.Settings; import org.mongolink.UpdateStrategies; import org.mongolink.domain.map...
package pw.scho.battleship.persistence.configuration; import com.mongodb.ServerAddress; import org.mongolink.MongoSession; import org.mongolink.MongoSessionManager; import org.mongolink.Settings; import org.mongolink.UpdateStrategies; import org.mongolink.domain.mapper.ContextBuilder; import java.net.UnknownHostExce...
Change suffix for locator to 'loc'
"""Kraken - base config module. Classes: BaseConfig -- Base config object used to configure builders. """ class BaseConfig(object): """Base Configuration for Kraken builders.""" def __init__(self): super(BaseConfig, self).__init__() self.nameTemplate = { "locat...
"""Kraken - base config module. Classes: BaseConfig -- Base config object used to configure builders. """ class BaseConfig(object): """Base Configuration for Kraken builders.""" def __init__(self): super(BaseConfig, self).__init__() self.nameTemplate = { "locat...
Fix method description in account_cost_spread
# Copyright 2016-2018 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_create(self): """Invoked when validating the invoice...
# Copyright 2016-2018 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_create(self): """Override, button Validate on invoic...
Tag Factory no understand full xpaths
<?php /* * This file is part of PHPExifTool. * * (c) 2012 Romain Neutron <imprec@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver; use PHPExiftool\Exception; use PHPExiftool\Tool\Command\Cl...
<?php /* * This file is part of PHPExifTool. * * (c) 2012 Romain Neutron <imprec@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver; use PHPExiftool\Exception; use PHPExiftool\Tool\Command\Cl...
Update context processors analyzer to target Django 1.4
import ast from .base import BaseAnalyzer, ModuleVisitor, Result class ContextProcessorsVisitor(ast.NodeVisitor): def __init__(self): self.found = [] removed_items = { 'django.core.context_processors.auth': 'django.contrib.auth.context_processors.auth', 'django.core.cont...
import ast from .base import BaseAnalyzer, ModuleVisitor, Result class ContextProcessorsVisitor(ast.NodeVisitor): def __init__(self): self.found = [] deprecated_items = { 'django.core.context_processors.auth': 'django.contrib.auth.context_processors.auth', 'django.core.c...
Build with PIC by default.
from conans import ConanFile, CMake, tools class LibWFUTConan(ConanFile): name = "libwfut" version = "0.2.4" license = "GPL-2.0+" author = "Erik Ogenvik <erik@ogenvik.org>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/libwfut" description = "A client side C+...
from conans import ConanFile, CMake, tools class LibWFUTConan(ConanFile): name = "libwfut" version = "0.2.4" license = "GPL-2.0+" author = "Erik Ogenvik <erik@ogenvik.org>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/libwfut" description = "A client side C+...
Set owner_id on new post.
List = new Meteor.Collection( 'List' ); List.allow({ insert: (userId, document) => true, update: (userId, document) => document.owner_id === Meteor.userId(), remove: (userId, document) => false }); List.deny({ insert: (userId, document) => false, update: (userId, document) => false, remove: (u...
List = new Meteor.Collection( 'List' ); List.allow({ insert: (userId, document) => true, update: (userId, document) => document.owner_id === Meteor.userId(), remove: (userId, document) => false }); List.deny({ insert: (userId, document) => false, update: (userId, document) => false, remove: (u...
Add link to manual in the footer. Added link to a PDF manual in the footer. Remember to make corresponding changes in nginx-config to make it work, similar to the logo and other static resources.
import React from 'react'; import ExternalLink from './ExternalLink'; import Link from './Link'; import prefix from '../prefix'; export default class Footer extends React.Component { static propTypes = { requests: React.PropTypes.object, } render() { const statistics = this.props.requests ...
import React from 'react'; import ExternalLink from './ExternalLink'; import Link from './Link'; export default class Footer extends React.Component { static propTypes = { requests: React.PropTypes.object, } render() { const statistics = this.props.requests ? <div>{this.props.requests.loca...
Make UglifyJSFilter docstring more consistent with other filters
import subprocess from webassets.exceptions import FilterError from webassets.filter import Filter __all__ = ('UglifyJSFilter',) class UglifyJSFilter(Filter): """ Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assu...
"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. Additional options may be passed to ``uglifyjs`` by setting ``UGLIFYJ...
Use master branch of content instead of specific release
from setuptools import setup setup( name = 'marquee-composer', version = '0.2.3-dev', description = '', long_description = file('README.md').read(), url = 'https://github.com/marquee/composer', author = '...
from setuptools import setup setup( name = 'marquee-composer', version = '0.2.3-dev', description = '', long_description = file('README.md').read(), url = 'https://github.com/marquee/composer', author = '...
Add eaten Ghosts to game score
package com.pm.server.manager; import com.pm.server.datatype.GameState; import com.pm.server.datatype.Pacdot; import com.pm.server.registry.GameStateRegistry; import com.pm.server.registry.PacdotRegistry; import com.pm.server.registry.PlayerRegistry; import org.springframework.beans.factory.annotation.Autowired; impor...
package com.pm.server.manager; import com.pm.server.datatype.GameState; import com.pm.server.datatype.Pacdot; import com.pm.server.registry.GameStateRegistry; import com.pm.server.registry.PacdotRegistry; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; imp...
Use get_binary in tox tests.
from click import Option import subprocess from unleash.util import VirtualEnv from .utils_tree import in_tmpexport PLUGIN_NAME = 'tox_tests' def setup(cli): cli.commands['release'].params.append(Option( ['--tests/--no-tests', '-t/-T'], default=True, help='Run unittests (default: enabled).' ...
from click import Option import subprocess from unleash.util import VirtualEnv from .utils_tree import in_tmpexport PLUGIN_NAME = 'tox_tests' def setup(cli): cli.commands['release'].params.append(Option( ['--tests/--no-tests', '-t/-T'], default=True, help='Run unittests (default: enabled).' ...
Replace form type name with FQCN in getParent() methods.
<?php /** * @author Igor Nikolaev <igor.sv.n@gmail.com> * @copyright Copyright (c) 2015, Darvin Studio * @link https://www.darvin-studio.ru * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Darvin\Utils\Form\Type; ...
<?php /** * @author Igor Nikolaev <igor.sv.n@gmail.com> * @copyright Copyright (c) 2015, Darvin Studio * @link https://www.darvin-studio.ru * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Darvin\Utils\Form\Type; ...
Remove unnecessary backslashes in parse_json_items
import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this value is default ...
import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this value is default ...
Make parameters final that can be made final.
package com.hubspot.singularity.executor.config; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Optional; import com.hubspot.singularity.executor.SingularityExecutorLogrotateFrequency; public class SingularityExecutorLogrotateAd...
package com.hubspot.singularity.executor.config; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Optional; import com.hubspot.singularity.executor.SingularityExecutorLogrotateFrequency; public class SingularityExecutorLogrotateAd...
Add processing cmd to update routine
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLogger(__name__) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLogger(__name__) ...
Fix suggestedMax in chart when there is no data to display
"use strict"; $(function () { //----------------------- //- Dashboard > Authentication Requests Chart - //----------------------- try{ var authChartData = JSON.parse($("#authenticationChartJson").val()); console.log("authentication chart data"); console.log(authChartData); var authenticationReq...
"use strict"; $(function () { //----------------------- //- Dashboard > Authentication Requests Chart - //----------------------- try{ var authChartData = JSON.parse($("#authenticationChartJson").val()); console.log("authentication chart data"); console.log(authChartData); var authenticationReq...
Add missing return type declarations
<?php namespace Doctrine\DBAL\Driver\DrizzlePDOMySql; use Doctrine\DBAL\Platforms\DrizzlePlatform; use Doctrine\DBAL\Schema\DrizzleSchemaManager; /** * Drizzle driver using PDO MySql. */ class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver { /** * {@inheritdoc} */ public function connect(ar...
<?php namespace Doctrine\DBAL\Driver\DrizzlePDOMySql; use Doctrine\DBAL\Platforms\DrizzlePlatform; use Doctrine\DBAL\Schema\DrizzleSchemaManager; /** * Drizzle driver using PDO MySql. */ class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver { /** * {@inheritdoc} */ public function connect(ar...
Fix conflicting test. Test checks for categories/1/
from django.test import TestCase from pinax.forums.models import Forum, ForumCategory class ForumCategoryTests(TestCase): def test_unicode_method(self): cat = ForumCategory(title="Software") self.assertEquals(str(cat), cat.title) def test_get_absolute_url(self): cat = ForumCategory....
from django.test import TestCase from pinax.forums.models import Forum, ForumCategory class ForumCategoryTests(TestCase): def test_unicode_method(self): cat = ForumCategory(title="Software") self.assertEquals(str(cat), cat.title) def test_get_absolute_url(self): cat = ForumCategory....
Replace `Layer` to `Clip` on Project structure spec`
import Project from '../../src/project/project' import Asset from '../../src/project/asset' import Composition from '../../src/project/composition' import TimeLane from '../../src/project/timelane' import Clip from '../../src/project/clip' describe('project structure specs', () => { describe('Project', () => { ...
import Project from '../../src/project/project' import Asset from '../../src/project/asset' import Composition from '../../src/project/composition' import TimeLane from '../../src/project/timelane' import Layer from '../../src/project/layer' describe('project structure specs', () => { describe('Project', () => { ...
Add value to return if nothing is found
from django.db import models from django.utils.timezone import now from django.utils.translation import get_language from django.utils.translation import ugettext_lazy as _ from rdmo.core.utils import get_languages class Model(models.Model): created = models.DateTimeField(editable=False, verbose_name=_('created'...
from django.db import models from django.utils.timezone import now from django.utils.translation import get_language from django.utils.translation import ugettext_lazy as _ from rdmo.core.utils import get_languages class Model(models.Model): created = models.DateTimeField(editable=False, verbose_name=_('created'...
Replace non-ASCII character in comment
from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins import DjediCon...
from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins import DjediCon...
Set the embedded schema registry's compatibility mode to full
package forklift.integration.server; import io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig; import io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication; import org.eclipse.jetty.server.Server; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Properties; /** * Emb...
package forklift.integration.server; import io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig; import io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication; import org.eclipse.jetty.server.Server; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Properties; /** * Emb...
Allow data URIs to be set as the new tab page
/*global chrome,document,window */ (function init(angular) { "use strict"; try { chrome.storage.local.get(["url", "tab.selected", "always-tab-update"], function (items) { var url = items.url; if (url) { url = (0 !== url.indexOf("about:") && 0 !== url.indexOf("data...
/*global chrome,document,window */ (function init(angular) { "use strict"; try { chrome.storage.local.get(["url", "tab.selected", "always-tab-update"], function (items) { var url = items.url; if (url) { url = (0 !== url.indexOf("about:") && -1 === url.indexOf("://...
Remove unnecessary comments from webpack
const path = require("path"); module.exports = { module: { rules: [ { test: /\.css$/, include: path.resolve(__dirname, ".."), use: [ { loader: 'style-loader', }, { loader: 'css-loader', options: { source...
const path = require("path"); module.exports = { module: { rules: [ { test: /\.css$/, include: path.resolve(__dirname, ".."), use: [ { loader: 'style-loader', }, { loader: 'css-loader', options: { source...
Comment for types of area that need importing
""" DIW MTW UTW """ import time import requests from bs4 import BeautifulSoup from django.core.management.base import BaseCommand from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.geos import Point from authorities.models import Authority, MapitArea from authorities import constants from auth...
import time import requests from bs4 import BeautifulSoup from django.core.management.base import BaseCommand from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.geos import Point from authorities.models import Authority, MapitArea from authorities import constants from authorities.helpers impor...
Update swagger docs with product variants originalPrice
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Sylius\Bundle\ApiBundle\Swagger; use Symfony\Component\Serializer...
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Sylius\Bundle\ApiBundle\Swagger; use Symfony\Component\Serializer...
Fix argument order for Object.assign Thanks @paulkaplan
const UPDATE_EDITING_TARGET = 'scratch-gui/targets/UPDATE_EDITING_TARGET'; const UPDATE_TARGET_LIST = 'scratch-gui/targets/UPDATE_TARGET_LIST'; const initialState = { sprites: {}, stage: {} }; const reducer = function (state, action) { if (typeof state === 'undefined') state = initialState; switch (ac...
const UPDATE_EDITING_TARGET = 'scratch-gui/targets/UPDATE_EDITING_TARGET'; const UPDATE_TARGET_LIST = 'scratch-gui/targets/UPDATE_TARGET_LIST'; const initialState = { sprites: {}, stage: {} }; const reducer = function (state, action) { if (typeof state === 'undefined') state = initialState; switch (ac...
Correct some more variables to private not static
<?php class SchemaPoint { private $latitude; private $longitude; private $altitude; public function __construct($parameters) { $this->latitude = @$parameters["latitude"]; $this->longitude = @$parameters["longitude"]; $this->altitude = @$parameters["altitude"]; } ...
<?php class SchemaPoint { static $latitude; static $longitude; static $altitude; public function __construct($parameters) { $this->latitude = @$parameters["latitude"]; $this->longitude = @$parameters["longitude"]; $this->altitude = @$parameters["altitude"]; } ...
Fix view created without context.
/** * @license * Copyright 2020 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.u2.view', name: 'ObjAltView', extends: 'foam.u2.View', documentation: "Like AltView, but for Objects instead of DAO's.", css: ` ^ { margin: auto; } ...
/** * @license * Copyright 2020 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.u2.view', name: 'ObjAltView', extends: 'foam.u2.View', documentation: "Like AltView, but for Objects instead of DAO's.", css: ` ^ { margin: auto; } ...
Reduce frequency to 10 Hz instead of 2.
#!/usr/bin/env python # -*- coding: utf-8 -*- # (C) 2015 Jean Nassar # Released under BSD version 4 """ Reduce /ardrone/image_color framerate from 30 Hz to 2 Hz. """ import rospy from sensor_msgs.msg import Image class FramerateReducer(object): """ Reduces the framerate of a video feed to one fifteenth of t...
#!/usr/bin/env python # -*- coding: utf-8 -*- # (C) 2015 Jean Nassar # Released under BSD version 4 """ Reduce /ardrone/image_color framerate from 30 Hz to 2 Hz. """ import rospy from sensor_msgs.msg import Image class FramerateReducer(object): """ Reduces the framerate of a video feed to one fifteenth of t...
Set liveness to 0 when broker tells us we are disconnected
module.exports = function() { var dataBuffer = Array.prototype.slice.call(arguments), data, self = this; data = dataBuffer.map(function(d) { return d.toString(); }); // update timer for last message recieved this.lastMsg = new Date(); switch(data[0]) { case this.constants.HEARTBEAT: ...
module.exports = function() { var dataBuffer = Array.prototype.slice.call(arguments), data, self = this; data = dataBuffer.map(function(d) { return d.toString(); }); // update timer for last message recieved this.lastMsg = new Date(); switch(data[0]) { case this.constants.HEARTBEAT: ...
Fix bug in trace handler
package io.undertow.server.handlers; import io.undertow.server.HttpHandler; import io.undertow.server.HttpServerExchange; import io.undertow.util.HeaderValues; import io.undertow.util.Headers; import io.undertow.util.Methods; /** * A handler that handles HTTP trace requests * * @author Stuart Douglas */ public cl...
package io.undertow.server.handlers; import io.undertow.server.HttpHandler; import io.undertow.server.HttpServerExchange; import io.undertow.util.HeaderValues; import io.undertow.util.Headers; import io.undertow.util.Methods; /** * A handler that handles HTTP trace requests * * @author Stuart Douglas */ public cl...
Add index to access_token_id column
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateOauthRefreshTokensTable extends Migration { /** * The database schema. * * @var \Illuminate\Database\Schema\Builder */ protected $schema; /*...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateOauthRefreshTokensTable extends Migration { /** * The database schema. * * @var \Illuminate\Database\Schema\Builder */ protected $schema; /*...
Rename old class name of kvs-schema
package io.github.droidkaigi.confsched.util; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import java.util.Arrays; import java.util.Locale; import io.github.droidkaigi.co...
package io.github.droidkaigi.confsched.util; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import java.util.Arrays; import java.util.Locale; import io.github.droidkaigi.co...
Fix anchor used to check if animations should run
package io.doist.recyclerviewext.flippers; import android.support.v4.view.ViewCompat; import android.view.View; /** * Flips between views with a common ancestor using a {@link FlipperAnimator}. */ public class Flipper { private FlipperAnimator mFlipperAnimator = new DefaultFlipperAnimator(); public Flipper...
package io.doist.recyclerviewext.flippers; import android.support.v4.view.ViewCompat; import android.view.View; /** * Flips between views with a common ancestor using a {@link FlipperAnimator}. */ public class Flipper { private FlipperAnimator mFlipperAnimator = new DefaultFlipperAnimator(); public Flipper...
Switch project view when user picks a different project.
Application.Directives.directive("sidebarProjects", sidebarProjectsDirective); function sidebarProjectsDirective() { return { restrict: "AE", replace: true, templateUrl: "index/sidebar-projects.html", controller: "sidebarProjectsDirectiveController" }; } Application.Controllers...
Application.Directives.directive("sidebarProjects", sidebarProjectsDirective); function sidebarProjectsDirective() { return { restrict: "AE", replace: true, templateUrl: "index/sidebar-projects.html", controller: "sidebarProjectsDirectiveController" }; } Application.Controllers...
Revert 'Change required library with minified one'
let should = require('should'); let expect = require('chai').expect; let jsdom = require('jsdom'); let {JSDOM} = jsdom; let Shell; describe('Shell', () => { let {document} = (new JSDOM('<!doctype html><html><body></body></html>')).window; global.document = document; global.window = document.defaultView; ...
let should = require('should'); let expect = require('chai').expect; let jsdom = require('jsdom'); let {JSDOM} = jsdom; let Shell; describe('Shell', () => { let {document} = (new JSDOM('<!doctype html><html><body></body></html>')).window; global.document = document; global.window = document.defaultView; ...
Fix for defaultcontroller when creating new item
<div class="group-defaultcontroller edit"> <?php echo form_open(); $aFieldSets = []; foreach ($CONFIG['FIELDS'] as $oField) { if (in_array($oField->key, $CONFIG['EDIT_IGNORE_FIELDS'])) { continue; } $sFieldSet = getFromArray('fieldset', (array) $oField, 'Basic Det...
<div class="group-defaultcontroller edit"> <?php echo form_open(); $aFieldSets = []; foreach ($CONFIG['FIELDS'] as $oField) { if (in_array($oField->key, $CONFIG['EDIT_IGNORE_FIELDS'])) { continue; } $sFieldSet = getFromArray('fieldset', (array) $oField, 'Basic Det...
Mark it Windows only before Linux implement ready.
package io.github.hcoona.utils; import com.sun.jna.Platform; import org.junit.Assert; import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Test; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concur...
package io.github.hcoona.utils; import org.junit.Assert; import org.junit.Test; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; public class NamedMutexTest { @Test public void testCannotWai...
Change Elements from Import And Export
package fr.synchrotron.soleil.ica.ci.lib.mongodb.domainobjects.project; import fr.synchrotron.soleil.ica.ci.lib.mongodb.domainobjects.artifact.DeveloperDocument; import java.util.List; /** * @author Gregory Boissinot */ public class ProjectDocument { private String org; private String name; private ...
package fr.synchrotron.soleil.ica.ci.lib.mongodb.domainobjects.project; import fr.synchrotron.soleil.ica.ci.lib.mongodb.domainobjects.artifact.DeveloperDocument; import java.util.List; /** * @author Gregory Boissinot */ public class ProjectDocument { private String org; private String name; private ...