text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Fix status codes of handled responses
from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_anomaly(): ...
from flask import Flask, url_for, Response, json, request class MonitorApp(object): def __init__(self, monitor): self.app = Flask(__name__) self.app.monitor = monitor self.setup() def setup(self): @self.app.route('/anomaly', methods = ['POST']) def api_anomaly(): ...
Use XDG directory for caching
import os from catchy import HttpCacher, xdg_directory_cacher, NoCachingStrategy from .installer import Installer from .sources import PackageSourceFetcher from .providers import CachingPackageProvider from .deployer import PackageDeployer def create(caching): if not caching.enabled: cacher = NoCachingS...
import os from catchy import HttpCacher, DirectoryCacher, NoCachingStrategy from .installer import Installer from .sources import PackageSourceFetcher from .providers import CachingPackageProvider from .deployer import PackageDeployer def create(caching): if not caching.enabled: cacher = NoCachingStrate...
Change Default Setting For User_Id_Type According to the default setting in Laravel
<?php return [ /* |-------------------------------------------------------------------------- | Users Model |-------------------------------------------------------------------------- | | We need to know which model are you using to authenticate your users, | so we can run the autoriza...
<?php return [ /* |-------------------------------------------------------------------------- | Users Model |-------------------------------------------------------------------------- | | We need to know which model are you using to authenticate your users, | so we can run the autoriza...
Increment rc version to rc3
from setuptools import setup from setuptools import find_packages from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #im...
from setuptools import setup from setuptools import find_packages from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #im...
Use hash_equals for constant-time string comparison
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ...
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ...
Change laravel 5 to Suyabay Reloaded
<!DOCTYPE html> <html> <head> <title>Laravel</title> <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> <style> html, body { height: 100%; } body { margin: 0; p...
<!DOCTYPE html> <html> <head> <title>Laravel</title> <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> <style> html, body { height: 100%; } body { margin: 0; p...
Fix version is not removed correctly When executed by ./gradlew bootRun, it works, but when executed by java -jar, it doesn't work because of duplicate separator(/).
package com.example.spring.config; import lombok.extern.slf4j.Slf4j; import org.springframework.web.servlet.resource.VersionPathStrategy; @Slf4j public class MiddleVersionPathStrategy implements VersionPathStrategy { private final String prefix; private final String version; public MiddleVersionPathStrat...
package com.example.spring.config; import lombok.extern.slf4j.Slf4j; import org.springframework.web.servlet.resource.VersionPathStrategy; @Slf4j public class MiddleVersionPathStrategy implements VersionPathStrategy { private final String prefix; private final String version; public MiddleVersionPathStrat...
Exit as soon as KeyboardInterrupt catched
# coding: utf-8 import sys import errno import logging from .base import Gor from tornado import gen, ioloop, queues import contextlib from tornado.stack_context import StackContext @contextlib.contextmanager def die_on_error(): try: yield except Exception: logging.error("exception in asyn...
# coding: utf-8 import os, sys from .base import Gor from tornado import gen, ioloop, queues class TornadoGor(Gor): def __init__(self, *args, **kwargs): super(TornadoGor, self).__init__(*args, **kwargs) self.q = queues.Queue() self.concurrency = kwargs.get('concurrency', 2) @gen.c...
Add class method to check if PC is a Mac
import platform class OSXDodger(object): allowed_version = "10.12.1" def __init__(self, applications_dir): self.app_dir = applications_dir def load_applications(self): """ Read all applications in the `/Applications/` dir """ self.pc_is_macintosh() def select...
import platform class OSXDodger(object): allowed_version = "10.12.1" def __init__(self, applications_dir): self.app_dir = applications_dir def load_applications(self): """ Read all applications in the `/Applications/` dir """ pass def select_applications(self...
Fix classname for filter list
var React = require('react'); var classNames = require('classnames'); var FilterItem = React.createClass({ propTypes: { selected: React.PropTypes.bool, href: React.PropTypes.string, className: React.PropTypes.string, count: React.PropTypes.number, onClick: React....
var React = require('react'); var classNames = require('classnames'); var FilterItem = React.createClass({ propTypes: { selected: React.PropTypes.bool, href: React.PropTypes.string, className: React.PropTypes.string, count: React.PropTypes.number, onClick: React....
Fix :bug: with assets watch deletion.
import collections import os import re import time def watch(folders, on_change, pattern=None, sleep_time=0.1): pattern = re.compile(pattern) if pattern else None watched = collections.defaultdict(lambda: -1) def walk(): walked = [] for folder in folders: for current, _, files...
import collections import os import re import time def watch(folders, on_change, pattern=None, sleep_time=0.1): pattern = re.compile(pattern) if pattern else None watched = collections.defaultdict(lambda: -1) def walk(): walked = [] for folder in folders: for current, _, files...
Remove the Membership special case. We want everything correlated.
# -*- coding: utf-8 -*- from datetime import date from django.contrib.contenttypes.models import ContentType from django.db import models class CorrelationManager(models.Manager): def update_or_create(self, instance, timestamp, attribute): ctype = ContentType.objects.get_for_model(instance.sender) ...
# -*- coding: utf-8 -*- from datetime import date from django.contrib.contenttypes.models import ContentType from django.db import models class CorrelationManager(models.Manager): def update_or_create(self, instance, timestamp, attribute): # Membership is a special case. Since most groups are static ...
Correct type hinting for $input_headers.
<?php namespace Meng\Soap; class Interpreter { private $soap; private $lastFunction; private $lastArguments; public function __construct($wsdl, array $options = []) { $this->soap = new Soap($wsdl, $options); } /** * Interpret SOAP method and arguments to a request envelope. ...
<?php namespace Meng\Soap; class Interpreter { private $soap; private $lastFunction; private $lastArguments; public function __construct($wsdl, array $options = []) { $this->soap = new Soap($wsdl, $options); } /** * Interpret SOAP method and arguments to a request envelope. ...
Allow null as defining class. git-svn-id: fe6d842192ccfb78748eb71580d1ce65f168b559@1736 9830eeb5-ddf4-0310-9ef7-f4b9a3e3227e
/* * Copyright (C) 2008, 2010 XStream Committers. * All rights reserved. * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * * Created on 13. October 2008 by Joerg Schaible */ package com....
/* * Copyright (C) 2008 XStream Committers. * All rights reserved. * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * * Created on 13. October 2008 by Joerg Schaible */ package com.though...
Fix error when tiles aren't selected
(() => { const tools = []; DTile.Tool = class DTileTool { static register() { tools.push(new this()); } static get allTools() { return tools; } static get store() { return DTile.store; } static get state() { return DTileTool.store.getState(); } get...
(() => { const tools = []; DTile.Tool = class DTileTool { static register() { tools.push(new this()); } static get allTools() { return tools; } static get store() { return DTile.store; } static get state() { return DTileTool.store.getState(); } get...
Move the CURRENT_USER_STORAGE_KEY constant to SessionManager
'use strict'; var React = require('react-native'); var Constants = require('./constants'); var { AsyncStorage } = React; const CURRENT_USER_STORAGE_KEY = 'currentUser'; var SessionManager = { login: function(user) { return new Promise(function(resolve, reject) { var url = Constants.APP_SERVER_HOST + '/u...
'use strict'; var React = require('react-native'); var Constants = require('./constants'); var { AsyncStorage } = React; var SessionManager = { login: function(user) { return new Promise(function(resolve, reject) { var url = Constants.APP_SERVER_HOST + '/users/register'; fetch(url, { method...
Add log info in webpack to troubleshoot Travis issue
// Karma configuration module.exports = function karmaConfig(config) { config.set({ client: { captureConsole: true }, frameworks: ['mocha'], files: [ './test/*/**.js' ], // Preprocess matching files before serving them to the browser // Available preprocessors: https...
// Karma configuration module.exports = function karmaConfig(config) { config.set({ client: { captureConsole: true }, frameworks: ['mocha'], files: [ './test/*/**.js' ], // Preprocess matching files before serving them to the browser // Available preprocessors: https...
Add slug transform from name.
"use strict"; const _ = require('lodash'), xss = require('xss'), router = require('koa-router')(), auth = require('../auth/auth.service'), params = require('../lib/params'), Term = require('../model/term.model'); _.map([ { path: '/categories', type: 'category' }, { path: '/tags', type:...
"use strict"; const _ = require('lodash'), xss = require('xss'), router = require('koa-router')(), auth = require('../auth/auth.service'), params = require('../lib/params'), Term = require('../model/term.model'); _.map([ { path: '/categories', type: 'category' }, { path: '/tags', type:...
Update Tapastic plugin for 1.7.9 compatibility
<?php class Af_Tapastic extends Plugin { function about() { return array(0.1, "Fetch image from comics hosted at tapastic.com", "Markus Wiik"); } function init($host) { $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); } function hook_article_filter($article) { $owner_ui...
<?php class Af_Tapastic extends Plugin { function about() { return array(0.1, "Fetch image from comics hosted at tapastic.com", "Markus Wiik"); } function init($host) { $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); } function hook_article_filter($article) { $owner_ui...
Define class with `class`, not `def` I don't make calsses much, can you tell?
from __future__ import print_function from twisted.internet import reactor, protocol, threads, defer from twisted.protocols.basic import LineReceiver from nethud.proto.client import NethackFactory class TelnetConnection(LineReceiver): def __init__(self, users): self.users = users self.uname = ''...
from __future__ import print_function from twisted.internet import reactor, protocol, threads, defer from twisted.protocols.basic import LineReceiver from nethud.proto.client import NethackFactory class TelnetConnection(LineReceiver): def __init__(self, users): self.users = users self.uname = ''...
Fix install_requires to limit Django version <2.0.
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-djaken', version='2.0.1', ...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-djaken', version='2.0.1', ...
Fix month in list name.
angular.module('shoppingList').controller( 'ShoppingListController', ['$scope', '$window', function($scope, $window) { 'use strict'; var blankItem = { name: '', category: '', quantity: '', unit: '', notes: '' }; $scope.categories = [ 'Baking', 'Beverages', ...
angular.module('shoppingList').controller( 'ShoppingListController', ['$scope', '$window', function($scope, $window) { 'use strict'; var blankItem = { name: '', category: '', quantity: '', unit: '', notes: '' }; $scope.categories = [ 'Baking', 'Beverages', ...
Change default zoom level to 8.
var app = angular.module('am'); app.directive('googleMap', ['$timeout', function($timeout) { return { scope: { 'center': '=' }, controller: function() { this.map = undefined; }, compile: function(el, attrs) { return { pre: function(scope, el, attrs, ctrl) { v...
var app = angular.module('am'); app.directive('googleMap', ['$timeout', function($timeout) { return { scope: { 'center': '=' }, controller: function() { this.map = undefined; }, compile: function(el, attrs) { return { pre: function(scope, el, attrs, ctrl) { v...
Introduce new Detections stream type
package stroom.data.store.impl.fs; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.Map; class StreamTypeExtensions { private static final Logger LOGGER = LoggerFactory.getLogger(StreamTypeExtensions.class); private static final Map<String, String> EXTENSION...
package stroom.data.store.impl.fs; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.Map; class StreamTypeExtensions { private static final Logger LOGGER = LoggerFactory.getLogger(StreamTypeExtensions.class); private static final Map<String, String> EXTENSION...
Make stream redirection py3 compatible. Ensure flask reloader is off inside notebook
import inspect import socket import sys from io import BytesIO, StringIO from threading import currentThread, Thread from IPython.core.display import HTML, display from werkzeug.local import LocalProxy from werkzeug.serving import ThreadingMixIn from birdseye import eye, PY2 from birdseye.server import app fake_stre...
import inspect import socket import sys from io import BytesIO from threading import currentThread, Thread from IPython.core.display import HTML, display from werkzeug.local import LocalProxy from werkzeug.serving import ThreadingMixIn from birdseye import server, eye thread_proxies = {} def stream_proxy(original)...
Fix header nav selected key issue
import React from 'react' import PropTypes from 'prop-types' import { Menu, Icon, Popover } from 'antd' import { Link } from 'dva/router' import uri from 'utils/uri' import { l } from 'utils/localization' import styles from './Header.less' import { classnames } from 'utils' function createMenu(items, handleClick, mode...
import React from 'react' import PropTypes from 'prop-types' import { Menu, Icon, Popover } from 'antd' import { Link } from 'dva/router' import uri from 'utils/uri' import { l } from 'utils/localization' import styles from './Header.less' import { classnames } from 'utils' function createMenu(items, handleClick, mode...
Include "filecache" and "alembicarchive" selection.
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- ## Description """ Define file for Cache Manager Tool. """ #------------------------------------------------------------------------------- # Define Cache Nodes to deal with this script CACHE_NODES = [ "file", ...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- ## Description """ Define file for Cache Manager Tool. """ #------------------------------------------------------------------------------- # Define Cache Nodes to deal with this script CACHE_NODES = [ "file", ...
Improve method name for search input change
import { updateQuery, fetchQuery, addSearch, isSearching } from '../actions'; import { search } from '../actions/SearchAPI'; import Icon from './Icon'; export default class SearchForm extends React.Component { constructor() { super() this._debouncedSearch = _.debounce(this._debouncedSearch, 300) } rende...
import { updateQuery, fetchQuery, addSearch, isSearching } from '../actions'; import { search } from '../actions/SearchAPI'; import Icon from './Icon'; export default class SearchForm extends React.Component { constructor() { super() this._debouncedSearch = _.debounce(this._debouncedSearch, 300) } rende...
Change encoding of URL parser
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible...
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible...
Fix fetch keys refresh condition
/* * Copyright 2018 Expedia Group * * 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...
/* * Copyright 2018 Expedia Group * * 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...
Change the source map and minimise the source
/* eslint import/no-extraneous-dependencies: 0 */ var webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const path = require('path'); module.exports = { watch: false, devtool: 'cheap-source-map', entry: ['./src/js/L.PM.js'], output: { filename: 'le...
/* eslint import/no-extraneous-dependencies: 0 */ const ExtractTextPlugin = require('extract-text-webpack-plugin'); const path = require('path'); module.exports = { watch: false, devtool: 'cheap-eval-source-map', entry: ['./src/js/L.PM.js'], output: { filename: 'leaflet.pm.min.js', pat...
Return entire corpus from corenlp analysis
#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: proc = None """ When the JSON segments return from the CoreNLP library, they separate the data acquired from eac...
#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: proc = None """ When the JSON segments return from the CoreNLP library, they separate the data acquired from eac...
Add default async filter in split chunks Using all chunks was causing conflict order issues in the css extraction
const os = require('os'); const TerserPlugin = require('terser-webpack-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); /** * parallel doesn't work yet for WSL (GNU/Linux on Windows) * cf https://github.com/webpack-contrib/terser-webpack-plugin/issues/21 * https://github.com/webpack-con...
const os = require('os'); const TerserPlugin = require('terser-webpack-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); /** * parallel doesn't work yet for WSL (GNU/Linux on Windows) * cf https://github.com/webpack-contrib/terser-webpack-plugin/issues/21 * https://github.com/webpack-con...
Fix typo in dependency name
var webpack = require('webpack'); const path = require('path'); module.exports = { entry: './js/index.js', output: { filename: 'index.js', path: path.resolve(__dirname, 'bundle') }, resolve: { alias: { 'css': path.resolve(__dirname, 'css/'), 'bootstrap': ...
var webpack = require('webpack'); const path = require('path'); module.exports = { entry: './js/index.js', output: { filename: 'index.js', path: path.resolve(__dirname, 'bundle') }, resolve: { alias: { 'css': path.resolve(__dirname, 'css/'), 'bootstrap': ...
Replace outdated deprecating comments with a proper doc string.
from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to ...
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
Fix error in template context
'use strict'; var yeoman = require('yeoman-generator'); var chalk = require('chalk'); var yosay = require('yosay'); module.exports = yeoman.Base.extend({ prompting: function () { var done = this.async(); // Have Yeoman greet the user. this.log(yosay( 'Welcome to the flawless ' ...
'use strict'; var yeoman = require('yeoman-generator'); var chalk = require('chalk'); var yosay = require('yosay'); module.exports = yeoman.Base.extend({ prompting: function () { var done = this.async(); // Have Yeoman greet the user. this.log(yosay( 'Welcome to the flawless ' ...
DEICH-329: Fix resetting page parameter when using search filters
import { replace } from 'react-router-redux' export function toggleParameter (queryParamName, inputLocationQuery) { return (dispatch, getState) => { const pathname = getState().routing.locationBeforeTransitions.pathname const locationQuery = inputLocationQuery || { ...getState().routing.locationBeforeTransit...
import { replace } from 'react-router-redux' export function toggleParameter (queryParamName, locationQuery) { return (dispatch, getState) => { const pathname = getState().routing.locationBeforeTransitions.pathname const locationQuery = locationQuery || { ...getState().routing.locationBeforeTransitions.query...
Use bower components from dist subfolder
module.exports = function Gruntfile(grunt) { 'use strict'; require('load-grunt-tasks')(grunt); grunt.initConfig( { babel: { options: { modules: 'system', sourceMap: true }, dist: { files: [ { expand: true, cw...
module.exports = function Gruntfile(grunt) { 'use strict'; require('load-grunt-tasks')(grunt); grunt.initConfig( { babel: { options: { modules: 'system', sourceMap: true }, dist: { files: [ { expand: true, cw...
Support multiple @var tags and also no @var tags at all
<?php namespace BetterReflection\TypesFinder; use PhpParser\Node\Stmt\Property as PropertyNode; use phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\Types\ContextFactory; use BetterReflection\Reflection\ReflectionProperty; class FindPropertyType { /** * Give...
<?php namespace BetterReflection\TypesFinder; use PhpParser\Node\Stmt\Property as PropertyNode; use phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\Types\ContextFactory; use BetterReflection\Reflection\ReflectionProperty; class FindPropertyType { /** * Give...
Improve logic in showing userRoom
const db = require('../db.js'); const Rooms = require('../models/roomModel.js'); const UsersRooms = require('../models/userRoomModel.js'); module.exports = (user1Id, user2Id) => { //user1 is the one trying to start a conversation const queryStr = ` SELECT ur_1.ur1_id FROM ( ...
const db = require('../db.js'); const Rooms = require('../models/roomModel.js'); const UsersRooms = require('../models/userRoomModel.js'); module.exports = (user1Id, user2Id) => { const queryStr = ` SELECT ur_1.ur1_id FROM ( ( SELECT user_id AS user...
Switch date labels to make them human friendly
<table class="table table-condensed table-hover"> <tr> <th>{{ trans('manager.vacancies.table.th.date') }}</th> @foreach ($business->services as $service) <th>{{ $service->name }}</th> @endforeach </tr> @foreach ($dates as $date => $vacancies) <tr> <td title="{{ $d...
<table class="table table-condensed table-hover"> <tr> <th>{{ trans('manager.vacancies.table.th.date') }}</th> @foreach ($business->services as $service) <th>{{ $service->name }}</th> @endforeach </tr> @foreach ($dates as $date => $vacancies) <tr> <td title="{{ Ca...
Increase transition time for slideshow images from 3 seconds to 5 seconds
(function () { 'use strict'; mare.views.Home = Backbone.View.extend({ el: 'body', initialize: function() { // DOM cache any commonly used elements to improve performance this.$featuredPanelOverlay = $( '.panel-overlay' ); // initialize the owl carousel and make an...
(function () { 'use strict'; mare.views.Home = Backbone.View.extend({ el: 'body', initialize: function() { // DOM cache any commonly used elements to improve performance this.$featuredPanelOverlay = $( '.panel-overlay' ); // initialize the owl carousel and make an...
Increment version number for release
<?php namespace Concrete\Package\CommunityStoreStripe; use Package; use Whoops\Exception\ErrorException; use \Concrete\Package\CommunityStore\Src\CommunityStore\Payment\Method as PaymentMethod; defined('C5_EXECUTE') or die(_("Access Denied.")); class Controller extends Package { protected $pkg...
<?php namespace Concrete\Package\CommunityStoreStripe; use Package; use Whoops\Exception\ErrorException; use \Concrete\Package\CommunityStore\Src\CommunityStore\Payment\Method as PaymentMethod; defined('C5_EXECUTE') or die(_("Access Denied.")); class Controller extends Package { protected $pkg...
Add Support for boolean as to string into yaml extension
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Twig\Extension; use Symfony\Component\Yaml\Dumper as Yam...
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Twig\Extension; use Symfony\Component\Yaml\Dumper as Yam...
Update meta. Bump minor version.
from setuptools import setup def readme(): with open('README.rst', encoding='utf-8') as f: return f.read() setup(name='Clashogram', version='0.1.24', description='Clash of Clans war moniting for telegram channels.', long_description=readme(), author='Mehdi Sadeghi', author_...
from setuptools import setup def readme(): with open('README.rst', encoding='utf-8') as f: return f.read() setup(name='Clashogram', version='0.1.23', description='Clash of Clans war moniting for telegram channels.', long_description=readme(), author='Mehdi Sadeghi', author_...
Update config with Boston IDs
angular.module('gdgXBoomerang') .factory('Config', function () { return { // TODO Modify these to configure your app 'name' : 'GDG Boston', 'id' : '104210617698082698436', 'googleApi' : 'AIzaSyBsAbuRRTugYJHNour-If818LLAL0cPNNc', 'pwaId' : '', /...
angular.module('gdgXBoomerang') .factory('Config', function () { return { // TODO Modify these to configure your app 'name' : 'GDG Space Coast', 'id' : '103959793061819610212', 'googleApi' : '<insert your API key here>', 'pwaId' : '591572514070...
QS-1249: Replace history state when clicking on toolbar links
import React, { PropTypes, Component } from 'react'; import connectToStores from '../../utils/connectToStores'; import shouldPureComponentUpdate from '../../../../node_modules/react-pure-render/function'; import LoginStore from '../../stores/LoginStore'; function getState() { const isGuest = LoginStore.isGuest(); ...
import React, { PropTypes, Component } from 'react'; import connectToStores from '../../utils/connectToStores'; import shouldPureComponentUpdate from '../../../../node_modules/react-pure-render/function'; import LoginStore from '../../stores/LoginStore'; function getState() { const isGuest = LoginStore.isGuest(); ...
Resolve scope issues with save function callback
angular.module('ChillaxApp', []) .controller("ChillaxController", function () { var chillax = this; chillax.init = function() { chillax.nextNotification="Chillax loaded!"; chillax.retrieveSettings(); }; chillax.retrieveSettings = function() { var settings = {}; ...
angular.module('ChillaxApp', []) .controller("ChillaxController", function () { var chillax = this; chillax.init = function() { chillax.nextNotification="Chillax loaded!"; chillax.retrieveSettings(); }; chillax.retrieveSettings = function() { var settings = {}; ...
Fix executors for retrofit request and callback
package com.drivemode.spotify.rest; import com.squareup.okhttp.OkHttpClient; import retrofit.RequestInterceptor; import retrofit.RestAdapter; import retrofit.client.OkClient; /** * @author KeishinYokomaku */ public class RestAdapterFactory { public static final String TAG = RestAdapterFactory.class.getSimpleNa...
package com.drivemode.spotify.rest; import com.squareup.okhttp.OkHttpClient; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import retrofit.RequestInterceptor; import retrofit.RestAdapter; import retrofit.client.OkClient; /** * @author KeishinYokomaku */ public class RestAdapterFacto...
Add create method to Todo Api
var $ = require('jquery'); var _ = require('lodash'); var BASE_URL = '/api/todos/'; var TodoApi = { create: function(todo, success, failure) { $.ajax({ url: BASE_URL, type: 'POST', dataType: 'json', data: todo, success: function() { success(); }, error: function...
var $ = require('jquery'); var _ = require('lodash'); var BASE_URL = '/api/todos/'; var TodoApi = { destroy: function(_id, success, failure) { $.ajax({ url: BASE_URL + _id, type: 'DELETE', dataType: 'json', success: function() { success(); }, error: function(xhr, stat...
Use the exit code constant
<?php namespace Padam87\CronBundle\Command; use Doctrine\Common\Annotations\AnnotationReader; use Padam87\CronBundle\Util\Helper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class DumpCommand extends ConfigurationAwareCommand { /** * {@inheritdoc...
<?php namespace Padam87\CronBundle\Command; use Doctrine\Common\Annotations\AnnotationReader; use Padam87\CronBundle\Util\Helper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class DumpCommand extends ConfigurationAwareCommand { /** * {@inheritdoc...
Fix Chrome headless when root on Linux Fix Chrome headless when running as root by adding --no-sandbox.
// Copyright (c) Martin Costello, 2017. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. const puppeteer = require("puppeteer"); process.env.CHROME_BIN = puppeteer.executablePath(); module.exports = function (config) { config.set...
// Copyright (c) Martin Costello, 2017. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. const puppeteer = require("puppeteer"); process.env.CHROME_BIN = puppeteer.executablePath(); module.exports = function (config) { config.set...
Disable torcache for now. Randomize order torrent cache mirrors are added to urls list. git-svn-id: ad91b9aa7ba7638d69f912c9f5d012e3326e9f74@2874 3942dd89-8c5d-46d7-aeed-044bccf3e60c
import logging import re import random from flexget.plugin import register_plugin, priority log = logging.getLogger('torrent_cache') MIRRORS = ['http://torrage.com/torrent/', # Now using a landing page instead of going directly to the torrent # TODO: May be fixable by setting the referer ...
import logging import re from flexget.plugin import register_plugin, priority log = logging.getLogger('torrent_cache') MIRRORS = ['http://torrage.com/torrent/', 'http://torcache.net/torrent/', 'http://zoink.it/torrent/', 'http://torrage.ws/torrent/'] class TorrentCache(object): ...
Change the development status to Beta
import distutils.core import sys from rabbitpy import __version__ tests_require = ['nose', 'mock'] if sys.version_info < (2, 7, 0): tests_require.append('unittest2') desc = 'A minimalistic & pythonic AMQP library focused on supporting RabbitMQ' distutils.core.setup(name='rabbitpy', version=...
import distutils.core import sys from rabbitpy import __version__ tests_require = ['nose', 'mock'] if sys.version_info < (2, 7, 0): tests_require.append('unittest2') desc = 'A minimalistic & pythonic AMQP library focused on supporting RabbitMQ' distutils.core.setup(name='rabbitpy', version=...
Fix some curious issue on SQL Record insertion
'use strict'; module.exports = { up: function(queryInterface, Sequelize) { return queryInterface.createTable('dns_records', { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, type: { type: Sequelize.ENUM('A', 'CNAME...
'use strict'; module.exports = { up: function(queryInterface, Sequelize) { return queryInterface.createTable('dns_records', { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, type: { type: Sequelize.STRING(4), ...
Fix the search class not found
<?php namespace AstritZeqiri\LaravelSearchable\Traits; use AstritZeqiri\LaravelSearchable\Search; use AstritZeqiri\LaravelSearchable\Exceptions\SearchException; trait Searchable { /** * Search on multiple database fields on eloquent models. * * @param Illuminate\Database\Eloquent\Builder $quer...
<?php namespace AstritZeqiri\LaravelSearchable\Traits; use AstritZeqiri\LaravelSearchable\Exceptions\SearchException; trait Searchable { /** * Search on multiple database fields on eloquent models. * * @param Illuminate\Database\Eloquent\Builder $query * @param string $search * @pa...
Add HTML fragment to test sample
# -*- coding: utf-8 -*- from __future__ import unicode_literals import unittest class ToHTMLTest(unittest.TestCase): SAMPLE = ( "Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки.\n\n" "<p>Test of <em>HTML</em>.</p>") def setUp(self): from paka.cmark import to_html ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import unittest class ToHTMLTest(unittest.TestCase): SAMPLE = "Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки." def setUp(self): from paka.cmark import to_html self.func = to_html def check(self, source, expe...
Fix map marker and zoom map in center
/* global google:false */ export function VenueDirective () { 'ngInject'; return { restrict: 'E', templateUrl: 'app/components/venue/venue.html', scope: {}, controller: VenueController, controllerAs: 'vm', bindToController: true }; } class VenueController { constructor () { 'ngInje...
/* global google:false */ export function VenueDirective () { 'ngInject'; return { restrict: 'E', templateUrl: 'app/components/venue/venue.html', scope: {}, controller: VenueController, controllerAs: 'vm', bindToController: true }; } class VenueController { constructor () { 'ngInje...
Add Navbar dropdown menu. Under username there are Settings and Log out
import React from 'react'; import {Link} from 'react-router-dom'; import {NavDropdown} from 'react-bootstrap'; class NavbarUserInfo extends React.Component { constructor(props) { super(props); } logOut() { } render() { if (!this.props.secret) { return ( <ul className="nav navbar-nav na...
import React from 'react'; import {Link} from 'react-router-dom'; class NavbarUserInfo extends React.Component { constructor(props) { super(props); } logOut() { } render() { if (!this.props.secret) { return ( <ul className="nav navbar-nav navbar-right"> <li> <Link...
Send editied file back to phoenix
<?php namespace Rogue\Jobs; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Rogue\Services\Phoenix; use Rogue\Models\Reportback; class SendReportbackToPhoenix extends Job implements ShouldQueue { use InteractsWithQueue, SerializesMod...
<?php namespace Rogue\Jobs; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Rogue\Services\Phoenix; use Rogue\Models\Reportback; class SendReportbackToPhoenix extends Job implements ShouldQueue { use InteractsWithQueue, SerializesMod...
Fix the file extensions for the bundles
const path = require('path'); const webpack = require('webpack'); module.exports = [{ entry: path.join(__dirname, 'src', 'Flatline.ts'), output: { path: path.join(__dirname, 'build'), filename: "flatline-browser.min.js", library: "Flatline", libraryTarget: "var" }, resol...
const path = require('path'); const webpack = require('webpack'); module.exports = [{ entry: path.join(__dirname, 'src', 'Flatline.ts'), output: { path: path.join(__dirname, 'build'), filename: "flatline-browser.js", library: "Flatline", libraryTarget: "var" }, resolve: ...
Fix missing --no-wait option on integration:delete
<?php namespace Platformsh\Cli\Command\Integration; use Platformsh\Cli\Command\PlatformCommand; use Platformsh\Cli\Util\ActivityUtil; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class IntegrationDeleteComm...
<?php namespace Platformsh\Cli\Command\Integration; use Platformsh\Cli\Command\PlatformCommand; use Platformsh\Cli\Util\ActivityUtil; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class IntegrationDeleteComm...
Hide Drag-Drop when no ElementDetails
import React, {Component} from 'react'; import {DragDropContext} from 'react-dnd'; import {Col} from 'react-bootstrap'; import HTML5Backend from 'react-dnd-html5-backend'; import List from './List'; import ElementDetails from './ElementDetails'; import ElementStore from './stores/ElementStore'; class Elements extends...
import React, {Component} from 'react'; import {DragDropContext} from 'react-dnd'; import {Col} from 'react-bootstrap'; import HTML5Backend from 'react-dnd-html5-backend'; import List from './List'; import ElementDetails from './ElementDetails'; import ElementStore from './stores/ElementStore'; class Elements extends...
Remove unnecessary lock on context creation
package com.mudalov.safe.impl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.ReentrantLock; /** * API Entry point, links commands and execution contexts * * User: mudalov * Date: 22/01/15 * Time: 23...
package com.mudalov.safe.impl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.ReentrantLock; /** * API Entry point, links commands and execution contexts * * User: mudalov * Date: 22/01/15 * Time: 23...
Make atom from filename before throwing an error in get_source.
import os import sys from prolog.interpreter.error import throw_existence_error from prolog.interpreter.term import Callable path = os.path.dirname(__file__) path = os.path.join(path, "..", "prolog_modules") def get_source(filename): try: fd = os.open(filename, os.O_RDONLY, 0777) except OSError, e: ...
import os import sys import py from prolog.interpreter.error import throw_existence_error path = os.path.dirname(__file__) path = os.path.join(path, "..", "prolog_modules") def get_source(filename): try: fd = os.open(filename, os.O_RDONLY, 0777) except OSError, e: try: fd = os.open...
Use decorator to patch git repository is not exist
import subprocess from unittest.mock import patch from django.test import TestCase from vcs_info_panel.clients.git import GitClient def without_git_repository(func): def inner(*args, **kwargs): with patch('subprocess.check_output') as _check_output: _check_output.side_effect = subprocess.Call...
import subprocess from unittest.mock import patch from django.test import TestCase from vcs_info_panel.clients.git import GitClient class GitClientTestCase(TestCase): def setUp(self): self.client = GitClient() def _test_called_check_output(self, commands): with patch('subprocess.check_output...
Fix broken spec tests in Laravel Session implementation
<?php namespace spec\Omniphx\Forrest\Providers\Laravel; use Illuminate\Config\Repository as Config; use Illuminate\Contracts\Session\Session as Session; use PhpSpec\ObjectBehavior; use Prophecy\Argument; class LaravelSessionSpec extends ObjectBehavior { public function let(Config $config, Session $session) {...
<?php namespace spec\Omniphx\Forrest\Providers\Laravel; use Illuminate\Config\Repository as Config; use Symfony\Component\HttpFoundation\Session\SessionInterface; use PhpSpec\ObjectBehavior; use Prophecy\Argument; class LaravelSessionSpec extends ObjectBehavior { public function let(Config $config, SessionInterf...
Fix emplorrs demo salary db error
from django import forms from .models import Employee, DeptManager, Title, Salary class ChangeManagerForm(forms.Form): manager = forms.ModelChoiceField(queryset=Employee.objects.all()[:100]) def __init__(self, *args, **kwargs): self.department = kwargs.pop('department') super(ChangeManagerFo...
from datetime import date from django import forms from django.utils import timezone from .models import Employee, DeptManager, Title, Salary class ChangeManagerForm(forms.Form): manager = forms.ModelChoiceField(queryset=Employee.objects.all()[:100]) def __init__(self, *args, **kwargs): self.depart...
Add polib as a dependency.
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup try: from pypandoc import convert long_description = convert('README.md', 'rst') except IOError: print("warning: README.md not found") long_description = "" except ImportError: print("warning: pypandoc module not found, cou...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup try: from pypandoc import convert long_description = convert('README.md', 'rst') except IOError: print("warning: README.md not found") long_description = "" except ImportError: print("warning: pypandoc module not found, cou...
Load external and internal IPs [WAL-542]
const resourceVmsList = { controller: ProjectVirtualMachinesListController, controllerAs: 'ListController', templateUrl: 'views/partials/filtered-list.html', }; export default resourceVmsList; function ProjectVirtualMachinesListController(BaseProjectResourcesTabController, ENV) { var controllerScope = this; ...
const resourceVmsList = { controller: ProjectVirtualMachinesListController, controllerAs: 'ListController', templateUrl: 'views/partials/filtered-list.html', }; export default resourceVmsList; function ProjectVirtualMachinesListController(BaseProjectResourcesTabController, ENV) { var controllerScope = this; ...
Hide actions after key deletion
define('app/views/key_list', [ 'text!app/templates/key_list.html', 'ember' ], /** * * Key list page * * @returns Class */ function(key_list_html) { return Ember.View.extend({ tagName: false, init: function() { this._super(); ...
define('app/views/key_list', [ 'text!app/templates/key_list.html', 'ember' ], /** * * Key list page * * @returns Class */ function(key_list_html) { return Ember.View.extend({ tagName: false, init: function() { this._super(); ...
Add slave option support to the master-slave inputs JS.
$(document).ready(function () { var showSlave = function ($master, showOn) { if ($master.is(':checkbox')) { return (+$master.is(':checked')).toString() === showOn; } var value = $master.val().toString(); if ($master.is('select') && $master.prop('multiple')) { ...
$(document).ready(function () { var showSlave = function ($master, showOn) { if ($master.is(':checkbox')) { return (+$master.is(':checked')).toString() === showOn; } var value = $master.val().toString(); if ($master.is('select') && $master.prop('multiple')) { ...
Create a gulp task to run pipeline once
'use strict'; const gulp = require('gulp'), fs = require('fs'), plumber = require('gulp-plumber'); const options = { source: 'templates', dist: 'dist', workingDir: 'tmp', src: function plumbedSrc() { return gulp.src.apply(gulp, arguments).pipe(plumber()); } }; /** * Load tasks from the '/tasks' di...
'use strict'; const gulp = require('gulp'), fs = require('fs'), plumber = require('gulp-plumber'); const options = { source: 'templates', dist: 'dist', workingDir: 'tmp', src: function plumbedSrc() { return gulp.src.apply(gulp, arguments).pipe(plumber()); } }; /** * Load tasks from the '/tasks' di...
Make getImage non-static, correct default path
<?php /** * @package Mautic * @copyright 2014 Mautic, NP. All rights reserved. * @author Mautic * @link http://mautic.com * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ namespace Mautic\CoreBundle\Templating\Helper; use Mautic\CoreBundle\Factory\MauticFactory; use Mautic\...
<?php /** * @package Mautic * @copyright 2014 Mautic, NP. All rights reserved. * @author Mautic * @link http://mautic.com * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ namespace Mautic\CoreBundle\Templating\Helper; use Mautic\CoreBundle\Factory\MauticFactory; use Mautic\...
Allow project to live in non-root directory.
<?php require_once './vendor/autoload.php'; use Turbine\Application; $config = [ 'baseDirectory' => '/PlexRSSFeed' ]; $app = new Application($config); if (getenv('DEVELOPMENT') === 'true') { $app->getErrorHandler()->pushHandler(new \Whoops\Handler\PrettyPageHandler); $app->setConfig('error', true); } $c...
<?php require_once './vendor/autoload.php'; use Turbine\Application; $config = []; $app = new Application($config); if (getenv('DEVELOPMENT') === 'true') { $app->getErrorHandler()->pushHandler(new \Whoops\Handler\PrettyPageHandler); $app->setConfig('error', true); } $container = $app->getContainer(); $app->...
Fix a JS error in ContactActions
var ContactActions = { getDrawerFingerprints : function(jid) { var store = new ChatOmemoStorage(); store.getLocalRegistrationId().then(deviceId => { ContactActions_ajaxGetDrawerFingerprints(jid, deviceId); }); }, morePictures(button, jid, page) { button.remove(); ...
var ContactActions = { getDrawerFingerprints : function(jid) { var store = new ChatOmemoStorage(); store.getLocalRegistrationId().then(deviceId => { ContactActions_ajaxGetDrawerFingerprints(jid, deviceId); }); }, morePictures(button, jid, page) { button.remove(); ...
Fix: Remove unintended POST request when loading subtitles
/** * Moovie: an advanced HTML5 video player for MooTools. * @copyright 2010 Colin Aarts * @license MIT */ import { WebSRT } from './WebSRT.js'; import { WebVTT } from 'vtt.js'; /** * Loads and parses the track based on the filetype. * @type {Class} */ const Loader = new Class({ initialize: function (url, s...
/** * Moovie: an advanced HTML5 video player for MooTools. * @copyright 2010 Colin Aarts * @license MIT */ import { WebSRT } from './WebSRT.js'; import { WebVTT } from 'vtt.js'; /** * Loads and parses the track based on the filetype. * @type {Class} */ const Loader = new Class({ initialize: function (url, s...
Include correct documentation URL in error message
import subprocess import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in the ass. Parsing pfctl ou...
import subprocess import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in the ass. Parsing pfctl ou...
Update user to be confirmed by default.
<?php class UsersTableSeeder extends Seeder { public function run() { DB::table('users')->delete(); $users = array( array( 'username' => 'admin', 'email' => 'admin@test.com', 'password' => Hash::make('admin'), ...
<?php class UsersTableSeeder extends Seeder { public function run() { DB::table('users')->delete(); $users = array( array( 'username' => 'admin', 'email' => 'admin@test.com', 'password' => Hash::make('admin'), ...
ZON-3178: Update test, the article now starts with a default value for `template` (belongs to commit:95a001d)
# coding: utf8 import zeit.content.article.edit.browser.testing class ArticleTemplateTest( zeit.content.article.edit.browser.testing.EditorTestCase): def setUp(self): super(ArticleTemplateTest, self).setUp() self.add_article() self.selenium.waitForElementPresent('id=options-templa...
# coding: utf8 import zeit.content.article.edit.browser.testing class ArticleTemplateTest( zeit.content.article.edit.browser.testing.EditorTestCase): def setUp(self): super(ArticleTemplateTest, self).setUp() self.add_article() self.selenium.waitForElementPresent('id=options-templa...
Use LocalDisk as data storage
/** * Default model configuration * (sails.config.models) * * Unless you override them, the following properties will be included * in each of your models. * * For more info on Sails models, see: * http://sailsjs.org/#!/documentation/concepts/ORM */ module.exports.models = { /******************************...
/** * Default model configuration * (sails.config.models) * * Unless you override them, the following properties will be included * in each of your models. * * For more info on Sails models, see: * http://sailsjs.org/#!/documentation/concepts/ORM */ module.exports.models = { /******************************...
Fix incorrect property name for getUserHomeDirectory() Change-Id: I34f209afae4d5ab2373aef8174bbee0d2fcfca6b
package ru.linachan.yggdrasil.common; import java.io.File; public class SystemInfo { public static File getWorkingDirectory() { return new File(System.getProperty("user.dir")); } public static String getUser() { return System.getProperty("user.name"); } public static File getUse...
package ru.linachan.yggdrasil.common; import java.io.File; public class SystemInfo { public static File getWorkingDirectory() { return new File(System.getProperty("user.dir")); } public static String getUser() { return System.getProperty("user.name"); } public static File getUse...
Document reason for class instead of free function
from django.contrib import messages from django.core.mail import send_mail from django.utils.translation import ugettext_lazy as _ import stored_messages from osmaxx.excerptexport import models # functions using database (extraction_order) must be instance methods of a class # -> free functions will not work: datab...
from django.contrib import messages from django.core.mail import send_mail from django.utils.translation import ugettext_lazy as _ import stored_messages from osmaxx.excerptexport import models class ConverterHelper: def __init__(self, extraction_order): self.extraction_order = extraction_order ...
Fix missing Halis Book font on website
/* global window */ /* @jsx createElement */ // @flow // eslint-disable-next-line no-unused-vars import { createElement } from 'jsx-dom'; import { watch } from '../core'; // $FlowFixMe import cardInfoHeader from '../assets/tooltip-header-sprite.png'; // $FlowFixMe import cardInfoBackground from '../assets/tooltip-text...
/* global window */ /* @jsx createElement */ // @flow // eslint-disable-next-line no-unused-vars import { createElement } from 'jsx-dom'; import { watch } from '../core'; // $FlowFixMe import cardInfoHeader from '../assets/tooltip-header-sprite.png'; // $FlowFixMe import cardInfoBackground from '../assets/tooltip-text...
Check function and branch coverage
module.exports = function(grunt) { grunt.loadNpmTasks("grunt-mocha-test"); grunt.loadNpmTasks("grunt-mocha-istanbul"); var testOutputLocation = process.env.CIRCLE_TEST_REPORTS || "test_output"; var artifactsLocation = process.env.CIRCLE_ARTIFACTS || "build_artifacts"; grunt.initConfig({ moc...
module.exports = function(grunt) { grunt.loadNpmTasks("grunt-mocha-test"); grunt.loadNpmTasks("grunt-mocha-istanbul"); var testOutputLocation = process.env.CIRCLE_TEST_REPORTS || "test_output"; var artifactsLocation = process.env.CIRCLE_ARTIFACTS || "build_artifacts"; grunt.initConfig({ moc...
:racehorse: Fix memory leak in Image component prefetch
import React, { Component } from 'react'; import './image.css'; import placeholderImg from './placeholder.png'; import { prefetch } from '@utils/image.utils'; class Image extends Component { static defaultProps = { alt: '', placeholder: placeholderImg, extraClasses: '', }; state = ...
import React, { Component } from 'react'; import './image.css'; import placeholderImg from './placeholder.png'; import { prefetch } from '@utils/image.utils'; class Image extends Component { static defaultProps = { alt: '', placeholder: placeholderImg, extraClasses: '', onLoad: x =>...
Use index context manager for sync
# coding: utf-8 import hues from django.core.management.base import BaseCommand from elasticsearch_dsl.connections import connections from elasticsearch_flex.indexes import registered_indices class Command(BaseCommand): help = 'Sync search indices, templates, and scripts.' def add_arguments(self, parser): ...
# coding: utf-8 import hues from django.core.management.base import BaseCommand from elasticsearch import exceptions from elasticsearch_dsl.connections import connections from elasticsearch_flex.indexes import registered_indices class Command(BaseCommand): help = 'Sync search indices, templates, and scripts.' ...
Change component category to media
<?php class Kwc_Basic_FullWidthImage_Component extends Kwc_TextImage_ImageEnlarge_Component { public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = trlKwfStatic('Picture 100% width'); $ret['componentCategory'] = 'media'; $ret['componentPrior...
<?php class Kwc_Basic_FullWidthImage_Component extends Kwc_TextImage_ImageEnlarge_Component { public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = trlKwfStatic('Picture 100% width'); $ret['componentCategory'] = 'content'; $ret['componentPri...
Clean up duplicate code in controllers
package org.apereo.cas.web.report; import org.springframework.cloud.bus.BusProperties; import org.springframework.cloud.config.server.config.ConfigServerProperties; import java.util.Map; /** * This is {@link ControllerUtils}. * * @author Misagh Moayyed * @since 5.1.0 */ final class ControllerUtils { private...
package org.apereo.cas.web.report; import org.springframework.cloud.bus.BusProperties; import org.springframework.cloud.config.server.config.ConfigServerProperties; import java.util.Map; /** * This is {@link ControllerUtils}. * * @author Misagh Moayyed * @since 5.1.0 */ public final class ControllerUtils { ...
[TASK] Change name of uuid to fingerprint in command
<?php namespace Flowpack\SingleSignOn\Client\Command; /* * * This script belongs to the TYPO3 Flow package "Flowpack.SingleSignOn.Client". * * */ use TYPO3\Flow...
<?php namespace Flowpack\SingleSignOn\Client\Command; /* * * This script belongs to the TYPO3 Flow package "Flowpack.SingleSignOn.Client". * * */ use TYPO3\Flow...
Fix an issue with grid post rendering.
import React from 'react' import { parsePost } from '../parsers/PostParser' class PostsAsGrid extends React.Component { static propTypes = { posts: React.PropTypes.object, json: React.PropTypes.object, currentUser: React.PropTypes.object, gridColumnCount: React.PropTypes.number, } renderColumn(p...
import React from 'react' import { parsePost } from '../parsers/PostParser' class PostsAsGrid extends React.Component { static propTypes = { posts: React.PropTypes.object, json: React.PropTypes.object, currentUser: React.PropTypes.object, gridColumnCount: React.PropTypes.number, } renderColumn(p...
Fix issue with has meta to match get meta
<?php namespace Coreplex\Meta\Eloquent; use Coreplex\Meta\Contracts\Variant; trait HasMetaData { /** * Retrieve the meta data for this model * * @param Variant $variant * @return \Illuminate\Database\Eloquent\Relations\MorphOne */ public function meta(Variant $variant = null) { ...
<?php namespace Coreplex\Meta\Eloquent; use Coreplex\Meta\Contracts\Variant; trait HasMetaData { /** * Retrieve the meta data for this model * * @param Variant $variant * @return \Illuminate\Database\Eloquent\Relations\MorphOne */ public function meta(Variant $variant = null) { ...
Clean up enumerations in Bats Hotspot FIX Proxy 4.0
package com.paritytrading.philadelphia.hotspot; /** * Enumerations for Bats Hotspot FIX Proxy 4.0. */ public class HotspotEnumerations { /** * Values for CxlRejReason(102). */ public static class HotspotCxlRejReasonValues { public static final int TooLateToCancel = 0; ...
package com.paritytrading.philadelphia.hotspot; /** * Enumerations for Bats Hotspot FIX Proxy 4.0. */ public class HotspotEnumerations { /** * Values for CxlRejReason(102). */ public static class HotspotCxlRejReasonValues { public static final int TooLateToCancel = 0; ...
Fix NPE while creating tests.
package net.sourceforge.javydreamercsw.client.ui.nodes.actions; import com.validation.manager.core.db.TestPlan; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.ImageIcon; import org.openide.util.Utilities; /** * * @author Javier A. Ortiz Bultron <javier.ortiz.78@gmail.com> ...
package net.sourceforge.javydreamercsw.client.ui.nodes.actions; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.ImageIcon; /** * * @author Javier A. Ortiz Bultron <javier.ortiz.78@gmail.com> */ public class CreateTestAction extends AbstractAction { public CreateTestAct...
Add Python 3 Only classifier and python_requires >= 3.5 in setup.py
#!/usr/bin/env python import os from setuptools import setup def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path) as f: return f.read() setup( name='pytest-testdox', version='1.2.1', description='A testdox format reporter for pytest', long_descripti...
#!/usr/bin/env python import os from setuptools import setup def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path) as f: return f.read() setup( name='pytest-testdox', version='1.2.1', description='A testdox format reporter for pytest', long_descripti...
Create APIServer view on notification used to json render
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import time from django.http import StreamingHttpResponse from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from opps.api.views.generic.list import ListView as ListAPIView from opps.views.generic.detail im...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import time from django.http import StreamingHttpResponse from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from opps.views.generic.detail import DetailView from opps.db import Db from .models import Noti...
Fix syntax error in PHP 5.3
<?php namespace Concise\Matcher; class UrlHasPart extends AbstractMatcher { public function supportedSyntaxes() { return array( 'url ?:string has scheme ?:string' => 'URL has scheme.', 'url ?:string has host ?:string' => 'URL has host.', 'url ?:string has port ?:int...
<?php namespace Concise\Matcher; class UrlHasPart extends AbstractMatcher { public function supportedSyntaxes() { return array( 'url ?:string has scheme ?:string' => 'URL has scheme.', 'url ?:string has host ?:string' => 'URL has host.', 'url ?:string has port ?:int...
Stop the view indicating if the command is first
@extends('layout') @section('content') <div class="row"> @include('commands._partials.list', [ 'step' => 'Before' ]) @include('commands._partials.list', [ 'step' => 'After' ]) </div> @include('dialogs.command') <script type="text/template" id="command-template"> <td> ...
@extends('layout') @section('content') <div class="row"> @include('commands._partials.list', [ 'step' => 'Before' ]) @include('commands._partials.list', [ 'step' => 'After' ]) </div> @include('dialogs.command') <script type="text/template" id="command-template"> <td> ...
Add image_handler for link harvester
import logging import re import socket import urllib import http.client from bs4 import BeautifulSoup logger = logging.getLogger(__name__) WURSTBALL_RE = re.compile(r"^https?://(www\.)?wurstball\.de/[0-9]+/") def default_handler(metadata): return {key: getattr(metadata, key) for key in ["original_url...
import logging import re import socket import urllib from bs4 import BeautifulSoup logger = logging.getLogger(__name__) WURSTBALL_RE = re.compile(r"^https?://(www\.)?wurstball\.de/[0-9]+/") def default_handler(metadata): return {key: getattr(metadata, key) for key in ["original_url", "url", "title", ...
Check if js registry is null
@inject('registry', 'Despark\Cms\Javascript\Contracts\RegistryContract') <script type="text/javascript"> if (typeof Despark == 'undefined') { Despark = {}; } Despark.js = Despark.js || {}; Despark.js.registry = { 'values': {!! json_encode($registry->getRegistry()) !!}, 'get': fun...
@inject('registry', 'Despark\Cms\Javascript\Contracts\RegistryContract') <script type="text/javascript"> if (typeof Despark == 'undefined') { Despark = {}; } Despark.js = Despark.js || {}; Despark.js.registry = { 'values': {!! json_encode($registry->getRegistry()) !!}, 'get': fun...