text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Use list for Models collector + sort
<?php namespace Barryvdh\Debugbar\DataCollector; use DebugBar\DataCollector\DataCollector; use DebugBar\DataCollector\DataCollectorInterface; use DebugBar\DataCollector\Renderable; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Support\Str; /** * Collector for Models. */ class ModelsCollector extends D...
<?php namespace Barryvdh\Debugbar\DataCollector; use Barryvdh\Debugbar\DataFormatter\SimpleFormatter; use DebugBar\DataCollector\MessagesCollector; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Support\Str; /** * Collector for Models. */ class ModelsCollector extends MessagesCollector { public $mo...
Put in $F function to grab values instead of $('id').value
var FormHelper = { // TODO: Make this more generic, because it // will be reused. hideShowConfigurationTitle: function() { if ($('configuration_title').visible()) { $('configuration_title').hide(); $('configuration_title_container').show(); } else { $('configuration_title').sho...
var FormHelper = { // TODO: Make this more generic, because it // will be reused. hideShowConfigurationTitle: function() { if ($('configuration_title').visible()) { $('configuration_title').hide(); $('configuration_title_container').show(); } else { $('configuration_title').sho...
Fix a bug when a command like "/list-players" is miss-spelled and "/leave" is executed cause of its alias "/l".
package client.command; public enum Commands { Username(new String[]{"/username", "/name", "/u"}, Username.class), Team(new String[]{"/team", "/t"}, Team.class), Contract(new String[]{"/contract"}, Contract.class), Create(new String[]{"/create", "/c"}, Create.class), Join(new String[]{"/jo...
package client.command; public enum Commands { Username(new String[]{"/username", "/name", "/u"}, Username.class), Team(new String[]{"/team", "/t"}, Team.class), Contract(new String[]{"/contract"}, Contract.class), Create(new String[]{"/create", "/c"}, Create.class), Join(new String[]{"/jo...
Fix syntax error and refer correct method
package org.edx.mobile.module.analytics; import android.content.Context; import org.edx.mobile.util.Config; public class SegmentFactory { private static ISegment sInstance; /** * Returns a singleton instance of {@link org.edx.mobile.module.analytics.ISegment}. * Use {@link #makeInstance(android.c...
package org.edx.mobile.module.analytics; import android.content.Context; import org.edx.mobile.util.Config; public class SegmentFactory { private static ISegment sInstance; /** * Returns a singleton instance of {@link org.edx.mobile.module.analytics.ISegment}. * Use {@link #makeInstance(android.c...
Update test case create is not available because of field edit permission.
<?php namespace ProcessWire\GraphQL\Test\Permissions; use ProcessWire\GraphQL\Test\GraphqlTestCase; use function ProcessWire\GraphQL\Test\Assert\assertTypePathNotExists; class EditorCreateNotAvailableFieldEditPermissionTest extends GraphqlTestCase { /** * + For editor. * + The template is legal. * + The ...
<?php namespace ProcessWire\GraphQL\Test\Permissions; use ProcessWire\GraphQL\Test\GraphqlTestCase; use ProcessWire\GraphQL\Utils; use function ProcessWire\GraphQL\Test\Assert\assertTypePathNotExists; class EditorCreateNotAvailableFieldEditPermissionTest extends GraphqlTestCase { /** * + For editor. * + The...
Hide video facility contents from non-financial clients
const BinaryPjax = require('../base/binary_pjax'); const Client = require('../base/client'); const localize = require('../base/localize').localize; const defaultRedirectUrl = require('../base/url').defaultRedirectUrl; const getLoginToken = require('../common_functions/common_functions...
const BinaryPjax = require('../base/binary_pjax'); const Client = require('../base/client'); const defaultRedirectUrl = require('../base/url').defaultRedirectUrl; const getLoginToken = require('../common_functions/common_functions').getLoginToken; const DeskWidget = require('../common_f...
Destroy session redis way too.
var CONTEXT_URI = process.env.CONTEXT_URI; exports.requiresSession = function (req, res, next) { if (req.session.encodedUsername) { res.cookie('_eun', req.session.encodedUsername); next(); } else { req.session.redirectUrl = CONTEXT_URI + req.originalUrl; if (req.url.split('?')[1...
var CONTEXT_URI = process.env.CONTEXT_URI; exports.requiresSession = function (req, res, next) { if (req.session.encodedUsername) { res.cookie('_eun', req.session.encodedUsername); next(); } else { req.session.redirectUrl = CONTEXT_URI + req.originalUrl; if (req.url.split('?')[1...
Decrease limit for faster testing
var should = require('should'); var Client = require('../../../client/v1'); var Promise = require('bluebird'); var path = require('path'); var mkdirp = require('mkdirp'); var inquirer = require('inquirer'); var _ = require('underscore'); var fs = require('fs'); describe("`AccountFollowers` class", function() { v...
var should = require('should'); var Client = require('../../../client/v1'); var Promise = require('bluebird'); var path = require('path'); var mkdirp = require('mkdirp'); var inquirer = require('inquirer'); var _ = require('underscore'); var fs = require('fs'); describe("`AccountFollowers` class", function() { v...
Make session cookies have secure and httponly flags by default.
# Copyright 2016 David Tomaschik <david@systemoverlord.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
# Copyright 2016 David Tomaschik <david@systemoverlord.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
Update dm.xmlsec.binding dependency to 1.3.7
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2010-2018 OneLogin, Inc. # MIT License from setuptools import setup setup( name='python-saml', version='2.4.1', description='Onelogin Python Toolkit. Add SAML support to your Python software using this library', classifiers=[ 'De...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2010-2018 OneLogin, Inc. # MIT License from setuptools import setup setup( name='python-saml', version='2.4.1', description='Onelogin Python Toolkit. Add SAML support to your Python software using this library', classifiers=[ 'De...
Disable sleep function when stopping
import threading import queue class Routine(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.queue = queue.Queue() self.manager = None self.no_wait = False self.is_stopping = False self.sleeper = threading.Event() def run(self): ...
import threading import queue class Routine(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.queue = queue.Queue() self.manager = None self.no_wait = False self.is_stopping = False self.sleeper = threading.Event() def run(self): ...
Change URL to our online apidocs server
"use strict"; angular.module("angular-mobile-docs") .factory("MockFetchService", function ($http, $q) { var config = { url: "http://apidocs.angularjs.de/code.angularjs.org/" }; var getVersionList = function (version) { return $http.get(config.url+"versions.json"); ...
"use strict"; angular.module("angular-mobile-docs") .factory("MockFetchService", function ($http, $q) { var config = { url: "http://localhost:8080/assets/code.angularjs.org/" }; var getVersionList = function (version) { return $http.get(config.url+"versions.json");...
Make the extra 'tiff' to be less confusing It matches the new version of the documentation, and is how it is normally spelled. Signed-off-by: Marcus D. Hanwell <cf7042e2e8eee958b5bcde1ae2cbefef82efc184@kitware.com>
from setuptools import setup, find_packages dm3_url = 'git+https://cjh1@bitbucket.org/cjh1/pydm3reader.git' \ '@filelike#egg=dm3_lib-1.2' bottle_url = 'https://github.com/bottlepy/bottle/archive/41ed6965.zip' \ '#egg=bottle-0.13-dev' setup( name='tomviz-acquisition', version='0.0.1', description='...
from setuptools import setup, find_packages dm3_url = 'git+https://cjh1@bitbucket.org/cjh1/pydm3reader.git' \ '@filelike#egg=dm3_lib-1.2' bottle_url = 'https://github.com/bottlepy/bottle/archive/41ed6965.zip' \ '#egg=bottle-0.13-dev' setup( name='tomviz-acquisition', version='0.0.1', description='...
Use persistent test DB (--keepdb can skip migrations) By default test database is in-memory (':memory:'), i.e. not saved on disk, making it impossible to skip migrations to quickly re-run tests with '--keepdb' argument.
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # """ Extra Django settings for test environment of pdc project. """ from settings import * # Database settings DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'te...
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # """ Extra Django settings for test environment of pdc project. """ from settings import * # Database settings DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'te...
Fix challengeTypes object incorrect key names
window.common = (function({ common = { init: [] } }) { common.init.push(function($) { $('#report-issue').on('click', function() { var textMessage = [ 'Challenge [', (common.challengeName || window.location.pathname), '](', window.location.href, ') has an issue.\n', ...
window.common = (function({ common = { init: [] } }) { common.init.push(function($) { $('#report-issue').on('click', function() { var textMessage = [ 'Challenge [', (common.challengeName || window.location.pathname), '](', window.location.href, ') has an issue.\n', ...
Fix passing the search_term parameter to Searcher
""" grep_redone, version 0.9 Search files for a pattern or string, optionally do this recursively. usage: grep_redone [-rnfe] [SEARCH_TERM] Arguments: SEARCH_TERM The string to search for. Options: -h --help Display this page. -r Do a recursive search. -f Display...
""" grep_redone, version 0.9 Search files for a pattern or string, optionally do this recursively. usage: grep_redone [-rnfe] [SEARCH_TERM] Arguments: SEARCH_TERM The string to search for. Options: -h --help Display this page. -r Do a recursive search. -f Display...
Revert "Remove Sf4.2 deprecation on TreeBuilder constructor" This reverts commit 803a5a2bcfa827db60f2bd0b55f144aa896adfb5.
<?php namespace AlterPHP\EasyAdminExtensionBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files. * * To learn more see {@li...
<?php namespace AlterPHP\EasyAdminExtensionBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files. * * To learn more see {@li...
Change libraryTarget to UMD, remove add-module-export plugin
var path = require('path'); var webpack = require('webpack'); module.exports = { regular: { devtool: 'source-map', output: { filename: 'meyda.js', library: 'Meyda', libraryTarget: 'umd' }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, ...
var path = require('path'); var webpack = require('webpack'); module.exports = { regular: { devtool: 'source-map', output: { filename: 'meyda.js', library: 'Meyda', libraryTarget: 'var' }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, ...
Fix tab-complete when having many arenas
package xyz.upperlevel.uppercore.arena.command; import xyz.upperlevel.uppercore.arena.Arena; import xyz.upperlevel.uppercore.arena.ArenaManager; import xyz.upperlevel.uppercore.command.functional.parameter.ParameterHandler; import java.util.Collections; import java.util.stream.Collectors; public final class ArenaPar...
package xyz.upperlevel.uppercore.arena.command; import xyz.upperlevel.uppercore.arena.Arena; import xyz.upperlevel.uppercore.arena.ArenaManager; import xyz.upperlevel.uppercore.command.functional.parameter.ParameterHandler; import xyz.upperlevel.uppercore.command.functional.parameter.ParameterParseException; import j...
Use the "ELLIPSIS"-Character instead of dots
angular.module('truncate', []) .filter('characters', function () { return function (input, chars, breakOnWord) { if (isNaN(chars)) return input; if (chars <= 0) return ''; if (input && input.length >= chars) { input = input.substring(0, chars); ...
angular.module('truncate', []) .filter('characters', function () { return function (input, chars, breakOnWord) { if (isNaN(chars)) return input; if (chars <= 0) return ''; if (input && input.length >= chars) { input = input.substring(0, chars); ...
Fix for /whoami with a user who doesn't have a profile picture && should be ||
<?php /* * This file is part of the TelegramBot package. * * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Longman\TelegramBot\Entities; use Longman\TelegramBot...
<?php /* * This file is part of the TelegramBot package. * * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Longman\TelegramBot\Entities; use Longman\TelegramBot...
Add support for arbitrary user actions on marking
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from functools import wraps from django.db import transaction from django.http import Http404 from django.contrib.flatpages.views import flatpage def render_flatpage(url): def ...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from functools import wraps from django.db import transaction from django.http import Http404 from django.contrib.flatpages.views import flatpage def render_flatpage(url): def ...
Add question desciption for valid parentheses
""" Source : https://oj.leetcode.com/problems/valid-parentheses/ Author : Changxi Wu Date : 2015-01-20 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "...
def isValid( s): if not s: return False stack = [] map = {'(':')', '[':']', '{':'}'} for c in s: if c in map.keys(): stack.append(c) else: if len(stack) > 0: top = stack.pop() if map[top] != c: return F...
Fix an bug into the id generation for a score record.
(function(){ angular .module("movieMash") .factory("scoreService",scoreService); scoreService.$inject=['localStorageService','$firebaseArray','firebaseDataService']; function scoreService(localStorageService,$firebaseArray,firebaseDataService){ var scoresSyncArray = $firebaseArray(firebaseDataService.scor...
(function(){ angular .module("movieMash") .factory("scoreService",scoreService); scoreService.$inject=['localStorageService','$firebaseArray','firebaseDataService']; function scoreService(localStorageService,$firebaseArray,firebaseDataService){ var scoresSyncArray = $firebaseArray(firebaseDataService.scor...
Update docblocks in Service Provider
<?php /** * @author Ben Rowe <ben.rowe.83@gmail.com> * @license http://www.opensource.org/licenses/mit-license.html MIT License */ namespace Benrowe\Laravel\Config; use Illuminate\Support\ServiceProvider; /** * Service Provider for Config * * @package Benrowe\Laravel\Config; */ class ServiceProvider exten...
<?php /** * @author Ben Rowe <ben.rowe.83@gmail.com> * @license http://www.opensource.org/licenses/mit-license.html MIT License */ namespace Benrowe\Laravel\Config; use Illuminate\Support\ServiceProvider; /** * Service Provider for Config * * @package Benrowe\Laravel\Config; */ class ServiceProvider exten...
Test db instead of memory db
from setuptools import setup from distutils.core import Command class TestCommand(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): from django.conf import settings settings.configure( DATABASES...
from setuptools import setup from distutils.core import Command class TestCommand(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): from django.conf import settings settings.configure( DATABASES...
Store references to albums, add new methods.
from BaseIndexEntry import BaseIndexEntry class PerformerIndexEntry(BaseIndexEntry): '''A class to hold index data for performers. Performers have titles and albums. ''' def __init__(self, name, titles, number): super(PerformerIndexEntry, self).__init__(name, titles, number) # Set t...
from BaseIndexEntry import BaseIndexEntry class PerformerIndexEntry(BaseIndexEntry): def __init__(self, name, titles, number): super(PerformerIndexEntry, self).__init__(name, titles, number) # Set the performer number on each of the titles for title in self._titles: title.per...
Switch unit test stubs to sinon-chrome-webextensions.min.js
const reporters = ['mocha', 'coverage'] if (process.env.COVERALLS_REPO_TOKEN) { reporters.push('coveralls') } module.exports = function (config) { config.set({ singleRun: true, browsers: ['Firefox'], frameworks: ['mocha'], reporters, coverageReporter: { dir: 'build/coverage', report...
const reporters = ['mocha', 'coverage'] if (process.env.COVERALLS_REPO_TOKEN) { reporters.push('coveralls') } module.exports = function (config) { config.set({ singleRun: true, browsers: ['Firefox'], frameworks: ['mocha'], reporters, coverageReporter: { dir: 'build/coverage', report...
Add 'name' option to Printer object, to specify the 'printer_name' argument sent to the client.
openerp.printer_proxy = function (instance) { instance.printer_proxy = {}; instance.printer_proxy.Printer = instance.web.Class.extend({ init: function(options){ options = options || {}; this.name = options.name || 'zebra_python_unittest'; this.connection = new insta...
openerp.printer_proxy = function (instance) { instance.printer_proxy = {}; instance.printer_proxy.Printer = instance.web.Class.extend({ init: function(options){ options = options || {}; this.connection = new instance.web.JsonRPC(); this.connection.setup(options.url ...
Fix for zero depth path
import re import logging logger = logging.getLogger("Parsing") def create_node(data): tag_part = r"(?P<tag>\w+)" attr_part = r"(?P<q>\[(?P<attr>\w+)=(\"|\')(?P<val>.+?)(\"|\')\])?" selector_part = r"(\{(?P<selector>\d+)\})?" p = tag_part + attr_part + selector_part patt = re.compile(p) m = p...
import re import logging logger = logging.getLogger("Parsing") def create_node(data): tag_part = r"(?P<tag>\w+)" attr_part = r"(?P<q>\[(?P<attr>\w+)=(\"|\')(?P<val>.+?)(\"|\')\])?" selector_part = r"(\{(?P<selector>\d+)\})?" p = tag_part + attr_part + selector_part patt = re.compile(p) m = p...
Check if the model is empty first in collection relationship
<?php namespace EGALL\Transformer\Relationships; use EGALL\Transformer\Relationship; /** * ModelToCollectionRelationship Class * * @package EGALL\Transformer\Relationships * @author Erik Galloway <erik@mybarnapp.com> */ class ModelToCollectionRelationship extends Relationship { /** * Transform a model...
<?php namespace EGALL\Transformer\Relationships; use EGALL\Transformer\Relationship; /** * ModelToCollectionRelationship Class * * @package EGALL\Transformer\Relationships * @author Erik Galloway <erik@mybarnapp.com> */ class ModelToCollectionRelationship extends Relationship { /** * Transform a model...
Fix bug in OboSerializer` causing `Ontology.dump` to crash
import io from typing import BinaryIO, ClassVar from ._fastobo import FastoboSerializer from .base import BaseSerializer class OboSerializer(FastoboSerializer, BaseSerializer): format = "obo" def dump(self, file): writer = io.TextIOWrapper(file) try: # dump the header ...
import io from typing import BinaryIO, ClassVar from ._fastobo import FastoboSerializer from .base import BaseSerializer class OboSerializer(FastoboSerializer, BaseSerializer): format = "obo" def dump(self, file): writer = io.TextIOWrapper(file) try: # dump the header ...
Throw exception right away if it happen to avoid repeatedly throwing exceptions.
package uk.ac.ebi.ddi.extservices.net; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class FtpUtils { ...
package uk.ac.ebi.ddi.extservices.net; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class FtpUtils { private static final Lo...
Fix a premature import when patching SQLite compatibility. We provide a compatibility patch that fixes certain versions of SQLite with Django prior to 2.1.5. This patch made the assumption that it could import the Django SQLite backend at the module level, since SQLite is built into Python. However, on modern version...
"""Patch to enable SQLite Legacy Alter Table support.""" from __future__ import unicode_literals import sqlite3 import django def needs_patch(): """Return whether the SQLite backend needs patching. It will need patching if using Django 1.11 through 2.1.4 while using SQLite3 v2.26. Returns: ...
"""Patch to enable SQLite Legacy Alter Table support.""" from __future__ import unicode_literals import sqlite3 import django from django.db.backends.sqlite3.base import DatabaseWrapper def needs_patch(): """Return whether the SQLite backend needs patching. It will need patching if using Django 1.11 throu...
Check item.payload.docs is iterable before iterating
'use strict' class DocumentIndex { constructor () { this._index = {} } get (key, fullOp = false) { return fullOp ? this._index[key] : this._index[key] ? this._index[key].payload.value : null } updateIndex (oplog, onProgressCallback) { const reducer = (handled, item, idx) => { ...
'use strict' class DocumentIndex { constructor () { this._index = {} } get (key, fullOp = false) { return fullOp ? this._index[key] : this._index[key] ? this._index[key].payload.value : null } updateIndex (oplog, onProgressCallback) { const reducer = (handled, item, idx) => { ...
Disable pseudo-tty to fix issues with Shipit and Docker
require('dotenv').config(); module.exports = shipit => { shipit.initConfig({ production: { servers: process.env.SHIPIT_PRODUCTION_SERVER, dir: process.env.SHIPIT_PRODUCTION_DIR, }, staging: { servers: process.env.SHIPIT_STAGING_SERVER, dir: pr...
require('dotenv').config(); module.exports = shipit => { shipit.initConfig({ production: { servers: process.env.SHIPIT_PRODUCTION_SERVER, dir: process.env.SHIPIT_PRODUCTION_DIR, }, staging: { servers: process.env.SHIPIT_STAGING_SERVER, dir: pr...
Fix JS error preventing newly created dictionary items from opening automatically (cherry picked from commit 59f90bd08be677817133584fc877f4a53a349359)
/** * @ngdoc controller * @name Umbraco.Editors.Dictionary.CreateController * @function * * @description * The controller for creating dictionary items */ function DictionaryCreateController($scope, $location, dictionaryResource, navigationService, notificationsService, formHelper, appState) { var vm = th...
/** * @ngdoc controller * @name Umbraco.Editors.Dictionary.CreateController * @function * * @description * The controller for creating dictionary items */ function DictionaryCreateController($scope, $location, dictionaryResource, navigationService, notificationsService, formHelper, appState) { var vm = th...
Add comment regarding Google account security
package org.linuxguy.MarketBot; import org.linuxguy.MarketBot.FlowdockNotifier.FlowdockNotificationType; public class MarketBot { public static void main(String[] args) throws InterruptedException { // This can be any valid Google account. For security reasons, I do NOT recommend using the same account ...
package org.linuxguy.MarketBot; import org.linuxguy.MarketBot.FlowdockNotifier.FlowdockNotificationType; public class MarketBot { public static void main(String[] args) throws InterruptedException { String googlePlayUsername = "marketbotuser@gmail.com"; String googlePlayPassword = "foo"; ...
[examples] Add link to jetty ssl example
package javalin.examples; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.util.ssl.SslContextFactory; import javalin.Javalin; import javalin.embeddedserver.EmbeddedServer; import javalin.embeddedserver.jetty.E...
package javalin.examples; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.util.ssl.SslContextFactory; import javalin.Javalin; import javalin.embeddedserver.EmbeddedServer; import javalin.embeddedserver.jetty.E...
Fix future query problems (current users not affected either way) [skip ci]
<?php /** * 2016_06_16_000001_create_users_table.php * Copyright (C) 2016 thegrumpydictator@gmail.com * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ declare(strict_types = 1); use Illuminate\Database\Migrations\Migration; use Illumina...
<?php /** * 2016_06_16_000001_create_users_table.php * Copyright (C) 2016 thegrumpydictator@gmail.com * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ declare(strict_types = 1); use Illuminate\Database\Migrations\Migration; use Illumina...
Disable Good cause pm2 pukes
var hapi = require('hapi'); var moonboots = require('moonboots_hapi'); var config = require('getconfig'); var templatizer = require('templatizer'); //var Good = require('good'); var ElectricFence = require('electricfence'); var server = hapi.createServer(8080, 'localhost'); server.pack.register([ { plugin:...
var hapi = require('hapi'); var moonboots = require('moonboots_hapi'); var config = require('getconfig'); var templatizer = require('templatizer'); var Good = require('good'); var ElectricFence = require('electricfence'); var server = hapi.createServer(8080, 'localhost'); server.pack.register([ { plugin: m...
Replace % with f-string :)
"""Module containing helper functions for using pygame.""" def load_class_assets(calling_object, assets_dict): """Load class assets. Only call if class_assets_loaded is False.""" calling_class = type(calling_object) for attribute_name in assets_dict: setattr(calling_class, attribute_name, assets_dic...
"""Module containing helper functions for using pygame.""" def load_class_assets(calling_object, assets_dict): """Load class assets. Only call if class_assets_loaded is False.""" calling_class = type(calling_object) for attribute_name in assets_dict: setattr(calling_class, attribute_name, assets_dic...
Update form with values altered on the server side.
(function() { angular.module('notely.notes', [ 'ui.router' ]) .config(notesConfig); notesConfig['$inject'] = ['$stateProvider']; function notesConfig($stateProvider) { $stateProvider .state('notes', { url: '/notes', resolve: { notesLoaded: ['NotesService', function(No...
(function() { angular.module('notely.notes', [ 'ui.router' ]) .config(notesConfig); notesConfig['$inject'] = ['$stateProvider']; function notesConfig($stateProvider) { $stateProvider .state('notes', { url: '/notes', resolve: { notesLoaded: ['NotesService', function(No...
Simplify initialiazing a datagram by use source port 0 and letting OS find an available port
package org.graylog2; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException; import java.net.UnknownHostException; import java.util.List; public class GelfSender { private static final int DEFAULT_PORT = 12201; ...
package org.graylog2; import java.io.IOException; import java.net.*; import java.util.List; public class GelfSender { private static final int DEFAULT_PORT = 12201; private static final int PORT_MIN = 8000; private static final int PORT_MAX = 8888; private InetAddress host; private int port; ...
Update service provider for 5.3.
<?php namespace LaravelColors; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class LaravelColorsServiceProvider extends ServiceProvider { /** * Register any other events for your application. */ ...
<?php namespace LaravelColors; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class LaravelColorsServiceProvider extends ServiceProvider { /** * Register any other events for your application. * ...
Remove imgur api and path
//Import modules var AWS = require('aws-sdk'); var util = require('util'); var fs = require('fs'); //Create S3 client var s3 = new AWS.S3(); //Create event handler for S3 exports.handler = function(event, context) { console.log("Reading options from event:\n", util.inspect(event, {depth: 5})); for (i = ...
//Import modules var AWS = require('aws-sdk'); var util = require('util'); var imgur = require('imgur-node-api'); var path = require('path'); //Create S3 client var s3 = new AWS.S3(); //Create event handler for S3 exports.handler = function(event, context) { console.log("Reading options from event:\n", util.insp...
Add 'beta' statement in brand
<!-- Navigation --> <nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav"> <div class="container"> <a class="navbar-brand js-scroll-trigger" href="#page-top">Gilles Henrard <small class="text-primary">beta</small></a> <button class="navbar-toggler navbar-toggler-right" type="bu...
<!-- Navigation --> <nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav"> <div class="container"> <a class="navbar-brand js-scroll-trigger" href="#page-top">Gilles Henrard</a> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-t...
Reset Pager index when searching Signed-off-by: Gerco van Heerdt <43740ea33a86c60a8dadd26e55cb69b32c6ef141@gmail.com>
<?php import_lib('interactive/Form'); class Search { private $index; private $form; private $pager; function __construct($redirect = true, $pager = null) { global $s; $this->index = find_index('search'); $this->form = new Form('search', isset($pager) && $pager->drawable() ? 'l...
<?php import_lib('interactive/Form'); class Search { private $index; private $form; private $pager; function __construct($redirect = true, $pager = null) { global $s; $this->index = find_index('search'); $this->form = new Form('search', isset($pager) && $pager->drawable() ? 'l...
Fix test helper once and for all
import github3 from .helper import IntegrationHelper def find(func, iterable): return next(iter(filter(func, iterable))) class TestDeployment(IntegrationHelper): def test_create_status(self): """ Test that using a Deployment instance, a user can create a status. """ self.bas...
import github3 from .helper import IntegrationHelper def find(func, iterable): return next(filter(func, iterable)) class TestDeployment(IntegrationHelper): def test_create_status(self): """ Test that using a Deployment instance, a user can create a status. """ self.basic_log...
Use `latest` tag for release
var gulp = require('gulp'); var gulpBabel = require('gulp-babel'); var eslint = require('gulp-eslint'); var mocha = require('gulp-mocha'); var ll = require('gulp-ll'); var publish = require('publish-please'); var del = require('del'); ll.tasks('lint'); gulp.task('clean', function (cb) { ...
var gulp = require('gulp'); var gulpBabel = require('gulp-babel'); var eslint = require('gulp-eslint'); var mocha = require('gulp-mocha'); var ll = require('gulp-ll'); var publish = require('publish-please'); var del = require('del'); ll.tasks('lint'); gulp.task('clean', function (cb) { ...
Fix pause for per vertex lighting sample
(function() { var width, height; width = height = 600; window.samples.per_vertex_lighting = { initialize: function(canvas) { var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera( 75, width / height, 1, 1000 ); camera.position.z = 100; var geometry = new THREE.Sp...
(function() { var width, height; width = height = 600; window.samples.per_vertex_lighting = { initialize: function(canvas) { var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera( 75, width / height, 1, 1000 ); camera.position.z = 100; var geometry = new THREE.Sp...
Fix injected local 'arguments' not working in list comprehension in bind.
# python 3 support import six if six.PY3: basestring = str long = int xrange = range unicode = str class FunctionPrototype: def toString(): if not this.is_callable(): raise TypeError('toString is not generic!') args = ', '.join(this.code.__code__.co_varnames[:this.argco...
# python 3 support import six if six.PY3: basestring = str long = int xrange = range unicode = str # todo fix apply and bind class FunctionPrototype: def toString(): if not this.is_callable(): raise TypeError('toString is not generic!') args = ', '.join(this.code.__cod...
Adjust the browser definition to the ones that actually work
module.exports = config => { const customLaunchers = { 'SL Chrome 26': { base: 'SauceLabs', browserName: 'chrome', platform: 'Linux', version: '26.0', }, 'SL Edge 13': { base: 'SauceLabs', browserName: 'MicrosoftEdge', platform: 'Windows 10', version: '13.10...
module.exports = config => { const customLaunchers = { 'SL Chrome 26': { base: 'SauceLabs', browserName: 'chrome', version: '26' }, 'SL Edge 13': { base: 'SauceLabs', browserName: 'microsoftedge', version: '13' }, 'SL Firefox 4': { base: 'SauceLabs', ...
Use debuglog for test client
'use strict'; // This is a client that produces load on hodor-net-server. process.title = 'nodejs hodor client'; var net = require('net'); var debuglog = require('debuglog'); var log = debuglog('hodor-net-client'); var BACKOFF = 1000; function next() { var connected = false; var finished = false; var d...
'use strict'; // This is a client that produces load on hodor-net-server. process.title = 'nodejs hodor client'; var net = require('net'); var BACKOFF = 1000; function next() { var connected = false; var finished = false; var data = ""; var client = net.connect(+process.env.HODOR_PORT, 'localhost'...
Move to test version for pypi-test
"""Setup for pyexperiment """ from __future__ import print_function # from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import import os from setuptools import setup try: from pypandoc import convert read_md = lambda fname: convert(fname, 'rst') except Imp...
"""Setup for pyexperiment """ from __future__ import print_function # from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import import os from setuptools import setup try: from pypandoc import convert read_md = lambda fname: convert(fname, 'rst') except Imp...
Fix a bug of TsDescriptorEmergencyInformation
"use strict"; const TsReader = require("../reader"); const TsDescriptorBase = require("./base"); class TsDescriptorEmergencyInformation extends TsDescriptorBase { constructor(buffer) { super(buffer); } decode() { const reader = new TsReader(this._buffer); const objDescriptor = {};...
"use strict"; const TsReader = require("../reader"); const TsDescriptorBase = require("./base"); class TsDescriptorEmergencyInformation extends TsDescriptorBase { constructor(buffer) { super(buffer); } decode() { const reader = new TsReader(this._buffer); const objDescriptor = {};...
Set exception code to status of HTTP response
<?php namespace Doctrine\CouchDB\HTTP; /** * Base exception class for package Doctrine\ODM\CouchDB\HTTP * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.com * @since 1.0 * @author Kore Nordmann <kore@arbitracker.org> */ class HTTPException...
<?php namespace Doctrine\CouchDB\HTTP; /** * Base exception class for package Doctrine\ODM\CouchDB\HTTP * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.com * @since 1.0 * @author Kore Nordmann <kore@arbitracker.org> */ class HTTPException...
Simplify invalid decode warning text The string is already displayed in the error text, so there's no reason to duplicate it.
from __future__ import unicode_literals import base32_crockford import logging from django.db.models import F from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 from django.utils.timezone import now from .models import ShortURL from .m...
from __future__ import unicode_literals import base32_crockford import logging from django.db.models import F from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 from django.utils.timezone import now from .models import ShortURL from .m...
Change to 'newNotification', change to post
Vue.component('spark-kiosk-notify', { props: [ ], data() { return { 'notifications': [], 'users': [], 'newNotification': { "user_id": null } }; }, ready(){ this.getNotifications(); this.getUsers(); },...
Vue.component('spark-kiosk-notify', { props: [ ], data() { return { 'notifications': [], 'users': [], 'newNotification': { "user_id": null } }; }, ready(){ this.getNotifications(); this.getUsers(); },...
Fix Django 1.7 migration support
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models, migrations, connection import django.db.models.deletion is_index = connection.vendor != 'mysql' if 'django.contrib.comments' in settings.INSTALLED_APPS: BASE_APP = 'comments' else: B...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations, connection import django.db.models.deletion is_index = connection.vendor != 'mysql' class Migration(migrations.Migration): dependencies = [ ('django_comments', '__first__'), ] operations =...
Fix a small bug - %d => %s Summary: easy peasy. noticed it trying to fix an image. Test Plan: can fix image by phid once more! Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D6659
<?php abstract class PhabricatorFilesManagementWorkflow extends PhutilArgumentWorkflow { public function isExecutable() { return true; } protected function buildIterator(PhutilArgumentParser $args) { if ($args->getArg('all')) { if ($args->getArg('names')) { throw new PhutilArgumentUsage...
<?php abstract class PhabricatorFilesManagementWorkflow extends PhutilArgumentWorkflow { public function isExecutable() { return true; } protected function buildIterator(PhutilArgumentParser $args) { if ($args->getArg('all')) { if ($args->getArg('names')) { throw new PhutilArgumentUsage...
fix: Test with Mockery class is compatible with PHP 5.4
<?php namespace Granam\Tests\Tools; abstract class TestWithMockery extends \PHPUnit_Framework_TestCase { protected function tearDown() { \Mockery::close(); } /** * @param string $className * @return \Mockery\MockInterface */ protected function mockery($className) { ...
<?php namespace Granam\Tests\Tools; abstract class TestWithMockery extends \PHPUnit_Framework_TestCase { protected function tearDown() { \Mockery::close(); } /** * @param string $className * @return \Mockery\MockInterface */ protected function mockery($className) { ...
Fix bug in IE8 undefined returns as object
define([ ], function () { /** * @exports is-defined * * Helper which checks whether a variable is defined or not. * * @param {*} check The variable to check that is defined * @param {String} type The type your expecting the variable to be defined as. * * @retu...
define([ ], function () { /** * @exports is-defined * * Helper which checks whether a variable is defined or not. * * @param {*} check The variable to check that is defined * @param {String} type The type your expecting the variable to be defined as. * * @retu...
Upgrade certifi 2015.11.20.1 => 2016.2.28
import sys from setuptools import find_packages, setup with open('VERSION') as version_fp: VERSION = version_fp.read().strip() install_requires = [ 'django-local-settings>=1.0a13', 'stashward', ] if sys.version_info[:2] < (3, 4): install_requires.append('enum34') setup( name='django-arcutils...
import sys from setuptools import find_packages, setup with open('VERSION') as version_fp: VERSION = version_fp.read().strip() install_requires = [ 'django-local-settings>=1.0a13', 'stashward', ] if sys.version_info[:2] < (3, 4): install_requires.append('enum34') setup( name='django-arcutils...
Rhymes: Fix "More at ..." link and move to group "base".
function ddg_spice_rhymes ( api_result ) { "use strict"; var query = DDG.get_query() .replace(/^(what|rhymes?( with| for)?) |\?/gi, ""); if (!api_result.length) { return; } var words = [], count=0; for(var i=0, l = api_result.length; i<l; i++) { var word = api_resul...
function ddg_spice_rhymes ( api_result ) { "use strict"; var query = DDG.get_query() .replace(/^(what|rhymes?( with| for)?) |\?/gi, ""); if (!api_result.length) { return; } var words = [], count=0; for(var i=0, l = api_result.length; i<l; i++) { var word = api_resul...
Fix slack 'invalid attachments' error message
from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func(*args, **kwarg...
from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func(*args, **kwarg...
Remove warning for long messages
import logging logger = logging.getLogger(__name__) def strspn(source, allowed): newchrs = [] for c in source: if c in allowed: newchrs.append(c) return u''.join(newchrs) def check_cell_phone_number(number): cleaned_number = strspn(number, u'+0123456789') if not u'+' in cleane...
import logging logger = logging.getLogger(__name__) def strspn(source, allowed): newchrs = [] for c in source: if c in allowed: newchrs.append(c) return u''.join(newchrs) def check_cell_phone_number(number): cleaned_number = strspn(number, u'+0123456789') if not u'+' in cleane...
Remove link constraint on media display block
<?php namespace OpenOrchestra\MediaAdminBundle\GenerateForm\Strategies; use OpenOrchestra\Backoffice\GenerateForm\Strategies\AbstractBlockStrategy; use OpenOrchestra\ModelInterface\Model\BlockInterface; use Symfony\Component\Form\FormBuilderInterface; use OpenOrchestra\Media\DisplayBlock\Strategies\DisplayMediaStrate...
<?php namespace OpenOrchestra\MediaAdminBundle\GenerateForm\Strategies; use OpenOrchestra\Backoffice\GenerateForm\Strategies\AbstractBlockStrategy; use OpenOrchestra\ModelInterface\Model\BlockInterface; use Symfony\Component\Form\FormBuilderInterface; use OpenOrchestra\Media\DisplayBlock\Strategies\DisplayMediaStrate...
Adjust chrome and chromedriver locations
package com.blackboard.testing.driver; import com.codeborne.selenide.webdriver.WebDriverFactory; import org.openqa.selenium.Proxy; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.DesiredCapabilities...
package com.blackboard.testing.driver; import com.codeborne.selenide.webdriver.WebDriverFactory; import org.openqa.selenium.Proxy; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.DesiredCapabilities...
Change new String() to "".
package com.griddynamics.jagger.dbapi.fetcher; import com.griddynamics.jagger.dbapi.util.ColorCodeGenerator; import com.griddynamics.jagger.dbapi.dto.*; import java.util.*; public abstract class SummaryDbMetricDataFetcher extends DbMetricDataFetcher<MetricDto> { protected PlotDatasetDto generatePlotDatasetDto(M...
package com.griddynamics.jagger.dbapi.fetcher; import com.griddynamics.jagger.dbapi.util.ColorCodeGenerator; import com.griddynamics.jagger.dbapi.dto.*; import java.util.*; public abstract class SummaryDbMetricDataFetcher extends DbMetricDataFetcher<MetricDto> { protected PlotDatasetDto generatePlotDatasetDto(M...
Append information to the zlib error
from exporters.pipeline.base_pipeline_item import BasePipelineItem import sys import zlib import six __all__ = ['BaseDecompressor', 'ZLibDecompressor', 'NoDecompressor'] class BaseDecompressor(BasePipelineItem): def decompress(self): raise NotImplementedError() def create_decompressor(): # create z...
from exporters.pipeline.base_pipeline_item import BasePipelineItem import logging import zlib __all__ = ['BaseDecompressor', 'ZLibDecompressor', 'NoDecompressor'] class BaseDecompressor(BasePipelineItem): def decompress(self): raise NotImplementedError() def create_decompressor(): # create zlib dec...
Disable jaeger logging by default
from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed from microcosm.config.types import boolean SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", ...
from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", sample_param=typed(int, 10), sampling_...
Fix syntax error and reuse variable
import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_content(self, image_u...
import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_content(self, image_u...
Add params to instantiate aggregation
const RasterAggregation = require('./raster-aggregation'); const VectorAggregation = require('./vector-aggregation'); const RASTER_AGGREGATION = 'RasterAggregation'; const VECTOR_AGGREGATION = 'VectorAggregation'; module.exports = class AggregationProxy { constructor (mapconfig, { resolution = 256, threshold = 10e...
const RasterAggregation = require('./raster-aggregation'); const VectorAggregation = require('./vector-aggregation'); const RASTER_AGGREGATION = 'RasterAggregation'; const VECTOR_AGGREGATION = 'VectorAggregation'; module.exports = class AggregationProxy { constructor (mapconfig, resolution = 256, threshold = 10e5,...
Fix for automatic tagging, needs to return an empty list instead of null.
//note must be set in gulp .sh config. const ServiceURL = process.env.ASSET_PROCESSING_SERVICE const Endpoints = { imageTagging: ServiceURL + "/image/tags/" } var AssetActions = { getSuggestedTags(mediaObject, callback) { switch(mediaObject.type) { case "image": fetch...
//note must be set in gulp .sh config. const ServiceURL = process.env.ASSET_PROCESSING_SERVICE const Endpoints = { imageTagging: ServiceURL + "/image/tags/" } var AssetActions = { getSuggestedTags(mediaObject, callback) { switch(mediaObject.type) { case "image": fetch...
Exclude data from the deploy for now
'use strict'; module.exports = function compress(grunt) { // Load task grunt.loadNpmTasks('grunt-contrib-compress'); return { 'hmda-edit-check-api': { options: { archive: './dist/hmda-edit-check-api.zip', mode: 'zip', //zip | gzip | deflate | tgz ...
'use strict'; module.exports = function compress(grunt) { // Load task grunt.loadNpmTasks('grunt-contrib-compress'); return { 'hmda-edit-check-api': { options: { archive: './dist/hmda-edit-check-api.zip', mode: 'zip', //zip | gzip | deflate | tgz ...
Replace date format from HH:m to HH:mm
import React, { Component, PropTypes as PT } from "react" import { ListView, Text, View, Image, TouchableOpacity } from "react-native" import moment from "moment" import myTheme from '../../themes/base-theme' import styles ...
import React, { Component, PropTypes as PT } from "react" import { ListView, Text, View, Image, TouchableOpacity } from "react-native" import myTheme from '../../themes/base-theme' import styles from "./style" cl...
Add color method to button item
import Item from './item'; export default class ButtonItem extends Item { constructor() { super(); this._root .classed('button', true) .styles({ 'background': '#FFF', 'cursor': 'pointer', 'height': '3em', 'justify-content': 'center', 'padding': '0.5em 0' ...
import Item from './item'; export default class ButtonItem extends Item { constructor() { super(); this._root .classed('button', true) .styles({ 'background': '#FFF', 'cursor': 'pointer', 'height': '3em', 'justify-content': 'center', 'padding': '0.5em 0' ...
Make it easier for external apps to use oauth javascript
girder.views.oauth_LoginView = girder.View.extend({ events: { 'click .g-oauth-button': function (event) { var provider = $(event.currentTarget).attr('g-provider'); window.location = this.providers[provider]; } }, initialize: function (settings) { var redirect...
girder.views.oauth_LoginView = girder.View.extend({ events: { 'click .g-oauth-button': function (event) { var provider = $(event.currentTarget).attr('g-provider'); window.location = this.providers[provider]; } }, initialize: function () { var redirect = girde...
Update conversation repository: get a conversation by recipient only (not by its author)
<?php namespace FD\PrivateMessageBundle\Repository; use Doctrine\ORM\EntityRepository; use Symfony\Component\Security\Core\User\UserInterface; /** * ConversationRepository */ class ConversationRepository extends EntityRepository { /** * Get all conversations of a user being involved in as recipient or aut...
<?php namespace FD\PrivateMessageBundle\Repository; use Doctrine\ORM\EntityRepository; use Symfony\Component\Security\Core\User\UserInterface; /** * ConversationRepository */ class ConversationRepository extends EntityRepository { /** * Get all conversations of a user being involved in as recipient or aut...
Allow ValueError as a notify exception
from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError, ValueError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): self.i...
from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): self.icon = icon ...
Hide the label settings for Panels since they have a title field.
export default [ { key: 'label', hidden: true, calculateValue: 'value = data.title' }, { weight: 1, type: 'textfield', input: true, placeholder: 'Panel Title', label: 'Title', key: 'title', tooltip: 'The title text that appears in the header of this panel.' }, { wei...
export default [ { weight: 10, type: 'textfield', input: true, placeholder: 'Panel Title', label: 'Title', key: 'title', tooltip: 'The title text that appears in the header of this panel.' }, { weight: 20, type: 'textarea', input: true, key: 'tooltip', label: 'Toolt...
Remove unnecessary call to angular.extend.
(function (root, factory) { if (typeof define === 'function' && define.amd) { define(['exports', 'angular'], factory); } else if (typeof exports === 'object') { factory(exports, require('angular')); } else { factory((root.commonJsStrict = {}), root.angular); } }(this, function (...
(function (root, factory) { if (typeof define === 'function' && define.amd) { define(['exports', 'angular'], factory); } else if (typeof exports === 'object') { factory(exports, require('angular')); } else { factory((root.commonJsStrict = {}), root.angular); } }(this, function (...
Simplify tests for custom tokens via IAM
<?php declare(strict_types=1); namespace Kreait\Firebase\Tests\Integration\Auth; use Kreait\Firebase\Auth\CustomTokenViaGoogleIam; use Kreait\Firebase\Exception\AuthException; use Kreait\Firebase\Tests\IntegrationTestCase; use PHPUnit\Framework\AssertionFailedError; use Throwable; /** * @internal */ class CustomT...
<?php declare(strict_types=1); namespace Kreait\Firebase\Tests\Integration\Auth; use Kreait\Firebase\Auth; use Kreait\Firebase\Auth\CustomTokenViaGoogleIam; use Kreait\Firebase\Tests\IntegrationTestCase; use Kreait\Firebase\Util\JSON; /** * @internal */ class CustomTokenViaGoogleIamTest extends IntegrationTestCas...
Fix not found page returning wrong status code
import express from 'express'; import React from 'react'; import { renderToString } from 'react-dom/server' import { RouterContext , match } from 'react-router'; import appRoutes from './shared/routes' const app = express(); app.use((req, res) => { let initialComponentHtml, isNotFoundPage = false; match({ rou...
import express from 'express'; import React from 'react'; import { renderToString } from 'react-dom/server' import { RouterContext , match } from 'react-router'; import appRoutes from './shared/routes' const app = express(); app.use((req, res) => { let initialComponentHtml, isNotFoundPage = false; match({ rou...
Remove leftover from deleted examples
from nose.tools import * from openpassword import EncryptionKey from openpassword import Keychain from openpassword.exceptions import InvalidPasswordException import fudge class KeychainSpec: def it_unlocks_the_keychain_with_the_right_password(self): EncryptionKey = fudge.Fake('encryption_key') ...
from nose.tools import * from openpassword import EncryptionKey from openpassword import Keychain from openpassword.exceptions import InvalidPasswordException import fudge import time class KeychainSpec: def it_unlocks_the_keychain_with_the_right_password(self): EncryptionKey = fudge.Fake('encryption_ke...
Fix source map file property
"use strict"; var gutil = require("gulp-util"); var through = require("through2"); var ngAnnotate = require("ng-annotate"); var applySourceMap = require("vinyl-sourcemaps-apply"); var merge = require("merge"); module.exports = function (options) { options = options || {add: true}; return through.obj(function (fi...
"use strict"; var gutil = require("gulp-util"); var through = require("through2"); var ngAnnotate = require("ng-annotate"); var applySourceMap = require("vinyl-sourcemaps-apply"); var merge = require("merge"); module.exports = function (options) { options = options || {add: true}; return through.obj(function (fi...
Change log priority to 'debug' when no items are available in a queue
<?php namespace Phive\TaskQueue; use Phive\Queue\Exception\ExceptionInterface; use Phive\Queue\Exception\NoItemException; abstract class AbstractExecutor { protected $context; public function __construct(ExecutionContextInterface $context) { $this->context = $context; } /** * @retu...
<?php namespace Phive\TaskQueue; use Phive\Queue\Exception\ExceptionInterface; abstract class AbstractExecutor { protected $context; public function __construct(ExecutionContextInterface $context) { $this->context = $context; } /** * @return bool True if a task was processed, false...
chore(eslint): Add correct enviroments to eslint config
module.exports = { env: { browser: true, node: true, es6: true, mocha: true, jasmine: true, jquery: true, }, extends: 'eslint:recommended', parserOptions: { sourceType: 'script', impliedStrict: true }, rules: { 'indent': ['e...
module.exports = { env: { browser: true, node: true, es6: true }, extends: 'eslint:recommended', parserOptions: { sourceType: 'module' }, rules: { 'indent': ['error', 4], 'linebreak-style': ['error', 'unix'], 'quotes': ['error', 'single'], ...
Add default value for env var
<?php return [ /* |-------------------------------------------------------------------------- | Third Party Services |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such | as Stripe, Mailgun, ...
<?php return [ /* |-------------------------------------------------------------------------- | Third Party Services |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such | as Stripe, Mailgun, ...
Fix failing update on change test Regression was not ran before last commit. When testing the view standalone the liveUpdate configuration ahd to be set.
/* global jasmine atom beforeEach waitsForPromise waitsFor runs describe it expect */ 'use strict' var PlantumlViewerEditor = require('../lib/plantuml-viewer-editor') var PlantumlViewerView = require('../lib/plantuml-viewer-view') describe('PlantumlViewerView', function () { var editor var view beforeEach(func...
/* global jasmine atom beforeEach waitsForPromise waitsFor runs describe it expect */ 'use strict' var PlantumlViewerEditor = require('../lib/plantuml-viewer-editor') var PlantumlViewerView = require('../lib/plantuml-viewer-view') describe('PlantumlViewerView', function () { var editor var view beforeEach(func...
Fix issue with unknown "this"
define([ 'urlutils', '../../components/vue/dist/vue.min' ], function (urlutils, Vue) { 'use strict'; /* Create application_list ViewModel (will next be wrapped in a main ViewModel which will contain the applicationListView and the applicationView) */ var ApplicationListView = Vue.extend({ ...
define([ 'urlutils', '../../components/vue/dist/vue.min' ], function (urlutils, Vue) { 'use strict'; /* Create application_list ViewModel (will next be wrapped in a main ViewModel which will contain the applicationListView and the applicationView) */ var ApplicationListView = Vue.extend({ ...
Fix addColorizer and add isColorizer in gS
"use strict"; angular.module('arethusa.core').service('globalSettings', [ 'configurator', 'plugins', function(configurator, plugins) { var self = this; var confKeys = [ "alwaysDeselect", "colorizer" ]; self.defaultConf = { alwaysDeselect: false, colorizer: 'morph' }...
"use strict"; angular.module('arethusa.core').service('globalSettings', [ 'configurator', 'plugins', function(configurator, plugins) { var self = this; // Need to do this lazy to avoid circular dependencies! var lazyState; function state() { if (!lazyState) lazyState = $injector.get('stat...
[StarQuest] Update only the changed Vault service
package com.starquestminecraft.bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.server.ServiceRegisterEvent; import org.bukkit.event.server.ServiceUnregisterEvent; import org.bukkit.plugin.java.JavaPlugin; import net.milkbowl.vault.chat.Chat; import net.milk...
package com.starquestminecraft.bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.server.ServiceRegisterEvent; import org.bukkit.event.server.ServiceUnregisterEvent; import org.bukkit.plugin.java.JavaPlugin; import net.milkbowl.vault.chat.Chat; import net.milk...
Support setLevel() with a stub
// Miscellaneous helpers // // log4js is optional. function getLogger(label) { var log; try { log = require('log4js')().getLogger(scrub_creds(label || 'audit_couchdb')); log.setLevel('info'); } catch(e) { log = { "trace": function() {} , "debug": function() {} , "info" : console.l...
// Miscellaneous helpers // // log4js is optional. function getLogger(label) { var log; try { log = require('log4js')().getLogger(scrub_creds(label || 'audit_couchdb')); log.setLevel('info'); } catch(e) { log = { "trace": function() {} , "debug": function() {} , "info" : console.l...
Add default argument for profile
import argparse import os import re from firefed import Firefed from feature import feature_map, Summary def feature_type(val): try: return feature_map()[val] except KeyError as key: raise argparse.ArgumentTypeError( 'Feature %s not found. Choose from: {%s}' % (key, ', ...
import argparse import os import re from firefed import Firefed from feature import feature_map, Summary def feature_type(val): try: return feature_map()[val] except KeyError as key: raise argparse.ArgumentTypeError( 'Feature %s not found. Choose from: {%s}' % (key, ', ...
Use Config in bind function
<?php namespace Adldap\Laravel; use Adldap\Adldap; use Adldap\Laravel\Exceptions\ConfigurationMissingException; use Illuminate\Support\ServiceProvider; class AdldapServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected ...
<?php namespace Adldap\Laravel; use Adldap\Adldap; use Adldap\Laravel\Exceptions\ConfigurationMissingException; use Illuminate\Support\ServiceProvider; class AdldapServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected ...
Create a financial year to test with
import json from infrastructure.models import FinancialYear from django.test import ( TransactionTestCase, Client, override_settings, ) from . import ( import_data, ) from .resources import ( GeographyResource, MunicipalityProfileResource, MedianGroupResource, RatingCountGroupResource,...
import json from django.test import ( TransactionTestCase, Client, override_settings, ) from . import ( import_data, ) from .resources import ( GeographyResource, MunicipalityProfileResource, MedianGroupResource, RatingCountGroupResource, ) @override_settings( SITE_ID=2, STAT...
Fix environment:delete, don't allow it to delete master.
<?php namespace CommerceGuys\Platform\Cli\Command; use Guzzle\Http\ClientInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Yaml\D...
<?php namespace CommerceGuys\Platform\Cli\Command; use Guzzle\Http\ClientInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Yaml\D...
Add strings and function definitions, attributions.
/* Language: AppleScript Authors: Nathan Grigg <nathan@nathanamy.org> Dr. Drang <drdrang@gmail.com> */ function(hljs) { var STRINGS = [ hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE ]; var TITLE = { className: 'title', begin: hljs.UNDERSCORE_IDENT_RE }; var PARAMS = { className: 'par...
/* Language: AppleScript */ function(hljs) { return { defaultMode: { keywords: { keyword: 'about above after against and around as at back before beginning ' + 'behind below beneath beside between but by considering contain ' + 'contain contains continue copy div does ...