text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Fix URL of healthcheck endpoint
package com.surfsoftconsulting.clipper.racetracker.controller; /* * Copyright 2017 Phil Haigh * * 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/LICENS...
package com.surfsoftconsulting.clipper.racetracker.controller; /* * Copyright 2017 Phil Haigh * * 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/LICENS...
Prepare version numbers for upcoming beta
package cgeo.geocaching.utils; import cgeo.geocaching.BuildConfig; public class BranchDetectionHelper { // should contain the version name of the last feature release public static final String FEATURE_VERSION_NAME = "2022.08.06-RC"; // should contain version names of active bugfix releases since last f...
package cgeo.geocaching.utils; import cgeo.geocaching.BuildConfig; public class BranchDetectionHelper { // should contain the version name of the last feature release public static final String FEATURE_VERSION_NAME = "2022.06.06"; // should contain version names of active bugfix releases since last feat...
Add more Python 3 classifiers
#!/usr/bin/env python # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setup...
#!/usr/bin/env python # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setup...
Fix iframe info receiver using wrong url
'use strict'; var inherits = require('inherits') , EventEmitter = require('events').EventEmitter , JSON3 = require('json3') , XHRLocalObject = require('./transport/sender/xhr-local') , InfoAjax = require('./info-ajax') ; function InfoReceiverIframe(transUrl) { var self = this; EventEmitter.call(this); ...
'use strict'; var inherits = require('inherits') , EventEmitter = require('events').EventEmitter , JSON3 = require('json3') , XHRLocalObject = require('./transport/sender/xhr-local') , InfoAjax = require('./info-ajax') ; function InfoReceiverIframe(transUrl, baseUrl) { var self = this; EventEmitter.call...
Add version constraint for xamfoo:reactive-obj
Package.describe({ name: 'blazer:react', version: '0.1.1', summary: "Blaze add-on: Create stateful components with methods and mixins like in Facebook's React", git: 'https://github.com/xamfoo/blazer-react', documentation: 'README.md' }); Package.onUse(function(api) { configure(api); }); Package.onTest(fu...
Package.describe({ name: 'blazer:react', version: '0.1.1', summary: "Blaze add-on: Create stateful components with methods and mixins like in Facebook's React", git: 'https://github.com/xamfoo/blazer-react', documentation: 'README.md' }); Package.onUse(function(api) { configure(api); }); Package.onTest(fu...
Add spaces to leaderboard names
require('./style.scss'); var $ = require("jquery"); var Game = require("./game"); var Menu = require("./menu"); var canvas = document.getElementById('canvas'); var context = canvas.getContext('2d'); var menu = new Menu(); function setupPregameDisplay() { menu.setup(); $("#restartButton").on("click", gameLoop); } ...
require('./style.scss'); var $ = require("jquery"); var Game = require("./game"); var Menu = require("./menu"); var canvas = document.getElementById('canvas'); var context = canvas.getContext('2d'); var menu = new Menu(); function setupPregameDisplay() { menu.setup(); $("#restartButton").on("click", gameLoop); } ...
Allow space before custom command name
'use strict'; const { hears } = require('telegraf'); const R = require('ramda'); // DB const { getCommand } = require('../../stores/command'); const capitalize = R.replace(/^./, R.toUpper); const getRepliedToId = R.path([ 'reply_to_message', 'message_id' ]); const typeToMethod = type => type === 'text' ? 'reply...
'use strict'; const { hears } = require('telegraf'); const R = require('ramda'); // DB const { getCommand } = require('../../stores/command'); const capitalize = R.replace(/^./, R.toUpper); const getRepliedToId = R.path([ 'reply_to_message', 'message_id' ]); const typeToMethod = type => type === 'text' ? 'reply...
Add default country to wpa supplicant
package config // Default Configurator constants that are describe a specific configuration option const ( Locale = "Locale" Keymap = "Keymap" Wifi = "Wifi" Interface = "Interface" DNS = "DNS" SSH = "SSH" Camera = "Camera" MountDir = "/tmp/isaax-sd/" Language = "LANGUAGE=%s\n" L...
package config // Default Configurator constants that are describe a specific configuration option const ( Locale = "Locale" Keymap = "Keymap" Wifi = "Wifi" Interface = "Interface" DNS = "DNS" SSH = "SSH" Camera = "Camera" MountDir = "/tmp/isaax-sd/" Language = "LANGUAGE=%s\n" L...
Add Read single Product method to Angular Controller.
'use strict'; angular.module('products').controller('ProductsController', ['$scope', '$stateParams', '$location', 'Products', function($scope, $stateParams, $location, Products) { // List Products $scope.find = function() { $scope.products = Products.query(); }; // CREATE new Product $scop...
'use strict'; angular.module('products').controller('ProductsController', ['$scope', '$stateParams', '$location', 'Products', function($scope, $stateParams, $location, Products) { // List Categories $scope.find = function() { $scope.products = Products.query(); }; // CREATE new Category $s...
Revert "Function is used statically, changed function definition to fix error" This reverts commit d4bfa121e6a028f0a8d239e8a4806e44b553e737.
<?php class Kwf_View_Helper_FileSize { public function fileSize($filesize) { if (!is_int($filesize) && file_exists($filesize)) { $filesize = filesize($filesize); } $shortcuts = array("Bytes", "KB", "MB", "GB", "TB", "PB"); $i = 0; while ($filesize > ...
<?php class Kwf_View_Helper_FileSize { public static function fileSize($filesize) { if (!is_int($filesize) && file_exists($filesize)) { $filesize = filesize($filesize); } $shortcuts = array("Bytes", "KB", "MB", "GB", "TB", "PB"); $i = 0; while ($file...
Define mock @profile decorator in builtins.
# -*- coding: utf-8 -*- # flake8: noqa """ phy is an open source electrophysiological data analysis package in Python for neuronal recordings made with high-density multielectrode arrays containing up to thousands of channels. """ #------------------------------------------------------------------------------ # Impo...
# -*- coding: utf-8 -*- # flake8: noqa """ phy is an open source electrophysiological data analysis package in Python for neuronal recordings made with high-density multielectrode arrays containing up to thousands of channels. """ #------------------------------------------------------------------------------ # Impo...
Disable preloader so the site isn't blanked out with js disabled
//<![CDATA[ $(window).load(function() { // makes sure the whole site is loaded // $('#status').fadeOut(); // will first fade out the loading animation // $('#preloader').delay(150).fadeOut('fast'); // will fade out the white DIV that covers the website. $('body').delay(100).css({'overflow':'visibl...
//<![CDATA[ $(window).load(function() { // makes sure the whole site is loaded $('#status').fadeOut(); // will first fade out the loading animation $('#preloader').delay(150).fadeOut('fast'); // will fade out the white DIV that covers the website. $('body').delay(100).css({'overflow':'visible'}); ...
Replace type filtering method with a name based assign() method
<?php namespace Bolt\Api; class Connections extends \Bolt\Base { public $sources; public function __construct($connections = null) { if ($connections !== null) { if (is_array($connections)) { foreach ($connections as $connection) { $this->add($connection); } } else ...
<?php namespace Bolt\Api; class Connections extends \Bolt\Base { public $sources; public function __construct($connections = null) { if ($connections !== null) { if (is_array($connections)) { foreach ($connections as $connection) { $this->add($connection); } } else ...
Update existing native rounding post processor Reviewed By: oprisnik Differential Revision: D9607950 fbshipit-source-id: 080aa9cd339761a48e534c2fd4d3677005063e78
/* * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package com.facebook.imagepipeline.postprocessors; import android.graphics.Bitmap; import com.facebook.cache.common.CacheKey; import com....
/* * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package com.facebook.imagepipeline.postprocessors; import android.graphics.Bitmap; import com.facebook.cache.common.CacheKey; import com....
Make test output more verbose so we can figure out what is hanging
from bongo.settings.prod import * # The same settings as production, but no database password. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'bongo_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '127.0.0.1', 'PORT': '5432...
from bongo.settings.prod import * # The same settings as production, but no database password. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'bongo_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '127.0.0.1', 'PORT': '5432...
Change connect command to 439
from motobot import hook from time import sleep @hook('PING') def handle_ping(bot, message): """ Handle the server's pings. """ bot.send('PONG :' + message.params[-1]) @hook('439') def handle_notice(bot, message): """ Use the notice message to identify and register to the server. """ if not bot.iden...
from motobot import hook from time import sleep @hook('PING') def handle_ping(bot, message): """ Handle the server's pings. """ bot.send('PONG :' + message.params[-1]) @hook('NOTICE') def handle_notice(bot, message): """ Use the notice message to identify and register to the server. """ if not bot.i...
Fix listeners getting registered too many times on card scan
var cardio = require('com.pointsource.card.io'); function handleScan(e) { console.log('scan event', e); var cardNumber = e.cardNumber; var cardType = e.cardType; var cardholderName = e.cardholderName; var cvv = e.cvv; var expiryMonth = e.expiryMonth; var expiryYear = e.expiryYear; var postalCode = e.postalCode...
var cardio = require('com.pointsource.card.io'); function openCardIO() { console.log("Opening Card.io"); cardio.addEventListener("scan", function(e) { console.log('scan event', e); var cardNumber = e.cardNumber; var cardType = e.cardType; var cardholderName = e.cardholderName; var cvv = e.cvv; var expiry...
Configure store creation to incorporate ReduxRouter
import { createStore, applyMiddleware, compose } from 'redux'; import { reduxReactRouter } from 'redux-router'; import thunk from 'redux-thunk'; import createHistory from 'history/lib/createBrowserHistory'; import routes from '../routes'; import createLogger from 'redux-logger'; import rootReducer from '../reducers'; ...
import { createStore, applyMiddleware } from 'redux'; import { reduxReactRouter } from 'redux-router'; import createHistory from 'history/lib/createBrowserHistory'; import routes from '../routes'; import thunkMiddleware from 'redux-thunk'; import createLogger from 'redux-logger'; import rootReducer from '../reducers'; ...
Use Throwable instead of Exception
package com.ternaryop.utils; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; public class DialogUtils { public static void showErrorDialog(Context context, Throwable t) { showErrorDialog(context, "Error", t); } public static void showErrorD...
package com.ternaryop.utils; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; public class DialogUtils { public static void showErrorDialog(Context context, Exception e) { showErrorDialog(context, "Error", e); } public static void showErrorD...
Remove unused <T> generic type from method signature git-svn-id: d9b8539636d91aff9cd33ed5cd52a0cf73394897@1236307 13f79535-47bb-0310-9956-ffa450edef68
// Copyright 2009, 2011, 2012 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 appl...
// Copyright 2009, 2011 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 applicable...
Use the right graph factory
package com.github.ferstl.depgraph; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.shared.dependency.graph...
package com.github.ferstl.depgraph; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.shared.dependency.graph...
Write comments in n-ary operator
package edu.washington.escience.myria.operator; import java.util.Objects; import com.google.common.base.Preconditions; import edu.washington.escience.myria.Schema; /** * * @author dominik * */ public abstract class NAryOperator extends Operator { /** Required for Java serialization. */ private static fin...
package edu.washington.escience.myria.operator; import java.util.Objects; import com.google.common.base.Preconditions; import edu.washington.escience.myria.Schema; public abstract class NAryOperator extends Operator { /** * The children of the n-ary operator. * */ protected Operator[] children; public...
Remove comment from zabbix integration
from dbaas_dbmonitor.provider import DBMonitorProvider from dbaas_zabbix.provider import ZabbixProvider import logging LOG = logging.getLogger(__name__) class MonitoringManager(): @classmethod def create_monitoring(cls, databaseinfra): try: LOG.info("Creating monitoring...") ...
from dbaas_dbmonitor.provider import DBMonitorProvider from dbaas_zabbix.provider import ZabbixProvider import logging LOG = logging.getLogger(__name__) class MonitoringManager(): @classmethod def create_monitoring(cls, databaseinfra): try: LOG.info("Creating monitoring...") ...
[wiki:DbFinderPlugin] Allow for easier testing with sf 1.1
<?php // Autofind the first available app environment $sf_root_dir = realpath(dirname(__FILE__).'/../../../'); $apps_dir = glob($sf_root_dir.'/apps/*', GLOB_ONLYDIR); $app = substr($apps_dir[0], strrpos($apps_dir[0], DIRECTORY_SEPARATOR) + 1, strlen($apps_dir[0])); if (!$app) { throw ne...
<?php // Autofind the first available app environment $sf_root_dir = realpath(dirname(__FILE__).'/../../../'); $apps_dir = glob($sf_root_dir.'/apps/*', GLOB_ONLYDIR); $app = substr($apps_dir[0], strrpos($apps_dir[0], DIRECTORY_SEPARATOR) + 1, strlen($apps_dir[0])); if (!$app) { throw ne...
Remove trailing line break from C4 UCI instance
from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a tuple with an in...
from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a tuple with an in...
Rename method to be more logical
from .base import Base class List(Base): def __init__(self, result, object_type): Base.__init__(self, result) self.object_type = object_type def get_object_name(self): return self.object_type.__name__.lower() + 's' def __iter__(self): for item in self['_embedded'][self.ge...
from .base import Base class List(Base): def __init__(self, result, object_type): Base.__init__(self, result) self.object_type = object_type def get_resource_name(self): return self.object_type.__name__.lower() + 's' def __iter__(self): for item in self['_embedded'][self....
Add final save to batch lookup
import csv from indra.literature import pubmed_client, crossref_client doi_cache = {} with open('doi_cache.txt') as f: csvreader = csv.reader(f, delimiter='\t') for row in csvreader: doi_cache[row[0]] = row[1] with open('missing_dois.txt') as f: missing_dois = [line.strip('\n') for line in f.readl...
import csv from indra.literature import pubmed_client, crossref_client doi_cache = {} with open('doi_cache.txt') as f: csvreader = csv.reader(f, delimiter='\t') for row in csvreader: doi_cache[row[0]] = row[1] with open('missing_dois.txt') as f: missing_dois = [line.strip('\n') for line in f.readl...
Use the correct excel path.
""" This module is a general example using test data showing usage of sparks, excel and the studbook structure. """ import os from GTT import SPARKS from GTT import excel as ew from GTT import studBookStruct TEST_DIR = os.path.dirname(__file__) TEST_DATA_DIR = os.path.join(TEST_DIR, 'testData') # my_sparks_reader = ...
""" This module is a general example using test data showing usage of sparks, excel and the studbook structure. """ import os from GTT import SPARKS from GTT import excel as ew from GTT import studBookStruct TEST_DIR = os.path.dirname(__file__) TEST_DATA_DIR = os.path.join(TEST_DIR, 'testData') # my_sparks_reader = ...
Fix file chunk size off-by-one error
module.exports = class RarFileChunk { constructor(fileMedia, startOffset, endOffset) { this.fileMedia = fileMedia; this.startOffset = startOffset; this.endOffset = endOffset; } paddEnd(endPadding) { return new RarFileChunk( this.fileMedia, this.startOffset, this.endOffset - endPa...
module.exports = class RarFileChunk { constructor(fileMedia, startOffset, endOffset) { this.fileMedia = fileMedia; this.startOffset = startOffset; this.endOffset = endOffset; } paddEnd(endPadding) { return new RarFileChunk( this.fileMedia, this.startOffset, this.endOffset - endPa...
Bring the directory near to the modules definition
'use strict'; /** * Run the modules with the libraries and the services * @example let config = { libraries: { library: require('library') }, directory: __dirname + '/', modules: [ [require('bundle'), [ ['modules/module', {}] ]],...
'use strict'; /** * Run the modules with the libraries and the services * @example let config = { directory: __dirname + '/', libraries: { library: require('library') }, modules: [ [require('bundle'), [ ['modules/module', {}] ]],...
Add per-word replace probability, max outputs.
import piglatin import random from interfaces.SentenceOperation import SentenceOperation from tasks.TaskTypes import TaskType class PigLatin(SentenceOperation): tasks = [ TaskType.TEXT_CLASSIFICATION, TaskType.TEXT_TO_TEXT_GENERATION, TaskType.TEXT_TAGGING, ] languages = ["en"] ...
import piglatin from interfaces.SentenceOperation import SentenceOperation from tasks.TaskTypes import TaskType class PigLatin(SentenceOperation): tasks = [ TaskType.TEXT_CLASSIFICATION, TaskType.TEXT_TO_TEXT_GENERATION, TaskType.TEXT_TAGGING, ] languages = ["en"] def __init__...
Use correct settings when registering the Builder with Laravel.
<?php namespace Staf\Generator; use Illuminate\Support\ServiceProvider; class GeneratorServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { // Setup the config file for publishing. $this->publis...
<?php namespace Staf\Generator; use Illuminate\Support\ServiceProvider; class GeneratorServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { // Setup the config file for publishing. $this->publis...
Fix playlist link when user does not have custom path close #56
/*jslint nomen: true, plusplus: true, es5: true, regexp: true */ /*global GS, GSX, GSXUtil, console, $, _ */ var GSXmodules = window.GSXmodules = window.GSXmodules || []; GSXmodules.push({ name: 'Sidebar', init: function () { 'use strict'; _.extend(GS.Views.Sidebar.prototype, { render: _.compose(fu...
/*jslint nomen: true, plusplus: true, es5: true, regexp: true */ /*global GS, GSX, GSXUtil, console, $, _ */ var GSXmodules = window.GSXmodules = window.GSXmodules || []; GSXmodules.push({ name: 'Sidebar', init: function () { 'use strict'; _.extend(GS.Views.Sidebar.prototype, { render: _.compose(fu...
:shirt: Resolve 'unnecessary escape character' violations Resolves the following linter violations: lib/toggle-markdown-task.js:43:31: Unnecessary escape character: \-. lib/toggle-markdown-task.js:43:33: Unnecessary escape character: \*. lib/toggle-markdown-task.js:43:36: Unnecessary escape character: \ . lib...
const {CompositeDisposable} = require('atom') module.exports = ({ subscriptions: null, activate (state) { this.subscriptions = new CompositeDisposable() this.subscriptions.add(atom.commands.add('atom-text-editor', {'toggle-markdown-task:toggle': () => this.toggle()}) ) }, deactivate () { ...
const {CompositeDisposable} = require('atom') module.exports = ({ subscriptions: null, activate (state) { this.subscriptions = new CompositeDisposable() this.subscriptions.add(atom.commands.add('atom-text-editor', {'toggle-markdown-task:toggle': () => this.toggle()}) ) }, deactivate () { ...
Add environment variable for password.
package org.kelley; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import o...
package org.kelley; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders....
Handle when /grid ends with a period, since Twitter let apgwoz link to it that way
from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), url(r'^entry/(...
from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), url(r'^entry/(...
Use a dict representation of the GET QueryDict
from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models import ShortURLAli...
from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models import ShortURLAli...
Change default deadline notify setting to true
package com.phicdy.totoanticipation.model.storage; import android.content.Context; import android.content.SharedPreferences; import android.support.annotation.NonNull; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.phicdy.totoanticipation.model.Game; import com.phicdy.totoanticipati...
package com.phicdy.totoanticipation.model.storage; import android.content.Context; import android.content.SharedPreferences; import android.support.annotation.NonNull; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.phicdy.totoanticipation.model.Game; import com.phicdy.totoanticipati...
Fix warning with list iteration
import React from "react" import { connect } from "react-redux" //import { fetchLinks } from "../actions/linkActions" @connect((store) => { return { user: 'Celso', myList: ['fee', 'fi', 'fo', 'fum'], message: ''//, //links: store.links.links }; }) export default class Layout extends React.Componen...
import React from "react" import { connect } from "react-redux" //import { fetchLinks } from "../actions/linkActions" @connect((store) => { return { user: 'Celso', myList: ['fee', 'fi', 'fo', 'fum'], message: ''//, //links: store.links.links }; }) export default class Layout extends React.Componen...
Make titles and hotbars more visible
package tc.oc.commons.bukkit.chat; import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.entity.Player; import tc.oc.commons.core.chat.Components; import tc.oc.commons.core.stream.Collectors; import java.util.stream.Stream; public class LegacyPlayerAudience extends PlayerAudience { private BaseCompon...
package tc.oc.commons.bukkit.chat; import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.entity.Player; import tc.oc.commons.core.chat.Component; import tc.oc.commons.core.chat.Components; public class LegacyPlayerAudience extends PlayerAudience { private BaseComponent recentHotbarMessage; public...
Fix for handling of zero-length declaration blocks
/*! Parker v0.0.0 - MIT license */ 'use strict'; var _ = require('underscore'); function CssRule(raw) { this.raw = raw; } CssRule.prototype.getSelectors = function () { return getSelectors(getSelectorBlock(this.raw)); }; CssRule.prototype.getDeclarations = function () { return getDeclarations(getDeclar...
/*! Parker v0.0.0 - MIT license */ 'use strict'; var _ = require('underscore'); function CssRule(raw) { this.raw = raw; } CssRule.prototype.getSelectors = function () { return getSelectors(getSelectorBlock(this.raw)); }; CssRule.prototype.getDeclarations = function () { return getDeclarations(getDeclar...
Remove "express." from errorHandler line
// Module dependencies. var express = require('express'); var ArticleProvider = require('./articleprovider-memory').ArticleProvider; var app = express(); var bodyParser = require('body-parser'); var methodOverride = require('method-override'); var errorHandler = require('errorhandler'); app.set('views', __di...
// Module dependencies. var express = require('express'); var ArticleProvider = require('./articleprovider-memory').ArticleProvider; var app = express(); var bodyParser = require('body-parser'); var methodOverride = require('method-override'); var errorHandler = require('errorhandler'); app.set('views', __di...
Delete to the root now deletes all todos on db.
var express = require('express'); var cors = require('cors'); var bodyParser = require('body-parser'); var Pool = require('pg').Pool; var pool = new Pool({ database: 'todo', max: 10, idelTimeoutMillis: 1000 }); var app = express(); app.use(cors()); app.use(bodyParser.json()); app.get('/', function(req, res, nex...
var express = require('express'); var cors = require('cors'); var bodyParser = require('body-parser'); var Pool = require('pg').Pool; var pool = new Pool({ database: 'todo', max: 10, idelTimeoutMillis: 1000 }); var app = express(); app.use(cors()); app.use(bodyParser.json()); app.get('/', function(req, res, nex...
Fix a bug involving how mock_state is set
import random from ...mock.mock_abstract_device import MockAbstractDevice from ..tc335 import TC335 """ Mock Lakeshore 335 Temperature Controller """ class MockTC335(MockAbstractDevice, TC335): """ Mock interface for Lakeshore 335 Temperature Controller. """ def __init__(self, *args, **kwargs): self.mocking =...
import random from ...mock.mock_abstract_device import MockAbstractDevice from ..tc335 import TC335 """ Mock Lakeshore 335 Temperature Controller """ class MockTC335(MockAbstractDevice, TC335): """ Mock interface for Lakeshore 335 Temperature Controller. """ def __init__(self, *args, **kwargs): self.mocking =...
Fix variable and return value
from __future__ import absolute_import from celery import shared_task from twisted.internet import reactor from scrapy.crawler import Crawler from scrapy import log, signals from scrapy.utils.project import get_project_settings import os from raw.scraper.spiders.legco_library import LibraryAgendaSpider from raw.scrape...
from __future__ import absolute_import from celery import shared_task from twisted.internet import reactor from scrapy.crawler import Crawler from scrapy import log, signals from scrapy.utils.project import get_project_settings import os from raw.scraper.spiders.legco_library import LibraryAgendaSpider from raw.scrape...
Rename origin -> sourceNodes, u -> node
// This is an ES6 module. // This exported function provides a constructor for graph instances. // Usage `var graph = Graph();` or (optionally) `var graph = new Graph();` export function Graph(){ // The adjacency list of the graph. // Keys are node ids. // Values are arrays of adjacent node ids. var edges = ...
// This is an ES6 module. export function Graph(){ // Keys are node ids. // Values are arrays of adjacent node ids. var edges = {}; // Gets or creates the adjacent node list for node u. function adjacent(u){ return edges[u] || (edges[u] = []); } return { adjacent: adjacent, addEdge:...
Undo premature fix for dependency
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass def remove_old_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass def remove_old_...
Add get merged count method.
""" serializers.py - (C) Copyright - 2017 This software is copyrighted to contributors listed in CONTRIBUTIONS.md. SPDX-License-Identifier: MIT Author(s) of this file: J. Harding Serializer for issue stats of a GitHub repo. """ from rest_framework import serializers as s from ..models import GhIssueEvent from rep...
""" serializers.py - (C) Copyright - 2017 This software is copyrighted to contributors listed in CONTRIBUTIONS.md. SPDX-License-Identifier: MIT Author(s) of this file: J. Harding Serializer for issue stats of a GitHub repo. """ from rest_framework import serializers as s from ..models import GhIssueEvent from rep...
Set required python ver to 3.5
from os import path from pip.download import PipSession from pip.req import parse_requirements from graphene_permissions import __version__ from setuptools import setup here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() instal...
from os import path from pip.download import PipSession from pip.req import parse_requirements from graphene_permissions import __version__ from setuptools import setup here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() instal...
Comment post endpoint return a ksopn, fix issue saving comments add post id and convert it to int
from flask import jsonify from flask_classy import FlaskView from flask_user import current_user, login_required from ..models import CommentModel, PostModel from ..forms import CommentForm class Comment(FlaskView): def get(self): pass def all(self, post_id): comment = CommentModel() ...
from flask import jsonify from flask_classy import FlaskView from flask_user import current_user, login_required from ..models import CommentModel, PostModel from ..forms import CommentForm class Comment(FlaskView): def get(self): pass def all(self, post_id): comment = CommentModel() ...
Add new line for LR_PASS;
package lv.ctco.cukesrest.loadrunner; import java.util.*; public class LoadRunnerAction { private List<LoadRunnerTransaction> transactions = new ArrayList<LoadRunnerTransaction>(); public List<LoadRunnerTransaction> getTransactions() { return transactions; } public void setTransactions(List...
package lv.ctco.cukesrest.loadrunner; import java.util.*; public class LoadRunnerAction { private List<LoadRunnerTransaction> transactions = new ArrayList<LoadRunnerTransaction>(); public List<LoadRunnerTransaction> getTransactions() { return transactions; } public void setTransactions(List...
Comment out t_shadow, t_stats, and t_circuitbreaker, at Flynn's behest
from kat.harness import Runner from abstract_tests import AmbassadorTest # Import all the real tests from other files, to make it easier to pick and choose during development. import t_basics import t_cors import t_extauth import t_grpc import t_grpc_bridge import t_grpc_web import t_gzip import t_headerrouting impo...
from kat.harness import Runner from abstract_tests import AmbassadorTest # Import all the real tests from other files, to make it easier to pick and choose during development. import t_basics import t_cors import t_extauth import t_grpc import t_grpc_bridge import t_grpc_web import t_gzip import t_headerrouting impo...
:chart_with_upwards_trend: UPDATE JSON AT 五 2月 17 15:43:00 CST 2017
var CronJob = require('cron').CronJob; var exec = require('child_process').exec; var buildAwesome = 'npm run awesome'; var buildAllRepo = 'npm run build'; var pushToGithub = 'npm run push'; console.log('Do The Crob Job! Awesome :)'); new CronJob('* * */6 * * *', function () { try { exec(buildAwesome, finishAweso...
var CronJob = require('cron').CronJob; var exec = require('child_process').exec; var buildAwesome = 'npm run awesome'; var buildAllRepo = 'npm run build'; var pushToGithub = 'npm run push'; console.log('Do The Crob Job! Awesome :)'); new CronJob('* * */6 * * *', function () { try { exec(buildAwesome, finishAweso...
Remove the noise default broken image
import os from fabric.api import local, settings, abort, run, cd, env, put, sudo from fabric.contrib.console import confirm import time DEPLOY_WAIT_TIME = 15 timestamp="release-%s" % int(time.time() * 1000) env.user = 'deploy' # Special group with limited sudo env.hosts = ['104.236.224.252'] code_dir = '/home/liz...
import os from fabric.api import local, settings, abort, run, cd, env, put, sudo from fabric.contrib.console import confirm import time DEPLOY_WAIT_TIME = 15 timestamp="release-%s" % int(time.time() * 1000) env.user = 'deploy' # Special group with limited sudo env.hosts = ['104.236.224.252'] code_dir = '/home/liz...
Make toDate test less dependent on local time
import momentTimezone from 'moment-timezone'; import { HOUR_IN_PIXELS } from '../src/Constants'; import toDate from '../src/toDate'; it('sets the right hour', () => { const expected = momentTimezone.tz('2017-05-01T07:33:11.722Z', 'Europe/Stockholm') .hours(4).minutes(0).seconds(0) .milliseconds(0) .toDa...
import { HOUR_IN_PIXELS } from '../src/Constants'; import toDate from '../src/toDate'; it('sets the right hour', () => { const expected = new Date(); expected.setHours(4, 0, 0, 0); expect(toDate(new Date(), HOUR_IN_PIXELS * 4, 'Europe/Stockholm')).toEqual(expected); }); it('sets the right minute', () => { con...
Fix failing test caused by new toolchain The challenge with floating point values in tests is that the value can change slightly based on the order of operations, which can legally be affected by optimizations. The results aren't visible (often just 1 ULP), but the tests validate exact bit patterns. This test would b...
#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # 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 l...
#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # 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 l...
Add removed APP_PATH setup in micro project.
<?php defined('APP_PATH') || define('APP_PATH', realpath('.')); return new \Phalcon\Config([ 'database' => [ 'adapter' => 'Mysql', 'host' => 'localhost', 'username' => 'root', 'password' => '', 'dbname' => 'test', 'charset' => 'utf8', ], ...
<?php return new \Phalcon\Config([ 'database' => [ 'adapter' => 'Mysql', 'host' => 'localhost', 'username' => 'root', 'password' => '', 'dbname' => 'test', 'charset' => 'utf8', ], 'application' => [ 'modelsDir' => APP_PATH . ...
Add ability to add dependencies in extractor
var path = require('path'); var _readFile = require('../utils/readFile'); function resolve(filepath) { return path.resolve(this.source.absolutePath, filepath); } function addDependency(filepath) { this.module.fileDependencies.push(filepath); } function readFile(filepath) { return _readFile(filepath, this.fs); ...
var path = require('path'); var _readFile = require('../utils/readFile'); function resolve(filepath) { return path.resolve(this.source.absolutePath, filepath); } function addDependency(filepath) { this.compilation.fileDependencies.push(filepath); } function readFile(filepath) { return _readFile(filepath, this....
Remove useless offset propety from addItem initialState
import { SET_ITEM_NAME, SET_ITEM_CATEGORY, RESET_ADD_ITEM_FORM, } from '../constants/ActionTypes'; const initialState = { name: null, categoryId: null, }; export default (state = initialState, action) => { switch (action.type) { case SET_ITEM_NAME: return { ...state, name: action...
import { SET_ITEM_NAME, SET_ITEM_CATEGORY, RESET_ADD_ITEM_FORM, } from '../constants/ActionTypes'; const initialState = { offset: null, name: null, categoryId: null, }; export default (state = initialState, action) => { switch (action.type) { case SET_ITEM_NAME: return { ...state, ...
Update Client Version to 3.2
from setuptools import setup setup( name="teamscale-client", version="3.2.0", author="Thomas Kinnen - CQSE GmbH", author_email="kinnen@cqse.eu", description=("A simple service client to interact with Teamscale's REST API."), license="Apache", keywords="rest api teamscale", url="https://...
from setuptools import setup setup( name="teamscale-client", version="3.1.1", author="Thomas Kinnen - CQSE GmbH", author_email="kinnen@cqse.eu", description=("A simple service client to interact with Teamscale's REST API."), license="Apache", keywords="rest api teamscale", url="https://...
Handle directory creation when it is not present
package fortiss.gui.listeners.helper; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import fortiss.gui.DesignerPanel; import memap.helper.DirectoryConfiguration; public class WindowSnipper { ...
package fortiss.gui.listeners.helper; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import fortiss.gui.DesignerPanel; import memap.helper.DirectoryConfiguration; public class WindowSnipper { ...
Fix path for handlebars helpers
var path = require("path"); // Export function to create new config (builder is passed in from outside) module.exports = function(builder) { var bootstrapLess = require.resolve("bootstrap/less/bootstrap.less"); return builder.merge({ template: require.resolve("./handlebars/template.hbs"), par...
var path = require("path"); // Export function to create new config (builder is passed in from outside) module.exports = function(builder) { var bootstrapLess = require.resolve("bootstrap/less/bootstrap.less"); return builder.merge({ template: require.resolve("./handlebars/template.hbs"), par...
Add threejs library as one of the usable module for compatibility.
/** * Provides a global namespace for the Zinc javascript library and some default parameters for it. * * @namespace * @author Alan Wu */ var Zinc = function() { this.Revision = 29; this.defaultMaterialColor = 0xFFFFFF; this.defaultOpacity = 1.0; this.Geometry = require('./geometry').Geometry; this.G...
/** * Provides a global namespace for the Zinc javascript library and some default parameters for it. * * @namespace * @author Alan Wu */ var Zinc = function() { this.Revision = 29; this.defaultMaterialColor = 0xFFFFFF; this.defaultOpacity = 1.0; this.Geometry = require('./geometry').Geometry; this.G...
Add indexes to user schema
var mongoose = require('mongoose'), urlFormatter = require('../../app/models/url_formatter.server.model'), Schema = mongoose.Schema; var UserSchema = new Schema({ firstName: String, lastName: String, email: { type: String, index: true }, username: { type: String, ...
var mongoose = require('mongoose'), urlFormatter = require('../../app/models/url_formatter.server.model'), Schema = mongoose.Schema; var UserSchema = new Schema({ firstName: String, lastName: String, email: String, username: { type: String, trim: true }, password: String...
Fix bug with getting ec2 connection instead of source image
package chroot import ( "fmt" "github.com/mitchellh/goamz/ec2" "github.com/mitchellh/multistep" "github.com/mitchellh/packer/packer" ) // StepCheckRootDevice makes sure the root device on the AMI is EBS-backed. type StepCheckRootDevice struct{} func (s *StepCheckRootDevice) Run(state multistep.StateBag) multist...
package chroot import ( "fmt" "github.com/mitchellh/goamz/ec2" "github.com/mitchellh/multistep" "github.com/mitchellh/packer/packer" ) // StepCheckRootDevice makes sure the root device on the AMI is EBS-backed. type StepCheckRootDevice struct{} func (s *StepCheckRootDevice) Run(state multistep.StateBag) multist...
Make version hack more reliable
import importlib.metadata from typing import Any, Optional, Protocol, cast class BasePath(Protocol): """A protocol that various path objects conform. This exists because importlib.metadata uses both ``pathlib.Path`` and ``zipfile.Path``, and we need a common base for type hints (Union does not work w...
import importlib.metadata from typing import Optional, Protocol class BasePath(Protocol): """A protocol that various path objects conform. This exists because importlib.metadata uses both ``pathlib.Path`` and ``zipfile.Path``, and we need a common base for type hints (Union does not work well since `...
Use html tech from bemhtml library
var PATH = require('path'), pjoin = PATH.join, presolve = PATH.resolve.bind(null, __dirname), PRJ_ROOT = presolve('../../'), PRJ_TECHS = presolve('../techs/'); exports.getTechs = function() { return { 'bemjson.js' : '', 'bemdecl.js' : 'bemdecl.js', 'deps.js' ...
var PATH = require('path'), pjoin = PATH.join, presolve = PATH.resolve.bind(null, __dirname), PRJ_ROOT = presolve('../../'), PRJ_TECHS = presolve('../techs/'), BEMBL_TECHS = pjoin(PRJ_ROOT, 'bem-bl/blocks-common/i-bem/bem/techs'); exports.getTechs = function() { return { 'bemjson.j...
feat(bot): Implement switching to webhooks in production
"use strict"; const http = require('http'); const mongoose = require('mongoose'); const requireAll = require('require-all'); const TelegramBot = require('node-telegram-bot-api'); const GitHubNotifications = require('./services/GitHubNotifications'); const User = require('./models/User'); const BOT_COMMANDS = requireA...
"use strict"; const http = require('http'); const mongoose = require('mongoose'); const requireAll = require('require-all'); const TelegramBot = require('node-telegram-bot-api'); const GitHubNotifications = require('./common/GitHubNotifications'); const User = require('./models/User'); const BOT_COMMANDS = requireAll...
Use let instead of const
/* * This script will automaticly look at the closest entity. * It checks for a near entity every tick. */ const mineflayer = require('mineflayer') if (process.argv.length < 4 || process.argv.length > 6) { console.log('Usage : node echo.js <host> <port> [<name>] [<password>]') process.exit(1) } const bot = min...
/* * This script will automaticly look at the closest entity. * It checks for a near entity every tick. */ const mineflayer = require('mineflayer') if (process.argv.length < 4 || process.argv.length > 6) { console.log('Usage : node echo.js <host> <port> [<name>] [<password>]') process.exit(1) } const bot = min...
[Genomics]: Make it easier to run the SAM indexer on a single file.
package com.github.sparkcaller.preprocessing; import htsjdk.samtools.BAMIndexer; import htsjdk.samtools.SamReader; import htsjdk.samtools.SamReaderFactory; import org.apache.spark.api.java.function.Function; import org.apache.spark.api.java.function.Function2; import java.io.File; public class BamIndexer implements ...
package com.github.sparkcaller.preprocessing; import htsjdk.samtools.BAMIndexer; import htsjdk.samtools.SamReader; import htsjdk.samtools.SamReaderFactory; import org.apache.spark.api.java.function.Function; import java.io.File; public class BamIndexer implements Function<File, File> { // Create an index (.bai) ...
Remove useless blank line after the namespace declaration
<?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS B...
<?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS B...
Set is_found in AppleFrameworks constructor Set is_found in AppleFrameworks constructor, rather than overriding the found() method, as other superclass methods may access is_found.
# Copyright 2013-2017 The Meson development team # 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 agree...
# Copyright 2013-2017 The Meson development team # 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 agree...
Add Knockout to font loader
var urls = [ 'http://s.npr.org/templates/css/fonts/GothamSSm.css', 'http://s.npr.org/templates/css/fonts/Gotham.css', 'http://s.npr.org/templates/css/fonts/Knockout.css' ]; if (window.location.protocol == "https:") { urls = [ 'https://secure.npr.org/templates/css/fonts/GothamSSm.css', '...
var urls = [ 'http://s.npr.org/templates/css/fonts/GothamSSm.css', 'http://s.npr.org/templates/css/fonts/Gotham.css' ]; if (window.location.protocol == "https:") { urls = [ 'https://secure.npr.org/templates/css/fonts/GothamSSm.css', 'https://secure.npr.org/templates/css/fonts/Gotham.css' ...
Allow exception to be thrown in `elixir` helper
<?php if (! function_exists('public_path')) { /** * Get the path to the public folder. * * @param string $path * @return string */ function public_path($path = '') { return 'source'.($path ? DIRECTORY_SEPARATOR.$path : $path); } } if (! function_exists('elixir')) { ...
<?php if (! function_exists('public_path')) { /** * Get the path to the public folder. * * @param string $path * @return string */ function public_path($path = '') { return 'source'.($path ? DIRECTORY_SEPARATOR.$path : $path); } } if (! function_exists('elixir')) { ...
Use latest petitions on HP instead...
import React from 'react'; import TeaserGrid from 'components/TeaserGrid'; import Container from 'components/Container'; import BlockContainer from 'components/BlockContainer'; import Section from 'components/Section'; import Heading2 from 'components/Heading2'; import styles from './homepage-petitions.scss'; import Li...
import React from 'react'; import TeaserGrid from 'components/TeaserGrid'; import Container from 'components/Container'; import BlockContainer from 'components/BlockContainer'; import Section from 'components/Section'; import Heading2 from 'components/Heading2'; import styles from './homepage-petitions.scss'; import Li...
Change extension path in registerBackendControllers()
<?php namespace Bolt\Extension\Bolt\Importwxr; use Bolt\Extension\Bolt\Importwxr\Controller\ImportController; use Bolt\Extension\SimpleExtension; use Bolt\Menu\MenuEntry; /** * Importwxr extension class. * * @author Your Name <you@example.com> */ class ImportwxrExtension extends SimpleExtension { protected ...
<?php namespace Bolt\Extension\Bolt\Importwxr; use Bolt\Extension\Bolt\Importwxr\Controller\ImportController; use Bolt\Extension\SimpleExtension; use Bolt\Menu\MenuEntry; /** * Importwxr extension class. * * @author Your Name <you@example.com> */ class ImportwxrExtension extends SimpleExtension { protected ...
Update message for missing ResponsiveMiddleware
from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured( "...
from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured( "...
Clarify static method description for sharing
package org.mozilla.webmaker.util; import android.app.Activity; import android.content.Intent; import org.mozilla.webmaker.R; public class Share { /** * Launches a share intent. * * @param url URL to be appended to the share body * @param activity Base activity */ public static void ...
package org.mozilla.webmaker.util; import android.app.Activity; import android.content.Intent; import org.mozilla.webmaker.R; public class Share { /** * Launches a share intent using a specified subject and body. * * @param url URL to be appended to the share body * @param activity Base activ...
Drop use of 'oslo' namespace package The Oslo libraries have moved all of their code out of the 'oslo' namespace package into per-library packages. The namespace package was retained during kilo for backwards compatibility, but will be removed by the liberty-2 milestone. This change removes the use of the namespace pa...
# Copyright 2014 Red Hat, 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...
# Copyright 2014 Red Hat, 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...
Fix typo in Pushbullet user section title
package fr.jcgay.jenkins.plugins.pushbullet; import hudson.Extension; import hudson.model.User; import hudson.model.UserProperty; import hudson.model.UserPropertyDescriptor; import hudson.util.Secret; import org.kohsuke.stapler.DataBoundConstructor; public class PushbulletUser extends UserProperty { private fina...
package fr.jcgay.jenkins.plugins.pushbullet; import hudson.Extension; import hudson.model.User; import hudson.model.UserProperty; import hudson.model.UserPropertyDescriptor; import hudson.util.Secret; import org.kohsuke.stapler.DataBoundConstructor; public class PushbulletUser extends UserProperty { private fina...
Tweak documentation for market listener in order book reconstruction
package org.jvirtanen.parity.top; /** * The interface for outbound events from the order book reconstruction. */ public interface MarketListener { /** * An event indicating that the best bid and offer (BBO) has changed. * * @param instrument the instrument * @param bidPrice the bid price or ...
package org.jvirtanen.parity.top; /** * <code>MarketListener</code> is the interface for outbound events from the * order book reconstruction. */ public interface MarketListener { /** * An event indicating that the best bid and offer (BBO) has changed. * * @param instrument the instrument *...
Fix Dominator memory leak with explicit sub.connection.Close() call.
package herd import ( "github.com/Symantec/Dominator/dom/mdb" ) func (herd *Herd) mdbUpdate(mdb *mdb.Mdb) { herd.subsByIndex = nil if herd.subsByName == nil { herd.subsByName = make(map[string]*Sub) } for _, sub := range herd.subsByName { sub.hostname = "" } for _, machine := range mdb.Machines { sub := ...
package herd import ( "github.com/Symantec/Dominator/dom/mdb" ) func (herd *Herd) mdbUpdate(mdb *mdb.Mdb) { herd.subsByIndex = nil if herd.subsByName == nil { herd.subsByName = make(map[string]*Sub) } for _, sub := range herd.subsByName { sub.hostname = "" } for _, machine := range mdb.Machines { sub := ...
Fix random x axis ball speed
import Item, { MovingDirection, ItemType } from './Item' import Ball from './Ball' import ItemLoader from '../Loader/ItemLoader' import Helper from '../Utility/Utility' export default class Platform extends Item { constructor(width, height, color) { super( [500 - (width / 2), 500 - height - 10], [wid...
import Item, { MovingDirection, ItemType } from './Item' import Ball from './Ball' import ItemLoader from '../Loader/ItemLoader' import Helper from '../Utility/Utility' export default class Platform extends Item { constructor(width, height, color) { super( [500 - (width / 2), 500 - height - 10], [wid...
Handle unparseable log lines properly
#!/usr/bin/env node "use strict"; var bunyan = require("bunyan"); var ss = require("stream-splitter"); var lineFormat = /(\d{4})\/(\d{2})\/(\d{2}) (\d{2}):(\d{2}):(\d{2}) /; var tagFormat = /([\w.]+): /; var logName = process.argv[2] || "etcd"; var log = bunyan.createLogger({name: logName}); var stream = process.s...
#!/usr/bin/env node "use strict"; var bunyan = require("bunyan"); var ss = require("stream-splitter"); var lineFormat = /(\d{4})\/(\d{2})\/(\d{2}) (\d{2}):(\d{2}):(\d{2}) /; var tagFormat = /([\w.]+): /; var logName = process.argv[2] || "etcd"; var log = bunyan.createLogger({name: logName}); var stream = process.s...
Add declare_strict_types rule for php-cs-fixer
<?php $finder = (new PhpCsFixer\Finder()) ->in(__DIR__); return (new PhpCsFixer\Config()) ->setRiskyAllowed(true) ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, 'array_syntax' => [ 'syntax' => 'short', ], 'concat_space' => [ 'spac...
<?php $finder = (new PhpCsFixer\Finder()) ->in(__DIR__); return (new PhpCsFixer\Config()) ->setRiskyAllowed(true) ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, 'array_syntax' => [ 'syntax' => 'short', ], 'concat_space' => [ 'spac...
Make the jplock/zookeeper tag explicit (3.4.6 instead of 'latest')
package com.containersol.minimesos.mesos; import com.containersol.minimesos.MesosCluster; import com.containersol.minimesos.container.AbstractContainer; import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.CreateContainerCmd; import com.github.dockerjava.api.model.ExposedPort; /** ...
package com.containersol.minimesos.mesos; import com.containersol.minimesos.MesosCluster; import com.containersol.minimesos.container.AbstractContainer; import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.CreateContainerCmd; import com.github.dockerjava.api.model.ExposedPort; /** ...
Fix jumping on ref removing.
import { Component } from 'substance' /* Simplistic back-matter displaying references and appendixes */ export default class BackComponent extends Component { render($$) { const node = this.props.node let el = $$('div').addClass('sc-back') .attr('data-id', node.id) // NOTE: Bibliography depend...
import { Component } from 'substance' /* Simplistic back-matter displaying references and appendixes */ export default class BackComponent extends Component { render($$) { const node = this.props.node let el = $$('div').addClass('sc-back') .attr('data-id', node.id) // NOTE: Bibliography depend...
Reduce size of testings images by default to speed up tests
import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (10, 10) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a new Django file-li...
import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (100, 100) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a new Django file-...
Add render template with js instructions
// http://mochajs.org/ // @see http://chaijs.com/api/bdd/ describe('View', function() { var App; var View; var testView; beforeEach(function() { App = window.App; View = App.View; }); afterEach(function() { testView = undefined; App = null; View = null; }); it('should set templa...
// http://mochajs.org/ // @see http://chaijs.com/api/bdd/ describe('View', function() { var App; var View; var testView; beforeEach(function() { App = window.App; View = App.View; }); afterEach(function() { testView = undefined; App = null; View = null; }); it('should set templa...
Update test for actually checking existence of nodes before creating.
from nose.tools import eq_, ok_ from tornado.httpclient import HTTPRequest import json from astral.api.tests import BaseTest from astral.models.node import Node from astral.models.tests.factories import NodeFactory class NodesHandlerTest(BaseTest): def test_get_nodes(self): [NodeFactory() for _ in range(3...
from nose.tools import eq_, ok_ from tornado.httpclient import HTTPRequest import json from astral.api.tests import BaseTest from astral.models.node import Node from astral.models.tests.factories import NodeFactory class NodesHandlerTest(BaseTest): def test_get_nodes(self): [NodeFactory() for _ in range(3...
Clean up code a bit.
/* * Paper.js * * This file is part of Paper.js, a JavaScript Vector Graphics Library, * based on Scriptographer.org and designed to be largely API compatible. * http://paperjs.org/ * http://scriptographer.org/ * * Copyright (c) 2011, Juerg Lehni & Jonathan Puckey * http://lehni.org/ & http://jonathanpuckey.co...
/* * Paper.js * * This file is part of Paper.js, a JavaScript Vector Graphics Library, * based on Scriptographer.org and designed to be largely API compatible. * http://paperjs.org/ * http://scriptographer.org/ * * Copyright (c) 2011, Juerg Lehni & Jonathan Puckey * http://lehni.org/ & http://jonathanpuckey.co...
Fix test that missed a re-factor
package com.example; import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest...
package com.example; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.cloud.contract....
[fix] Make moment global for debugging.
import _ from "lodash"; import jQuery from "jquery"; import moment from "moment"; import Config from "./config.js"; import DText from "./dtext.js"; import Tag from "./tag.js"; import UI from "./ui.js"; import "./danbooru-ex.css"; export default class EX { static get Config() { return Config; } static get DTe...
import _ from "lodash"; import jQuery from "jquery"; import moment from "moment"; import Config from "./config.js"; import DText from "./dtext.js"; import Tag from "./tag.js"; import UI from "./ui.js"; import "./danbooru-ex.css"; export default class EX { static get Config() { return Config; } static get DTe...
Correct typo for view utilities
<?php /* |------------------------------------------------------ | Return the Closure to calculate the remaining tickets |------------------------------------------------------ */ return function(PDO $db_conn) { $totalTickets = require __DIR__.'/check_total_tickets.php'; try { $soldTickets = (i...
<?php /* |------------------------------------------------------ | Return the Closure to calculate the remaining tickets |------------------------------------------------------ */ return function(PDO $db_conn) { $totalTicekts = require __DIR__.'/check_total_tickets.php'; try { $soldTickets = (i...
Fix charset and lang for serving static page
<?php header("Content-Type: text/html; charset=UTF-8"); require("time.php"); ?> <!DOCTYPE html> <html lang="en-GB"> <head> <title><?php echo $pageMeta["title"]?></title> <meta charset="utf-8"> <link rel="stylesheet" href="/wp-content/themes/quis/css/quis.css" type="text/css" /> <link rel="alternate" typ...
<?php header("Content-Type: text/html; charset=UTF-8"); require("time.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <title><?php echo $pageMeta["title"]?></title> <link rel="stylesheet" href="/wp-content/themes/quis/css/quis.css" type="text/css" /> <link rel="alternate" type="application/rss+xml" title=...
Allow dots in module names.
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next two lines to enab...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next two lines to enab...
Fix issue where the tabs object throws an error if no sub_tabs exist at all
<?php namespace Jadu\Pulsar\Twig\Extension; class TabsExtension extends \Twig_Extension { public function getName() { return 'tabs_extension'; } public function getFunctions() { return array( new \Twig_SimpleFunction('get_active_tab', array($this, 'getActiveParentTabID')) ); } public...
<?php namespace Jadu\Pulsar\Twig\Extension; class TabsExtension extends \Twig_Extension { public function getName() { return 'tabs_extension'; } public function getFunctions() { return array( new \Twig_SimpleFunction('get_active_tab', array($this, 'getActiveParentTabID')) ); } public...
Switch default URL back to Jesse
'use strict'; const webpack = require('webpack'); const path = require('path'); var CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { entry: [ 'webpack-dev-server/client?https://0.0.0.0:8080', './src/index.js' ], output: { path: path.resolve(__dirname, 'build...
'use strict'; const webpack = require('webpack'); const path = require('path'); var CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { entry: [ 'webpack-dev-server/client?https://0.0.0.0:8080', './src/index.js' ], output: { path: path.resolve(__dirname, 'build...
Remove type hints, rename $config => $configs
<?php require __DIR__.'/../vendor/autoload.php'; class HelloController { public function worldAction($request) { return "Hallo welt, got swag yo!\n"; } } $container = Yolo\createContainer( [ 'debug' => true, ], [ new Yolo\DependencyInjection\MonologExtension(), ...
<?php require __DIR__.'/../vendor/autoload.php'; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\DependencyInjection\ContainerBuilder; class HelloController { public function worldAction(Request $request) { return new Response("Hallo ...
Contacts: Add id to vars with id in them
<?php /** * Copyright (c) 2011-2012 Thomas Tanghus <thomas@tanghus.net> * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ require_once ("../../lib/base.php"); OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('contacts'); $bookid = isset($_GET...
<?php /** * Copyright (c) 2011-2012 Thomas Tanghus <thomas@tanghus.net> * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ require_once ("../../lib/base.php"); OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('contacts'); $book = isset($_GET['...