text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Switch first handler arg from "server" to "client".
from kismetclient.utils import csv from kismetclient.exceptions import ServerError def kismet(client, version, starttime, servername, dumpfiles, uid): """ Handle server startup string. """ print version, servername, uid def capability(client, CAPABILITY, capabilities): """ Register a server capability. ...
from kismetclient.utils import csv from kismetclient.exceptions import ServerError def kismet(server, version, starttime, servername, dumpfiles, uid): """ Handle server startup string. """ print version, servername, uid def capability(server, CAPABILITY, capabilities): """ Register a server's capability...
Allow passing new messages for same locale
import { Component, Children } from 'react' import PropTypes from 'prop-types' import Polyglot from 'node-polyglot' // Provider root component export default class I18n extends Component { constructor(props) { super(props) this._polyglot = new Polyglot({ locale: props.locale, phrases: props.mess...
import { Component, Children } from 'react' import PropTypes from 'prop-types' import Polyglot from 'node-polyglot' // Provider root component export default class I18n extends Component { constructor(props) { super(props) this._polyglot = new Polyglot({ locale: props.locale, phrases: props.mess...
Add ginkgo defer to allow us to see error message -This is when the main_suite_test fails before running the main_test
package main_test import ( "os" "os/exec" "path" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "testing" ) func TestMain(t *testing.T) { RegisterFailHandler(Fail) dir, err := os.Getwd() Expect(err).NotTo(HaveOccurred()) cmd := exec.Command("go", "build", "-o", path.Join(dir, "..", "fixtures", "pl...
package main_test import ( "os" "os/exec" "path" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "testing" ) func TestMain(t *testing.T) { RegisterFailHandler(Fail) dir, err := os.Getwd() Expect(err).NotTo(HaveOccurred()) cmd := exec.Command("go", "build", "-o", path.Join(dir, "..", "fixtures", "pl...
Use triple-quotes for long strings
from distutils.core import setup import bugspots setup( name="bugspots", version=bugspots.__version__, description="""Identify hot spots in a codebase with the bug prediction algorithm used at Google.""", long_description=bugspots.__doc__, author=bugspots.__author__, author_email="bmbslice@gmail.com", url="htt...
from distutils.core import setup import bugspots setup( name="bugspots", version=bugspots.__version__, description="Identify hot spots in a codebase with the bug prediction \ algorithm used at Google", long_description=bugspots.__doc__, author=bugspots.__author__, author_email="bmbslice@gmail.com", url="http:/...
Copy new implementation of $trWrapper and $tr from i18n.js
import vue from 'vue'; import vuex from 'vuex'; import router from 'vue-router'; import vueintl from 'vue-intl'; import 'intl'; import 'intl/locale-data/jsonp/en.js'; vue.prototype.Kolibri = {}; vue.config.silent = true; vue.use(vuex); vue.use(router); vue.use(vueintl, { defaultLocale: 'en-us' }); function $trWrapper...
import vue from 'vue'; import vuex from 'vuex'; import router from 'vue-router'; import vueintl from 'vue-intl'; vue.prototype.Kolibri = {}; vue.config.silent = true; vue.use(vuex); vue.use(router); require('intl'); require('intl/locale-data/jsonp/en.js'); vue.use(vueintl, { defaultLocale: 'en-us' }); vue.mixin({ s...
Fix parseDocument (was broken on Firefox)
/* HTML utilities */ define(function () { function parseDocument(html) { // The HTML parsing is not supported on all the browsers, maybe we // should use a polyfill? var parser = new DOMParser(); return parser.parseFromString(html, 'text/html'); } function load(url, processR...
/* HTML utilities */ define(function () { function parseDocument(html) { /* var parser = new DOMParser(); return parser.parseFromString(html, 'text/html'); */ var doc = document.implementation.createHTMLDocument(''); doc.open(); doc.write(html); doc.cl...
Use buffered channel for signals to fix go vet
package cli import ( "os" "os/signal" "syscall" "github.com/99designs/aws-vault/v6/server" "github.com/alecthomas/kingpin" ) func ConfigureProxyCommand(app *kingpin.Application, a *AwsVault) { stop := false cmd := app.Command("proxy", "Start a proxy for the ec2 instance role server locally"). Alias("server...
package cli import ( "os" "os/signal" "syscall" "github.com/99designs/aws-vault/v6/server" "github.com/alecthomas/kingpin" ) func ConfigureProxyCommand(app *kingpin.Application, a *AwsVault) { stop := false cmd := app.Command("proxy", "Start a proxy for the ec2 instance role server locally"). Alias("server...
Replace tiles after the world ticked. Might stop a crash with fastcraft
package ganymedes01.etfuturum.core.handlers; import ganymedes01.etfuturum.ModBlocks; import java.util.List; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import ...
package ganymedes01.etfuturum.core.handlers; import ganymedes01.etfuturum.ModBlocks; import java.util.List; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import ...
Modify Validate Region for test cases
package common import ( "flag" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" ) func listEC2Regions() []string { var regions []string sess := session.Must(session.NewSessionWithOptions(session.Options{ SharedConfigState: session.SharedConfigEnable, })) ec2conn := ec2.New(se...
package common import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" ) func listEC2Regions() []string { var regions []string // append regions that are not part of autogenerated list regions = append(regions, "us-gov-west-1", "cn-north-1", "cn-northwest-1") sess := session.Mu...
Update Arconaitv to new url
import re from streamlink.plugin import Plugin from streamlink.plugin.api import http from streamlink.plugin.api import useragents from streamlink.stream import HLSStream _url_re = re.compile(r'''https?://(www\.)?arconaitv\.co/stream\.php\?id=\d+''') _playlist_re = re.compile(r'''source\ssrc=["'](?P<url>[^"']+)["']''...
import re from streamlink.plugin import Plugin from streamlink.plugin.api import http from streamlink.plugin.api import useragents from streamlink.stream import HLSStream _url_re = re.compile(r'''https?://(www\.)?arconaitv\.me/stream\.php\?id=\d+''') _playlist_re = re.compile(r'''source\ssrc=["'](?P<url>[^"']+)["']''...
Fix ft for my bets page
class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector('tr.match') ...
class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector('div.match') ...
Disable parallel requests for now
"use strict"; plugin.consumes = [ "db", "connect.static" ]; plugin.provides = [ "unpacked_helper" ]; module.exports = plugin; function plugin(options, imports, register) { var connectStatic = imports["connect.static"]; var assert = require("assert"); var baseUrl = options.baseUrl; var ideBase...
"use strict"; plugin.consumes = [ "db", "connect.static" ]; plugin.provides = [ "unpacked_helper" ]; module.exports = plugin; function plugin(options, imports, register) { var connectStatic = imports["connect.static"]; var assert = require("assert"); var baseUrl = options.baseUrl; var ideBase...
Add a constructor for a component of the load-button
(function(app) { 'use strict'; var jCore = require('jcore'); var helper = app.helper || require('../helper.js'); var dom = app.dom || require('../dom.js'); var Button = app.Button || require('./button.js'); var SidebarToggleButton = app.SidebarToggleButton || require('./sidebar-toggle-button.js'); var L...
(function(app) { 'use strict'; var jCore = require('jcore'); var helper = app.helper || require('../helper.js'); var dom = app.dom || require('../dom.js'); var SidebarToggleButton = app.SidebarToggleButton || require('./sidebar-toggle-button.js'); var ContentHeader = helper.inherits(function(props) { ...
Fix bug with profile loading
app.controller('SearchController', ['$http', '$mdDialog', 'BioFactory', function($http, $mdDialog, BioFactory) { console.log('SearchController running'); var self = this; self.mentors = []; self.newSearch = { generic_search: null, first_name: null, last_name: null, email: null, company: nu...
app.controller('SearchController', ['$http', '$mdDialog', 'BioFactory', function($http, $mdDialog, BioFactory) { console.log('SearchController running'); var self = this; self.mentors = []; self.newSearch = { generic_search: null, first_name: null, last_name: null, email: null, company: ...
Clarify AccessMode alternative in else.
package io.collap.bryg.compiler.ast.expression; import io.collap.bryg.compiler.ast.AccessMode; import io.collap.bryg.compiler.parser.BrygMethodVisitor; import io.collap.bryg.compiler.parser.StandardVisitor; import io.collap.bryg.compiler.expression.Variable; import static org.objectweb.asm.Opcodes.*; public class Va...
package io.collap.bryg.compiler.ast.expression; import io.collap.bryg.compiler.ast.AccessMode; import io.collap.bryg.compiler.parser.BrygMethodVisitor; import io.collap.bryg.compiler.parser.StandardVisitor; import io.collap.bryg.compiler.expression.Variable; import static org.objectweb.asm.Opcodes.*; public class Va...
Fix zero-length field error when building docs in Python 2.6
import os import libtaxii project = u'libtaxii' copyright = u'2014, The MITRE Corporation' version = libtaxii.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig', 'sphinx.ext.intersphinx', 'sphinxcontrib.napoleon', ] intersphinx_mapping ...
import os import libtaxii project = u'libtaxii' copyright = u'2014, The MITRE Corporation' version = libtaxii.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig', 'sphinx.ext.intersphinx', 'sphinxcontrib.napoleon', ] intersphinx_mapping ...
Use array_walk instead of loop
<?php namespace jjok\Switches\Strategy; use DateTimeInterface as DateTime; use jjok\Switches\Period; use jjok\Switches\SwitchStrategy; use jjok\Switches\Time; use function array_walk; final class DailySchedule implements SwitchStrategy { /** * @var Period[] */ private $periods = []; public fu...
<?php namespace jjok\Switches\Strategy; use DateTimeInterface as DateTime; use jjok\Switches\Period; use jjok\Switches\SwitchStrategy; use jjok\Switches\Time; final class DailySchedule implements SwitchStrategy { /** * @var Period[] */ private $periods = []; public function __construct(array $...
Convert Clone from object to function I find it really annoying that we have to do `NodeGit.Clone.clone` just to clone a repository. It would be much nicer to get a similar effect like in C, where you can run `git_clone`. This copies over the effect of an object, but actually using our `clone` patched function inste...
var NodeGit = require("../"); var normalizeOptions = require("./util/normalize_options"); var Clone = NodeGit.Clone; var clone = Clone.clone; /** * Patch repository cloning to automatically coerce objects. * * @async * @param {String} url url of the repository * @param {String} local_path local path to store rep...
var NodeGit = require("../"); var normalizeOptions = require("./util/normalize_options"); var Clone = NodeGit.Clone; var clone = Clone.clone; /** * Patch repository cloning to automatically coerce objects. * * @async * @param {String} url url of the repository * @param {String} local_path local path to store rep...
Update Copyright year to 2005 git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@325095 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: 8de90f5c3893df00b32b3f6cf2ae219fcf488bb6
/* * Copyright 2003-2005 The Apache Software Foundation. * * 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 appli...
/* * Copyright 2003-2004 The Apache Software Foundation. * * 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 appli...
Add the setting of root element label
package editor; import utility.Observer; import xml.Element; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; /** * The ElementTreeView controls the section of the GUI that displays the tree * representation of an XML element tree. */ public class Ele...
package editor; import utility.Observer; import xml.Element; import javax.swing.*; /** * The ElementTreeView controls the section of the GUI that displays the tree * representation of an XML element tree. */ public class ElementTreeView extends JPanel implements Observer { private JTree tree; private Elem...
Make sure small images look good in carousel Closes #448.
import React, { PropTypes } from 'react'; import Carousel from 'react-bootstrap/lib/Carousel'; import { getCaption } from 'utils/imageUtils'; const IMAGE_WIDTH = 700; const IMAGE_HEIGHT = 420; function renderCarouselItem(image, altText) { const imageAlt = getCaption(image) || altText; const imageSrc = `${image.u...
import React, { PropTypes } from 'react'; import Carousel from 'react-bootstrap/lib/Carousel'; import { getCaption } from 'utils/imageUtils'; const IMAGE_WIDTH = 700; const IMAGE_HEIGHT = 420; function renderCarouselItem(image, altText) { const imageAlt = getCaption(image) || altText; const imageSrc = `${image.u...
Fix of bug in Python 2.6 with failed isclass check in inspect module
"""Utils module.""" from six import class_types from .errors import Error def is_provider(instance): """Check if instance is provider instance.""" return (not isinstance(instance, class_types) and hasattr(instance, '__IS_OBJECTS_PROVIDER__')) def ensure_is_provider(instance): """Check if i...
"""Utils module.""" from inspect import isclass from .errors import Error def is_provider(instance): """Check if instance is provider instance.""" return (not isclass(instance) and hasattr(instance, '__IS_OBJECTS_PROVIDER__')) def ensure_is_provider(instance): """Check if instance is provi...
Remove dirty lies from doctstring This was a leftover from wherever I originally copied this config from.
"""Configuration for testtube. Automatically run tests when files change by running: stir See: https://github.com/thomasw/testtube For flake8, don't forget to install: * flake8-quotes """ from testtube.helpers import Flake8, Helper, Nosetests class ScreenClearer(Helper): command = 'clear' def success(self, ...
"""Configuration for testtube. Automatically run tests when files change by running: stir See: https://github.com/thomasw/testtube For flake8, don't forget to install: * flake8-quotes """ from testtube.helpers import Flake8, Helper, Nosetests class ScreenClearer(Helper): command = 'clear' def success(self, ...
Change default loadMore and limit configuration
Comments.ui = (function () { Avatar.options = { defaultImageUrl: 'http://s3.amazonaws.com/37assets/svn/765-default-avatar.png' }; Tracker.autorun(function () { var userId = Meteor.userId(); if (userId) { Comments.session.set('loginAction', ''); } }); var config = { template: 'sema...
Comments.ui = (function () { Avatar.options = { defaultImageUrl: 'http://s3.amazonaws.com/37assets/svn/765-default-avatar.png' }; Tracker.autorun(function () { var userId = Meteor.userId(); if (userId) { Comments.session.set('loginAction', ''); } }); var config = { template: 'sema...
Check script returns an exit code
import errno import sys class CPUFlags: def __init__(self): self.flags = set() try: self.flags = self.__parse_cpuinfo() except IOError as e: if e.errno == errno.ENOENT: return raise def __contains__(self, name): return name...
import errno class CPUFlags: def __init__(self): self.flags = set() try: self.flags = self.__parse_cpuinfo() except IOError as e: if e.errno == errno.ENOENT: return raise def __contains__(self, name): return name in self.fl...
Switch uuid to original implementation The original code.google.com go-uuid package has now been migrated to github by Paul Borman, a Googler and a Golang core contributor.
package osin import ( "encoding/base64" "strings" "github.com/pborman/uuid" ) // AuthorizeTokenGenDefault is the default authorization token generator type AuthorizeTokenGenDefault struct { } func removePadding(token string) string { return strings.TrimRight(token, "=") } // GenerateAuthorizeToken generates a ...
package osin import ( "encoding/base64" "strings" "github.com/satori/go.uuid" ) // AuthorizeTokenGenDefault is the default authorization token generator type AuthorizeTokenGenDefault struct { } func removePadding(token string) string { return strings.TrimRight(token, "=") } // GenerateAuthorizeToken generates ...
Make delete command message more meaningful
from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two_years = self.n...
from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two_years = self.n...
Use lesson names as menu link titles
var classNames = require('classnames') var React = require('react') require('./LessonMenu.css') var LessonMenu = React.createClass({ handleSelectLesson(index) { this.props.selectLesson(index) }, render() { var {lessons, currentLessonIndex} = this.props return <div className="LessonMenu"> {less...
var classNames = require('classnames') var React = require('react') require('./LessonMenu.css') var LessonMenu = React.createClass({ handleSelectLesson(index) { this.props.selectLesson(index) }, render() { var {lessons, currentLessonIndex} = this.props return <div className="LessonMenu"> {less...
Update version number to 0.1.10.dev0. PiperOrigin-RevId: 202663603
# Copyright 2017 Google Inc. All Rights Reserved. # # 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 a...
# Copyright 2017 Google Inc. All Rights Reserved. # # 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 a...
Refactor for using the new Response class
<?php namespace PhpWatson\Sdk\Tests\Language\RetrieveAndRank; use PhpWatson\Sdk\Tests\AbstractTestCase; use PhpWatson\Sdk\Language\RetrieveAndRank\V1\RetrieveAndRankService; class RetrieveAndRankV1Test extends AbstractTestCase { /** * @var RetrieveAndRankService */ public $service; public func...
<?php namespace PhpWatson\Sdk\Tests\Language\RetrieveAndRank; use PhpWatson\Sdk\Tests\AbstractTestCase; use PhpWatson\Sdk\Language\RetrieveAndRank\V1\RetrieveAndRankService; class RetrieveAndRankV1Test extends AbstractTestCase { /** * @var RetrieveAndRankService */ public $service; public func...
Add an extra blank line
function autosaveSnippet () { var $url = $('.edit_snippet')[0].action; var $data = $('.edit_snippet').serialize(); $.ajax({ type: "PATCH", url: $url, data: $data, dataType: "text" }).done(function(response){ console.log(response); $(".autosave").html(response); }); } function autosave...
function autosaveSnippet () { var $url = $('.edit_snippet')[0].action; var $data = $('.edit_snippet').serialize(); $.ajax({ type: "PATCH", url: $url, data: $data, dataType: "text" }).done(function(response){ console.log(response); $(".autosave").html(response); }); } function autosave...
Fix document query for existing documents
from __future__ import absolute_import import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings") import logging from scrapi import events from scrapi.processing.base import BaseProcessor from api.webview.models import Document logger = logging.getLogger(__name__) class PostgresProcessor(BaseP...
from __future__ import absolute_import import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings") # import django import logging from scrapi import events from scrapi.processing.base import BaseProcessor from api.webview.models import Document # django.setup() logger = logging.getLogger(__name_...
Add correct localhost port to test
//test-name.spec.js /* Acceptance Criteria: I can: -Navigate to this page according to the site map url -See that the page looks like the mockup -View the page at different resolutions and the content is laid out logically */ /* global casper */ casper.test.begin('Contact page navigates to home page ', 2, function...
//test-name.spec.js /* Acceptance Criteria: I can: -Navigate to this page according to the site map url -See that the page looks like the mockup -View the page at different resolutions and the content is laid out logically */ /* global casper */ casper.test.begin('Contact page navigates to home page ', 2, function...
Fix handler module path check, was broken for module not found in handler
'use strict' module.exports = class InProcessRunner { constructor(functionName, handlerPath, handlerName) { this._functionName = functionName this._handlerName = handlerName this._handlerPath = handlerPath } run(event, context, callback) { // check if the handler module path exists if (!requ...
'use strict' const serverlessLog = require('../serverlessLog.js') module.exports = class InProcessRunner { constructor(functionName, handlerPath, handlerName) { this._functionName = functionName this._handlerName = handlerName this._handlerPath = handlerPath } run(event, context, callback) { //...
Fix update-schema JSON for Storyboard 2
import fs from 'fs-extra'; import path from 'path'; import { addListener, mainStory, chalk } from 'storyboard'; import consoleListener from 'storyboard/lib/listeners/console'; import Promise from 'bluebird'; import * as gqlServer from './gqlServer'; addListener...
import fs from 'fs-extra'; import path from 'path'; import { mainStory, chalk } from 'storyboard'; import Promise from 'bluebird'; import * as gqlServer from './gqlServer'; const outputPath = path.join(__dirname, '../common/'); gqlServer.init(); Promise.resolve() ....
Fix sniffer test, rename stop to delete
from mock import patch from django.test import TestCase from breach.sniffer import Sniffer class SnifferTest(TestCase): def setUp(self): self.endpoint = 'http://localhost' self.sniffer = Sniffer(self.endpoint) self.source_ip = '147.102.239.229' self.destination_host = 'dionyziz.c...
from mock import patch from django.test import TestCase from breach.sniffer import Sniffer class SnifferTest(TestCase): def setUp(self): self.endpoint = 'http://localhost' self.sniffer = Sniffer(self.endpoint) self.source_ip = '147.102.239.229' self.destination_host = 'dionyziz.c...
Fix documentation example showing use of ReadStruct Logic flow was inverted. Example was printing the result when an error was occurring and using panic when no error.
package xlsx import "fmt" func ExampleRow_ReadStruct() { //example type type structTest struct { IntVal int `xlsx:"0"` StringVal string `xlsx:"1"` FloatVal float64 `xlsx:"2"` IgnoredVal int `xlsx:"-"` BoolVal bool `xlsx:"4"` } structVal := structTest{ IntVal: 16, StringVal:...
package xlsx import "fmt" func ExampleRow_ReadStruct() { //example type type structTest struct { IntVal int `xlsx:"0"` StringVal string `xlsx:"1"` FloatVal float64 `xlsx:"2"` IgnoredVal int `xlsx:"-"` BoolVal bool `xlsx:"4"` } structVal := structTest{ IntVal: 16, StringVal:...
Migrate implementation to Java 8
package org.mkonrad.fizzbuzz; import java.io.PrintStream; import java.util.stream.IntStream; /** * @author Markus Konrad */ public final class FizzBuzz { private final PrintStream printStream; public FizzBuzz(PrintStream printStream) { this.printStream = printStream; } public final void run(int numberOfRou...
package org.mkonrad.fizzbuzz; import java.io.PrintStream; import java.util.stream.IntStream; /** * @author Markus Konrad */ public final class FizzBuzz { private final PrintStream printStream; public FizzBuzz(PrintStream printStream) { this.printStream = printStream; } public final void run(int numberOfRou...
Add description to channel response
<?php /** * Copyright 2015 ppy Pty. Ltd. * * This file is part of osu!web. osu!web is distributed with the hope of * attracting more community contributions to the core ecosystem of osu!. * * osu!web is free software: you can redistribute it and/or modify * it under the terms of the Affero GNU Ge...
<?php /** * Copyright 2015 ppy Pty. Ltd. * * This file is part of osu!web. osu!web is distributed with the hope of * attracting more community contributions to the core ecosystem of osu!. * * osu!web is free software: you can redistribute it and/or modify * it under the terms of the Affero GNU Ge...
Correct the namespace in the template file.
<?php class <CLASS> extends Tivoh\Torm\Model { const table = '<TABLE>'; const primaryKey = '<PRIMARY KEY>'; <FIELD> protected $<PROPERTY NAME>; </FIELD> protected static $fields = [ <FIELD NAMES> ]; <GETTER> public function get<METHOD NAME>() { return $this-><PROPERTY NAME>; } </GETTER> <FOREIGN> publi...
<?php class <CLASS> extends Torm\Model { const table = '<TABLE>'; const primaryKey = '<PRIMARY KEY>'; <FIELD> protected $<PROPERTY NAME>; </FIELD> protected static $fields = [ <FIELD NAMES> ]; <GETTER> public function get<METHOD NAME>() { return $this-><PROPERTY NAME>; } </GETTER> <FOREIGN> public func...
Use classic array declaration instead of the short one Use this notation to be compatible with php >=5.3.3
<?php namespace Payum\PayumModule\Registry; use Payum\PayumModule\Action\GetHttpRequestAction; use Payum\PayumModule\Options\PayumOptions; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; class RegistryFactory implements FactoryInterface { /** * {@inheritDoc} */...
<?php namespace Payum\PayumModule\Registry; use Payum\PayumModule\Action\GetHttpRequestAction; use Payum\PayumModule\Options\PayumOptions; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; class RegistryFactory implements FactoryInterface { /** * {@inheritDoc} */...
Remove Email module - missed tests
<?php namespace CodeIgniter\Config; use Config\Email; class ConfigTest extends \CIUnitTestCase { public function testCreateSingleInstance() { $Config = Config::get('Format', false); $NamespaceConfig = Config::get('Config\\Format', false); $this->assertInstanceOf(Format::class, $Config); $this->as...
<?php namespace CodeIgniter\Config; use Config\Email; class ConfigTest extends \CIUnitTestCase { public function testCreateSingleInstance() { $Config = Config::get('Format', false); $NamespaceConfig = Config::get('Config\\Format', false); $this->assertInstanceOf(Email::class, $Config); $this->ass...
[Form] Add options with_minutes to DateTimeType & TimeType
<?php if ($widget == 'single_text'): ?> <?php echo $view['form']->block($form, 'form_widget_simple'); ?> <?php else: ?> <div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>> <?php // There should be no spaces between the colons and the widgets, that's why ...
<?php if ($widget == 'single_text'): ?> <?php echo $view['form']->block($form, 'form_widget_simple'); ?> <?php else: ?> <div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>> <?php // There should be no spaces between the colons and the widgets, that's why ...
Check for any overflow scroll style on parent node.
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * @fileOverview Find scroll parent */ exports.default = function (node) { if (!node) { return document.documentElement; } var excludeStaticParent = node.style.position === 'absolute'; var overflowRegex = /(scroll|auto)/...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * @fileOverview Find scroll parent */ exports.default = function (node) { if (!node) { return document.documentElement; } var excludeStaticParent = node.style.position === 'absolute'; var overflowRegex = /(scroll|auto)/...
Improve error logging during authentication
"use strict"; const github = require("simple-github"); const auth = require("./auth"); class GithubAPI { constructor(pr, options) { this.pr = pr; this.options = options || {}; } requestAuthHeaders() { return auth(this.pr.installation, { debug: this.options.debug }); } ...
"use strict"; const github = require("simple-github"); const auth = require("./auth"); class GithubAPI { constructor(pr, options) { this.pr = pr; this.options = options || {}; } requestAuthHeaders() { return auth(this.pr.installation); } setAuthHeaders(headers) { ...
Fix deprecated Twig class usage
<?php namespace Devture\Bundle\UserBundle\Twig; use Devture\Bundle\UserBundle\AccessControl\AccessControl; class UserExtension extends \Twig_Extension { private $control; public function __construct(AccessControl $control) { $this->control = $control; } public function getName() { return 'devture_user_user...
<?php namespace Devture\Bundle\UserBundle\Twig; use Devture\Bundle\UserBundle\AccessControl\AccessControl; class UserExtension extends \Twig_Extension { private $control; public function __construct(AccessControl $control) { $this->control = $control; } public function getName() { return 'devture_user_user...
Update up to changes in memoizee package
'use strict'; var noop = require('es5-ext/function/noop') , assign = require('es5-ext/object/assign') , memoize = require('memoizee') , ee = require('event-emitter') , eePipe = require('event-emitter/pipe') , deferred = require('deferred') , isPromise = deferred.isPromise; module.exports =...
'use strict'; var noop = require('es5-ext/function/noop') , assign = require('es5-ext/object/assign') , memoize = require('memoizee') , ee = require('event-emitter') , eePipe = require('event-emitter/pipe') , deferred = require('deferred') , isPromise = deferred.isPromise; module.exports =...
Change template for the ranking route
var subscriptions = new SubsManager(); Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound' }); Router.route('/', { name: 'home', waitOn: function() { return [subscriptions.subscribe('lastGames'), subscriptions.subscribe('allUsers')]; }, fastRender: true }); ...
var subscriptions = new SubsManager(); Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound' }); Router.route('/', { name: 'home', waitOn: function() { return [subscriptions.subscribe('lastGames'), subscriptions.subscribe('allUsers')]; }, fastRender: true }); ...
Fix bug on account update
var mongo = require('./mongo'); var passport = require('passport'); var FacebookStrategy = require('passport-facebook').Strategy; var uuid = require('uuid'); passport.use(new FacebookStrategy({ clientID: process.env.FB_APP_ID, clientSecret: process.env.FB_APP_SECRET, callbackURL: 'http://localhost:180...
var mongo = require('./mongo'); var passport = require('passport'); var FacebookStrategy = require('passport-facebook').Strategy; var uuid = require('uuid'); passport.use(new FacebookStrategy({ clientID: process.env.FB_APP_ID, clientSecret: process.env.FB_APP_SECRET, callbackURL: 'http://localhost:180...
demo: Put the nested ThemeProvider inside a parent Consumer (still works!)
import { createElement, Component, createContext, Fragment } from 'ceviche'; const { Provider, Consumer } = createContext(); class ThemeProvider extends Component { state = { value: this.props.value }; componentDidMount() { setTimeout(() => { this.setState({ value: this.props.next }); }, 3000); } ...
import { createElement, Component, createContext, Fragment } from 'ceviche'; const { Provider, Consumer } = createContext(); class ThemeProvider extends Component { state = { value: this.props.value }; componentDidMount() { setTimeout(() => { this.setState({ value: this.props.next }); }, 3000); } ...
Fix typo in install bundle script
'use strict'; const fs = require('fs'); const cp = require('child_process'); const os = require('os'); const commander = require('commander'); const parse = require('git-url-parse'); const gitRoot = cp.execSync('git rev-parse --show-toplevel').toString('utf8').trim(); process.chdir(gitRoot); commander.command('insta...
'use strict'; const fs = require('fs'); const cp = require('child_process'); const os = require('os'); const commander = require('commander'); const parse = require('git-url-parse'); const gitRoot = cp.execSync('git rev-parse --show-toplevel').toString('utf8').trim(); process.chdir(gitRoot); commander.command('insta...
Fix spark mode (faulty shutdown conditional logic)
import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ info = event....
import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ info = event....
Fix interface that cannot reference to self
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ...
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ...
Add a property to set the default enablement Set '-Dorg.showshortcuts.enabled=false' to e.g. disable the tool by default.
package org.showshortcuts.internal; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.jface.preference.IPreferenceStore; /** * Initializer for shortcut visualizer preferences * * @author d031150 */ public class ShortcutPreferenceInitializer extends AbstractPreferenceIni...
package org.showshortcuts.internal; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.jface.preference.IPreferenceStore; /** * Initializer for shortcut visualizer preferences * * @author d031150 */ public class ShortcutPreferenceInitializer extends AbstractPreferenceIni...
Reset search query on location change
import { LOCATION_CHANGE } from 'react-router-redux'; import { SEARCH_QUERY, } from '../constants'; export const initialState = { searchQuery: '', }; export default function reducer(state = initialState, action) { switch (action.type) { case LOCATION_CHANGE: return { ....
import { SEARCH_QUERY, FETCH_ENDPOINTS_START, FETCH_OAUTH_SERVERS_LIST_START, } from '../constants'; export const initialState = { searchQuery: '', }; export default function reducer(state = initialState, action) { switch (action.type) { case FETCH_ENDPOINTS_START: case FETCH_OAUTH...
Use a bounding box to limit search results See issue #7 [@wwared, @brunoendo]
/* Copyright © 2015 Biciguia Team 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/. */ function getGeocoderURLFromAddress(address) { if (address.match('^ *$')) { ...
/* Copyright © 2015 Biciguia Team 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/. */ function getGeocoderURLFromAddress(address) { if (address.match('^ *$')) { ...
Use actual binary name instead of hardcoding it Signed-off-by: Radek Simko <c0f89f684c2e56811603206eabe5a4cea7f58f3e@gmail.com>
package main import ( "os" log "github.com/Sirupsen/logrus" "github.com/codegangsta/cli" ) func main() { for _, f := range os.Args { if f == "-D" || f == "--debug" || f == "-debug" { os.Setenv("DEBUG", "1") initLogging(log.DebugLevel) } } app := cli.NewApp() app.Name = os.Args[0] app.Commands = Co...
package main import ( "os" log "github.com/Sirupsen/logrus" "github.com/codegangsta/cli" ) func main() { for _, f := range os.Args { if f == "-D" || f == "--debug" || f == "-debug" { os.Setenv("DEBUG", "1") initLogging(log.DebugLevel) } } app := cli.NewApp() app.Name = "machine" app.Commands = Com...
[kurento-client] Call disconnected event when reconnecting Change-Id: I0f0388f281fa80a1333f6bd18e60e563d4694cf3
package org.kurento.client; import org.kurento.jsonrpc.client.JsonRpcWSConnectionListener; public class JsonRpcConnectionListenerKurento implements JsonRpcWSConnectionListener { private KurentoConnectionListener listener; public JsonRpcConnectionListenerKurento(KurentoConnectionListener listener) { this.lis...
package org.kurento.client; import org.kurento.jsonrpc.client.JsonRpcWSConnectionListener; public class JsonRpcConnectionListenerKurento implements JsonRpcWSConnectionListener { private KurentoConnectionListener listener; public JsonRpcConnectionListenerKurento(KurentoConnectionListener listener) { this.li...
Remove redundant promise chain block
/** * Created by Tomasz Gabrysiak @ Infermedica on 02/02/2017. */ export default class InfermedicaApi { constructor (appId, appKey, apiModel = 'infermedica-en', apiUrl = 'https://api.infermedica.com/v2/') { this.appId = appId; this.appKey = appKey; this.apiUrl = apiUrl; this.apiModel = apiModel; ...
/** * Created by Tomasz Gabrysiak @ Infermedica on 02/02/2017. */ export default class InfermedicaApi { constructor (appId, appKey, apiModel = 'infermedica-en', apiUrl = 'https://api.infermedica.com/v2/') { this.appId = appId; this.appKey = appKey; this.apiUrl = apiUrl; this.apiModel = apiModel; ...
Add missing user_id_seq in migration script
from sqlalchemy.sql import text from c2corg_api.scripts.migration.migrate_base import MigrateBase class UpdateSequences(MigrateBase): sequences = [ ('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'), ('guidebook', 'documents', 'document_id', 'documents_document_id_seq'), ...
from sqlalchemy.sql import text from c2corg_api.scripts.migration.migrate_base import MigrateBase class UpdateSequences(MigrateBase): sequences = [ ('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'), ('guidebook', 'documents', 'document_id', 'documents_document_id_seq'), ...
Return empty response on login page.
<?php namespace Lucianux\SpaBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method...
<?php namespace Lucianux\SpaBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method...
Fix typo in validation message template.
/* * Copyright (C) 2011 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.dellroad.stuff.validation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target;...
/* * Copyright (C) 2011 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.dellroad.stuff.validation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target;...
Fix getting basic auth credentials for installing bundles
package com.github.dynamicextensionsalfresco.gradle.configuration; import java.util.Base64; import javax.inject.Inject; import org.gradle.api.model.ObjectFactory; import org.gradle.api.provider.Property; import org.gradle.api.provider.Provider; import org.gradle.api.provider.ProviderFactory; /** * @author Laurent Va...
package com.github.dynamicextensionsalfresco.gradle.configuration; import java.util.Base64; import javax.inject.Inject; import org.gradle.api.model.ObjectFactory; import org.gradle.api.provider.Property; import org.gradle.api.provider.Provider; import org.gradle.api.provider.ProviderFactory; /** * @author Laurent Va...
Kill process to end browserify compile test
var amok = require('../'); var test = require('tape'); var fs = require('fs'); test('compile with browserify', function(t) { var args = [ 'test/fixture/bundle.js' ]; var exe = amok.compile('browserify', args); exe.stderr.on('data', function(data) { data = data.toString(); t.fail(data); }); ex...
var amok = require('../'); var test = require('tape'); var fs = require('fs'); test('compile with browserify', function(t) { var args = [ 'test/fixture/bundle.js' ]; var exe = amok.compile('browserify', args); exe.stderr.on('data', function(data) { data = data.toString(); t.fail(data); }); ex...
[BUGFIX] Set the new name for the css compile task in teh default grunt task array
module.exports = function(grunt) { "use strict"; // Display the execution time of grunt tasks require("time-grunt")(grunt); // Load all grunt-tasks in 'Build/Grunt-Options'. var gruntOptionsObj = require("load-grunt-configs")(grunt, { "config" : { src: "Build/Grunt-Options/*.js" } }); grunt.initConfig(g...
module.exports = function(grunt) { "use strict"; // Display the execution time of grunt tasks require("time-grunt")(grunt); // Load all grunt-tasks in 'Build/Grunt-Options'. var gruntOptionsObj = require("load-grunt-configs")(grunt, { "config" : { src: "Build/Grunt-Options/*.js" } }); grunt.initConfig(g...
Include plot title to plots
from flask_restplus import Namespace, Resource, fields, abort import cea.config import cea.plots.cache api = Namespace('Dashboard', description='Dashboard plots') LAYOUTS = ['row', 'grid', 'map'] CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]} for c...
from flask_restplus import Namespace, Resource, fields, abort import cea.config import cea.plots.cache api = Namespace('Dashboard', description='Dashboard plots') LAYOUTS = ['row', 'grid', 'map'] CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]} for c...
Set flash message to platform update method.
<?php namespace App\Http\Controllers; use App\Http\Requests\BackUpSettingsValidator; use Illuminate\Http\Request; use App\Http\Requests; /** * */ class SettingsController extends Controller { /** * SettingsController constructor */ public function __construct() { $this->middleware('lang');...
<?php namespace App\Http\Controllers; use App\Http\Requests\BackUpSettingsValidator; use Illuminate\Http\Request; use App\Http\Requests; /** * */ class SettingsController extends Controller { /** * SettingsController constructor */ public function __construct() { $this->middleware('lang');...
Update URL for baseline images
import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ # The developer versions of the form 3.1.x+... contain changes that will only # be included in the 3.2.x release, so we update this here. if MPL_VERSION[:3] == '3.1' and '+' in MPL_V...
import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ # The developer versions of the form 3.1.x+... contain changes that will only # be included in the 3.2.x release, so we update this here. if MPL_VERSION[:3] == '3.1' and '+' in MPL_V...
CRM-1835: Create B2B customer identity - minor bug fixes
<?php namespace Oro\Bundle\IntegrationBundle\Migrations\Schema\v1_6; use Doctrine\DBAL\Schema\Schema; use Oro\Bundle\MigrationBundle\Migration\Migration; use Oro\Bundle\MigrationBundle\Migration\QueryBag; class OroIntegrationBundle implements Migration { /** * @inheritdoc */ public function up(Sch...
<?php namespace Oro\Bundle\IntegrationBundle\Migrations\Schema\v1_6; use Doctrine\DBAL\Schema\Schema; use Oro\Bundle\MigrationBundle\Migration\Migration; use Oro\Bundle\MigrationBundle\Migration\QueryBag; class OroIntegrationBundle implements Migration { /** * @inheritdoc */ public function up(Sch...
Make test results not sticky
// CHANGELOG check const hasAppChanges = _.filter(git.modified_files, function(path) { return _.includes(path, 'lib/'); }).length > 0 if (hasAppChanges && _.includes(git.modified_files, "CHANGELOG.md") === false) { fail("No CHANGELOG added.") } const testFiles = _.filter(git.modified_files, function(path) { ret...
// CHANGELOG check const hasAppChanges = _.filter(git.modified_files, function(path) { return _.includes(path, 'lib/'); }).length > 0 if (hasAppChanges && _.includes(git.modified_files, "CHANGELOG.md") === false) { fail("No CHANGELOG added.") } const testFiles = _.filter(git.modified_files, function(path) { ret...
Fix Shell tests according to css changes
""" @given: ------- @when: ------ I type the "{command}" shell command --> shell_command @then: ------ I should see the "{command}" result in shell output --> shell_output ------ """ @when(u'I type the "{command}" shell command') def shell_command(context, command): shell_input = context.browser.fi...
""" @given: ------- @when: ------ I type the "{command}" shell command --> shell_command @then: ------ I should see the "{command}" result in shell output --> shell_output ------ """ @when(u'I type the "{command}" shell command') def shell_command(context, command): shell_input = context.browser.fi...
Use the renamed 'branding' section of the settings
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { isNil } from 'lodash-es' import girderClient from '@openchemistry/girder-client'; import { selectors } from '@openchemistry/redux'; import FooterComponent from '../../components/footer'; class FooterContainer extends Componen...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { isNil } from 'lodash-es' import girderClient from '@openchemistry/girder-client'; import { selectors } from '@openchemistry/redux'; import FooterComponent from '../../components/footer'; class FooterContainer extends Componen...
Replace deprecate code in JUnit call Summary: To make code compatible with JUnit 4.13 (following diff). `createTestClass` function is deprecated, javadoc suggest replacing a call with a constructor, which is what I did. Note this is a buck-self-test-only change. Reviewed By: mykola-semko shipit-source-id: 64158afd...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...
Revert "[tmp commit] add example transforms to ./lib/ Plotly for testing" This reverts commit a06441a2b32bf42334cd65bb397eec0d3c6d84fb.
/** * Copyright 2012-2016, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /* * This file is browserify'ed into a standalone 'Plotly' object. */ var Core = require('./core'); // Load ...
/** * Copyright 2012-2016, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /* * This file is browserify'ed into a standalone 'Plotly' object. */ var Core = require('./core'); // Load ...
Throw error when cookie is missing
const { denodeify, err, xml } = require('./util') const request = require('request') const util = require('request/lib/helpers') // Promisified request. export const requestPromise = Object.assign(denodeify(request), request) // Request with bound credentials. export const requestAuth = ({ request, user, pass }) => ...
const { denodeify, xml } = require('./util') const request = require('request') const util = require('request/lib/helpers') // Promisified request. export const requestPromise = Object.assign(denodeify(request), request) // Request with bound credentials. export const requestAuth = ({ request, user, pass }) => requ...
Revert back to using urllib to encode params But take a snippet from #69 which decodes the response back to unicode. Fixes #67
import requests import time import urlparse import urllib from paypal import exceptions def post(url, params): """ Make a POST request to the URL using the key-value pairs. Return a set of key-value pairs. :url: URL to post to :params: Dict of parameters to include in post payload """ ...
import requests import time import urlparse from paypal import exceptions def post(url, params): """ Make a POST request to the URL using the key-value pairs. Return a set of key-value pairs. :url: URL to post to :params: Dict of parameters to include in post payload """ for k in params...
Add metrics page to webpack instead of main metrics js script
var webpack = require('webpack'); var path = require('path'); var common = require('../webpack.common.config.js'); var assign = require('object-assign'); var BundleTracker = require('webpack-bundle-tracker'); var websiteRoot = path.join(__dirname, '..', 'website', 'static'); var adminRoot = path.join(__dirname, 'stat...
var webpack = require('webpack'); var path = require('path'); var common = require('../webpack.common.config.js'); var assign = require('object-assign'); var BundleTracker = require('webpack-bundle-tracker'); var websiteRoot = path.join(__dirname, '..', 'website', 'static'); var adminRoot = path.join(__dirname, 'stat...
Update blender plugin version to the next release number
bl_info = { 'name': "Import: .EDM model files", 'description': "Importing of .EDM model files", 'author': "Nicholas Devenish", 'version': (0,3,0), 'blender': (2, 78, 0), 'location': "File > Import/Export > .EDM Files", 'category': 'Import-Export', } try: import bpy def register(): from .io_oper...
bl_info = { 'name': "Import: .EDM model files", 'description': "Importing of .EDM model files", 'author': "Nicholas Devenish", 'version': (0,0,1), 'blender': (2, 78, 0), 'location': "File > Import/Export > .EDM Files", 'category': 'Import-Export', } try: import bpy def register(): from .io_oper...
Use addModuleIncludeMatcher instead of prototype mutation.
/* globals jQuery,QUnit */ jQuery(document).ready(function() { var TestLoaderModule = require('ember-cli/test-loader'); var TestLoader = TestLoaderModule['default']; var addModuleIncludeMatcher = TestLoaderModule['addModuleIncludeMatcher']; function moduleMatcher(moduleName) { return moduleName.match(/\/....
/* globals jQuery,QUnit */ jQuery(document).ready(function() { var TestLoader = require('ember-cli/test-loader')['default']; TestLoader.prototype.shouldLoadModule = function(moduleName) { return moduleName.match(/\/.*[-_]test$/) || (!QUnit.urlParams.nojshint && moduleName.match(/\.jshint$/)); }; TestLoade...
remove: Use native base64 instead of angular module
/** * Copyright (c) Ajay Sreedhar. All rights reserved. * * Licensed under the MIT License. * Please see LICENSE file located in the project root for more information. */ 'use strict'; import KongDash from './kongdash.js'; import FooterController from './controllers/footer.js'; import BootstrapController from '....
/** * Copyright (c) Ajay Sreedhar. All rights reserved. * * Licensed under the MIT License. * Please see LICENSE file located in the project root for more information. */ 'use strict'; import KongDash from './kongdash.js'; import FooterController from './controllers/footer.js'; import BootstrapController from '....
Add optional key for setReleaseFromArray
<?php namespace MusicBrainz\Value\Property; use MusicBrainz\Helper\ArrayAccess; use MusicBrainz\Value\Release; /** * Provides a getter for a release. */ trait ReleaseTrait { /** * The release number * * @var Release */ public $release; /** * Returns the release. * * ...
<?php namespace MusicBrainz\Value\Property; use MusicBrainz\Helper\ArrayAccess; use MusicBrainz\Value\Release; /** * Provides a getter for a release. */ trait ReleaseTrait { /** * The release number * * @var Release */ public $release; /** * Returns the release. * * ...
Use event delegation for form submissions
$(document).ready(function() { // This is called after the document has loaded in its entirety // This guarantees that any elements we bind to will exist on the page // when we try to bind to them // See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready() $('#content').on('submit', 'form.toggle...
$(document).ready(function() { // This is called after the document has loaded in its entirety // This guarantees that any elements we bind to will exist on the page // when we try to bind to them // See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready() $('.toggle_form').submit(function (even...
Add test deps on nose, mock.
from setuptools import setup import sys sys.path.insert(0, 'src') from rosdep2 import __version__ setup(name='rosdep', version= __version__, packages=['rosdep2', 'rosdep2.platforms'], package_dir = {'':'src'}, # data_files=[('man/man1', ['doc/man/rosdep.1'])], install_requires = ['rospkg...
from setuptools import setup import sys sys.path.insert(0, 'src') from rosdep2 import __version__ setup(name='rosdep', version= __version__, packages=['rosdep2', 'rosdep2.platforms'], package_dir = {'':'src'}, # data_files=[('man/man1', ['doc/man/rosdep.1'])], install_requires = ['rospkg...
Switch to module imports for readability.
"""Test the conductor REST module.""" from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from _pytest.python import raises from future import standard_library standard_library.install_aliases() import responses import ...
"""Test the conductor REST module.""" from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from _pytest.python import raises from future import standard_library standard_library.install_aliases() from responses import ac...
Remove router, we just have ONE GET, nothing more.
var express = require('express'); var http = require('http'); var path = require('path'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io').listen(server); var spotify = r...
var express = require('express'); var http = require('http'); var path = require('path'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io').listen(server); var spotify = r...
Include provides even if it not deferred. Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
<?php namespace Orchestra\Memory; use Illuminate\Support\ServiceProvider; class MemoryServiceProvider extends ServiceProvider { /** * Register the service provider. * * @return void */ public function register() { $this->app['orchestra.memory'] = $this->app->share(function($app) { return new Memory...
<?php namespace Orchestra\Memory; use Illuminate\Support\ServiceProvider; class MemoryServiceProvider extends ServiceProvider { /** * Register the service provider. * * @return void */ public function register() { $this->app['orchestra.memory'] = $this->app->share(function($app) { return new Memory...
Break name and path into separate fields
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateImagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('images', function(Blueprint $table) { $table->increments('id'); $table->str...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateImagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('images', function(Blueprint $table) { $table->increments('id'); $table->str...
Split python 3 and python 2 requirements
from sys import version_info from setuptools import setup, find_packages BASE_REQUIREMENTS = [ 'pymorphy2' ] BACKPORT_REQUIREMENTS = [ 'enum34', 'backports.functools-lru-cache', ] if version_info.major == 2 or (version_info.major == 3 and version_info.minor < 4): BASE_REQUIREMENTS.append(BACKPORT_REQ...
from setuptools import setup, find_packages setup( name='yargy', version='0.4.0', description='Tiny rule-based facts extraction package', url='https://github.com/bureaucratic-labs/yargy', author='Dmitry Veselov', author_email='d.a.veselov@yandex.ru', license='MIT', classifiers=[ ...
Use variables instead of os.Args Instead of using the index of an array, use clear names to show what the index of os.Args should be holding.
package main import ( "fmt" "os" "os/user" "strconv" "strings" "syscall" ) func checkError(err error) { if err != nil { fmt.Println(err) os.Exit(111) } } func main() { username := os.Args[1] program := os.Args[2] user, err := user.Lookup(username) checkError(err) uid, err := strconv.Atoi(user.Uid...
package main import ( "fmt" "os" "os/user" "strconv" "strings" "syscall" ) func checkError(err error) { if err != nil { fmt.Println(err) os.Exit(111) } } func main() { //path := os.Getenv("PATH") user, err := user.Lookup(os.Args[1]) checkError(err) uid, err := strconv.Atoi(user.Uid) checkError(er...
Add new Hooks. Not yet called into code
package fr.treeptik.cloudunit.hooks; /** * Created by nicolas on 19/04/2016. */ public enum HookAction { APPLICATION_POST_START("Application post start", "/cloudunit/appconf/hooks/application-post-start.sh"), APPLICATION_POST_STOP("Application post stop", "/cloudunit/appconf/hooks/application-post-stop.sh")...
package fr.treeptik.cloudunit.hooks; /** * Created by nicolas on 19/04/2016. */ public enum HookAction { APPLICATION_POST_START("Application post start", "/cloudunit/appconf/hooks/application-post-start.sh"), APPLICATION_POST_STOP("Application post stop", "/cloudunit/appconf/hooks/application-post-stop.sh")...
Change image form type "file" field type to "file".
<?php /** * @author Igor Nikolaev <igor.sv.n@gmail.com> * @copyright Copyright (c) 2015, 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 Darvin\ImageBundle\Form\...
<?php /** * @author Igor Nikolaev <igor.sv.n@gmail.com> * @copyright Copyright (c) 2015, 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 Darvin\ImageBundle\Form\...
Exit with log.Fatal instead of os.Exit
package main import ( "encoding/json" "fmt" "io/ioutil" "log" "code.google.com/p/goauth2/oauth" "github.com/google/go-github/github" ) func ListRepos(config *Config) { t := &oauth.Transport{ Token: &oauth.Token{AccessToken: config.OauthToken}, } client := github.NewClient(t.Client()) // list all reposi...
package main import ( "encoding/json" "fmt" "io/ioutil" "os" "code.google.com/p/goauth2/oauth" "github.com/google/go-github/github" ) func ListRepos(config *Config) { t := &oauth.Transport{ Token: &oauth.Token{AccessToken: config.OauthToken}, } client := github.NewClient(t.Client()) // list all reposit...
Remove unused import of pytest
from serfclient import result class TestSerfResult(object): def test_initialises_to_none(self): r = result.SerfResult() assert r.head is None assert r.body is None def test_provides_a_pretty_printed_form_for_repl_use(self): r = result.SerfResult(head={"a": 1}, body=('foo', 'ba...
import pytest from serfclient import result class TestSerfResult(object): def test_initialises_to_none(self): r = result.SerfResult() assert r.head is None assert r.body is None def test_provides_a_pretty_printed_form_for_repl_use(self): r = result.SerfResult(head={"a": 1}, b...
Add redirect for old hotlinks
from django.conf.urls import url, include from django.contrib import admin from django.views.generic import RedirectView from django.contrib.auth.views import login, logout_then_login from keyform import views urlpatterns = [ url(r'^$', views.HomeView.as_view(), name='home'), url(r'^table.php$', RedirectView.a...
from django.conf.urls import url, include from django.contrib import admin from django.contrib.auth.views import login, logout_then_login from keyform import views urlpatterns = [ url(r'^$', views.HomeView.as_view(), name='home'), url(r'^contact$', views.ContactView.as_view(), name='contact'), url(r'^edit-...
Add logging info for request
const config = require('./config'); const express = require('express'); const cors = require('cors'); const importer = require('./middleware/importer'); const mongoose = require('mongoose'); const dbHelper = require('./lib/db'); const tools = require('./lib/tools'); // import routers const bitcoinRouter = require('./r...
const config = require('./config'); const express = require('express'); const cors = require('cors'); const importer = require('./middleware/importer'); const mongoose = require('mongoose'); const dbHelper = require('./lib/db'); // import routers const bitcoinRouter = require('./router/bitcoin'); const defaultRouter =...
Add admin routes and layout management
var subscriptions = new SubsManager(); Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', }); Router.route('/', { name: 'home', waitOn: function() { return subscriptions.subscribe('allVolunteers'); }, fastRender: true }); Router.route('/myProfile', { name...
var subscriptions = new SubsManager(); Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', }); Router.route('/', { name: 'home', waitOn: function() { return subscriptions.subscribe('allVolunteers'); }, fastRender: true }); Router.route('/myProfile', { name...
Add dependencies on hr_contract as it should have been done
# -*- coding: utf-8 -*- { 'name': 'Human Employee Streamline', 'version': '1.2', 'author': 'XCG Consulting', 'category': 'Human Resources', 'description': """ enchancements to the hr module to streamline its usage """, 'website': 'http://www.openerp-experts.com', 'depends': [ ...
# -*- coding: utf-8 -*- { 'name': 'Human Employee Streamline', 'version': '1.2', 'author': 'XCG Consulting', 'category': 'Human Resources', 'description': """ enchancements to the hr module to streamline its usage """, 'website': 'http://www.openerp-experts.com', 'depends': [ ...
Return the mail function result. http://php.net/manual/en/function.mail.php > Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.
<?php // Check for empty fields if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['message']) || !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { echo "No arguments Provided!"; return false; } $name = strip_tags(htmlspecialchars($_POST['name'])); $e...
<?php // Check for empty fields if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['message']) || !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) { echo "No arguments Provided!"; return false; } $name = strip_tags(htmlspecialchars($_POST['name']...
Move getRestfulContext() from superclass to this.
package com.atg.openssp.common.cache.broker; import com.atg.openssp.common.configuration.ContextCache; import com.atg.openssp.common.configuration.ContextProperties; import com.atg.openssp.common.exception.EmptyHostException; import restful.client.JsonDataProviderConnector; import restful.context.PathBuilder; import ...
package com.atg.openssp.common.cache.broker; import com.atg.openssp.common.configuration.ContextCache; import com.atg.openssp.common.configuration.ContextProperties; import com.atg.openssp.common.exception.EmptyHostException; import restful.client.JsonDataProviderConnector; import restful.context.PathBuilder; ...
Update the named of a renamed React check
module.exports = { "extends": "justinlocsei/configurations/es6", "ecmaFeatures": { "jsx": true }, "env": { "browser": true }, "plugins": [ "react" ], "rules": { "jsx-quotes": [2, "prefer-double"], "react/jsx-boolean-value": [2, "always"], "react/jsx-curly-spacing": [2, "never"], ...
module.exports = { "extends": "justinlocsei/configurations/es6", "ecmaFeatures": { "jsx": true }, "env": { "browser": true }, "plugins": [ "react" ], "rules": { "jsx-quotes": [2, "prefer-double"], "react/jsx-boolean-value": [2, "always"], "react/jsx-curly-spacing": [2, "never"], ...