text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Fix test if server started in xrootd cleanup code git-svn-id: 884a03e47e2adb735d896e55bb5ad6bc3421ba19@17920 4e558342-562e-0410-864c-e07659590f8c
import os import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.osgunittest as osgunittest import unittest class TestStopXrootd(osgunittest.OSGTestCase): def test_01_stop_xrootd(self): if (core.config['xrootd.gsi'] == "ON") and (core.state['xrootd.backups-exist']...
import os import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.osgunittest as osgunittest import unittest class TestStopXrootd(osgunittest.OSGTestCase): def test_01_stop_xrootd(self): if (core.config['xrootd.gsi'] == "ON") and (core.state['xrootd.backups-exist']...
Add support for program editor to create and update snapshots
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "Private Program" description = """ A user with authorization to edit mapping objects related to an access controlled program.<br/><br/>When a person has this role they can map and unmap object...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "Private Program" description = """ A user with authorization to edit mapping objects related to an access controlled program.<br/><br/>When a person has this role they can map and unmap object...
Update Twisted requirement to add a minimum version.
import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted...
import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted...
RDL-4689: Add six to the requirements.
#!/usr/bin/env python import re from setuptools import find_packages, setup with open('py_mstr/__init__.py', 'rb') as f: version = str(re.search('__version__ = "(.+?)"', f.read().decode('utf-8')).group(1)) setup( name='py-mstr', version=version, packages=find_packages(), description='Python AP...
#!/usr/bin/env python import re from setuptools import find_packages, setup with open('py_mstr/__init__.py', 'rb') as f: version = str(re.search('__version__ = "(.+?)"', f.read().decode('utf-8')).group(1)) setup( name='py-mstr', version=version, packages=find_packages(), description='Python AP...
Use a tokenless client by default.
<?php /** * AbstractTask.php * * @author Frederic Dewinne <frederic@continuousphp.com> * @copyright Copyright (c) 2015 Continuous S.A. (http://continuousphp.com) * @license http://opensource.org/licenses/Apache-2.0 Apache License, Version 2.0 * @file AbstractTask.php * @link http://github.com/cont...
<?php /** * AbstractTask.php * * @author Frederic Dewinne <frederic@continuousphp.com> * @copyright Copyright (c) 2015 Continuous S.A. (http://continuousphp.com) * @license http://opensource.org/licenses/Apache-2.0 Apache License, Version 2.0 * @file AbstractTask.php * @link http://github.com/cont...
Set the service_type for the builder If we don't do this we can't lookup the endpoint. Change-Id: I7eae87afc9e4d9ef9dd4f5877b71a4ebe299df0a
# Copyright 2014 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# Copyright 2014 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
admin_calendar: Fix to work on the latest django-imagekit
# -*- coding: utf-8 -*- from django.db import models from django.contrib import admin from django.contrib.auth.models import User from imagekit.models import ImageSpecField from imagekit.processors import ResizeToFill class CalendarEvent(models.Model): user = models.ForeignKey(User, verbose_name=u'Käyttäjä') ...
# -*- coding: utf-8 -*- from django.db import models from django.contrib import admin from django.contrib.auth.models import User from imagekit.models import ImageSpec from imagekit.processors import resize class CalendarEvent(models.Model): user = models.ForeignKey(User, verbose_name=u'Käyttäjä') start = mod...
fix: Remove unnecessary call to findDOMNode
/* eslint-env browser */ import {findSingleNode, getFindDOMNode} from './helpers'; let findDOMNode = findDOMNode || (global && global.findDOMNode); function haveDomNodeWithXpath(domNode, expression) { document.body.appendChild(domNode); const xpathNode = findSingleNode(expression, domNode.parentNode); document....
/* eslint-env browser */ import {findSingleNode, getFindDOMNode} from './helpers'; let findDOMNode = findDOMNode || (global && global.findDOMNode); function haveComponentWithXpath(component, expression) { findDOMNode = findDOMNode || getFindDOMNode(); const domNode = findDOMNode(component); document.body.appen...
Use metric types from index.js in example
'use strict'; var express = require('express'); var server = express(); var register = require('../lib/register'); var Histogram = require('../').Histogram; var h = new Histogram('test_histogram', 'Example of a histogram', [ 'code' ]); var Counter = require('../').Counter; var c = new Counter('test_counter', 'Exampl...
'use strict'; var express = require('express'); var server = express(); var register = require('../lib/register'); var Histogram = require('../lib/histogram'); var h = new Histogram('test_histogram', 'Example of a histogram', [ 'code' ]); var Counter = require('../lib/counter'); var c = new Counter('test_counter', '...
Fix calling nonexistent config value
<?php namespace Aviator\Helpdesk\Models; use Illuminate\Database\Eloquent\Model; class Pool extends Model { protected $guarded = []; /** * Set the table name from the Helpdesk config * @param array $attributes */ public function __construct(array $attributes = []) { parent::__...
<?php namespace Aviator\Helpdesk\Models; use Illuminate\Database\Eloquent\Model; class Pool extends Model { protected $guarded = []; /** * Set the table name from the Helpdesk config * @param array $attributes */ public function __construct(array $attributes = []) { parent::__...
Change name getbusline name method
"""Busine-me API Universidade de Brasilia - FGA Técnicas de Programação, 2/2015 @file views.py Views (on classic MVC, controllers) with methods that control the requisitions for the user authentication and manipulation. """ from django.views.generic import View from core.serializers import serialize_objects from .mode...
"""Busine-me API Universidade de Brasilia - FGA Técnicas de Programação, 2/2015 @file views.py Views (on classic MVC, controllers) with methods that control the requisitions for the user authentication and manipulation. """ from django.views.generic import View from core.serializers import serialize_objects from .mode...
Add noop importer to isExportsOrModuleAssignment tests
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { statement, noopImporter } from '../../../tests/utils'; import isExportsOrModuleAssignment from '../isExportsOrModuleAs...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { statement } from '../../../tests/utils'; import isExportsOrModuleAssignment from '../isExportsOrModuleAssignment'; de...
Make sure modals are correctly positioned
var Backbone = require('backbone'); var ModalContainerView = Backbone.View.extend({ events: { 'mousedown': 'closeOnOutsideClick' }, initialize: function() { }, closeOnOutsideClick: function(e) { if (this.modal && this.$el.is(e.target) && this.modal.closable) { this.closeCurrentModal(); ...
var Backbone = require('backbone'); var ModalContainerView = Backbone.View.extend({ events: { 'mousedown': 'closeOnOutsideClick' }, initialize: function() { }, closeOnOutsideClick: function(e) { if (this.modal && this.$el.is(e.target) && this.modal.closable) { this.closeCurrentModal(); ...
Add modify to keyed methods to enable patch with id
var Router = require('express').Router; var keyed = ['get', 'read', 'put', 'update', 'patch', 'modify', 'del', 'delete'], map = { index:'get', list:'get', read:'get', create:'post', update:'put', modify:'patch' }; module.exports = function ResourceRouter(route) { route.mergeParams = route.mergeParams ? true : false...
var Router = require('express').Router; var keyed = ['get', 'read', 'put', 'patch', 'update', 'del', 'delete'], map = { index:'get', list:'get', read:'get', create:'post', update:'put', modify:'patch' }; module.exports = function ResourceRouter(route) { route.mergeParams = route.mergeParams ? true : false; var rou...
Upgrade to the new Domgen API
package org.realityforge.replicant.example.server.service.tyrell.replicate; import java.io.Serializable; import java.util.HashMap; import java.util.Map; import javax.annotation.Nonnull; import javax.enterprise.context.Dependent; import org.realityforge.replicant.example.server.entity.TyrellRouter; import org.realityfo...
package org.realityforge.replicant.example.server.service.tyrell.replicate; import java.io.Serializable; import java.util.HashMap; import java.util.Map; import javax.annotation.Nonnull; import javax.enterprise.context.Dependent; import org.realityforge.replicant.example.server.entity.tyrell.Building; import org.realit...
Increase timeout a lot because Windows is slow.
module.exports = function (grunt) { // Project configuration. grunt.initConfig({ release: {}, simplemocha: { options: { timeout: 600000, reporter: 'spec' }, all: { src: ['test/**/*.js'] } }, jshint: { options: { jshintrc: '.jshintrc' }, li...
module.exports = function (grunt) { // Project configuration. grunt.initConfig({ release: {}, simplemocha: { options: { timeout: 60000, reporter: 'spec' }, all: { src: ['test/**/*.js'] } }, jshint: { options: { jshintrc: '.jshintrc' }, lib...
Use 8 characters for email address rather than 10.
from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 8 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 8 = 1.11429157 x 10 ** 14 possible results....
from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 10 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 10 = 3.62033331 x 10 ** 17 possible result...
Disable a pointless override warning. This is a valid warning, but only on python3. On python2, the default is False. I don't want to crud up the code with a bunch of conditionals for stuff like this.
#!/usr/bin/python import unittest from decimal import Decimal from blivet import util class MiscTest(unittest.TestCase): # Disable this warning, which will only be triggered on python3. For # python2, the default is False. longMessage = True # pylint: disable=pointless-class-attribute-override ...
#!/usr/bin/python import unittest from decimal import Decimal from blivet import util class MiscTest(unittest.TestCase): longMessage = True def test_power_of_two(self): self.assertFalse(util.power_of_two(None)) self.assertFalse(util.power_of_two("not a number")) self.assertFalse(uti...
Use headless Chrome for Protractor tests (see https://github.com/angular/protractor/blob/master/docs/browser-setup.md)
'use strict' exports.config = { directConnect: true, allScriptsTimeout: 80000, specs: [ 'test/e2e/*.js' ], capabilities: { browserName: 'chrome', chromeOptions: { args: [ "--headless", "--disable-gpu", "--window-size=800,600" ] } }, baseUrl: 'http://localhost:3000', framework...
'use strict' exports.config = { directConnect: true, allScriptsTimeout: 80000, specs: [ 'test/e2e/*.js' ], capabilities: { 'browserName': 'chrome' }, baseUrl: 'http://localhost:3000', framework: 'jasmine2', jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 80000 }, ...
Fix type in overridden setting
import urlparse from django.test import TestCase, override_settings from django.conf import settings from mock import patch, Mock from opendebates.context_processors import global_vars from opendebates.tests.factories import SubmissionFactory class NumberOfVotesTest(TestCase): def test_number_of_votes(self): ...
import urlparse from django.test import TestCase, override_settings from django.conf import settings from mock import patch, Mock from opendebates.context_processors import global_vars from opendebates.tests.factories import SubmissionFactory class NumberOfVotesTest(TestCase): def test_number_of_votes(self): ...
Add dependency on the dataclasses library This dependency is optional in Python 3.7 or later, as [PEP 557] made it part of the standard library. [PEP 557]: https://www.python.org/dev/peps/pep-0557/
from setuptools import setup def readme(): with open('README.md') as file: return file.read() setup( name='ppb-vector', version='0.4.0rc1', packages=['ppb_vector'], url='http://github.com/pathunstrom/ppb-vector', license='', author='Piper Thunstrom', author_email='pathunstrom...
from setuptools import setup def readme(): with open('README.md') as file: return file.read() setup( name='ppb-vector', version='0.4.0rc1', packages=['ppb_vector'], url='http://github.com/pathunstrom/ppb-vector', license='', author='Piper Thunstrom', author_email='pathunstrom...
Fix editor card header duplicate prefix
import React, { PropTypes } from 'react'; import { StyleSheet, css } from 'aphrodite'; import { Card, CardHeader, CardText, CardActions} from 'material-ui/Card'; const styles = StyleSheet.create({ blockEditor: { margin: '0 0 1.4em', } }); const EditorCard = ({ title, children, actions }) => ( <Card clas...
import React, { PropTypes } from 'react'; import { StyleSheet, css } from 'aphrodite'; import { Card, CardHeader, CardText, CardActions} from 'material-ui/Card'; const styles = StyleSheet.create({ blockEditor: { margin: '0 0 1.4em', } }); const EditorCard = ({ title, children, actions }) => ( <Card clas...
Work with custom user models in django >= 1.5
from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_user_model Us...
from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_user_model Us...
Fix imports for management command
from django.conf import settings from django.core.management.base import BaseCommand from django.db import transaction from twitter import OAuth, Twitter from latest_tweets.models import Tweet from latest_tweets.utils import update_tweets @transaction.atomic def update_user(user): t = Twitter(auth=OAuth( ...
from django.conf import settings from django.core.management.base import BaseCommand from django.db import transaction from twitter import OAuth, Twitter from ..models import Tweet from ..utils import update_tweets @transaction.atomic def update_user(user): t = Twitter(auth=OAuth( settings.TWITTER_OAUTH_...
Refactor addUser function for readability.
'use strict'; module.exports = function(app) { app.controller('CreateGameController', ['$rootScope', 'UserService', 'FriendService', 'GameService', function($rs, UserService, FriendService, GameService) { let ctrl = this; ctrl.user = UserService.data.user; ctrl.allFriends = FriendService.data.allFriends...
'use strict'; module.exports = function(app) { app.controller('CreateGameController', ['$rootScope', 'UserService', 'FriendService', 'GameService', function($rs, UserService, FriendService, GameService) { let ctrl = this; ctrl.user = UserService.data.user; ctrl.allFriends = FriendService.data.allFriends...
Add site log received SNS topic
from amazonia.classes.sns import SNS from troposphere import Ref, Join, cloudwatch from troposphere.sns import Topic, Subscription def user_registration_topic(emails): return topic("UserRegistrationReceived", emails) def new_cors_site_request_received_topic(emails): return topic("NewCorsSiteRequestReceived",...
from amazonia.classes.sns import SNS from troposphere import Ref, Join, cloudwatch from troposphere.sns import Topic, Subscription def user_registration_topic(emails): return topic("UserRegistrationReceived", emails) def new_cors_site_request_received_topic(emails): return topic("NewCorsSiteRequestReceived",...
Add app root dir to settings.
/** * ActiveRules implemented on top of Koa. * * @module arkoa * @copyright 2015 - Brian Winkers * @license MIT */ "use strict"; /** * System wide settings, most settings will be in ActiveRules sites * File-based Configuration support, using nconf for bow * * Setup nconf to use (in-order): * 1. Command-line...
/** * ActiveRules implemented on top of Koa. * * @module arkoa * @copyright 2015 - Brian Winkers * @license MIT */ "use strict"; /** * System wide settings, most settings will be in ActiveRules sites * File-based Configuration support, using nconf for bow * * Setup nconf to use (in-order): * 1. Command-line...
Increase number of photos downloaded to 50 at once fixes issue where on 10in screen images dont fill the screen and scroll doesnt work, disabling loading of more images
package com.michaldabski.panoramio.requests; import com.android.volley.Response; /** * Created by Michal on 10/08/2014. */ public class NearbyPhotosRequest extends PanoramioRequest { public static final int NUM_PHOTOS = 50; private static final float LAT_MULTIPLIER = 0.4f, LON_MULTIP...
package com.michaldabski.panoramio.requests; import com.android.volley.Response; /** * Created by Michal on 10/08/2014. */ public class NearbyPhotosRequest extends PanoramioRequest { public static final int NUM_PHOTOS = 30; private static final float LAT_MULTIPLIER = 0.4f, LON_MULTIP...
Reformat SQLLogger comments to fit in godoc HTML page.
package sqlstmt import ( "database/sql" ) // DB is the interface that wraps the database access methods // used by this package. // // The *DB and *Tx types in the standard library package "database/sql" // both implement this interface. type DB interface { // Exec executes a query without returning any rows. // T...
package sqlstmt import ( "database/sql" ) // DB is the interface that wraps the database access methods // used by this package. // // The *DB and *Tx types in the standard library package "database/sql" // both implement this interface. type DB interface { // Exec executes a query without returning any rows. // T...
Add singer-tools as a dev dependency
#!/usr/bin/env python from setuptools import setup, find_packages import subprocess setup(name="singer-python", version='5.0.7', description="Singer.io utility library", author="Stitch", classifiers=['Programming Language :: Python :: 3 :: Only'], url="http://singer.io", install_re...
#!/usr/bin/env python from setuptools import setup, find_packages import subprocess setup(name="singer-python", version='5.0.7', description="Singer.io utility library", author="Stitch", classifiers=['Programming Language :: Python :: 3 :: Only'], url="http://singer.io", install_re...
Improve efficiency of queue loop This commit avoids a property lookup on every iteration of the queue-consuming loop by first storing it in a variable, since we don't expect the size of the array to change within the duration of the loop. This will make the initialization slightly more efficient. Change-Id: Ied891fd5...
var MethodProxy = function(object, queue) { this.init = function(object, queue) { this.object = object; for (var i = 0, len = queue.length; i < len; ++i) { this.forward(queue[i]); } }; // payload : ['methodName', arguments*] this.push = this.forward = function(payload) { var methodName =...
var MethodProxy = function(object, queue) { this.init = function(object, queue) { this.object = object; for (var i = 0; i < queue.length; ++i) { this.forward(queue[i]); } }; // payload : ['methodName', arguments*] this.push = this.forward = function(payload) { var methodName = payload.sh...
Add block structure to perception handler. Slightly change perception handler logic.
""" Module that holds classes that represent an agent's perception handler. """ import abc import world import structure class PerceptionHandler(object): @abc.abstractmethod def perceive(self, agent, world): """ Generates a percept given an agent and a world. :param agent: The agent ...
""" Module that holds classes that represent an agent's perception handler. """ import abc import world import structure class PerceptionHandler(object): @abc.abstractmethod def perceive(self, agent, world): """ Generates a percept given an agent and a world. :param agent: The agent ...
Change something so tests are not skipped
"""Execute exactly this copy of pip, within a different environment. This file is named as it is, to ensure that this module can't be imported via an import statement. """ import runpy import sys import types from importlib.machinery import ModuleSpec, PathFinder from os.path import dirname from typing import Optiona...
"""Execute exactly this copy of pip, within a different environment. This file is named as it is, to ensure that this module can't be imported via an import statement. """ import runpy import sys import types from importlib.machinery import ModuleSpec, PathFinder from os.path import dirname from typing import Optiona...
Modify Parameter trait to get all not null properties
<?php namespace AdobeConnectClient\Traits; trait ParameterTrait { /** * Retrieves all not null attributes as an associative array * * @return array An associative array */ public function toArray() { $values = []; foreach ($this as $prop => $value) { if (!i...
<?php namespace AdobeConnectClient\Traits; use \AdobeConnectClient\Helper\StringCaseTransform as SCT; use \AdobeConnectClient\Helper\BooleanTransform as B; /** * Converts the public properties into an array to use in the WS call * * Works only for the not empty properties. False and null are considered empty valu...
Fix DB name in NIST tests
package com.splicemachine.test.connection; import com.splicemachine.constants.SpliceConstants; import java.sql.Connection; import java.sql.DriverManager; import org.apache.log4j.Logger; /** * Static helper class to get an client connection to Splice */ public class SpliceNetConnection extends BaseConnection { priv...
package com.splicemachine.test.connection; import com.splicemachine.constants.SpliceConstants; import java.sql.Connection; import java.sql.DriverManager; import org.apache.log4j.Logger; /** * Static helper class to get an client connection to Splice */ public class SpliceNetConnection extends BaseConnection { priv...
Use accessor to use in sort.
# -*- coding: utf-8 -*- import re from . import export @export def fuzzyfinder(input, collection, accessor=lambda x: x): """ Args: input (str): A partial string which is typically entered by a user. collection (iterable): A collection of strings which will be filtered ...
# -*- coding: utf-8 -*- import re from . import export @export def fuzzyfinder(input, collection, accessor=lambda x: x): """ Args: input (str): A partial string which is typically entered by a user. collection (iterable): A collection of strings which will be filtered ...
Change validation handler to use array input instead of assuming a request
<?php namespace Fuzz\ApiServer\Validation; use Illuminate\Validation\Validator; use Fuzz\ApiServer\Exception\BadRequestException; trait ValidatesRequests { /** * Validate the given request with the given rules. * * @param array $request * @param array $rules * @param array $messages * @return void ...
<?php namespace Fuzz\ApiServer\Validation; use Fuzz\ApiServer\Exception\BadRequestException; use Illuminate\Http\Request; use Illuminate\Http\JsonResponse; use Illuminate\Validation\Validator; use Illuminate\Http\Exception\HttpResponseException; trait ValidatesRequests { /** * Validate the given request with the ...
Remove JSONP callback function once done
var _paramanders$elm_twitch_chat$Native_Jsonp = function() { function jsonp(url, callbackName) { return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { window[callbackName] = function(content) { callback(_elm_lang$core$Native_Scheduler.succeed(JSON.stringify(content))); ...
var _paramanders$elm_twitch_chat$Native_Jsonp = function() { function jsonp(url, callbackName) { return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { window[callbackName] = function(content) { callback(_elm_lang$core$Native_Scheduler.succeed(JSON.stringify(content))); ...
[Bugfix] Correct validators generator command description Merge pull request #42 from SirLamer/patch-1 Correct make:json-api:validators description typo
<?php /** * Copyright 2016 Cloud Creativity Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
<?php /** * Copyright 2016 Cloud Creativity Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
Replace requestNamespace by xmlNamespace method
<?php /** * This file is part of the Zimbra API in PHP library. * * © Nguyen Van Nguyen <nguyennv1981@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Zimbra\Voice\Request; use Zimbra\Soap\Request; /** * Bas...
<?php /** * This file is part of the Zimbra API in PHP library. * * © Nguyen Van Nguyen <nguyennv1981@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Zimbra\Voice\Request; use Zimbra\Soap\Request; /** * Bas...
Fix the entrypoint missing the path prefix
import SubmissionError from '../error/SubmissionError' import { ENTRYPOINT } from '../config/entrypoint'; const MIME_TYPE = 'application/ld+json' export default function (id, options = {}) { if (typeof options.headers === 'undefined') Object.assign(options, { headers: new Headers() }) if (options.headers.get('Ac...
import SubmissionError from '../error/SubmissionError' import { ENTRYPOINT } from '../config/entrypoint'; const MIME_TYPE = 'application/ld+json' export default function (id, options = {}) { if (typeof options.headers === 'undefined') Object.assign(options, { headers: new Headers() }) if (options.headers.get('Ac...
Use fail() method in tests
package com.sanction.thunder.authentication; import com.google.common.base.Optional; import com.google.common.collect.Lists; import io.dropwizard.auth.AuthenticationException; import io.dropwizard.auth.basic.BasicCredentials; import java.util.List; import org.junit.Test; import static org.junit.Assert.assertEquals...
package com.sanction.thunder.authentication; import com.google.common.base.Optional; import com.google.common.collect.Lists; import io.dropwizard.auth.AuthenticationException; import io.dropwizard.auth.basic.BasicCredentials; import java.util.List; import org.junit.Test; import static org.junit.Assert.assertEquals...
Make extension work in dev env too
var iframe; function initFrame() { iframe = document.createElement('iframe'); document.body.appendChild(iframe); } // Listen to the parent window send src info to be set on the nested frame function receiveNestedFrameData() { var handler = function(e) { if (e.source !== window.parent && !e.data.src) return;...
var iframe; function initFrame() { iframe = document.createElement('iframe'); document.body.appendChild(iframe); } // Listen to the parent window send src info to be set on the nested frame function receiveNestedFrameData() { var handler = function(e) { if (e.source !== window.parent && !e.data.src) return;...
Add uuid to the patient bean in Android
package org.msf.records.model; import java.io.Serializable; /** * Created by Gil on 03/10/2014. */ public class Patient implements Serializable { public String id; public String uuid; public String given_name; public String family_name; public String important_information; /** * Acce...
package org.msf.records.model; import java.io.Serializable; /** * Created by Gil on 03/10/2014. */ public class Patient implements Serializable { public String id; public String given_name; public String family_name; public String important_information; /** * Accepted values: * susp...
Update HTML validation error handling for Bootstrap 4
<?php namespace SebastiaanLuca\Helpers\Html; use Collective\Html\HtmlBuilder as CollectiveHtmlBuilder; class HtmlBuilder extends CollectiveHtmlBuilder { /** * Get the Bootstrap error class if the given field has a validation error. * * @param string $field * * @return string */ ...
<?php namespace SebastiaanLuca\Helpers\Html; use Collective\Html\HtmlBuilder as CollectiveHtmlBuilder; class HtmlBuilder extends CollectiveHtmlBuilder { /** * Get the Bootstrap error class if the given field has a validation error. * * @param string $field * * @return string */ ...
Use empty to check for empty array
<?php /** * Wingman * * @link http://github.com/mleko/wingman * @copyright Copyright (c) 2017 Daniel Król * @license MIT */ namespace Mleko\Wingman; use Mleko\Wingman\IO\Output; class MistakeChecker { private static $possibleMistakes = [ "tags" => "keywords", "desc" => "description...
<?php /** * Wingman * * @link http://github.com/mleko/wingman * @copyright Copyright (c) 2017 Daniel Król * @license MIT */ namespace Mleko\Wingman; use Mleko\Wingman\IO\Output; class MistakeChecker { private static $possibleMistakes = [ "tags" => "keywords", "desc" => "description...
Add a logging message to indicate start.
/* ___ usage ___ en_US ___ mingle static [address:port, address:port...] options: -b, --bind <address:port> address and port to bind to --help display help message ___ $ ___ en_US ___ bind is required: the `--bind` argument is a req...
/* ___ usage ___ en_US ___ mingle static [address:port, address:port...] options: -b, --bind <address:port> address and port to bind to --help display help message ___ $ ___ en_US ___ bind is required: the `--bind` argument is a req...
Write two zeros when 0 minutes. Looks nicer
Ext.define('MusicSearch.App', { extend: 'Deft.mvc.Application', init: function() { Ext.fly('followingBallsG').destroy(); Ext.tip.QuickTipManager.init(); Deft.Injector.configure({ searchResultStore: 'MusicSearch.SongsStore', playlistStore: 'MusicSearch.PlaylistStore' }); Ext.create('MusicSearch.Vie...
Ext.define('MusicSearch.App', { extend: 'Deft.mvc.Application', init: function() { Ext.fly('followingBallsG').destroy(); Ext.tip.QuickTipManager.init(); Deft.Injector.configure({ searchResultStore: 'MusicSearch.SongsStore', playlistStore: 'MusicSearch.PlaylistStore' }); Ext.create('MusicSearch.Vie...
Move description constant to test Since it's specific to the Description test
package dsl import ( "testing" "github.com/goadesign/goa/design" "github.com/goadesign/goa/eval" ) func TestDescription(t *testing.T) { const ( description = "test description" ) cases := map[string]struct { Expr eval.Expression Desc string DescFunc func(e eval.Expression) string }{ "api...
package dsl import ( "testing" "github.com/goadesign/goa/design" "github.com/goadesign/goa/eval" ) const ( description = "test description" ) func TestDescription(t *testing.T) { cases := map[string]struct { Expr eval.Expression Desc string DescFunc func(e eval.Expression) string }{ "api": {&...
Improve precision of related post s
var _ = require('lodash'); function parseId(postData, type) { type = type || 'tags'; return postData[type].data.map(function(t) { return t._id; }); } function getSimilarityScore(arrA, arrB) { if (!arrA.length || !arrB.length) return 0; return Math.sqrt( _.intersection(arrA, arrB).length / Math.max(arrA.le...
var _ = require('lodash'); function parseId(postData, type) { type = type || 'tags'; return postData[type].data.map(function(t) { return t._id; }); } function getSimilarityScore(arrA, arrB) { if (!arrA.length || !arrB.length) return 0; return _.intersection(arrA, arrB).length / (arrA.length + arrB.length); } ...
Use action bar icon to move up from Mail details
package net.rdrei.android.wakimail.ui; import net.rdrei.android.wakimail.R; import roboguice.activity.RoboFragmentActivity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.FragmentTransaction; import com.actionbarsherlock.app.ActionBar; import com.actionb...
package net.rdrei.android.wakimail.ui; import net.rdrei.android.wakimail.R; import roboguice.activity.RoboFragmentActivity; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.FragmentTransaction; import com.actionbarsherlock.app.ActionBar; public class MailDetailActivity extends RoboFrag...
Bring code implementation in line with documentation Remove option for passing assetpath as an explicit parameter, just load oit from options instead
var path = require('path'), servestatic = require('serve-static'); module.exports = { setup: function (app, options) { options = options || {}; options.path = options.path || '/govuk-assets'; app.use(options.path, servestatic(path.join(__dirname, './node_modules/govuk_template_mustach...
var path = require('path'), static = require('serve-static'); module.exports = { setup: function (app, assetpath, options) { if (arguments.length === 2 && typeof assetpath === 'object') { options = assetpath; assetpath = ''; } options = options || {}; a...
[Join] Make sure the 'channel' argument is not Unicode when we send it, because Twisted doesn't like that
from CommandTemplate import CommandTemplate from IrcMessage import IrcMessage class Command(CommandTemplate): triggers = ['join'] helptext = "Makes me join another channel, if I'm allowed to at least" def execute(self, message): """ :type message: IrcMessage """ replytext = u"" if message.messageParts...
from CommandTemplate import CommandTemplate from IrcMessage import IrcMessage class Command(CommandTemplate): triggers = ['join'] helptext = "Makes me join another channel, if I'm allowed to at least" def execute(self, message): """ :type message: IrcMessage """ replytext = u"" if message.messageParts...
Update index for Debug class location
<?php error_reporting(E_ALL); if (! defined('DS')) { define('DS', DIRECTORY_SEPARATOR); define('ROOT', __DIR__ . \DS . '..' . \DS . 'app' . \DS); } $config = include ROOT . 'config/config.php'; $sConfig = include __DIR__ . \DS . 'config.php'; $config["siteUrl"] = 'http://' . $sConfig['host'] . ':' . $sConfig['port'] ...
<?php error_reporting(E_ALL); if (! defined('DS')) { define('DS', DIRECTORY_SEPARATOR); define('ROOT', __DIR__ . \DS . '..' . \DS . 'app' . \DS); } $config = include ROOT . 'config/config.php'; $sConfig = include __DIR__ . \DS . 'config.php'; $config["siteUrl"] = 'http://' . $sConfig['host'] . ':' . $sConfig['port'] ...
Update regexp due to changes in stylint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT # """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an in...
[HOPS-1360] Fix Tuple does not exist in removeSafeBlock
/* * Copyright (C) 2015 hops.io. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
/* * Copyright (C) 2015 hops.io. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
Change cached file extension to .json.tmp
<?php class Cache { private static $_config = false; private static function getConfig() { if(static::$_config) return static::$_config; static::$_config = require(__DIR__ . '/../../../config/cache.php'); } public static function store($key, $value, $ttl) { $dir =...
<?php class Cache { private static $_config = false; private static function getConfig() { if(static::$_config) return static::$_config; static::$_config = require(__DIR__ . '/../../../config/cache.php'); } public static function store($key, $value, $ttl) { $dir =...
Complete solution for overlapping rectangles
import sys def over_rect(line): line = line.rstrip() if line: xula, yula, xlra, ylra, xulb, yulb, xlrb, ylrb = (int(i) for i in line.split(',')) h_overlap = True v_overlap = True if xlrb < xula or xulb > xlra: ...
import sys def over_rect(line): line = line.rstrip() if line: line = line.split(',') rect_a = [int(item) for item in line[:4]] rect_b = [int(item) for item in line[4:]] return (rect_a[0] <= rect_b[0] <= rect_a[2] and (rect_a[3] <= rect_b[1] <= rect_a[1] or ...
Implement group form type extension.
<?php declare(strict_types=1); /** * @author Igor Nikolaev <igor.sv.n@gmail.com> * @copyright Copyright (c) 2019, Darvin Studio * @link https://www.darvin-studio.ru * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace...
<?php declare(strict_types=1); /** * @author Igor Nikolaev <igor.sv.n@gmail.com> * @copyright Copyright (c) 2019, Darvin Studio * @link https://www.darvin-studio.ru * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace...
Remove dev mode, that should really be configured by the configuration
'use strict'; let irc = require( 'irc' ); let plugins = require( './plugins' ); const config = { channels: [ '#kokarn' ], plugins: [ 'Telegram', 'Urlchecker', 'Github', 'RSS', 'DagensMix', 'Pushbullet', 'HttpCat' ], server: 'irc.freenode.net', botName: 'BoilBot' }; let bot = new irc.Client( confi...
'use strict'; let irc = require( 'irc' ); let plugins = require( './plugins' ); const config = { channels: [ '#kokarn' ], plugins: [ 'Telegram', 'Urlchecker', 'Github', 'RSS', 'DagensMix', 'Pushbullet', 'HttpCat' ], server: 'irc.freenode.net', botName: 'BoilBot' }; if( process.argv.indexOf( '--dev' ) ...
Fix Rainforest Plains not being generated
package net.tropicraft.core.common.dimension.layer; import net.minecraft.world.gen.INoiseRandom; import net.minecraft.world.gen.layer.traits.IC0Transformer; public final class TropicraftAddSubBiomesLayer implements IC0Transformer { final int baseID; final int[] subBiomeIDs; TropicraftAddSubBiomesLayer(final int b...
package net.tropicraft.core.common.dimension.layer; import net.minecraft.world.gen.INoiseRandom; import net.minecraft.world.gen.layer.traits.IC0Transformer; public final class TropicraftAddSubBiomesLayer implements IC0Transformer { final int baseID; final int[] subBiomeIDs; TropicraftAddSubBiomesLayer(final int b...
Enable passing str to echo
import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execution results ar...
import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execution results ar...
Fix wrong boolean on account creation
orion.accounts = {}; /** * Initialize the profile schema option with its default value */ Options.init('profileSchema', { name: { type: String } }); /** * Updates the profile schema reactively */ Tracker.autorun(function () { orion.accounts.profileSchema = new SimpleSchema({ profile: { type: new Sim...
orion.accounts = {}; /** * Initialize the profile schema option with its default value */ Options.init('profileSchema', { name: { type: String } }); /** * Updates the profile schema reactively */ Tracker.autorun(function () { orion.accounts.profileSchema = new SimpleSchema({ profile: { type: new Sim...
Update /users/login endpoint to return serialized metadata
from .blueprint import root_blueprint as root_route from ...core.node import node # syft absolute from syft.core.common.message import SignedImmediateSyftMessageWithReply from syft.core.common.message import SignedImmediateSyftMessageWithoutReply from syft.core.common.serde.deserialize import _deserialize from flask ...
from .blueprint import root_blueprint as root_route from ...core.node import node # syft absolute from syft.core.common.message import SignedImmediateSyftMessageWithReply from syft.core.common.message import SignedImmediateSyftMessageWithoutReply from syft.core.common.serde.deserialize import _deserialize from flask ...
Throw exception if procedure is empty.
<?php namespace Retrinko\CottonTail\Message\Payloads; use Retrinko\CottonTail\Exceptions\PayloadException; class RpcRequestPayload extends DefaultPayload { const KEY_PARAMS = 'params'; const KEY_PROCEDURE = 'procedure'; /** * @var array */ protected $requiredFields = [self::KEY_PROCEDU...
<?php namespace Retrinko\CottonTail\Message\Payloads; class RpcRequestPayload extends DefaultPayload { const KEY_PARAMS = 'params'; const KEY_PROCEDURE = 'procedure'; /** * @var array */ protected $requiredFields = [self::KEY_PROCEDURE, self::KEY_PARAMS]; /** * @param string $...
Rename args variable to pairs for clarity
import hasCallback from 'has-callback'; import promisify from 'es6-promisify'; import yargsBuilder from 'yargs-builder'; import renamerArgsBuilder from './renamerArgsBuilder'; import fsRenamer from './fsRenamer'; import getExistingFilenames from './getExistingFilenames'; import {ERROR_ON_MISSING_FILE} from './flags';...
import hasCallback from 'has-callback'; import promisify from 'es6-promisify'; import yargsBuilder from 'yargs-builder'; import renamerArgsBuilder from './renamerArgsBuilder'; import fsRenamer from './fsRenamer'; import getExistingFilenames from './getExistingFilenames'; import {ERROR_ON_MISSING_FILE} from './flags';...
Fix autoremove in wrong place
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from slacksync.membersync import SlackMemberSync from slacksync.utils import api_configured class Command(BaseCommand): help = 'Make sure all members are in Slack and optionally kick non-members' def add_arguments(self,...
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from slacksync.membersync import SlackMemberSync from slacksync.utils import api_configured class Command(BaseCommand): help = 'Make sure all members are in Slack and optionally kick non-members' def add_arguments(self,...
Use currenUser instead of getting it from session
import Ember from "ember"; import config from "../config/environment"; export default Ember.Service.extend({ session: Ember.inject.service(), rollbar: Ember.inject.service(), getReason(reason) { return reason instanceof Error || typeof reason !== "object" ? reason : JSON.stringify(reason); }, ...
import Ember from "ember"; import config from "../config/environment"; export default Ember.Service.extend({ session: Ember.inject.service(), rollbar: Ember.inject.service(), getReason(reason) { return reason instanceof Error || typeof reason !== "object" ? reason : JSON.stringify(reason); }, ...
Add `--no-sandbox` to Chrome args in CI.
/* jshint node:true */ var options = { "framework": "qunit", "test_page": "tests/index.html?hidepassed", "disable_watching": true, "launch_in_ci": [ "Chrome", "Firefox", ], "launch_in_dev": [ "Chrome", "Firefox", "Safari", ], browser_args: { Chrome: { mode: 'ci', arg...
/* jshint node:true */ var options = { "framework": "qunit", "test_page": "tests/index.html?hidepassed", "disable_watching": true, "launch_in_ci": [ "Chrome", "Firefox", ], "launch_in_dev": [ "Chrome", "Firefox", "Safari", ], browser_args: { Chrome: { mode: 'ci', arg...
Add and pass tests for gardenLocation
package umm3601.plant; import com.google.gson.Gson; import org.junit.Before; import org.junit.Test; import umm3601.digitalDisplayGarden.Plant; import umm3601.digitalDisplayGarden.PlantController; import umm3601.plant.PopulateMockDatabase; import java.io.IOException; import static junit.framework.TestCase.assertEqual...
package umm3601.plant; import com.google.gson.Gson; import org.junit.Before; import org.junit.Test; import umm3601.digitalDisplayGarden.Plant; import umm3601.digitalDisplayGarden.PlantController; import umm3601.plant.PopulateMockDatabase; import java.io.IOException; import static junit.framework.TestCase.assertEqual...
Add a model for Object.assign
export default function(state, ctx, model, helpers) { const ConcretizeIfNative = helpers.ConcretizeIfNative; //TODO: Test IsNative for apply, bind & call model.add(Function.prototype.apply, ConcretizeIfNative(Function.prototype.apply)); model.add(Function.prototype.call, ConcretizeIfNative(Function.prototype.call...
export default function(state, ctx, model, helpers) { const ConcretizeIfNative = helpers.ConcretizeIfNative; //TODO: Test IsNative for apply, bind & call model.add(Function.prototype.apply, ConcretizeIfNative(Function.prototype.apply)); model.add(Function.prototype.call, ConcretizeIfNative(Function.prototype.call...
Fix crash when starting new bike activity
package fr.cph.chicago.listener; import android.content.Intent; import android.os.Bundle; import android.view.View; import fr.cph.chicago.App; import fr.cph.chicago.R; import fr.cph.chicago.activity.BikeStationActivity; import fr.cph.chicago.entity.BikeStation; public class BikeStationOnClickListener implements View...
package fr.cph.chicago.listener; import android.content.Intent; import android.os.Bundle; import android.view.View; import fr.cph.chicago.App; import fr.cph.chicago.R; import fr.cph.chicago.activity.BikeStationActivity; import fr.cph.chicago.entity.BikeStation; public class BikeStationOnClickListener implements View...
Fix for Friendly tips when Missing SOCIAL_AUTH_ALLOWED_REDIRECT_URIS i forget add SOCIAL_AUTH_ALLOWED_REDIRECT_URIS to my config it return 400 error, i don't know why , i pay more time find the issues so i add Friendly tips -- sorry , my english is not well and thank you all
from rest_framework import generics, permissions, status from rest_framework.response import Response from social_django.utils import load_backend, load_strategy from djoser.conf import settings from djoser.social.serializers import ProviderAuthSerializer class ProviderAuthView(generics.CreateAPIView): permissio...
from rest_framework import generics, permissions, status from rest_framework.response import Response from social_django.utils import load_backend, load_strategy from djoser.conf import settings from djoser.social.serializers import ProviderAuthSerializer class ProviderAuthView(generics.CreateAPIView): permissio...
Remove reference to web activity file
'use strict'; define([ 'backbone', 'app', 'views/app' ], function(Backbone, App, AppView) { var appView; var AppRouter = Backbone.Router.extend({ routes:{ '': 'index' }, initialize: function() { return this; }, index: function() { ...
'use strict'; define([ 'backbone', 'app', 'views/app', 'views/webactivities' ], function(Backbone, App, AppView, WebActivityViews) { var appView; var AppRouter = Backbone.Router.extend({ routes:{ 'subscribeFromWebActivity': 'webActivitySubscribe', '': 'index' ...
Adjust minidump dependency to >= 0.0.10
try: from setuptools import setup from setuptools import find_packages packages = find_packages() except ImportError: from distutils.core import setup import os packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')...
try: from setuptools import setup from setuptools import find_packages packages = find_packages() except ImportError: from distutils.core import setup import os packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')...
Fix typo in tests_require parameter
from setuptools import setup, find_packages VERSION = __import__('location_field').__version__ setup( name='django-location-field', version=VERSION, description="Location field for Django", long_description="This module provides a location field for Django applications.", author="Caio Ariede", ...
from setuptools import setup, find_packages VERSION = __import__('location_field').__version__ setup( name='django-location-field', version=VERSION, description="Location field for Django", long_description="This module provides a location field for Django applications.", author="Caio Ariede", ...
Deploy ember app to dist For fastboot-app-server
module.exports = function(deployTarget) { var ENV = { build: {} // include other plugin configuration that applies to all deploy targets here }; if (deployTarget === 'development') { ENV.build.environment = 'development'; // configure other plugins for development deploy target here } if (de...
module.exports = function(deployTarget) { var ENV = { build: {} // include other plugin configuration that applies to all deploy targets here }; if (deployTarget === 'development') { ENV.build.environment = 'development'; // configure other plugins for development deploy target here } if (de...
Move importing of the server module inside the scope of the worker process. This change saves us unnecessary redis connections to the master process
'use strict'; /* eslint-disable global-require */ // Load environment vars. require('dotenv').config(); const cluster = require('cluster'); const config = require('./config'); const logger = require('./lib/logger'); /** * exitHandler - When any of the workers die the cluster module will emit the 'exit' event. * ...
'use strict'; // Load environment vars. require('dotenv').config(); const cluster = require('cluster'); const config = require('./config'); const logger = require('./lib/logger'); const server = require('./server'); /** * exitHandler - When any of the workers die the cluster module will emit the 'exit' event. * ...
Drop argparse as a dependency argparse has been part of the standard library since Python 2.7, so there's no reason to declare this as a dependency, since it cannot be satisfied by anyone running a modern Linux distribution including a supported version of Python.
#!/usr/bin/env python3 from setuptools import setup exec(open('manatools/version.py').read()) try: import yui except ImportError: import sys print('Please install python3-yui in order to install this package', file=sys.stderr) sys.exit(1) setup( name=__project_name__, version=__project_version__...
#!/usr/bin/env python3 from setuptools import setup exec(open('manatools/version.py').read()) try: import yui except ImportError: import sys print('Please install python3-yui in order to install this package', file=sys.stderr) sys.exit(1) setup( name=__project_name__, version=__project_version__...
Use expect.shift instead of building an array of arguments for expect when delegating to the next assertion.
var BufferedStream = require('bufferedstream'); var createMockCouchAdapter = require('./createMockCouchAdapter'); var http = require('http'); var mockCouch = require('mock-couch-alexjeffburke'); var url = require('url'); function generateCouchdbResponse(databases, req, res) { var responseObject = null; var co...
var BufferedStream = require('bufferedstream'); var createMockCouchAdapter = require('./createMockCouchAdapter'); var http = require('http'); var mockCouch = require('mock-couch-alexjeffburke'); var url = require('url'); function generateCouchdbResponse(databases, req, res) { var responseObject = null; var co...
Add stack trace to exceptions in detailed mode
<?php namespace Light\ObjectService\Formats\Json\Serializers; use Light\ObjectService\Service\Protocol\ExceptionSerializer; class DefaultExceptionSerializer extends BaseSerializer implements ExceptionSerializer { /** @var bool */ protected $detailed; public function __construct($detailed = false, $contentType = "...
<?php namespace Light\ObjectService\Formats\Json\Serializers; use Light\ObjectService\Service\Protocol\ExceptionSerializer; class DefaultExceptionSerializer extends BaseSerializer implements ExceptionSerializer { /** @var bool */ protected $detailed; public function __construct($detailed = false, $contentType = "...
Transform ESM to CJS when BABEL_ENV is "test"
const pluginLodash = require('babel-plugin-lodash') const pluginReactRequire = require('babel-plugin-react-require').default const presetEnv = require('babel-preset-env') const presetStage1 = require('babel-preset-stage-1') const presetReact = require('babel-preset-react') const {BABEL_ENV} = process.env const defaul...
const pluginLodash = require('babel-plugin-lodash') const pluginReactRequire = require('babel-plugin-react-require').default const presetEnv = require('babel-preset-env') const presetStage1 = require('babel-preset-stage-1') const presetReact = require('babel-preset-react') const {BABEL_ENV} = process.env const defaul...
Remove unused Python 2 support
from django.contrib.staticfiles.storage import staticfiles_storage from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify from wagtail.wagtailcore.templatetags import wagtailcore_tags from wagtail.wagtailadmin.templatetags import wagtailuserbar from jinja2 import Environment fr...
from __future__ import absolute_import # Python 2 only from django.contrib.staticfiles.storage import staticfiles_storage from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify from wagtail.wagtailcore.templatetags import wagtailcore_tags from wagtail.wagtailadmin.templatetags...
Add build-raw-files log; fixes 12603 BS3 commits: 7100e3a37eedf31f6ba005bb045ee3074a6ee5ed
/* global btoa: true */ /*! * Bootstrap Grunt task for generating raw-files.min.js for the Customizer * http://getbootstrap.com * Copyright 2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ 'use strict'; var fs = require('fs'); var btoa = require('btoa'); var grunt ...
/* global btoa: true */ /*! * Bootstrap Grunt task for generating raw-files.min.js for the Customizer * http://getbootstrap.com * Copyright 2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ 'use strict'; var btoa = require('btoa'); var fs = require('fs'); function ...
feature/oop-api-refactoring: Remove redundant parentheses around if conditions
# -*- coding: utf-8 -*- from os.path import sep KEY = 'go' LABEL = 'Go' DEPENDENCIES = ['go'] TEMP_DIR = 'go' SUFFIX = 'go' # go build -o tmp/estimator tmp/estimator.go CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}' # tmp/estimator <args> CMD_EXECUTE = '{dest_dir}' + s...
# -*- coding: utf-8 -*- from os.path import sep KEY = 'go' LABEL = 'Go' DEPENDENCIES = ['go'] TEMP_DIR = 'go' SUFFIX = 'go' # go build -o tmp/estimator tmp/estimator.go CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}' # tmp/estimator <args> CMD_EXECUTE = '{dest_dir}' + s...
[auth] Connect to www not beta (which no longer exists)
"use strict"; var BaobabControllers; //globals BaobabControllers .controller('AppCtrl', ['$scope', '$me', '$inbox', '$auth', '$location', '$cookieStore', '$sce', function($scope, $me, $inbox, $auth, $location, $cookieStore, $sce) { var self = this; window.AppCtrl = this; this.inboxAuthURL = $sce.trustAsResource...
"use strict"; var BaobabControllers; //globals BaobabControllers .controller('AppCtrl', ['$scope', '$me', '$inbox', '$auth', '$location', '$cookieStore', '$sce', function($scope, $me, $inbox, $auth, $location, $cookieStore, $sce) { var self = this; window.AppCtrl = this; this.inboxAuthURL = $sce.trustAsResource...
Use explicit null check in `getNamesFromPattern`.
"use strict"; exports.getNamesFromPattern = function (pattern) { var queue = [pattern]; var names = []; for (var i = 0; i < queue.length; ++i) { var pattern = queue[i]; if (pattern === null) { // The ArrayPattern .elements array can contain null to indicate that // the position is a hole. ...
"use strict"; exports.getNamesFromPattern = function (pattern) { var queue = [pattern]; var names = []; for (var i = 0; i < queue.length; ++i) { var pattern = queue[i]; if (! pattern) { // The ArrayPattern .elements array can contain null to indicate the // element at that position that shou...
Remove int enum values, as they are unneeded
package com.openxc.measurements; import java.util.Locale; import com.openxc.units.State; /** * The ClimateMode measurement is used to start the AC/Heater/Fan */ public class ClimateMode extends BaseMeasurement<State<ClimateMode.ClimateControls>> { public final static String ID = "climate_mode"; public enum C...
package com.openxc.measurements; import java.util.Locale; import com.openxc.units.State; /** * The ClimateMode measurement is used to start the AC/Heater/Fan */ public class ClimateMode extends BaseMeasurement<State<ClimateMode.ClimateControls>> { public final static String ID = "climate_mode"; public enum C...
Include decorator requirement for tests as well One would think setup.py would include runtime deps with test deps, but no... References #6
import codecs from setuptools import find_packages, setup import digestive requires = ['decorator'] setup( name='digestive', version=digestive.__version__, url='https://github.com/akaIDIOT/Digestive', packages=find_packages(), description='Run several digest algorithms on the same data efficient...
import codecs from setuptools import find_packages, setup import digestive setup( name='digestive', version=digestive.__version__, url='https://github.com/akaIDIOT/Digestive', packages=find_packages(), description='Run several digest algorithms on the same data efficiently', author='Mattijs U...
Expand the sentence segmentation tests a little()
# import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 0 - a single simple sentence ("This is a simple sentence.", ["This is a simple sentence"]), # 1 - two simple sentences ("This is a simple ##@command-2## sentence. This one is too.", ["This is a si...
# import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 1 ("This is a simple ##@command-2## sentence. This one too.", ["This is a simple ##@command-2## sentence", "This one too"]), # 2 ("This is not a test in one go. openSUSE is not written with a capital ...
Add callback call after promise finishes.
'use strict'; const assert = require('assert'); const gulp = require('gulp'); const helper = require('gulp/helper'); const _ = require('lodash'); const Promise = require('bluebird').Promise; const sandbox = require('sandboxjs'); gulp.task('build:webtasks', cb => { const config = helper.getConfig(); assert(config....
'use strict'; const assert = require('assert'); const gulp = require('gulp'); const helper = require('gulp/helper'); const _ = require('lodash'); const Promise = require('bluebird').Promise; const sandbox = require('sandboxjs'); gulp.task('build:webtasks', cb => { const config = helper.getConfig(); assert(config....
Enable inhomogeneous packets in the main simulation runner
"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this ...
"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this ...
Remove key while opening a door
from onirim.card._base import ColorCard from onirim.card._location import LocationKind def _is_openable(door_card, card): """Check if the door can be opened by another card.""" return card.kind == LocationKind.key and door_card.color == card.color def _may_open(door_card, content): """Check if the door ...
from onirim.card._base import ColorCard from onirim.card._location import LocationKind def _openable(door_card, card): """Check if the door can be opened by another card.""" return card.kind == LocationKind.key and door_card.color == card.color def _may_open(door_card, content): """Check if the door may ...
Fix property name in test
import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonic_pressure == 0.0 assert thermoHMA.potential_energyHMA is None assert thermoHMA...
import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonicPressure == 0.0 assert thermoHMA.potential_energyHMA is None assert thermoHMA....
Fix user profile not serializing.
package io.github.vcuswimlab.stackintheflow.controller.component; import com.intellij.openapi.components.PersistentStateComponent; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.util.xmlb.XmlSerializerUtil; import org.jetbrains.annotations.Nullable; i...
package io.github.vcuswimlab.stackintheflow.controller.component; import com.intellij.openapi.components.PersistentStateComponent; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.util.xmlb.XmlSerializerUtil; import org.jetbrains.annotations.Nullable; i...
Fix ConvertAndFreeCoTaskMemString for 32 bit platforms
package interop import ( "syscall" "unsafe" ) //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go interop.go //sys coTaskMemFree(buffer unsafe.Pointer) = ole32.CoTaskMemFree func ConvertAndFreeCoTaskMemString(buffer *uint16) string { str := syscall.UTF16ToString((*[1 << 29]u...
package interop import ( "syscall" "unsafe" ) //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go interop.go //sys coTaskMemFree(buffer unsafe.Pointer) = ole32.CoTaskMemFree func ConvertAndFreeCoTaskMemString(buffer *uint16) string { str := syscall.UTF16ToString((*[1 << 30]u...
Allow unsetting of configuration (for testing)
# -*- coding: utf-8 -*- """ Ziggy ~~~~~~~~ :copyright: (c) 2012 by Rhett Garber :license: ISC, see LICENSE for more details. """ __title__ = 'ziggy' __version__ = '0.0.1' __build__ = 0 __author__ = 'Rhett Garber' __license__ = 'ISC' __copyright__ = 'Copyright 2012 Rhett Garber' import logging from . import utils ...
# -*- coding: utf-8 -*- """ Ziggy ~~~~~~~~ :copyright: (c) 2012 by Rhett Garber :license: ISC, see LICENSE for more details. """ __title__ = 'ziggy' __version__ = '0.0.1' __build__ = 0 __author__ = 'Rhett Garber' __license__ = 'ISC' __copyright__ = 'Copyright 2012 Rhett Garber' import logging from . import utils ...
Add github3.py depedency to be able to list all plugins from Github.
from setuptools import setup, find_packages setup( name='weaveserver', version='0.8', author='Srivatsan Iyer', author_email='supersaiyanmode.rox@gmail.com', packages=find_packages(), license='MIT', description='Library to interact with Weave Server', long_description=open('README.md').r...
from setuptools import setup, find_packages setup( name='weaveserver', version='0.8', author='Srivatsan Iyer', author_email='supersaiyanmode.rox@gmail.com', packages=find_packages(), license='MIT', description='Library to interact with Weave Server', long_description=open('README.md').r...
Disable test not working on GitHub workflow
/* * Copyright (c) 2014-2021 Bjoern Kimminich. * SPDX-License-Identifier: MIT */ const frisby = require('frisby') const Joi = frisby.Joi const URL = 'http://localhost:3000' describe('/snippet/:challenge', () => { it('GET code snippet retrieval for unknown challenge key throws error', () => { return frisby.g...
/* * Copyright (c) 2014-2021 Bjoern Kimminich. * SPDX-License-Identifier: MIT */ const frisby = require('frisby') const Joi = frisby.Joi const URL = 'http://localhost:3000' describe('/snippet/:challenge', () => { it('GET code snippet retrieval for unknown challenge key throws error', () => { return frisby.g...
OpenFile: Use *.bob over *.opi when called from alarm UI, cmd line
/******************************************************************************* * Copyright (c) 2015-2016 Oak Ridge National Laboratory. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, ...
/******************************************************************************* * Copyright (c) 2015-2016 Oak Ridge National Laboratory. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, ...