text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Fix load failure if not logged in.
package com.gh4a.loader; import java.io.IOException; import org.eclipse.egit.github.core.RepositoryId; import org.eclipse.egit.github.core.client.RequestException; import org.eclipse.egit.github.core.service.CollaboratorService; import android.content.Context; import com.gh4a.Gh4Application; public class IsCollabo...
package com.gh4a.loader; import java.io.IOException; import org.eclipse.egit.github.core.RepositoryId; import org.eclipse.egit.github.core.client.RequestException; import org.eclipse.egit.github.core.service.CollaboratorService; import android.content.Context; import com.gh4a.Gh4Application; public class IsCollabo...
Add process monitoring for LBaaS agents Add neutron-lbaas-agent (LBaaS V1) and neutron-lbaasv2-agent (LBaaS V2) to the neutron detection plugin. Because the string "neutron-lbaas-agent" can be both a process name and log file name, the process monitor is susceptible to false positive matching on that string. Use a lo...
import monasca_setup.detection class Neutron(monasca_setup.detection.ServicePlugin): """Detect Neutron daemons and setup configuration to monitor them. """ def __init__(self, template_dir, overwrite=True, args=None): service_params = { 'args': args, 'template_dir': templ...
import monasca_setup.detection class Neutron(monasca_setup.detection.ServicePlugin): """Detect Neutron daemons and setup configuration to monitor them. """ def __init__(self, template_dir, overwrite=True, args=None): service_params = { 'args': args, 'template_dir': templ...
Improve tests for multilingual json output
var path = require('path'); var _ = require('lodash'); var assert = require('assert'); var fs = require("fs"); var fsUtil = require("../lib/utils/fs"); var testGeneration = function(book, type, func, done) { var OUTPUT_PATH = book.options.output; qdone( book.generate(type) .then(function(...
var path = require('path'); var _ = require('lodash'); var assert = require('assert'); var fs = require("fs"); var fsUtil = require("../lib/utils/fs"); var testGeneration = function(book, type, func, done) { var OUTPUT_PATH = book.options.output; qdone( book.generate(type) .then(function(...
Make class final and mark it as thread-safe. Future modification or additions to this class must take thread-safety into consideration.
package alluxio.master.audit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.ArrayBlockingQueue; import javax.annotation.concurrent.ThreadSafe; @ThreadSafe public final class AsyncUserAccessAuditLogWriter { private static final int QUEUE_SIZE = 100; private static final Logg...
package alluxio.master.audit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.ArrayBlockingQueue; public class AsyncUserAccessAuditLogWriter { private static final int QUEUE_SIZE = 100; private static final Logger LOG = LoggerFactory.getLogger(AsyncUserAccessAuditLogWriter.cl...
Add support for multiple datasets
angular.module('siyfion.sfTypeahead', []) .directive('sfTypeahead', function () { return { restrict: 'ACE', scope: { datasets: '=', ngModel: '=' }, link: function (scope, element) { element.typeahead(scope.datasets); // Updates the ngModel binding when a va...
angular.module('siyfion.sfTypeahead', []) .directive('sfTypeahead', function () { return { restrict: 'ACE', scope: { datasets: '=', ngModel: '=' }, link: function (scope, element) { element.typeahead(scope.datasets); // Updates the ngModel binding when a va...
fix(rasterize-list): Update test to not hang on failed promise-dependant expecation
'use strict'; const expect = require('../../helpers/expect'); const fs = require('fs'); const sizeOf = require('image-size'); const RasterizeList = require('../../../src/utils/rasterize-list'); describe('RasterizeList', function() { // Hitting the file system is slow this.timeout(0); ...
'use strict'; const expect = require('../../helpers/expect'); const fs = require('fs'); const sizeOf = require('image-size'); const RasterizeList = require('../../../src/utils/rasterize-list'); describe('RasterizeList', function() { // Hitting the file system is slow this.timeout(0); ...
Support file globbing for log processor since names could be dynamic (based on hostname, etc.).
import glob import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'star...
import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'start': int(v['...
Test Depth First Search: Remove console logs
/* eslint-env mocha */ const dfs = require('../../../src').algorithms.search.dfs; const assert = require('assert'); describe('DFS', () => { it('should perform dfs on a tree', () => { const tree = { root: { name: 'root', children: [{ name: 'child_1', children: [{ ...
/* eslint-env mocha */ const dfs = require('../../../src').algorithms.search.dfs; const assert = require('assert'); describe('DFS', () => { it('should perform dfs on a tree', () => { const tree = { root: { name: 'root', children: [{ name: 'child_1', children: [{ ...
Add example of new cache_time field for callback queries.
<?php /** * This file is part of the TelegramBot package. * * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Longman\TelegramBot\Commands\SystemCommands; use Lo...
<?php /** * This file is part of the TelegramBot package. * * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Longman\TelegramBot\Commands\SystemCommands; use Lo...
BAP-2667: Modify CLI installer to allow run common commands from Package Manager[
<?php namespace Oro\Bundle\InstallerBundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Oro\Bundle\InstallerBundle\CommandExecutor; class PlatformUpdateCommand extends Containe...
<?php namespace Oro\Bundle\InstallerBundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Oro\Bundle\InstallerBundle\CommandExecutor; class PlatformUpdateCommand extends Containe...
Fix small bug introduced in 0b8e5d428e60. Opening file twice.
""" LWR HTTP Client layer based on Python Standard Library (urllib2) """ from __future__ import with_statement from os.path import getsize import mmap try: from urllib2 import urlopen except ImportError: from urllib.request import urlopen try: from urllib2 import Request except ImportError: from urllib....
""" LWR HTTP Client layer based on Python Standard Library (urllib2) """ from __future__ import with_statement from os.path import getsize import mmap try: from urllib2 import urlopen except ImportError: from urllib.request import urlopen try: from urllib2 import Request except ImportError: from urllib....
Change the way an expected set is instantated in a test
package org.tenidwa.collections.utils; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import java.util.Arrays; import java.util.LinkedHashSet; import org.junit.Assert; import org.junit.Test; public final class CollectorsTest { @Test public void toImmutableSet() ...
package org.tenidwa.collections.utils; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import java.util.Arrays; import java.util.LinkedHashSet; import org.junit.Assert; import org.junit.Test; public final class CollectorsTest { @Test public void toImmutableSet() ...
Change constructor parameter types from DayTime to DateModifying - as this interface defines the only method we need to call.
package uk.ac.ebi.quickgo.rest.period; import com.google.common.base.Preconditions; import java.time.Duration; import java.time.LocalDateTime; import java.util.Objects; import javax.validation.constraints.NotNull; /** * An implementation of a {@link Period} which uses two values for {@link DayTime} as start and end ...
package uk.ac.ebi.quickgo.rest.period; import com.google.common.base.Preconditions; import java.time.Duration; import java.time.LocalDateTime; import java.util.Objects; import javax.validation.constraints.NotNull; /** * An implementation of a {@link Period} which uses two values for {@link DayTime} as start and end ...
Fix typos: encoding, data -> self.encoding, self.data
#! /bin/env python from landlab.io.vtk.writer import VtkWriter from landlab.io.vtk.vtktypes import VtkUniformRectilinear from landlab.io.vtk.vtkxml import ( VtkRootElement, VtkGridElement, VtkPieceElement, VtkPointDataElement, VtkCellDataElement, VtkExtent, VtkOrigin, VtkSpacing, ) cl...
#! /bin/env python from landlab.io.vtk.writer import VtkWriter from landlab.io.vtk.vtktypes import VtkUniformRectilinear from landlab.io.vtk.vtkxml import ( VtkRootElement, VtkGridElement, VtkPieceElement, VtkPointDataElement, VtkCellDataElement, VtkExtent, VtkOrigin, VtkSpacing, ) cl...
Add StackOverFlowData, not completed yet
""" Helper classes """ import facebook import requests as r class FacebookData: def __init__(self, token): """ :param token: Facebook Page token :param _api: Instance of the GraphAPI object """ self.token = token self._api = facebook.GraphAPI(self.token) def g...
""" Helper classes """ import facebook import requests as r class FacebookData: def __init__(self, token): """ :param token: Facebook Page token :param _api: Instance of the GraphAPI object """ self.token = token self._api = facebook.GraphAPI(self.token) def g...
Fix command line arguments order for gjslint Closure Linter does not respect "--strict" flag if it goes after files list.
/** * common code goes here */ var grunt = require('grunt'), exec = require('child_process').exec, _ = grunt.util._; module.exports.registerTool = function(task, toolname) { var callback = task.async(), files = [], closureLinterPath = task.data.closureLinterPath, options = grunt....
/** * common code goes here */ var grunt = require('grunt'), exec = require('child_process').exec, _ = grunt.util._; module.exports.registerTool = function(task, toolname) { var callback = task.async(), files = [], closureLinterPath = task.data.closureLinterPath, options = grunt....
Refactor Gilda module and add function to get models
"""This module implements a client to the Gilda grounding web service, and contains functions to help apply it during the course of INDRA assembly.""" import requests from .mapper import GroundingMapper grounding_service_url = 'http://grounding.indra.bio' def get_gilda_models(): """Return a list of strings for ...
"""This module implements a client to the Gilda grounding web service, and contains functions to help apply it during the course of INDRA assembly.""" import requests from .mapper import GroundingMapper grounding_service_url = 'http://grounding.indra.bio/ground' def ground_statements(stmts): """Set grounding fo...
Fix for server root relative url
/** * Created by SuhairZain on 12/5/16. */ var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var PROD = JSON.parse(process.env.PROD_ENV || '0'); var plugins = [ new HtmlWebpackPlugin({ title: "URL to GDrive", filename: '../index.html', template: '...
/** * Created by SuhairZain on 12/5/16. */ var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var PROD = JSON.parse(process.env.PROD_ENV || '0'); var plugins = [ new HtmlWebpackPlugin({ title: "URL to GDrive", filename: '../index.html', template: '...
Fix for the sorted merge step git-svn-id: 51b39fcfd0d3a6ea7caa15377cad4af13b9d2664@4014 5fb7f6ec-07c1-534a-b4ca-9155e429e800
package org.pentaho.di.run.sortedmerge; import junit.framework.TestCase; import org.pentaho.di.core.Result; import org.pentaho.di.core.logging.LogWriter; import org.pentaho.di.run.AllRunTests; import org.pentaho.di.run.TimedTransRunner; public class RunSortedMerge extends TestCase { public void test_S...
package org.pentaho.di.run.sortedmerge; import junit.framework.TestCase; import org.pentaho.di.core.Result; import org.pentaho.di.core.logging.LogWriter; import org.pentaho.di.run.AllRunTests; import org.pentaho.di.run.TimedTransRunner; public class RunSortedMerge extends TestCase { public void test_S...
Allow preferred width or height to be overridden since it seems that JScrollPane will happily return some insane value when it's wrapping an empty JList. git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@2314 542714f4-19e9-0310-aa3c-eee0fc999fb1
// // $Id: SafeScrollPane.java,v 1.7 2003/03/22 01:56:09 mdb Exp $ package com.threerings.media; import java.awt.Component; import java.awt.Dimension; import java.awt.Point; import javax.swing.JComponent; import javax.swing.JScrollPane; import javax.swing.JViewport; /** * A scroll pane that is safe to use in frame...
// // $Id: SafeScrollPane.java,v 1.6 2002/11/05 21:03:31 mdb Exp $ package com.threerings.media; import java.awt.Component; import java.awt.Point; import javax.swing.JComponent; import javax.swing.JScrollPane; import javax.swing.JViewport; /** * A scroll pane that is safe to use in frame managed views. */ public ...
Fix path to "util.js" in test
const util = require('../../lib/util'); describe("Continuous delivery", function() { describe("utils", function() { describe("makeStringArray", function() { it('works when list is a string', function() { const result = util.makeStringArray('gugus'); expect(result...
const util = require('../../lib/continuous-delivery/util'); describe("Continuous delivery", function() { describe("utils", function() { describe("makeStringArray", function() { it('works when list is a string', function() { const result = util.makeStringArray('gugus'); ...
Remove unused interface from repository
<?php // @codingStandardsIgnoreFile // @codeCoverageIgnoreStart // this is an autogenerated file - do not edit spl_autoload_register( function($class) { static $classes = null; if ($classes === null) { $classes = array( 'theseer\\fdom\\fdomdocument' => '/src/fDOMDocument....
<?php // @codingStandardsIgnoreFile // @codeCoverageIgnoreStart // this is an autogenerated file - do not edit spl_autoload_register( function($class) { static $classes = null; if ($classes === null) { $classes = array( 'theseer\\fdom\\fdomdocument' => '/src/fDOMDocument....
Make user ids v1 UUIDs
var uuid = require('node-uuid'); var util = require('./util'); var bcrypt = require('bcryptjs'); module.exports = function(username, password, callback) { if (util.isEmpty(username) || util.isEmpty(password)) return callback(new Error('Username and password required')); this.db.get(this.prefix + this.usernameT...
var uuid = require('node-uuid'); var util = require('./util'); var bcrypt = require('bcryptjs'); module.exports = function(username, password, callback) { if (util.isEmpty(username) || util.isEmpty(password)) return callback(new Error('Username and password required')); this.db.get(this.prefix + this.usernameT...
Update resize script for new image size
<?php require_once '../includes/master.inc.php'; $cnt = 0; $mydir = dir('../media'); while (($file = $mydir->read()) !== false && $cnt < 200) { if ($file != "." && $file != "..") { if (strpos($file, '_thumbnail') !== false || strpos($file, '_mid') !== false || strpos($file, '_medlg') !== false) { ...
<?php require_once '../includes/master.inc.php'; $cnt = 0; $mydir = dir('../media'); while (($file = $mydir->read()) !== false && $cnt < 60) { if ($file != "." && $file != "..") { if (strpos($file, '_thumbnail') !== false || strpos($file, '_mid') !== false || strpos($file, '_medlg') !== false) { ...
Remove the use of `__DIR__` constant.
<?php namespace SerendipityHQ\Bundle\QueuesBundle; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass; use SerendipityHQ\Bundle\QueuesBundle\DependencyInjection\CompilerPass\DaemonDependenciesPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\H...
<?php namespace SerendipityHQ\Bundle\QueuesBundle; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass; use SerendipityHQ\Bundle\QueuesBundle\DependencyInjection\CompilerPass\DaemonDependenciesPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\H...
Fix running unit tests on Windows
<?php declare(strict_types=1); namespace Tests\Unit\Translator\Framework; use PHPUnit\Framework\TestCase; class HelperTest extends TestCase { /** @var string */ private $testDir; protected function setUp(): void { $this->testDir = realpath(__DIR__.'/../..') ?? ''; } public function ...
<?php declare(strict_types=1); namespace Tests\Unit\Translator\Framework; use PHPUnit\Framework\TestCase; class HelperTest extends TestCase { /** @var string */ private $testDir; protected function setUp(): void { $this->testDir = realpath(__DIR__.'/../..') ?? ''; } public function ...
Fix Call to undefined method DOMNodeList::getElementsByTagName()
<?php namespace Omnipay\SecureTrading\Message; use DOMDocument; /** * ThreeDSecure Request * * @method ThreeDSecureResponse send() */ class ThreeDSecureRequest extends AbstractPurchaseRequest { /** * @return string */ public function getAction() { return 'THREEDQUERY'; } /*...
<?php namespace Omnipay\SecureTrading\Message; use DOMDocument; /** * ThreeDSecure Request * * @method ThreeDSecureResponse send() */ class ThreeDSecureRequest extends AbstractPurchaseRequest { /** * @return string */ public function getAction() { return 'THREEDQUERY'; } /*...
Revert "dont pass bdajax. get it from window" This reverts commit 05393ce7c10b99eca03f1c8fb5c8f1a3abcc32b1.
/* jslint browser: true */ /* global jQuery, bdajax */ (function($, bdajax) { "use strict"; $(document).ready(function() { var binder = function(context) { $('div.availability', context).unbind('mouseover') .bind('mouseover', function() { var details = $(...
/* jslint browser: true */ /* global jQuery */ (function($) { "use strict"; $(document).ready(function() { var binder = function(context) { $('div.availability', context).unbind('mouseover') .bind('mouseover', function() { var details = $('div.availabilit...
Update Raft web site link
"use strict"; /*jslint browser: true, nomen: true*/ /*global define*/ define([], function () { return function (frame) { var player = frame.player(), layout = frame.layout(); frame.after(1, function() { frame.model().clear(); layout.invalidate(); }) ...
"use strict"; /*jslint browser: true, nomen: true*/ /*global define*/ define([], function () { return function (frame) { var player = frame.player(), layout = frame.layout(); frame.after(1, function() { frame.model().clear(); layout.invalidate(); }) ...
Remove application ID header from example. This is no longer required, so no need to present it in the admin panel.
@extends('layout.master') @section('main_content') @include('layout.header', ['header' => 'API Keys', 'subtitle' => 'Northstar application access & permissions']) <div class="container -padded"> <div class="wrapper"> <div class="container__block"> <h1>{{ $key->app_id }}</h...
@extends('layout.master') @section('main_content') @include('layout.header', ['header' => 'API Keys', 'subtitle' => 'Northstar application access & permissions']) <div class="container -padded"> <div class="wrapper"> <div class="container__block"> <h1>{{ $key->app_id }}</h...
Add uuid to remote shell node name. With this change it's possible to attach several remote shells to the same cluster. Previously there would be a name conflict. Change-Id: Ic85f99c8a7c27a80b37ecad994c39557934c7f50 Reviewed-on: http://review.couchbase.org/12365 Tested-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae768...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provides info about a particular server. """ from usage import usage import restclient import simplejson import subprocess import sys from uuid import uuid1 class Info: def __init__(self): self.debug = False def runCmd(self, cmd, server, port, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provides info about a particular server. """ from usage import usage import restclient import simplejson import subprocess import sys class Info: def __init__(self): self.debug = False def runCmd(self, cmd, server, port, user, passw...
Fix issue where bundle was happening before compile finished
var tsproject = require('tsproject'); var gulp = require('gulp'); var rjs = require('requirejs'); gulp.task('compile', function () { return tsproject.src('./').pipe(gulp.dest('./')); }); gulp.task('bundle', [ 'compile' ], function () { return rjs.optimize({ appDir: 'built/debug', baseUrl: './',...
var tsproject = require('tsproject'); var gulp = require('gulp'); var rjs = require('requirejs'); gulp.task('compile', function () { tsproject.src('./') .pipe(gulp.dest('./')); }); gulp.task('bundle', function () { rjs.optimize({ appDir: 'built/debug', baseUrl: './', dir: 'built...
Add tests for sending messages to emails without account.
from django.test import TestCase from django.core import mail from oscar.core.compat import get_user_model from oscar.apps.customer.utils import Dispatcher from oscar.apps.customer.models import CommunicationEventType from oscar.test.factories import create_order User = get_user_model() class TestDispatcher(TestCa...
from django.test import TestCase from django.core import mail from oscar.core.compat import get_user_model from oscar.apps.customer.utils import Dispatcher from oscar.apps.customer.models import CommunicationEventType from oscar.test.factories import create_order User = get_user_model() class TestDispatcher(TestCa...
Return this object in setName.
<?php namespace AppBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\User as BaseUser; /** * @ORM\Entity * @ORM\Table(name="users") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\Generat...
<?php namespace AppBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\User as BaseUser; /** * @ORM\Entity * @ORM\Table(name="users") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\Generat...
Update deps because of CVE-2019-10906 in Jinja2 < 2.10.1
from setuptools import setup, find_packages from pypandoc import convert def convert_markdown_to_rst(file): return convert(file, 'rst') setup(name='gitlabform', version='1.1.0', description='Easy configuration as code tool for GitLab using config in plain YAML', long_description=convert_mark...
from setuptools import setup, find_packages from pypandoc import convert def convert_markdown_to_rst(file): return convert(file, 'rst') setup(name='gitlabform', version='1.1.0', description='Easy configuration as code tool for GitLab using config in plain YAML', long_description=convert_mark...
Add a method for line by line asset parsing
class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ def __init__(self...
class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ def __init__(self...
Add conference name as fallback for subject
/* @flow */ import React, { Component } from 'react'; import { getConferenceName } from '../../../base/conference/functions'; import { connect } from '../../../base/redux'; import { isToolboxVisible } from '../../../toolbox'; import ParticipantsCount from './ParticipantsCount'; /** * The type of the React {@code C...
/* @flow */ import React, { Component } from 'react'; import { connect } from '../../../base/redux'; import { isToolboxVisible } from '../../../toolbox'; import ParticipantsCount from './ParticipantsCount'; /** * The type of the React {@code Component} props of {@link Subject}. */ type Props = { /** * T...
Add gettype() PHP Function to Twig Extension
<?php namespace Umpirsky\Twig\Extension; use Twig_Extension; use Twig_SimpleFunction; use BadFunctionCallException; class PhpFunctionExtension extends Twig_Extension { private $functions = array( 'uniqid', 'floor', 'ceil', 'addslashes', 'chr', 'chunk_​split', ...
<?php namespace Umpirsky\Twig\Extension; use Twig_Extension; use Twig_SimpleFunction; use BadFunctionCallException; class PhpFunctionExtension extends Twig_Extension { private $functions = array( 'uniqid', 'floor', 'ceil', 'addslashes', 'chr', 'chunk_​split', ...
Stop logging the MDB object
require(['ByteSource', 'AppleVolume'], function(ByteSource, AppleVolume) { 'use strict'; function makeFileDrop(el, callback) { if (typeof el === 'string') { el = document.getElementById(el); if (!el) { console.error('filedrop element not found'); return; } el.addEv...
require(['ByteSource', 'AppleVolume'], function(ByteSource, AppleVolume) { 'use strict'; function makeFileDrop(el, callback) { if (typeof el === 'string') { el = document.getElementById(el); if (!el) { console.error('filedrop element not found'); return; } el.addEv...
Allow data aggregate contents to be traversable
<?php /* * This file is part of Transfer. * * For the full copyright and license information, please view the LICENSE file located * in the root directory. */ namespace Transfer\Adapter\Transaction; /** * Holds data for transaction objects. */ class DataAggregate implements \IteratorAggregate { /** *...
<?php /* * This file is part of Transfer. * * For the full copyright and license information, please view the LICENSE file located * in the root directory. */ namespace Transfer\Adapter\Transaction; /** * Holds data for transaction objects. */ class DataAggregate implements \IteratorAggregate { /** *...
Remove useless ACME tab from UI.
'use strict'; var angular = require('angular'); var traefikCoreProvider = 'traefik.core.provider'; module.exports = traefikCoreProvider; angular .module(traefikCoreProvider, ['ngResource']) .factory('Providers', Providers); /** @ngInject */ function Providers($resource, $q) { const resourceProvider = $resource...
'use strict'; var angular = require('angular'); var traefikCoreProvider = 'traefik.core.provider'; module.exports = traefikCoreProvider; angular .module(traefikCoreProvider, ['ngResource']) .factory('Providers', Providers); /** @ngInject */ function Providers($resource, $q) { const resourceProvider = $resource...
Add parameter to Route::model() to force default behavior of using id This is useful, if you generally want to bind with a slug (web interface) but sometimes (e.g. API) want to use id.
<?php namespace Felixkiss\SlugRoutes; use Illuminate\Routing\Router; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class SlugRouter extends Router { public function model($key, $class, Closure $callback = null, $forceId = false) { return $this->bind($key, function($value) use ($cla...
<?php namespace Felixkiss\SlugRoutes; use Illuminate\Routing\Router; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class SlugRouter extends Router { public function model($key, $class, Closure $callback = null) { return $this->bind($key, function($value) use ($class, $callback) ...
Add code test for test_remove function
from devicehive import NetworkError from devicehive import ApiResponseError def test_save(test): def handle_connect(handler): name = test.generate_id('n-s') description = '%s-description' % name network = handler.api.create_network(name, description) name = test.generate_id('n-s')...
from devicehive import NetworkError from devicehive import ApiResponseError def test_save(test): def handle_connect(handler): name = test.generate_id('n-s') description = '%s-description' % name network = handler.api.create_network(name, description) name = test.generate_id('n-s')...
l10n_br_nfse: Update python lib erpbrasil.assinatura version 1.4.0
# Copyright 2019 KMEE INFORMATICA LTDA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "NFS-e", "summary": """ NFS-e""", "version": "14.0.1.7.0", "license": "AGPL-3", "author": "KMEE, Odoo Community Association (OCA)", "maintainers": ["gabrielcardoso21", "mileo...
# Copyright 2019 KMEE INFORMATICA LTDA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "NFS-e", "summary": """ NFS-e""", "version": "14.0.1.7.0", "license": "AGPL-3", "author": "KMEE, Odoo Community Association (OCA)", "maintainers": ["gabrielcardoso21", "mileo...
Update query configuration and source name
const ZoomdataSDK = require('zoomdata-client/distribute/sdk/zoomdata-client.node'); async function run() { const application = { secure: true, host: 'developer.zoomdata.com', port: 443, path: '/zoomdata-2.6' }; const credentials = { key: 'KVKWiD8kUl' }; con...
const ZoomdataSDK = require('zoomdata-client/distribute/sdk/zoomdata-client.node'); async function run() { const application = { secure: true, host: 'developer.zoomdata.com', port: 443, path: '/zoomdata-2.6' }; const credentials = { key: 'KVKWiD8kUl' }; ...
Add a shortcut to toggle debug mode.
import React from 'react'; import Invocation from './invocation'; import StatusLine from './status_line'; export default React.createClass({ getInitialState() { return {vcsData: { isRepository: true, branch: 'name', status: 'clean' }}; }, componentWillMou...
import React from 'react'; import Invocation from './invocation'; import StatusLine from './status_line'; export default React.createClass({ getInitialState() { return {vcsData: { isRepository: true, branch: 'name', status: 'clean' }}; }, componentWillMou...
Fix normalize signature for sf 4.4 https://github.com/symfony/serializer/blob/4.4/Normalizer/AbstractObjectNormalizer.php
<?php /** * Created by PhpStorm. * User: evaisse * Date: 05/05/15 * Time: 15:38 */ namespace evaisse\SimpleHttpBundle\Serializer; use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; class CustomGetSetNormalizer extends GetSetMethodNormalizer { /** * {@inheritdoc} */ public func...
<?php /** * Created by PhpStorm. * User: evaisse * Date: 05/05/15 * Time: 15:38 */ namespace evaisse\SimpleHttpBundle\Serializer; use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; class CustomGetSetNormalizer extends GetSetMethodNormalizer { /** * {@inheritdoc} */ public func...
Adjust generic name validation to better check tag values e.g. "name=Fast Food" should match "amenity=fast_food"
import { t } from '../util/locale'; import { discardNames } from '../../node_modules/name-suggestion-index/config/filters.json'; export function validationGenericName() { function isGenericName(entity) { var name = entity.tags.name; if (!name) return false; var i, re; // test if ...
import { t } from '../util/locale'; import { discardNames } from '../../node_modules/name-suggestion-index/config/filters.json'; export function validationGenericName() { function isGenericName(entity) { var name = entity.tags.name; if (!name) return false; if (entity.tags.amenity === nam...
Check that params can be null
package com.github.arteam.simplejsonrpc.core.domain; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.NullNode; import com.fasterxml.jackson.databind.node.ValueNode; import org.jetbrains.annotations.NotNull; import org.jetb...
package com.github.arteam.simplejsonrpc.core.domain; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.NullNode; import com.fasterxml.jackson.databind.node.ValueNode; import org.jetbrains.annotations.NotNull; import org.jetb...
Add import statement for get_user_model.
# (c) Crown Owned Copyright, 2016. Dstl. from django.core.urlresolvers import reverse from django.shortcuts import redirect from django.views.generic.base import View from django.contrib.auth import login from django.contrib.auth import get_user_model class Home(View): # Get the homepage. If the user isn't log...
# (c) Crown Owned Copyright, 2016. Dstl. from django.core.urlresolvers import reverse from django.shortcuts import redirect from django.views.generic.base import View from django.contrib.auth import login class Home(View): # Get the homepage. If the user isn't logged in, (we can find no trace # of the us...
Add \r at the end of Web socket
import os import socket import websocket from . import IOHandler def resolve_hostname(hostname, port): # We do our own mDNS resolution # to enforce we only search for IPV4 address # and avoid a 5s timeout in the websocket on the ESP # See https://github.com/esp8266/Arduino/issues/2110 addrinfo =...
import os import socket import websocket from . import IOHandler def resolve_hostname(hostname, port): # We do our own mDNS resolution # to enforce we only search for IPV4 address # and avoid a 5s timeout in the websocket on the ESP # See https://github.com/esp8266/Arduino/issues/2110 addrinfo =...
Add button for jumping to todays date
/** * Created by nkmathew on 05/07/2016. */ $(document).ready(function () { $("#profile-form").submit(function (e) { $("#btn-submit-profile").spin(BIG_SPINNER); var url = '/site/profile'; $.ajax({ type: 'POST', url: url, data: $("#profile-for...
/** * Created by nkmathew on 05/07/2016. */ $(document).ready(function () { $("#profile-form").submit(function (e) { $("#btn-submit-profile").spin(BIG_SPINNER); var url = '/site/profile'; $.ajax({ type: 'POST', url: url, data: $("#profile-for...
Fix automatic reconnect (e.g. on bad auth key) This took more time than it should have to debug.
import struct from zlib import crc32 from .connection import Connection from ...errors import InvalidChecksumError class ConnectionTcpFull(Connection): """ Default Telegram mode. Sends 12 additional bytes and needs to calculate the CRC value of the packet itself. """ def __init__(self, ip, port, ...
import struct from zlib import crc32 from .connection import Connection from ...errors import InvalidChecksumError class ConnectionTcpFull(Connection): """ Default Telegram mode. Sends 12 additional bytes and needs to calculate the CRC value of the packet itself. """ def __init__(self, ip, port, ...
Set zip_safe to False to eliminate a variable getting the tests to run
#!/usr/bin/env python """ Setup file for toolaudit. """ import codecs import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(filename): """ Read the contents of the files listed in filenames and return it as a string. """ return codecs.open(os.path.jo...
#!/usr/bin/env python """ Setup file for toolaudit. """ import codecs import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(filename): """ Read the contents of the files listed in filenames and return it as a string. """ return codecs.open(os.path.jo...
Use connection check in test
<?php declare(strict_types=1); namespace League\Flysystem\Ftp; use League\Flysystem\FilesystemAdapter; /** * @group ftp */ class FtpAdapterTest extends FtpAdapterTestCase { protected static function createFilesystemAdapter(): FilesystemAdapter { $options = FtpConnectionOptions::fromArray([ ...
<?php declare(strict_types=1); namespace League\Flysystem\Ftp; use League\Flysystem\FilesystemAdapter; /** * @group ftp */ class FtpAdapterTest extends FtpAdapterTestCase { protected static function createFilesystemAdapter(): FilesystemAdapter { $options = FtpConnectionOptions::fromArray([ ...
Fix mistaken reference to image_callback.
#!/usr/bin/env python # -*- coding: utf-8 -*- # (C) 2015 Jean Nassar # Released under BSD version 4 """ Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz. """ import rospy from sensor_msgs.msg import Image class ImageFeature(object): """ A ROS image Publisher/Subscriber. """ def __init__(self)...
#!/usr/bin/env python # -*- coding: utf-8 -*- # (C) 2015 Jean Nassar # Released under BSD version 4 """ Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz. """ import rospy from sensor_msgs.msg import Image class ImageFeature(object): """ A ROS image Publisher/Subscriber. """ def __init__(self)...
Refactor file to match masseuse spec.
/** * The google api module is responsible for all google operations. */ module.exports = function(app){ 'use strict'; var _ = require('underscore'), config = require('../config'), bridgetown = require('bridgetown-api'), grasshopper = require('grasshopper-core'), Response = br...
/** * The google api module is responsible for all google operations. */ module.exports = function(app){ 'use strict'; var _ = require('underscore'), config = require('../config'), bridgetown = require('bridgetown-api'), grasshopper = require('grasshopper-core'), google = {}, ...
Read properties from a property file Reads a property value from either a project property file of the file or value is missing, tries to get a default value for that property.
package nl.codecastle.configuration; import java.io.IOException; import java.io.InputStream; import java.util.Properties; /** * Reads properties file from a given location. */ public class PropertiesReader { private final Properties properties; private final Properties defaultProperties; /** * Re...
package nl.codecastle.configuration; import java.io.IOException; import java.io.InputStream; import java.util.Properties; /** * Reads properties file from a given location. */ public class PropertiesReader { private final Properties properties; private final Properties defaultProperties; /** * Re...
Fix JS ObjectDB class wrapper to use format "plugins.Foo.Bar" not "plugin.Foo.Bar". Oops!
package uk.co.uwcs.choob.support; import java.io.*; import org.mozilla.javascript.*; public final class ObjectDBClassJSWrapper implements ObjectDBClass { private Function cls; public ObjectDBClassJSWrapper(Object obj) { if (!(obj instanceof Function)) { throw new RuntimeException("Trying to wrap a non-functi...
package uk.co.uwcs.choob.support; import java.io.*; import org.mozilla.javascript.*; public final class ObjectDBClassJSWrapper implements ObjectDBClass { private Function cls; public ObjectDBClassJSWrapper(Object obj) { if (!(obj instanceof Function)) { throw new RuntimeException("Trying to wrap a non-functi...
Add new page for register to session cleanup.
<?php /** * This file is part of the Stippers project (available here: https://github.com/Stannieman/stippers/). * The license and all terms en conditions that apply to Stippers also apply to this file. * * @author Stan Wijckmans * * Middleware to do some session cleanup. It removes data from session that's ir...
<?php /** * This file is part of the Stippers project (available here: https://github.com/Stannieman/stippers/). * The license and all terms en conditions that apply to Stippers also apply to this file. * * @author Stan Wijckmans * * Middleware to do some session cleanup. It removes data from session that's ir...
Change default value for root_dir
<?php namespace Ftrrtf\RollbarBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symf...
<?php namespace Ftrrtf\RollbarBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symf...
Add pytz to installation requirements, needed for pedometerpp
from setuptools import setup import io # Take from Jeff Knupp's excellent article: # http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/ def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for filename in...
from setuptools import setup import io # Take from Jeff Knupp's excellent article: # http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/ def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for filename in...
Check repo type and repo name alwways on lower case
<?php declare(strict_types=1); namespace ApiClients\Client\Github\CommandBus\Handler\Repository; use ApiClients\Client\AppVeyor\AsyncClient; use ApiClients\Client\AppVeyor\Resource\ProjectInterface; use ApiClients\Client\Github\CommandBus\Command\Repository\AppVeyorCommand; use React\Promise\Promise; use React\Promis...
<?php declare(strict_types=1); namespace ApiClients\Client\Github\CommandBus\Handler\Repository; use ApiClients\Client\AppVeyor\AsyncClient; use ApiClients\Client\AppVeyor\Resource\ProjectInterface; use ApiClients\Client\Github\CommandBus\Command\Repository\AppVeyorCommand; use React\Promise\Promise; use React\Promis...
Make the nonce more secure and faster to generate
# -*- coding: utf-8 -*- # Import nacl libs import libnacl import libnacl.encode # Import python libs import time import binascii class BaseKey(object): ''' Include methods for key management convenience ''' def hex_sk(self): if hasattr(self, 'sk'): return libnacl.encode.hex_encod...
# -*- coding: utf-8 -*- # Import nacl libs import libnacl import libnacl.encode # Import python libs import datetime import binascii class BaseKey(object): ''' Include methods for key management convenience ''' def hex_sk(self): if hasattr(self, 'sk'): return libnacl.encode.hex_e...
Fix issues reported by Sonar
package me.devsaki.hentoid.collection.mikan; import com.google.gson.annotations.Expose; import me.devsaki.hentoid.database.domains.Attribute; import me.devsaki.hentoid.enums.AttributeType; import me.devsaki.hentoid.enums.Site; public class MikanAttribute { // Published by both Collection and Attributes endpoints...
package me.devsaki.hentoid.collection.mikan; import com.google.gson.annotations.Expose; import me.devsaki.hentoid.database.domains.Attribute; import me.devsaki.hentoid.enums.AttributeType; import me.devsaki.hentoid.enums.Site; public class MikanAttribute { // Published by both Collection and Attributes endpoints...
Add support for custom OkHttpClient when creating bot
package com.pengrad.telegrambot; import com.google.gson.Gson; import com.pengrad.telegrambot.impl.FileApi; import com.pengrad.telegrambot.impl.TelegramBotClient; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.logging.HttpLoggingInterceptor; /** * stas * 8/4/15. */ public class TelegramBotA...
package com.pengrad.telegrambot; import com.google.gson.Gson; import com.pengrad.telegrambot.impl.FileApi; import com.pengrad.telegrambot.impl.TelegramBotClient; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.logging.HttpLoggingInterceptor; /** * stas * 8/4/15. */ public class TelegramBotA...
Add delay of 1.5s before search list refresh It takes one second for elasticsearch to update it's index. See `index.refresh_interval` in https://www.elastic.co/guide/en/elasticsearch/reference/5.6/index-modules.html#dynamic-index-settings
'use strict'; angular.module('mean.icu.ui.searchlist') .controller('SearchListController', function ($rootScope, $scope, $stateParams, $location, $timeout, results, term, SearchService, UsersService) { document.me = $scope.me.id; $scope.results = results; filterFinalRes(); $scope.inObjArray = function(id,a...
'use strict'; angular.module('mean.icu.ui.searchlist') .controller('SearchListController', function ($rootScope, $scope, $stateParams, $location, $timeout, results, term, SearchService, UsersService) { document.me = $scope.me.id; $scope.results = results; filterFinalRes(); $scope.inObjArray = function(id,a...
Fix scripting for remote web services.
<?php namespace DreamFactory\Core\Events; use DreamFactory\Core\Contracts\ServiceRequestInterface; use DreamFactory\Core\Contracts\ServiceResponseInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\StreamedResponse; class ApiEvent extends ServiceEvent { public $...
<?php namespace DreamFactory\Core\Events; use DreamFactory\Core\Contracts\ServiceRequestInterface; use DreamFactory\Core\Contracts\ServiceResponseInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\StreamedResponse; class ApiEvent extends ServiceEvent { public $...
Update leaflet request to be over https
from django.contrib.gis.forms import widgets class LeafletPointWidget(widgets.BaseGeometryWidget): template_name = 'leaflet/leaflet.html' class Media: css = { 'all': ('https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css', 'leaflet/css/location_form.css', ...
from django.contrib.gis.forms import widgets class LeafletPointWidget(widgets.BaseGeometryWidget): template_name = 'leaflet/leaflet.html' class Media: css = { 'all': ('https://cdnjs.cloudflare.com/ajax/libs/leaflet/v0.7.7/leaflet.css', 'leaflet/css/location_form.css', ...
Add YiiAsset dependency for widget asset bundles
<?php /** * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2013 * @package yii2-widgets * @version 1.0.0 */ namespace kartik\widgets; /** * Base asset bundle for all widgets * * @author Kartik Visweswaran <kartikv2@gmail.com> * @since 1.0 */ class AssetBundle extends \yii\web\AssetBundle { ...
<?php /** * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2013 * @package yii2-widgets * @version 1.0.0 */ namespace kartik\widgets; /** * Base asset bundle for all widgets * * @author Kartik Visweswaran <kartikv2@gmail.com> * @since 1.0 */ class AssetBundle extends \yii\web\AssetBundle { ...
Fix GitHub code editor whitespaces
from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version information. ...
from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version information. ...
Add in the active level to json output for the mobile game to use
import random as orig_random from decorator import decorator import binascii import struct import hashlib from gameserver.database import db db_session = db.session random = orig_random.Random() random.seed() def node_to_dict(node): connections = [] for edge in node.lower_edges: connections.append( ...
import random as orig_random from decorator import decorator import binascii import struct import hashlib from gameserver.database import db db_session = db.session random = orig_random.Random() random.seed() def node_to_dict(node): connections = [] for edge in node.lower_edges: connections.append( ...
Set the base url of the dummy app
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
Add in model contact beforeUpdate
/** * Contact.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/#!documentation/models */ var bcrypt = require('bcrypt'); module.exports = { attributes: { firstname: { type: 'string' }, las...
/** * Contact.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/#!documentation/models */ var bcrypt = require('bcrypt'); module.exports = { attributes: { firstname: { type: 'string' }, las...
Refactor loadMap to take result
(function() { 'use strict'; /** * Controller for the gw app root view -- handles header bar and search bar logic */ /* ngInject */ function RootController($log, $state, Geocoder) { var ctl = this; initialize(); function initialize() { ctl.searchText = '...
(function() { 'use strict'; /** * Controller for the gw app root view -- handles header bar and search bar logic */ /* ngInject */ function RootController($log, $state, Geocoder) { var ctl = this; initialize(); function initialize() { ctl.searchText = '...
Add md5 hash password encryption in SQL
<?php foreach ( $_POST as $key => $value ) { $$key = $value; } include 'ConnectDB.php'; session_start(); $_SESSION['username']=$user_username; unset($_SESSION['password']); if($user_username==""||$user_password==""){ header("location: login.php?errMsg=".urlencode("Please Fill All the Req...
<?php foreach ( $_POST as $key => $value ) { $$key = $value; } include 'ConnectDB.php'; session_start(); $_SESSION['username']=$user_username; unset($_SESSION['password']); if($user_username==""||$user_password==""){ header("location: login.php?errMsg=".urlencode("Please Fill All the Req...
Fix resource paths for user file attachments. When I fixed the names in the user file attachments resource to make it available within the API templates, I neglected to actually test the javascript in the Review Board UI, which was still using the old paths and names. This change fixes it. Testing done: Drag-and-drop...
/** * A new or existing user file attachment. * * Model Attributes: * caption (string): * The file attachment's caption. * * userName (string): * The username of the owner of the file attachment. * * downloadURL (string): * The URL to download the file, for existing file a...
/** * A new or existing user file attachment. * * Model Attributes: * caption (string): * The file attachment's caption. * * userName (string): * The username of the owner of the file attachment. * * downloadURL (string): * The URL to download the file, for existing file a...
Add client initial request through component did mount
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as profileActions from '../../modules/profile'; class UserPicPage extends Component { componentDidMount() { this.props.fetchProfile(); } static needs = [p...
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as profileActions from '../../modules/profile'; class UserPicPage extends Component { static needs = [profileActions.fetchProfile] render() { const { ...
FIX: Check for fillOpacity when fill is undefined Fix for condition where both fill and fillOpacity properties are undefined
import rgba from './rgba'; import { ART } from 'react-native'; let { LinearGradient, RadialGradient } = ART; let fillPatterns = {}; let fillReg = /^url\(#(\w+?)\)$/; function isGradient(obj) { return obj instanceof LinearGradient || obj instanceof RadialGradient; } export default function (props...
import rgba from './rgba'; import { ART } from 'react-native'; let { LinearGradient, RadialGradient } = ART; let fillPatterns = {}; let fillReg = /^url\(#(\w+?)\)$/; function isGradient(obj) { return obj instanceof LinearGradient || obj instanceof RadialGradient; } export default function (props...
Remove box prefix from config
/* * Things Gateway Default Configuration. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict'; module.exports = { // Expose CLI cli: true, ...
/* * Things Gateway Default Configuration. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict'; module.exports = { // Expose CLI cli: true, ...
Use of commonjs import/export syntaxe
const mongo = require('../db') const utils = require('../utils') /** * User :: { * id: String, * username: String, * password: String, * createdAt: String * } */ /** String -> String -> User */ function createUser(username, password) { return { "id": utils.UUID(), "username": us...
import mongo from '../db' import utils from '../utils' import crypto from 'crypto' /** * User :: { * id: String, * username: String, * password: String, * createdAt: String * } */ /** String -> String -> User */ function createUser(username, password) { return { "id": utils.UUID(), ...
Fix shape item promise handler test suite
// DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details. 'use strict'; var expect = require('chai').expect; describe('Shape Item Promise Handler', function() { it('changes the promise shape into a content shape and runs a new rendering life cycle for the item', function(done) { va...
// DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details. 'use strict'; var expect = require('chai').expect; describe('Shape Item Promise Handler', function() { it('changes the promise shape into a content shape and runs a new rendering life cycle for the item', function(done) { va...
Use the 'with' keyword for managing template file pointers
from django import template from ..conf import conf from ..loading import find, MustacheJSTemplateNotFound register = template.Library() class MustacheJSNode(template.Node): def __init__(self, name): self.name = template.Variable(name) def render(self, context): name = self.name.resolve...
from django import template from ..conf import conf from ..loading import find, MustacheJSTemplateNotFound register = template.Library() class MustacheJSNode(template.Node): def __init__(self, name): self.name = template.Variable(name) def render(self, context): name = self.name.resolve...
Update iframe url (the poor video was removed)
import React from 'react'; import { storiesOf } from '@kadira/storybook'; import AspectRatio from '../index'; import '../../aspect-ratio.css'; storiesOf('AspectRatio', module) .add('Image', () => ( <div className="card"> <h2>Image with Aspect Ratio</h2> <AspectRatio ratio="3/4" style={{ maxWidth: '4...
import React from 'react'; import { storiesOf } from '@kadira/storybook'; import AspectRatio from '../index'; import '../../aspect-ratio.css'; storiesOf('AspectRatio', module) .add('Image', () => ( <div className="card"> <h2>Image with Aspect Ratio</h2> <AspectRatio ratio="3/4" style={{ maxWidth: '4...
Allow viewport to be initialized with a pre-existing camera model
cinema.views.ViewportView = Backbone.View.extend({ initialize: function (opts) { this.$el.html(cinema.app.templates.viewport()); this.camera = opts.camera || new cinema.models.CameraModel({ info: this.model }); this.renderView = new cinema.views.VisualizationCanvasWidg...
cinema.views.ViewportView = Backbone.View.extend({ initialize: function () { this.$el.html(cinema.app.templates.viewport()); this.camera = new cinema.models.CameraModel({ info: this.model }); this.renderView = new cinema.views.VisualizationCanvasWidget({ el...
Fix refresh button highlighted after click
import React, { PropTypes } from 'react' import { connect } from 'react-redux' import ContainerFluid from '../ContainerFluid' import VmUserMessages from '../VmUserMessages' import UserMenu from './UserMenu' import { getAllVms } from '../../actions/vm' /** * Main application header on top of the page */ const VmsPa...
import React, { PropTypes } from 'react' import { connect } from 'react-redux' import ContainerFluid from '../ContainerFluid' import VmUserMessages from '../VmUserMessages' import UserMenu from './UserMenu' import { getAllVms } from '../../actions/vm' /** * Main application header on top of the page */ const VmsPa...
Add possibility to open comment form by clicking anywhere in the diff line
angular.module('codebrag.commits.comments') .directive('commentable', function($compile, events) { var template = $('#inlineCommentForm').html(); return { restrict: 'A', link: function(scope, element) { var alreadyOpened = false; var onclick ...
angular.module('codebrag.commits.comments') .directive('commentable', function($compile, events) { var template = $('#inlineCommentForm').html(); return { restrict: 'A', link: function(scope, element, attrs) { var alreadyOpened = false; var co...
Fix deprecation error because missing the static keyword
<?php namespace PastryBag\Di; use Aura\Di\Container; use Aura\Di\ContainerBuilder; use Aura\Di\ContainerConfigInterface; class PastryBag { /** * The current container instance * @var Container */ protected static $instance; /** * @param array $configClasses * @return Container ...
<?php namespace PastryBag\Di; use Aura\Di\Container; use Aura\Di\ContainerBuilder; use Aura\Di\ContainerConfigInterface; class PastryBag { /** * The current container instance * @var Container */ protected static $instance; /** * @param array $configClasses * @return Container ...
Fix file level doc for test class Fix DisallowLongArraySyntax to DisallowShortArraySyntax.
<?php /** * Unit test class for the DisallowShortArraySyntax sniff. * * @author Greg Sherwood <gsherwood@squiz.net> * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence */ namespace PHP_CodeSniffer\Standards\Gen...
<?php /** * Unit test class for the DisallowLongArraySyntax sniff. * * @author Greg Sherwood <gsherwood@squiz.net> * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence */ namespace PHP_CodeSniffer\Standards\Gene...
Change eslint indentation style to 2 spaces
module.exports = { "env": { "es6": true, "node": true }, "extends": "airbnb-base", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "error", 2, { "SwitchCase": 1 } ], "quotes": [ "error", ...
module.exports = { "env": { "es6": true, "node": true }, "extends": "airbnb-base", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "error", 4, { "SwitchCase": 1 } ], "quotes": [ "error", ...
Allow HTTP auth during tests
from django.conf import settings from django.utils.translation import ugettext as _ from django_digest import HttpDigestAuthenticator from rest_framework.authentication import ( BaseAuthentication, get_authorization_header, BasicAuthentication) from rest_framework.exceptions import AuthenticationFailed class ...
from django.utils.translation import ugettext as _ from django_digest import HttpDigestAuthenticator from rest_framework.authentication import ( BaseAuthentication, get_authorization_header, BasicAuthentication) from rest_framework.exceptions import AuthenticationFailed class DigestAuthentication(BaseAuthenti...
Add optimizer to the API Former-commit-id: 3e06c976ad6a7d4409817fb0fa1472237bfa28b7
from .io import preprocess from .train import train from .network import mlp def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True, mask=None, type='normal', activation='relu', testset=False, learning_rate=1e-2, hidden_size=(256,64,256), l2_coef=0., epo...
from .io import preprocess from .train import train from .network import mlp def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True, mask=None, type='normal', activation='relu', testset=False, learning_rate=1e-2, hidden_size=(256,64,256), l2_coef=0., epo...
Remove verbose logging on PlayerActionService
<?php /* * Spring Signage Ltd - http://www.springsignage.com * Copyright (C) 2016 Spring Signage Ltd * (Xmr.php) */ namespace Xibo\Middleware; use Slim\Middleware; use Xibo\Service\PlayerActionService; /** * Class Xmr * @package Xibo\Middleware */ class Xmr extends Middleware { public function call() ...
<?php /* * Spring Signage Ltd - http://www.springsignage.com * Copyright (C) 2016 Spring Signage Ltd * (Xmr.php) */ namespace Xibo\Middleware; use Slim\Middleware; use Xibo\Service\PlayerActionService; /** * Class Xmr * @package Xibo\Middleware */ class Xmr extends Middleware { public function call() ...
Add validate published on templatetag get all articlebox
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = s...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = s...
Add step command to help
import backend.Core; import java.io.IOException; import parse.GreetParser; import parse.StepParser; public class App { public String getGreeting() { return "Hello world."; } /** * Main entry point to G2Tutorial. * * @param args commandline arguments */ public static void main(String[] args) {...
import backend.Core; import java.io.IOException; import parse.GreetParser; import parse.StepParser; public class App { public String getGreeting() { return "Hello world."; } /** * Main entry point to G2Tutorial. * * @param args commandline arguments */ public static void main(String[] args) {...
Fix strategy name in error message.
package org.metaborg.spoofax.core.stratego.primitive.scopegraph; import org.metaborg.scopegraph.context.IScopeGraphContext; import org.metaborg.scopegraph.context.IScopeGraphUnit; import org.metaborg.scopegraph.indices.TermIndex; import org.metaborg.util.log.ILogger; import org.metaborg.util.log.LoggerUtils; import or...
package org.metaborg.spoofax.core.stratego.primitive.scopegraph; import org.metaborg.scopegraph.context.IScopeGraphContext; import org.metaborg.scopegraph.context.IScopeGraphUnit; import org.metaborg.scopegraph.indices.TermIndex; import org.metaborg.util.log.ILogger; import org.metaborg.util.log.LoggerUtils; import or...
Update polyfill url to include default
/* eslint-disable react/no-danger */ import Document, { Head, Main, NextScript } from 'next/document' import React from 'react' // The document (which is SSR-only) needs to be customized to expose the locale // data for the user's locale for React Intl to work in the browser. export default class IntlDocument extends...
/* eslint-disable react/no-danger */ import Document, { Head, Main, NextScript } from 'next/document' import React from 'react' // The document (which is SSR-only) needs to be customized to expose the locale // data for the user's locale for React Intl to work in the browser. export default class IntlDocument extends...
Set profile once <select> has been initialized
var EdsnSwitch = (function () { 'use strict'; var EDSN_THRESHOLD = 30, validBaseLoads = /^(base_load|base_load_edsn)$/; function swapSelectBox() { var self = this, type = $(this.target).data('type'), profile = $(this.target).data('profile'), ...
var EdsnSwitch = (function () { 'use strict'; var EDSN_THRESHOLD = 30, validBaseLoads = /^(base_load|base_load_edsn)$/; function swapSelectBox() { var self = this, type = $(this.target).data('type'), profile = $(this.target).data('profile'), ...
Update REST API for LVAP handoffs
package net.floodlightcontroller.odin.master; import java.io.IOException; import java.net.InetAddress; import java.util.HashMap; import net.floodlightcontroller.util.MACAddress; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.Objec...
package net.floodlightcontroller.odin.master; import java.io.IOException; import java.net.InetAddress; import java.util.HashMap; import net.floodlightcontroller.util.MACAddress; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.Objec...
Add support for Parsedown Extra
<?php namespace allejo\stakx\Engines; use Highlight\Highlighter; class MarkdownEngine extends \ParsedownExtra { protected $highlighter; public function __construct () { parent::__construct(); $this->highlighter = new Highlighter(); } protected function blockHeader($line) { ...
<?php namespace allejo\stakx\Engines; use Highlight\Highlighter; class MarkdownEngine extends \Parsedown { protected $highlighter; public function __construct () { $this->highlighter = new Highlighter(); } protected function blockHeader($line) { $Block = parent::blockHeader(...