text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Update footer version with env
<?php namespace OpenDominion\Providers; use Illuminate\Contracts\View\View; use Illuminate\Support\ServiceProvider; use OpenDominion\Calculators\NetworthCalculator; use OpenDominion\Services\DominionSelectorService; class ComposerServiceProvider extends ServiceProvider { /** * Register bindings in the conta...
<?php namespace OpenDominion\Providers; use Illuminate\Contracts\View\View; use Illuminate\Support\ServiceProvider; use OpenDominion\Calculators\NetworthCalculator; use OpenDominion\Services\DominionSelectorService; class ComposerServiceProvider extends ServiceProvider { /** * Register bindings in the conta...
Print the discovered queues in alphabetical order for convenience
from django.core.management.base import BaseCommand from ... import app_settings from ...utils import get_backend, load_extra_config from ...cron_scheduler import get_cron_config class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('--config', action='store', default=None, ...
from django.core.management.base import BaseCommand from ... import app_settings from ...utils import get_backend, load_extra_config from ...cron_scheduler import get_cron_config class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('--config', action='store', default=None, ...
Fix syntax error, rename manifest
const webpack = require('webpack') const path = require('path') const Dotenv = require('dotenv-webpack') const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin') const WebpackChunkHash = require('webpack-chunk-hash') module.exports = { entry: { client: './src/client' }, target: 'web', module: {...
const webpack = require('webpack') const path = require('path') const Dotenv = require('dotenv-webpack') const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin') const WebpackChunkHash = require('webpack-chunk-hash') module.exports = { entry: { client: './src/client' }, target: 'web', module: {...
Reorder down() for migrate:refresh and migrate:rollback consistency
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class Scaffoldinterfaces extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('scaffoldinterfaces', function (Blueprint $table) { ...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class Scaffoldinterfaces extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('scaffoldinterfaces', function (Blueprint $table) { ...
Fix issue in SdlService constructor in hello_sdl_java_ee sample
package com.smartdevicelink; /** * This is a sample of how to get Java EE Bean to work with an SDL application * The code can be uncommented out with the proper gradle dependencies added */ // @ServerEndpoint("/") // @Stateful(name = "SDLSessionEJB") public class Main { /* Session session; ...
package com.smartdevicelink; /** * This is a sample of how to get Java EE Bean to work with an SDL application * The code can be uncommented out with the proper gradle dependencies added */ // @ServerEndpoint("/") // @Stateful(name = "SDLSessionEJB") public class Main { /* Session session; ...
Update admin middleware to fix permissions for adding users etc Changed the wrong variable in the last fix.
<?php namespace JamylBot\Http\Middleware; use Closure; use Illuminate\Contracts\Auth\Guard; use JamylBot\Group; class MustBeAdmin { /** * The Guard implementation. * * @var Guard */ protected $auth; /** * Create a new filter instance. * * @param Guard $auth */ ...
<?php namespace JamylBot\Http\Middleware; use Closure; use Illuminate\Contracts\Auth\Guard; use JamylBot\Group; class MustBeAdmin { /** * The Guard implementation. * * @var Guard */ protected $auth; /** * Create a new filter instance. * * @param Guard $auth */ ...
Remove unused field from request.
import json from ._base import get_base_rdio_client class _RdioExportClient(object): def __init__(self, base_client): self.base_client = base_client def get_current_user_key(self): return self.base_client.call('currentUser')['key'] def get_collection_by_album(self, batch_size=100): ...
import json from ._base import get_base_rdio_client class _RdioExportClient(object): def __init__(self, base_client): self.base_client = base_client def get_current_user_key(self): return self.base_client.call('currentUser')['key'] def get_collection_by_album(self, batch_size=100): ...
Add loader functionality for jpeg, jpg and gif to webpack
'use strict'; var path = require('path'); var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require("extract-text-webpack-plugin"); module.exports = { entry: { 'vendor': ['angular','angular-animate','angular-aria','angular-messages','angul...
'use strict'; var path = require('path'); var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require("extract-text-webpack-plugin"); module.exports = { entry: { 'vendor': ['angular','angular-animate','angular-aria','angular-messages','angul...
test: Split IAM template tests with paramtrize See also: #208
"""Test IAM Policy templates are valid JSON.""" import json import jinja2 import pytest from foremast.iam.construct_policy import render_policy_template from foremast.utils.templates import LOCAL_TEMPLATES def iam_templates(): """Generate list of IAM templates.""" jinjaenv = jinja2.Environment(loader=jinja2...
"""Test IAM Policy templates are valid JSON.""" import jinja2 from foremast.iam.construct_policy import render_policy_template from foremast.utils.templates import LOCAL_TEMPLATES def iam_templates(): """Generate list of IAM templates.""" jinjaenv = jinja2.Environment(loader=jinja2.FileSystemLoader([LOCAL_TE...
Add JSHint in test target.
/* * grunt-stamp * https://github.com/brainkim/grunt-stamp * * Copyright (c) 2013 Brian Kim * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { grunt.initConfig({ jshint: { all: [ 'Gruntfile.js', 'tasks/*.js', '<%= nodeunit.tests %>', ]...
/* * grunt-stamp * https://github.com/brainkim/grunt-stamp * * Copyright (c) 2013 Brian Kim * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { grunt.initConfig({ jshint: { all: [ 'Gruntfile.js', 'tasks/*.js', '<%= nodeunit.tests %>', ]...
Revert "Change careeropportunity migration dep" This reverts commit 60fdfab7e3b557e46276c225ff159f5773930525.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_initial'), ] operations = [ migrations.CreateModel( name='CareerOpportunity', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_squashed_0003_company_image'), ] operations = [ migrations.CreateModel( name='CareerOppor...
Disable mouse handling in vterm example.
#!/usr/bin/python import urwid def main(): event_loop = urwid.SelectEventLoop() mainframe = urwid.Frame( urwid.Columns([ ('fixed', 3, urwid.SolidFill('|')), urwid.Pile([ ('weight', 70, urwid.TerminalWidget(None, event_loop)), ('fixed', 1, urwid.F...
#!/usr/bin/python import urwid def main(): event_loop = urwid.SelectEventLoop() mainframe = urwid.Frame( urwid.Columns([ ('fixed', 3, urwid.SolidFill('|')), urwid.Pile([ ('weight', 70, urwid.TerminalWidget(None, event_loop)), ('fixed', 1, urwid.F...
Remove extra line in line 33
package seedu.ezdo.model.task; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; import seedu.ezdo.model.todo.StartDate; public class StartDateTest { @Test public void isValidStartDate() { // invalid dates assertFalse(StartDate.isV...
package seedu.ezdo.model.task; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; import seedu.ezdo.model.todo.StartDate; public class StartDateTest { @Test public void isValidStartDate() { // invalid dates assertFalse(StartDate.isV...
Add config option for WebSockets port
var Reflux = require('reflux'); var ApiActions = require('./../actions/ApiActions'); var ConfigStore = require('./ConfigStore'); var buffer = []; var ws = null; var ApiStore = Reflux.createStore({ init() { this.listenTo(ConfigStore, this.initWs); }, initWs(config) { var proto = ...
var Reflux = require('reflux'); var ApiActions = require('./../actions/ApiActions'); var ConfigStore = require('./ConfigStore'); var buffer = []; var ws = null; var ApiStore = Reflux.createStore({ init() { this.listenTo(ConfigStore, this.initWs); }, initWs(config) { var proto = ...
Add build index modal extra changes message
import React from "react"; import { map, sortBy } from "lodash-es"; import { Row, Col, ListGroup, ListGroupItem, Panel } from "react-bootstrap"; import { LoadingPlaceholder } from "../../base"; export default function RebuildHistory ({ unbuilt, error }) { const extraChanges = unbuilt.page_count > 1 ? ( ...
import React from "react"; import { map, sortBy } from "lodash-es"; import { Row, Col, ListGroup, ListGroupItem, Panel } from "react-bootstrap"; import { LoadingPlaceholder } from "../../base"; export default function RebuildHistory ({ unbuilt, error }) { let content; if (unbuilt === null) { content...
Fix import and indent issue
import hashlib import models import os import os.path def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) buf = file.read(8192) ...
import hashlib import models import os import os.path import peewee def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) buf = file....
Remove unneeded import of dataService
'use strict'; /** * @ngdoc directive * @name midjaApp.directive:googlechart * @description * # googlechart */ angular.module('midjaApp') .directive('googlechart', function() { return { template: '<div style="height:{{ minHeight }}px;"></div>', restrict: 'E', link: link, replace: true...
'use strict'; /** * @ngdoc directive * @name midjaApp.directive:googlechart * @description * # googlechart */ angular.module('midjaApp') .directive('googlechart', function(dataService) { return { template: '<div style="height:{{ minHeight }}px;"></div>', restrict: 'E', link: link, re...
Remove transactionTypes table and specify column nullablility
exports.up = (knex, Promise) => Promise.all([ knex.schema.createTable('users', table => { table.uuid('id') .primary() .defaultTo(knex.raw('uuid_generate_v4()')); table.string('username', 20) .notNullable() .unique(); table.string('password') ...
exports.up = (knex, Promise) => Promise.all([ knex.schema.createTable('users', table => { table.uuid('id') .primary() .defaultTo(knex.raw('uuid_generate_v4()')); table.string('username', 20) .unique(); table.string('password'); table.float('saldo'...
Check for the specific error being thrown
<?php class ArraysTest extends \PHPUnit\Framework\TestCase { public function testFlatten() { $this->assertEquals( ['a', 'b', 'c', 'd'], Missing\Arrays::flatten([ ['a', 'b'], 'c', [[['d']]], ]) ); } publ...
<?php class ArraysTest extends \PHPUnit\Framework\TestCase { public function testFlatten() { $this->assertEquals( ['a', 'b', 'c', 'd'], Missing\Arrays::flatten([ ['a', 'b'], 'c', [[['d']]], ]) ); } publ...
BAP-12112: Add migration to update current workflow definitions - added save of step labels
<?php namespace Oro\Bundle\WorkflowBundle\Migrations\Data\ORM; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\Persistence\ObjectManager; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Oro\Bundle\WorkflowBun...
<?php namespace Oro\Bundle\WorkflowBundle\Migrations\Data\ORM; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\Persistence\ObjectManager; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Oro\Bundle\WorkflowBun...
Add const for error message of not logged in user
<?php namespace AppBundle\API; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\Session\SessionInterface; class Webservice { const ERROR_NOT_LOGGED_IN = "Error. Not logged in."; private $DB; public funct...
<?php namespace AppBundle\API; use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\Session\SessionInterface; class Webservice { private $DB; public function __construct(\AppBundle\DB $DB) { $this->DB...
Upgrade to support Django 1.7
from django_rocket import __version__, __author__, __email__, __license__ from setuptools import setup, find_packages README = open('README.rst').read() # Second paragraph has the short description description = README.split('\n')[1] setup( name='django-rocket', version=__version__, description=descripti...
from django_rocket import __version__, __author__, __email__, __license__ from setuptools import setup, find_packages README = open('README.rst').read() # Second paragraph has the short description description = README.split('\n')[1] setup( name='django-rocket', version=__version__, description=descripti...
Fix newline handling in autoreload test
from __future__ import absolute_import, division, print_function import os import subprocess from subprocess import Popen import sys from tempfile import mkdtemp from tornado.test.util import unittest MAIN = """\ import os import sys from tornado import autoreload # This import will fail if path is not set up corr...
from __future__ import absolute_import, division, print_function import os import subprocess from subprocess import Popen import sys from tempfile import mkdtemp from tornado.test.util import unittest MAIN = """\ import os import sys from tornado import autoreload # This import will fail if path is not set up corr...
Add more verbose to HTTP events
<?php namespace Athena\Event\Adapter; use Athena\Event\HttpTransactionCompleted; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Symfony\Component\EventDispatcher\EventDispatcher; class GuzzleReportMiddleware { public static function eventCapture(EventDispatcher $emitter) {...
<?php namespace Athena\Event\Adapter; use Athena\Event\HttpTransactionCompleted; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Symfony\Component\EventDispatcher\EventDispatcher; class GuzzleReportMiddleware { public static function eventCapture(EventDispatcher $emitter) {...
Fix build errors when using optional switches.
module.exports = function(grunt) { //"use strict"; //This is disabled because it's picking up octal literal notation that is quoted in a string. //usage: grunt [server | watch | (--minify &| --syncload)] //server: Start a testing server for the website. //watch: Automatically recompile part of...
module.exports = function(grunt) { //"use strict"; //This is disabled because it's picking up octal literal notation that is quoted in a string. //usage: grunt [server | watch | (--minify &| --syncload)] //server: Start a testing server for the website. //watch: Automatically recompile part of...
Fix error where self.config was undefined These decorators are harsh
import zirc import ssl import socket import utils import commands debug = False class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="chat.freenode.net", ...
import zirc import ssl import socket import utils import commands debug = False class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="chat.freenode.net", ...
Revert bad renaming of route url parameter
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
Update St. Olaf calendar URL We have changed calendar backend systems, so the old URL will go away soon. This is, I believe, the new ID for the master St. Olaf calendar. It has the (dis)advantage of including Alumni and Athletics events, but we're not sure how to exclude them yet.
// @flow /** * All About Olaf * Calendar page */ import React from 'react' import {TabNavigator} from '../components/tabbed-view' import {TabBarIcon} from '../components/tabbar-icon' import {GoogleCalendarView} from './calendar-google' export {EventDetail} from './event-detail' export default TabNavigator( { ...
// @flow /** * All About Olaf * Calendar page */ import React from 'react' import {TabNavigator} from '../components/tabbed-view' import {TabBarIcon} from '../components/tabbar-icon' import {GoogleCalendarView} from './calendar-google' export {EventDetail} from './event-detail' export default TabNavigator( { ...
Remove unnecessary value on inline prop
import React from 'react'; import { FormattedMessage, FormattedNumber } from 'react-intl'; import { Button, Popover, Position, Spinner } from '@blueprintjs/core'; const SearchFilterCountries = ({ loaded, countries, currentValue, onOpen, onChange }) => { function toggleCountryId(countryId) { const newValue = cur...
import React from 'react'; import { FormattedMessage, FormattedNumber } from 'react-intl'; import { Button, Popover, Position, Spinner } from '@blueprintjs/core'; const SearchFilterCountries = ({ loaded, countries, currentValue, onOpen, onChange }) => { function toggleCountryId(countryId) { const newValue = cur...
Remove Head/Tail conflict in form.java
package com.google.sps.data; import java.io.*; import com.google.appengine.api.datastore.Entity; public class Form { private String editURL; private String URL; private String id; private boolean isPublished; public Form(String editURL, String URL, String id) { this.editURL = editURL; ...
package com.google.sps.data; import java.io.*; import com.google.appengine.api.datastore.Entity; public class Form { private String editURL; private String URL; private String id; private boolean isPublished; public Form(String editURL, String URL, String id) { this.editURL = editURL; ...
Change tooltip to "Question Grid"
export default class { constructor($scope, auth, toast) { 'ngInject'; $scope.buttons = [ { name: 'View Code', icon: 'code', show: true, href: 'https://github.com/mjhasbach/material-qna' }, { ...
export default class { constructor($scope, auth, toast) { 'ngInject'; $scope.buttons = [ { name: 'View Code', icon: 'code', show: true, href: 'https://github.com/mjhasbach/material-qna' }, { ...
Edit slides by finding them from the collection
define([ "backbone", "jquery", "view/HomeView", "collection/Presentation", "view/PresentationView", "model/Slide", "view/SlideView" ], function (Backbone, $, HomeView, Presentation, PresentationView, Slide, SlideView) { var presentation = new Presentation(); return Backbone.Router....
define([ "backbone", "jquery", "view/HomeView", "collection/Presentation", "view/PresentationView", "model/Slide", "view/SlideView" ], function (Backbone, $, HomeView, Presentation, PresentationView, Slide, SlideView) { return Backbone.Router.extend({ routes: { "home...
Fix syntax error in fallback download script
<?php require_once "config.inc.php"; $router=$_REQUEST["router"]; $fileExtension = ''; $baseurl="./"; switch ($_REQUEST["type"]) { case '0': $type = 'factory'; break; case '1': $type = 'sysupgrade'; $fileExtension = '-sysupgrade'; break; default: $type = 'f...
<?php require_once "config.inc.php"; $router=$_REQUEST["router"]; $fileExtension = ''; $baseurl="./"; switch ($_REQUEST["type"]) { case '0': $type = 'factory'; break; case '1': $type = 'sysupgrade'; $fileExtension = '-sysupgrade'; break; default: $type = 'f...
Fix incorrect ne_NP locale tests This test incorrectly assumes a call to name() will yield only a first/last name, which isn't always true for this locale. I suspect it hasn't been uncovered yet because the tests are seeded the same at the beginning of every run. It only becomes a problem when you start moving tests a...
from __future__ import unicode_literals import unittest from faker import Factory from .. import string_types class NeNPFactoryTestCase(unittest.TestCase): def setUp(self): self.factory = Factory.create('ne_NP') def test_address(self): from faker.providers.address.ne_NP import Prov...
from __future__ import unicode_literals import unittest import re from faker import Factory from faker.utils import text from .. import string_types class ne_NP_FactoryTestCase(unittest.TestCase): def setUp(self): self.factory = Factory.create('ne_NP') def test_address(self): from fa...
Change path to correct location
<?php class Kwc_Favourites_Box_Component extends Kwc_Abstract { public static function getSettings() { $ret = parent::getSettings(); $ret['assets']['files'][] = 'kwf/Kwc/Favourites/Box/Component.js'; $ret['favouritesPageComponent'] = 'KWC_FAVOURITES_PAGE'; //TODO set to kwc-favourites-pa...
<?php class Kwc_Favourites_Box_Component extends Kwc_Abstract { public static function getSettings() { $ret = parent::getSettings(); $ret['assets']['files'][] = 'web/components/Favourites/Box/Component.js'; $ret['favouritesPageComponent'] = 'KWC_FAVOURITES_PAGE'; //TODO set to kwc-favour...
Update filter to use Grammar modifiers
<?php namespace Romans\Filter; use Romans\Grammar\Grammar; use Romans\Grammar\GrammarAwareTrait; /** * Int to Roman */ class IntToRoman { use GrammarAwareTrait; /** * Default Constructor * * @param Grammar $grammar Grammar Object */ public function __construct(Grammar $grammar = nu...
<?php namespace Romans\Filter; use Romans\Grammar\Grammar; use Romans\Grammar\GrammarAwareTrait; /** * Int to Roman */ class IntToRoman { use GrammarAwareTrait; /** * Default Constructor * * @param Grammar $grammar Grammar Object */ public function __construct(Grammar $grammar = nu...
Update openfisca-core requirement from <28.0,>=27.0 to >=27.0,<32.0 Updates the requirements on [openfisca-core](https://github.com/openfisca/openfisca-core) to permit the latest version. - [Release notes](https://github.com/openfisca/openfisca-core/releases) - [Changelog](https://github.com/openfisca/openfisca-core/b...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approve...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approve...
[DEV-3932] Remove unnecesasry dependency from demo
const bodyParser = require('body-parser') const express = require('express'); const hellosign = require('hellosign-sdk'); const app = express(); app.use(bodyParser.json()); app.use(express.static(__dirname + '/dist')); app.post('/create-signature-request', (req, res) => { const { apiKey, clientId } = req.body; ...
const bodyParser = require('body-parser') const express = require('express'); const hellosign = require('hellosign-sdk'); const path = require('path'); const app = express(); app.use(bodyParser.json()); app.use(express.static(__dirname + '/dist')); app.post('/create-signature-request', (req, res) => { const { apiK...
Remove folder from files search
// Requires var _ = require('lodash'); var glob = require("glob"); var Q = require('q'); function setup(options, imports, register) { // Import var vfs = imports.vfs; var workspace = imports.workspace; // Construct var filesSearch = function(args) { var d = Q.defer(); args = _.de...
// Requires var _ = require('lodash'); var glob = require("glob"); var Q = require('q'); function setup(options, imports, register) { // Import var vfs = imports.vfs; var workspace = imports.workspace; // Construct var filesSearch = function(args) { var d = Q.defer(); args = _.de...
Use timeout for lldb expr eval (PY-14252).
# This file is meant to be run inside lldb as a command after # the attach_linux.dylib dll has already been loaded to settrace for all threads. def __lldb_init_module(debugger, internal_dict): # Command Initialization code goes here # print('Startup LLDB in Python!') import lldb try: show_debug...
# This file is meant to be run inside lldb as a command after # the attach_linux.dylib dll has already been loaded to settrace for all threads. def __lldb_init_module(debugger, internal_dict): # Command Initialization code goes here # print('Startup LLDB in Python!') import lldb try: show_debug...
Update recipe for Google Benchmark
#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googlebenchmark.yaml")...
#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googlebenchmark.yaml")...
Add button class to Comments form
@php if (post_password_required()) { return; } @endphp <section id="comments" class="comments"> @if (have_comments()) <h2> {!! sprintf(_nx('One response to &ldquo;%2$s&rdquo;', '%1$s responses to &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'sage'), number_format_i18n(get_comments_number...
@php if (post_password_required()) { return; } @endphp <section id="comments" class="comments"> @if (have_comments()) <h2> {!! sprintf(_nx('One response to &ldquo;%2$s&rdquo;', '%1$s responses to &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'sage'), number_format_i18n(get_comments_number...
Change formatting of log file to enhance readability
package bakatxt.log; import java.text.SimpleDateFormat; import java.util.Date; import java.util.logging.Formatter; import java.util.logging.Handler; import java.util.logging.LogRecord; public class BakaLogFormatter extends Formatter { private static final int MAX_BUFFER = 1000; private static final String DA...
package bakatxt.log; import java.text.SimpleDateFormat; import java.util.Date; import java.util.logging.Formatter; import java.util.logging.Handler; import java.util.logging.LogRecord; public class BakaLogFormatter extends Formatter { private static final int MAX_BUFFER = 1000; private static final String DA...
Move mergeConfigFrom to register method According to http://laravel.com/docs/5.0/packages#configuration it should be in register() and not in boot()
<?php namespace Kyslik\ColumnSortable; use Illuminate\Support\ServiceProvider; class ColumnSortableServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /** * Bootstrap any application service...
<?php namespace Kyslik\ColumnSortable; use Illuminate\Support\ServiceProvider; class ColumnSortableServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /** * Bootstrap any application service...
Update command docs for conda index
from __future__ import absolute_import, division, print_function import os from locale import getpreferredencoding from os.path import abspath from conda.compat import PY3 from conda.cli.conda_argparse import ArgumentParser from conda_build.index import update_index def main(): p = ArgumentParser( desc...
from __future__ import absolute_import, division, print_function import argparse import os from locale import getpreferredencoding from os.path import abspath from conda.compat import PY3 from conda_build.index import update_index def main(): p = argparse.ArgumentParser( description="Update package ind...
Increase scroll timeout for smoother performance
ngGridDirectives.directive('ngViewport', [function() { return function($scope, elm) { var isMouseWheelActive; var prevScollLeft; var prevScollTop = 0; var ensureDigest = function() { if (!$scope.$root.$$phase) { $scope.$digest(); } }; ...
ngGridDirectives.directive('ngViewport', [function() { return function($scope, elm) { var isMouseWheelActive; var prevScollLeft; var prevScollTop = 0; var ensureDigest = function() { if (!$scope.$root.$$phase) { $scope.$digest(); } }; ...
Increase timeout from 1000 ms to 3000 when requesting ELIQ API
var RSVP = require('rsvp'), request = require('request'), date = require('./date'); module.exports = function (config) { 'use strict'; var eliqUrl = require('./eliqurl')(config); function fetchData (url) { return new RSVP.Promise(function (resolve, reject) { var options = { ...
var RSVP = require('rsvp'), request = require('request'), date = require('./date'); module.exports = function (config) { 'use strict'; var eliqUrl = require('./eliqurl')(config); function fetchData (url) { return new RSVP.Promise(function (resolve, reject) { var options = { ...
Add preloader queries for navigation
import Relay from 'react-relay'; import fromGraphQL from 'react-relay/lib/fromGraphQL'; const QUERIES = { "organization/show": Relay.QL` query PipelinesList($organization: ID!, $teamsCount: Int!) { organization(slug: $organization) { id slug name teams(first: $teamsCount) { ...
import Relay from 'react-relay'; import fromGraphQL from 'react-relay/lib/fromGraphQL'; const QUERIES = { "organization/show": Relay.QL` query PipelinesList($organization: ID!, $teamsCount: Int!) { organization(slug: $organization) { id slug name teams(first: $teamsCount) { ...
Use our own code, when possible.
from django.shortcuts import get_object_or_404 from django.utils.decorators import available_attrs from comrade.views.simple import direct_to_template from functools import wraps def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() ...
from django.shortcuts import get_object_or_404 from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): ...
Include CHANGES.rst in long description.
from setuptools import setup, find_packages version = '1.0a5.dev0' long_description = ( open('README.rst').read() + '\n' + '\n' + open('CHANGES.rst').read() + '\n') setup( name='robotframework-djangolibrary', version=version, description="A robot framework library for Django.", lo...
from setuptools import setup, find_packages version = '1.0a5.dev0' setup( name='robotframework-djangolibrary', version=version, description="A robot framework library for Django.", long_description="""\ """, classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved ...
Order by date on server side before finding uniques
const { History, Song } = require('../models') const _ = require('lodash') module.exports = { async index (req, res) { try { const userId = req.user.id const histories = await History.findAll({ where: { UserId: userId }, include: [ { model: ...
const { History, Song } = require('../models') const _ = require('lodash') module.exports = { async index (req, res) { try { const userId = req.user.id const histories = await History.findAll({ where: { UserId: userId }, include: [ { model: ...
booster-bdd: Replace hardcoded Forge API URL by variable.
import pytest import time import requests import support.helpers as helpers import sys import re import os class ImportBooster(object): def importGithubRepo(self, gitRepo): ############################################### # Environment variables # # Note: Pipelines = https://forge....
import pytest import time import requests import support.helpers as helpers import sys import re import os class ImportBooster(object): def importGithubRepo(self, gitRepo): ############################################### # Environment variables # # Note: Pipelines = https://forge....
Fix crash in python 3.8 due to a mismatch on the ArgumentParser parameter
"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): if kwargs.get('parent', None) is None: kwargs['parents'] = [...
"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, prog=None, usage=None, description=None,...
Add a default fallback URL.
'use strict'; const hiredis = require('hiredis'); const URL = require('url'); const reader = new hiredis.Reader(); class YoRedis { constructor(config) { if (config instanceof Function) this.config = config; else this.config = function() { return config || {} }; } connect() { if (t...
'use strict'; const hiredis = require('hiredis'); const URL = require('url'); const reader = new hiredis.Reader(); class YoRedis { constructor(config) { if (config instanceof Function) this.config = config; else this.config = function() { return config || {} }; } connect() { if (t...
Revert "Disable test that fails on bot" This reverts commit e214e46e748881e6418ffac374a87d6ad30fcfea. I have reverted the swift commit that was causing this failure. rdar://35264910
# TestPOUnwrapping.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIB...
# TestPOUnwrapping.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIB...
Use new namespaced auth API methods
import Ember from 'ember'; import Base from 'simple-auth/authenticators/base'; import ENV from 'wordset/config/environment'; export default Base.extend({ restore: function(properties) { var propertiesObject = Ember.Object.create(properties); return new Ember.RSVP.Promise(function(resolve, reject) { if...
import Ember from 'ember'; import Base from 'simple-auth/authenticators/base'; import ENV from 'wordset/config/environment'; export default Base.extend({ restore: function(properties) { var propertiesObject = Ember.Object.create(properties); return new Ember.RSVP.Promise(function(resolve, reject) { if...
Update to v0.2.0 and translate the description.
<?php /********************************************************************* The MIT License (MIT) Copyright (c) 2015 William Hiver Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restric...
<?php /********************************************************************* The MIT License (MIT) Copyright (c) 2015 William Hiver Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restric...
Enable only if really needed
<?php use Timber\Loader; use Timber\Menu; use Timber\Site; use Timber\Timber; class TheSite extends Site { function __construct() { add_filter('timber_context', [$this, 'addToContext']); add_filter('get_twig', [$this, 'addToTwig']); add_action('init', [$this, 'registerPostTypes']); ...
<?php use Timber\Loader; use Timber\Menu; use Timber\Site; use Timber\Timber; class TheSite extends Site { function __construct() { add_filter('timber_context', [$this, 'addToContext']); add_filter('get_twig', [$this, 'addToTwig']); add_action('init', [$this, 'registerPostTypes']); ...
Include card count in deck directory
#!/usr/bin/env node var _ = require('underscore'), glob = require('glob'), fs = require('fs'), mkdirp = require('mkdirp'), path = require('path'), generateEntry, sanitizePath; generateEntry = function(filepath) { var contents, entry; console.log('Creating index entry for: ' + filepath);...
#!/usr/bin/env node var _ = require('underscore'), glob = require('glob'), fs = require('fs'), mkdirp = require('mkdirp'), path = require('path'), generateEntry, sanitizePath; generateEntry = function(filepath) { var contents, entry; console.log('Creating index entry for: ' + filepath);...
Make queued jobs the default.
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Input\InputOption; class JobMakeCommand extends GeneratorCommand { /** * The console command name. * * @var string */ protected $name = 'make:job'; /** * The con...
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Input\InputOption; class JobMakeCommand extends GeneratorCommand { /** * The console command name. * * @var string */ protected $name = 'make:job'; /** * The con...
Make kafka client a field in Reader
# -*- coding: utf-8 -*- import logging import time from kafka.client import KafkaClient from kafka.consumer import SimpleConsumer class KafkaReader(object): def __init__(self, host, port, group, topic, connection_wait_time=2): """ Initialize Kafka reader """ self.host = host self.port = p...
# -*- coding: utf-8 -*- import logging import time from kafka.client import KafkaClient from kafka.consumer import SimpleConsumer class KafkaReader(object): def __init__(self, host, port, group, topic, connection_wait_time=2): """ Initialize Kafka reader """ self.host = host self.port = p...
Add a command to find a measurement by id.
# -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=False), Col...
# -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=False), Col...
Add connect function to mockBluetooth
/* global navigator, Promise*/ import Ember from 'ember'; const Mock = Ember.Object.extend({ available: true, name: null, value: null, isAvailable(value) { return this._setAndMock('available', value); }, deviceName(deviceName) { return this._setAndMock('name', deviceName); }, characteristic...
/* global navigator, Promise*/ import Ember from 'ember'; const Mock = Ember.Object.extend({ available: true, name: null, value: null, isAvailable(value) { return this._setAndMock('available', value); }, deviceName(deviceName) { return this._setAndMock('name', deviceName); }, characteristic...
FIX tests: add connection parameters
<?php namespace CassandraPDO4Doctrine\tests; use CassandraPDO4Doctrine\Doctrine\DBAL\DriverManager; use Doctrine\ORM\EntityManager; use Doctrine\ORM\Tools\Setup; class CP4DBaseTestCase extends \PHPUnit_Framework_TestCase { static protected function _getDataDir() { return realpath(__DIR__ . '/../data'); ...
<?php namespace CassandraPDO4Doctrine\tests; use CassandraPDO4Doctrine\Doctrine\DBAL\DriverManager; use Doctrine\ORM\EntityManager; use Doctrine\ORM\Tools\Setup; class CP4DBaseTestCase extends \PHPUnit_Framework_TestCase { static protected function _getDataDir() { return realpath(__DIR__ . '/../data'); ...
Allow updating of pick lock time
<?php namespace SofaChamps\Bundle\BowlPickemBundle\Admin; use Sonata\AdminBundle\Admin\Admin; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Form\FormMapper; class SeasonAdmin extends Admin { protected function configureFormFields(FormMapper $fo...
<?php namespace SofaChamps\Bundle\BowlPickemBundle\Admin; use Sonata\AdminBundle\Admin\Admin; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Form\FormMapper; class SeasonAdmin extends Admin { protected function configureFormFields(FormMapper $fo...
Fix: Use Manager to annotate vote count
import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user user_choic...
import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user user_choic...
Rewrite the main script according to the whole refactoring.
( function( mdash, $ ) { $( document ).ready( function() { var manager = new mdash.Manager(), fontCtrl = new mdash.FontCtrl( $( '#fontctrl > a' ) ), helpCtrl = new mdash.HelpCtrl( $( '#helpctrl' ), $( '#getstarted' ), $( '#bookmarks' ) ); manager.init( fun...
( function( $, d, undefined ) { d._ = window.console.debug.bind( window.console ); d.init = function() { d.initFontSize(); d.initHelp(); d.initManager(); }; d.initManager = function() { this.manager = new d.Manager(); this.manager....
Add test for custom css
from django.test import TestCase, RequestFactory from molo.core.tests.base import MoloTestCaseMixin from freebasics.views import HomeView from freebasics.templatetags import freebasics_tags class EnvTestCase(TestCase, MoloTestCaseMixin): def setUp(self): self.mk_main() def test_block_ordering(self):...
from django.test import TestCase, RequestFactory from molo.core.tests.base import MoloTestCaseMixin from freebasics.views import HomeView from freebasics.templatetags import freebasics_tags class EnvTestCase(TestCase, MoloTestCaseMixin): def setUp(self): self.mk_main() def test_block_ordering(self):...
Make it easier to generate images for each demo
module.exports = function (grunt) { // Project configuration. grunt.initConfig({ // Store your Package file so you can reference its specific data whenever necessary pkg: grunt.file.readJSON('package.json'), imageDirectory: { default: 'Demo - Grunt/Assets/Images/', ...
module.exports = function (grunt) { // Project configuration. grunt.initConfig({ // Store your Package file so you can reference its specific data whenever necessary pkg: grunt.file.readJSON('package.json'), imageDirectory: 'Demo - Grunt/Assets/Images/', responsive_images: { ...
Update title for the sub sidebar Fix https://github.com/ProtonMail/proton-vpn-settings/issues/105
import React, { useState, useEffect } from 'react'; import { c } from 'ttag'; import PropTypes from 'prop-types'; const SubSidebar = ({ list = [], children }) => { const clean = (h = '') => h.replace(/#/g, ''); const [hash, setHash] = useState(clean(location.hash)); const onHashChange = () => setHash(clean...
import React, { useState, useEffect } from 'react'; import { c } from 'ttag'; import PropTypes from 'prop-types'; const SubSidebar = ({ list = [], children }) => { const clean = (h = '') => h.replace(/#/g, ''); const [hash, setHash] = useState(clean(location.hash)); const onHashChange = () => setHash(clean...
Add checkbox to API permissions
import React from "react"; import PropTypes from "prop-types"; import { map, sortBy } from "lodash-es"; import { ListGroup, Panel } from "react-bootstrap"; import { ListGroupItem, Checkbox } from "../../../base/index"; export default function APIPermissions ({ style, userPermissions, keyPermissions, onChange }) { ...
import React from "react"; import PropTypes from "prop-types"; import { map, sortBy } from "lodash-es"; import { ListGroup, Panel } from "react-bootstrap"; import { Icon, ListGroupItem } from "../../../base/index"; export default function APIPermissions ({ style, userPermissions, keyPermissions, onChange }) { co...
Add getter returning access token with bearer prefix
// Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.athenz.api; import java.util.Objects; /** * Represents an Athenz Access Token * * @author bjorncs */ public class AthenzAccessToken { public static final String HTTP_HEADER...
// Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.athenz.api; import java.util.Objects; /** * Represents an Athenz Access Token * * @author bjorncs */ public class AthenzAccessToken { public static final String HTTP_HEADER...
CRM-1321: Refactor sync commands - minor unit tests fixesxy
<?php namespace Oro\Bundle\IntegrationBundle\Tests\Unit\Utils; use Oro\Bundle\IntegrationBundle\Utils\FormUtils; use Oro\Bundle\IntegrationBundle\Manager\TypesRegistry; use Oro\Bundle\IntegrationBundle\Tests\Unit\Fixture\TestConnector; use Oro\Bundle\IntegrationBundle\Tests\Unit\Fixture\TestIntegrationType; use Oro\...
<?php namespace Oro\Bundle\IntegrationBundle\Tests\Unit\Utils; use Oro\Bundle\IntegrationBundle\Utils\FormUtils; use Oro\Bundle\IntegrationBundle\Manager\TypesRegistry; use Oro\Bundle\IntegrationBundle\Tests\Unit\Fixture\TestChannelType; use Oro\Bundle\IntegrationBundle\Tests\Unit\Fixture\TestConnector; use Oro\Bund...
Use a setter for max_depth
import ab_bridge import alpha_beta from gui import * from player import * import threading class AIPlayer(Player): """ Yes there is a circular dependancy between AIPlayer and Game """ def __init__(self, *args, **vargs): Player.__init__(self, *args, **vargs) self.max_depth = 1 def set_ma...
import ab_bridge import alpha_beta from gui import * from player import * import threading class AIPlayer(Player): """ Yes there is a circular dependancy between AIPlayer and Game """ def __init__(self, max_depth, *args, **vargs): Player.__init__(self, *args, **vargs) self.max_depth = max_de...
Select all fields from from table in song type
<?php class Denkmal_Elasticsearch_Type_Song extends CM_Elastica_Type_Abstract { const INDEX_NAME = 'song'; protected $_mapping = array( 'label' => array('type' => 'string'), ); protected $_indexParams = array( 'index' => array( 'number_of_shards' => 1, 'numb...
<?php class Denkmal_Elasticsearch_Type_Song extends CM_Elastica_Type_Abstract { const INDEX_NAME = 'song'; protected $_mapping = array( 'label' => array('type' => 'string'), ); protected $_indexParams = array( 'index' => array( 'number_of_shards' => 1, 'numb...
Add spaces to increase readability. "OSF-4419"
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
Update integration test coverage threshold
const TEST_TYPE = ((argv) => { let match = argv[argv.length - 1].match(/npm\/test-(\w+).js/); return match && match[1] || ''; })(process.argv); function configOverrides (testType) { switch (testType) { case 'cli': return { statements: 80, bra...
const TEST_TYPE = ((argv) => { let match = argv[argv.length - 1].match(/npm\/test-(\w+).js/); return match && match[1] || ''; })(process.argv); function configOverrides (testType) { switch (testType) { case 'cli': return { statements: 80, bra...
Fix incorrect unit test annotations
<?php namespace Gamajo\EmailAddress; class EmailAddressTest extends \PHPUnit_Framework_TestCase { /** * @covers \Gamajo\EmailAddress\EmailAddress::__construct * @expectedException \InvalidArgumentException */ public function testCannotBeConstructedFromInvalidEmailAddress() { ...
<?php namespace Gamajo\EmailAddress; class EmailAddressTest extends \PHPUnit_Framework_TestCase { /** * @covers \Gamajo\EmailAddress::__construct * @expectedException \InvalidArgumentException */ public function testCannotBeConstructedFromInvalidEmailAddress() { new Email...
Allow setting the plates file extension
<?php namespace Rych\Silex\Provider; use Silex\Application; use Silex\ServiceProviderInterface; use Rych\Plates\Extension\RoutingExtension; use Rych\Plates\Extension\SecurityExtension; class PlatesServiceProvider implements ServiceProviderInterface { public function register(Application $app) { $app...
<?php namespace Rych\Silex\Provider; use Silex\Application; use Silex\ServiceProviderInterface; use Rych\Plates\Extension\RoutingExtension; use Rych\Plates\Extension\SecurityExtension; class PlatesServiceProvider implements ServiceProviderInterface { public function register(Application $app) { $app...
Add privilege check on follow button
var addFollowers = require('./follow'); var checkAuth = require('./check_auth'); var checkPrivilege = require('./privilege_check'); var githubOAuth = require('./github_oauth'); var users = require('./db').get('users'); module.exports = function(app) { app.get('/me', checkAuth, function(req, res) { checkPrivileg...
var addFollowers = require('./follow'); var checkAuth = require('./check_auth'); var checkPrivilege = require('./privilege_check'); var githubOAuth = require('./github_oauth'); var users = require('./db').get('users'); module.exports = function(app) { app.get('/me', checkAuth, function(req, res) { checkPrivileg...
Add Display.html_contact js method that injects rendered contact template onto page
$(document).ready(function(){ console.log("Connected"); Search.form_listener(); Display.list_listener(); }) var Search = (function(){ return{ form_listener: function(){ $("#search_container").on("submit", "#search_form", function(event){ event.preventDefault(); var formData = $("input...
$(document).ready(function(){ console.log("Connected"); Search.form_listener(); Display.list_listener(); }) var Search = (function(){ return{ form_listener: function(){ $("#search_container").on("submit", "#search_form", function(event){ event.preventDefault(); var formData = $("input...
Remove useless parameters in createShortLink
<?php $__ROOT__ = dirname(__FILE__)."../.."; require_once $__ROOT__."/lib/lib.php"; if(isset($_POST["k"])) { if(apiKeyExist($_POST["k"])) { $filename = cleanString(basename($_FILES["img"]["name"])); $outpath = $_SERVER["DOCUMENT_ROOT"]."/ciconia/img/".$_POST["k"]."/"; if(!file_...
<?php $__ROOT__ = dirname(__FILE__)."../.."; require_once $__ROOT__."/lib/lib.php"; if(isset($_POST["k"])) { if(apiKeyExist($_POST["k"])) { $filename = cleanString(basename($_FILES["img"]["name"])); $outpath = $_SERVER["DOCUMENT_ROOT"]."/ciconia/img/".$_POST["k"]."/"; if(!file_...
Improve interpunction in error messages
<?php namespace Mollie\Api\Exceptions; class ApiException extends \Exception { /** * @var string */ protected $field; /** * @var string */ protected $documentationUrl; /** * @param string $message * @param int $code * @param string|null ...
<?php namespace Mollie\Api\Exceptions; class ApiException extends \Exception { /** * @var string */ protected $field; /** * @var string */ protected $documentationUrl; /** * @param string $message * @param int $code * @param string|null ...
Remove traditional way of getting logged in username.
package space.hideaway.controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import space.hideaway.model.SearchModel; import space.hideaway.services.Us...
package space.hideaway.controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import space.hideaway.model.SearchModel; import space.hideaway.services.Us...
[WEB-585] Fix border style for sticky table headers
export default ({ borders, colors, fonts, fontSizes, shadows }) => { const defaultStyles = { color: colors.text.primary, fontFamily: fonts.default, fontSize: `${fontSizes[0]}px`, '.MuiTableCell-head': { paddingY: 1, borderTop: borders.default, borderBottom: 'none', }, '&.Mu...
export default ({ borders, colors, fonts, fontSizes, shadows }) => { const defaultStyles = { color: colors.text.primary, fontFamily: fonts.default, fontSize: `${fontSizes[0]}px`, '.MuiTableCell-head': { paddingY: 1, borderTop: borders.default, borderBottom: 'none', }, '.Mui...
Fix accidental clobbering of item variable
define(['mac/roman'], function(macintoshRoman) { 'use strict'; return function(item) { return item.getBytes().then(function(bytes) { var dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); var dataObject = { id: dv.getUint16(0, false), definitionProcedureResource...
define(['mac/roman'], function(macintoshRoman) { 'use strict'; return function(item) { return item.getBytes().then(function(bytes) { var dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); var dataObject = { id: dv.getUint16(0, false), definitionProcedureResource...
Include more info about project in route /
<!DOCTYPE html> <html> <head> <title>Rest Birita</title> <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> <style> html, body { height: 100%; } body { margin: 0; ...
<!DOCTYPE html> <html> <head> <title>Rest Birita</title> <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> <style> html, body { height: 100%; } body { margin: 0; ...
Save favourites with the page title
define(['jquery', 'backbone', 'underscore', 'moxie.conf', 'favourites/collections/Favourites'], function($, Backbone, _, conf, Favourites) { var FavouriteButtonView = Backbone.View.extend({ initialize: function() { _.bindAll(this); this.favourites = new Favourites...
define(['jquery', 'backbone', 'underscore', 'favourites/models/Favourite', 'favourites/collections/Favourites'], function($, Backbone, _, Favourite, Favourites) { var FavouriteButtonView = Backbone.View.extend({ initialize: function() { _.bindAll(this); this.favou...
CRM-3483: Change origin syncs (IMAP/EWS) to use origin - Fix migration for oro_email_origin
<?php namespace Oro\Bundle\UserBundle\Migrations\Schema\v1_15; use Doctrine\DBAL\Schema\Schema; use Oro\Bundle\MigrationBundle\Migration\Migration; use Oro\Bundle\MigrationBundle\Migration\OrderedMigrationInterface; use Oro\Bundle\MigrationBundle\Migration\QueryBag; class UpdateEmailOriginRelation implements Migrat...
<?php namespace Oro\Bundle\UserBundle\Migrations\Schema\v1_15; use Doctrine\DBAL\Schema\Schema; use Oro\Bundle\MigrationBundle\Migration\Migration; use Oro\Bundle\MigrationBundle\Migration\OrderedMigrationInterface; use Oro\Bundle\MigrationBundle\Migration\QueryBag; class UpdateEmailOriginRelation implements Migrat...
Fix String to Integer conversion bug
package example; import java.io.DataOutputStream; import java.io.IOException; import java.net.Socket; public class SocketClient { public static void main( String[] args ) throws IOException { // Check arguments if (args.length < 3) { System.err.println("Argument(s) missin...
package example; import java.io.DataOutputStream; import java.io.IOException; import java.net.Socket; public class SocketClient { public static void main( String[] args ) throws IOException { // Check arguments if (args.length < 3) { System.err.println("Argument(s) missin...
Tweak to migration in order to accomodate old names for data fields and allow for if data fields were not present
import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org...
import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org...
Add untested support for change lists
/* global django */ /* eslint indent:[2,4] */ /* eslint comma-dangle:[2,"never"] */ django.jQuery(function($){ var context = document.getElementById('admin-ordering-context'); if (!context) return; var data = JSON.parse(context.getAttribute('data-context')); if (data.tabular) { $('#' + data.pr...
/* global django */ /* eslint indent:[2,4] */ /* eslint comma-dangle:[2,"never"] */ django.jQuery(function($){ var context = document.getElementById('admin-ordering-context'); if (!context) return; var data = JSON.parse(context.getAttribute('data-context')); if (data.tabular) { $('#' + data.pr...
Create only one MDAnalysis selection
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all__ keyword acco...
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all__ keyword acco...
Implement proper parameter matching rules
module.exports = class Call { constructor(callee, args) { this.callee = callee; this.args = args; } analyze(context) { this.callee.analyze(context); context.assertIsFunction(this.callee.referent); this.checkArgumentMatching(this.callee.referent); } checkArgumentMatching(callee) { let...
module.exports = class Call { constructor(callee, args) { this.callee = callee; this.args = args; } analyze(context) { this.callee.analyze(context); context.assertIsFunction(this.callee.referent); this.checkNumberOfArguments(this.callee.referent); this.checkArgumentNamesAndPositionalRules...
Fix error in visual layout editor Avoid setting PhoneNumberFormattingTextWatcher in MobileNumberEditText when in edit mode. Fixes #24
package com.braintreepayments.cardform.view; import android.content.Context; import android.telephony.PhoneNumberFormattingTextWatcher; import android.telephony.PhoneNumberUtils; import android.text.InputFilter; import android.text.InputFilter.LengthFilter; import android.text.InputType; import android.util.AttributeS...
package com.braintreepayments.cardform.view; import android.content.Context; import android.telephony.PhoneNumberFormattingTextWatcher; import android.telephony.PhoneNumberUtils; import android.text.InputFilter; import android.text.InputFilter.LengthFilter; import android.text.InputType; import android.util.AttributeS...
Update floating task name constraints message
package seedu.jimi.model.task; import seedu.jimi.commons.exceptions.IllegalValueException; /** * Represents a FloatingTask's name in the address book. * Guarantees: immutable; is valid as declared in {@link #isValidName(String)} */ public class Name { public static final String MESSAGE_NAME_CONSTRAINTS = "Flo...
package seedu.jimi.model.task; import seedu.jimi.commons.exceptions.IllegalValueException; /** * Represents a FloatingTask's name in the address book. * Guarantees: immutable; is valid as declared in {@link #isValidName(String)} */ public class Name { public static final String MESSAGE_NAME_CONSTRAINTS = "Flo...
Make ultimate question ever more ultimate
from pywps import Process, LiteralOutput from pywps.app.Common import Metadata class UltimateQuestion(Process): def __init__(self): inputs = [] outputs = [LiteralOutput('answer', 'Answer to Ultimate Question', data_type='string')] super(UltimateQuestion, self).__init__( self._...
from pywps import Process, LiteralOutput from pywps.app.Common import Metadata class UltimateQuestion(Process): def __init__(self): inputs = [] outputs = [LiteralOutput('answer', 'Answer to Ultimate Question', data_type='string')] super(UltimateQuestion, self).__init__( self._...
Fix firefox invocation as browser
import os.path, os def run_as_browser(fn): def wrapped(*args, **kwargs): rv = fn(*args, **kwargs) return 'sudo -Hiu browser env XAUTHORITY=/home/browser/.Xauthority %s' % rv return wrapped class Helpers: @property @run_as_browser def default_firefox_bin(self): candidates = ...
import os.path, os def run_as_browser(fn): def wrapped(*args, **kwargs): rv = fn(*args, **kwargs) return 'sudo -Hiu browser %s' % rv return wrapped class Helpers: @property @run_as_browser def default_firefox_bin(self): candidates = [ '/usr/local/lib/firefox/fir...
Use AugmentedContent instead of Content Do not touch the Content field: it is used also for database handling and modifying it will introduce a lot of issues. Instead, added the new AugmentedContent element to be used instead of Content in templates.
<?php class Autotoc extends DataExtension { private $_tocifier; private static function _convertNode($node) { $data = new ArrayData(array( 'Id' => $node['id'], 'Title' => $node['title'] )); if (isset($node['children'])) $data->setField('Childre...
<?php class Autotoc extends DataExtension { private $_tocifier; private static function _convertNode($node) { $data = new ArrayData(array( 'Id' => $node['id'], 'Title' => $node['title'] )); if (isset($node['children'])) $data->setField('Childre...
Change nature endpoint to return lakes
'use strict'; var _ = require('lodash'); var instagram = require('instagram-node').instagram(); instagram.use({ access_token: '1035958982.117ba06.4abe0116ea094d489f0b6f2218942979', client_id: '117ba064c0dc48249c0804d1b36f9524', client_secret: '01e9ed98b82a4cee91769631dd3122cb' }); exports.nature = funct...
'use strict'; var _ = require('lodash'); var instagram = require('instagram-node').instagram(); instagram.use({ access_token: '1035958982.117ba06.4abe0116ea094d489f0b6f2218942979', client_id: '117ba064c0dc48249c0804d1b36f9524', client_secret: '01e9ed98b82a4cee91769631dd3122cb' }); exports.nature = funct...