text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Move call to module scope
'use strict'; // MODULES // var keys = require( 'object-keys' ); var isPlainObject = require( '@stdlib/utils/is-plain-object' ); var hasSymbolSupport = require( '@stdlib/utils/detect-symbol-support' )(); // MAIN // /** * Tests if a value is an empty object. * * @param {*} value - value to test * @returns {boolean}...
'use strict'; // MODULES // var keys = require( 'object-keys' ); var isPlainObject = require( '@stdlib/utils/is-plain-object' ); var hasSymbolSupport = require( '@stdlib/utils/detect-symbol-support' ); // MAIN // /** * Tests if a value is an empty object. * * @param {*} value - value to test * @returns {boolean} b...
Fix swapped documentation for template methods
<?php namespace Podlove\Modules\Shows; use \Podlove\Modules\Shows\Model\Show; class TemplateExtensions { /** * List of all Podcast shows * * **Examples** * * ``` * This podcast features several shows: * <ul> * {% for show in podcast.shows %} * <li>{{ show.title }}</li> * {% endfor %} * </u...
<?php namespace Podlove\Modules\Shows; use \Podlove\Modules\Shows\Model\Show; class TemplateExtensions { /** * Episode Show * * **Examples** * * ``` * This episode is part of the Show: {{ episode.show.title }} which deals with * {{ episode.show.summary }} * ``` * * @accessor * @dynamicAccess...
Change configuration on production Auth0
import Ember from 'ember'; export default Ember.Controller.extend({ session: Ember.inject.service(), actions: { login () { var lockOptions = { allowedConnections: [ 'Default', ], autoclose: true, allowLogin: true, allowSignUp: false, rememberLastL...
import Ember from 'ember'; export default Ember.Controller.extend({ session: Ember.inject.service(), actions: { login () { var lockOptions = { allowedConnections: [ 'Username-Password-Authentication', ], autoclose: true, allowLogin: true, allowSignUp: fal...
Send original and new directories
'use strict'; const fs = require('fs-extra'); function setDir(options) { return function setDirInner(dir) { return { to: function (location) { options.onStart(dir, location); fs.copy(dir, location, function(err) { if (err) { ...
'use strict'; const fs = require('fs-extra'); function setDir(options) { return function setDirInner(dir) { return { to: function (location) { options.onStart(dir, location); fs.copy(dir, location, function(err) { if (err) { ...
Replace anonymous Runnable with lambda expression
package com.codeaffine.eclipse.swt.widget.scrollable; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Point; import com.codeaffine.eclipse.swt.widget.scrollable.context.AdaptionContext; import com.codeaffine.eclipse.swt.widget.scrollbar.Fla...
package com.codeaffine.eclipse.swt.widget.scrollable; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Point; import com.codeaffine.eclipse.swt.widget.scrollable.context.AdaptionContext; import com.codeaffine.eclipse.swt.widget.scrollbar.Fla...
Use CommandUnknown exception in the method create.
package com.obidea.semantika.cli2.command; import com.obidea.semantika.cli2.runtime.ConsoleSession; import com.obidea.semantika.cli2.runtime.UnknownCommandException; public class CommandFactory { public static Command create(String command, ConsoleSession session) throws UnknownCommandException { if (star...
package com.obidea.semantika.cli2.command; import com.obidea.semantika.cli2.runtime.ConsoleSession; public class CommandFactory { public static Command create(String command, ConsoleSession session) throws Exception { if (startsWith(command, Command.SELECT)) { return new SelectCommand(command, se...
Fix wrong French resources for the developer guide. git-svn-id: bd781a9493159d57baabeab2b59de614917f0f5c@1713160 13f79535-47bb-0310-9956-ffa450edef68
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
PlaneLabelOverlay: Use `offsetWidth` instead of jQuery
import Component from '@ember/component'; import $ from 'jquery'; import ol from 'openlayers'; export default class PlaneLabelOverlay extends Component { tagName = ''; map = null; flight = null; position = null; overlay = null; init() { super.init(...arguments); let badgeStyle = `display: inlin...
import Component from '@ember/component'; import $ from 'jquery'; import ol from 'openlayers'; export default class PlaneLabelOverlay extends Component { tagName = ''; map = null; flight = null; position = null; overlay = null; init() { super.init(...arguments); let badgeStyle = `display: inlin...
Make method to create an empty 'circuit element'
(function(app) { 'use strict'; var circuit = require('circuit'); var Wrapper = function(self) { this.unwrap = Wrapper.unwrap.bind(self); }; Wrapper.unwrap = function(key) { if (key === Wrapper.KEY) return this; }; Wrapper.KEY = {}; var CircuitElementMember = function(props) { this...
(function(app) { 'use strict'; var circuit = require('circuit'); var Wrapper = function(self) { this.unwrap = Wrapper.unwrap.bind(self); }; Wrapper.unwrap = function(key) { if (key === Wrapper.KEY) return this; }; Wrapper.KEY = {}; var CircuitElementMember = function(props) { this...
Use iota at log level enumeration.
// Copyright 2013 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 applicabl...
// Copyright 2013 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 applicabl...
Create real channel object in tests
var EventEmitter = require("events").EventEmitter; var util = require("util"); var _ = require("lodash"); var express = require("express"); var Network = require("../src/models/network"); var Chan = require("../src/models/chan"); function MockClient(opts) { this.user = {nick: "test-user"}; for (var k in opts) { t...
var EventEmitter = require("events").EventEmitter; var util = require("util"); var _ = require("lodash"); var express = require("express"); var Network = require("../src/models/network"); function MockClient(opts) { this.user = {nick: "test-user"}; for (var k in opts) { this[k] = opts[k]; } } util.inherits(MockC...
Use python import lib (django import lib will be removed in 1.9).
""" gargoyle ~~~~~~~~ :copyright: (c) 2010 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ __all__ = ('gargoyle', 'ConditionSet', 'autodiscover', 'VERSION') try: VERSION = __import__('pkg_resources') \ .get_distribution('gargoyle').version except Exception, e: VERSION = 'unkno...
""" gargoyle ~~~~~~~~ :copyright: (c) 2010 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ __all__ = ('gargoyle', 'ConditionSet', 'autodiscover', 'VERSION') try: VERSION = __import__('pkg_resources') \ .get_distribution('gargoyle').version except Exception, e: VERSION = 'unkno...
Remove hack for tab-key handling in Processing 2.0 - This is now fixed in Processing 2.1
package com.haxademic.core.system; import processing.core.PApplet; import com.haxademic.core.app.P; public class SystemUtil { public static String getJavaVersion() { return System.getProperty("java.version"); } public static String getTimestamp( PApplet p ) { // use P.nf to pad date components to 2 digits ...
package com.haxademic.core.system; import processing.core.PApplet; import processing.opengl.PGL; import com.haxademic.core.app.P; public class SystemUtil { public static String getJavaVersion() { return System.getProperty("java.version"); } public static String getTimestamp( PApplet p ) { // use P.nf to pa...
Make README.rst the package's long description
#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points={ ...
#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points={ ...
Use items() instead of iteritems() for Python 2 and 3 compatibility
import bleach from django import template from django.conf import settings from django.utils.safestring import mark_safe register = template.Library() bleach_args = {} possible_settings = { 'BLEACH_ALLOWED_TAGS': 'tags', 'BLEACH_ALLOWED_ATTRIBUTES': 'attributes', 'BLEACH_ALLOWED_STYLES': 'styles', ...
import bleach from django import template from django.conf import settings from django.utils.safestring import mark_safe register = template.Library() bleach_args = {} possible_settings = { 'BLEACH_ALLOWED_TAGS': 'tags', 'BLEACH_ALLOWED_ATTRIBUTES': 'attributes', 'BLEACH_ALLOWED_STYLES': 'styles', ...
Update - sáb nov 11 19:54:37 -02 2017
--- layout: null --- jQuery(document).ready(function($) { if (navigator.vendor == "" || navigator.vendor == undefined) { function show_alert(){ alert("This Browser is not printable with this page. If you print with Ctrl + P, errors will appear in the page structure. We recommend 'Google Chrome' or 'Safari'. ...
--- layout: null --- jQuery(document).ready(function($) { /* Method 2: */ /* var isFirefox = /^((?!chrome|android).)*firefox/i.test(navigator.userAgent); */ $("#btn-print").click(function() { /* Method 1:*/ if (navigator.vendor == "" || navigator.vendor == undefined) { alert("This Browser is not p...
Set URL to github one.
# -*- coding: utf-8 -*- import os from setuptools import setup from setuptools.dist import Distribution with open(os.path.join(os.path.dirname(__file__), 'README')) as f: doc = f.read() class BinaryDistribution(Distribution): def is_pure(self): return False setup( name='json-stream', vers...
# -*- coding: utf-8 -*- import os from setuptools import setup from setuptools.dist import Distribution with open(os.path.join(os.path.dirname(__file__), 'README')) as f: doc = f.read() class BinaryDistribution(Distribution): def is_pure(self): return False setup( name='json-stream', vers...
Set praise list as home
"""pronto_praise URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cl...
"""pronto_praise URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cl...
Add log error if we run salt-api w/ no config Currently, the salt-api script will exit with no error or hint of why it failed if there is no netapi module configured. Added a short line if we find no api modules to start, warning the user that the config may be missing. Fixes #28240
# encoding: utf-8 ''' The main entry point for salt-api ''' from __future__ import absolute_import # Import python libs import logging # Import salt-api libs import salt.loader import salt.utils.process logger = logging.getLogger(__name__) class NetapiClient(object): ''' Start each netapi module that is con...
# encoding: utf-8 ''' The main entry point for salt-api ''' from __future__ import absolute_import # Import python libs import logging # Import salt-api libs import salt.loader import salt.utils.process logger = logging.getLogger(__name__) class NetapiClient(object): ''' Start each netapi module that is con...
Fix assessment metadata state for exercises
import { assessmentMetaDataState } from 'kolibri.coreVue.vuex.mappers'; export function SET_LESSON_CONTENTNODES(state, contentNodes) { state.pageState.contentNodes = [...contentNodes]; } export function SET_CURRENT_LESSON(state, lesson) { state.pageState.currentLesson = { ...lesson }; } export function SET_LEARN...
export function SET_LESSON_CONTENTNODES(state, contentNodes) { state.pageState.contentNodes = [...contentNodes]; } export function SET_CURRENT_LESSON(state, lesson) { state.pageState.currentLesson = { ...lesson }; } export function SET_LEARNER_CLASSROOMS(state, classrooms) { state.pageState.classrooms = [...cla...
Remove deprecated SL 'syntax' property override Replaced by 'defaults/selector': http://www.sublimelinter.com/en/stable/linter_settings.html#selector
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
Move AWS_ setting imports under the check for AmazonS3 so Norc doesn't break without them.
import os from norc.settings import NORC_LOG_DIR, BACKUP_SYSTEM if BACKUP_SYSTEM == 'AmazonS3': from norc.norc_utils.aws import set_s3_key from norc.settings import (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME) def s3_backup(fp, target): NUM_TRIES = 3 for i in range(NUM_TRIES)...
import os from norc.settings import (NORC_LOG_DIR, BACKUP_SYSTEM, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME) if BACKUP_SYSTEM == 'AmazonS3': from norc.norc_utils.aws import set_s3_key def s3_backup(fp, target): NUM_TRIES = 3 for i in range(NUM_TRIES): try: set_s3...
Allow a specific address to be specified for sending
""" Client/Source Generates and sends E1.31 packets over UDP """ import socket import struct from packet import E131Packet def ip_from_universe(universe): # derive multicast IP address from Universe high_byte = (universe >> 8) & 0xff low_byte = universe & 0xff return "239.255.{}.{}".format(high_byt...
""" Client/Source Generates and sends E1.31 packets over UDP """ import socket import struct from packet import E131Packet def ip_from_universe(universe): # derive multicast IP address from Universe high_byte = (universe >> 8) & 0xff low_byte = universe & 0xff return "239.255.{}.{}".format(high_byte...
Fix timeout issue sending invoice email Xero has recently started return a `411 Length Required` response when a send email request is made. This commit adds the missing header.
<?php namespace XeroPHP\Traits; use XeroPHP\Remote\URL; use XeroPHP\Remote\Request; trait SendEmailTrait { public function sendEmail() { /** * Allows the document to be sent by email to the customer * currently only availbale for Invoices. * Invoice status should be SUBMITT...
<?php namespace XeroPHP\Traits; use XeroPHP\Remote\URL; use XeroPHP\Remote\Request; trait SendEmailTrait { public function sendEmail() { /** * Allows the document to be sent by email to the customer * currently only availbale for Invoices. * Invoice status should be SUBMITT...
Add parse_var methode to the RustParser
var DocsParser = require("../docsparser"); var xregexp = require('../xregexp').XRegExp; function RustParser(settings) { DocsParser.call(this, settings); } RustParser.prototype = Object.create(DocsParser.prototype); RustParser.prototype.setup_settings = function() { this.settings = { 'curlyTypes': fal...
var DocsParser = require("../docsparser"); var xregexp = require('../xregexp').XRegExp; function RustParser(settings) { DocsParser.call(this, settings); } RustParser.prototype = Object.create(DocsParser.prototype); RustParser.prototype.setup_settings = function() { this.settings = { 'curlyTypes': fal...
Add info and error messages
const fs = require('fs'); const chalk = require('chalk'); const helpers = require('../helpers'); const settingsFilePath = 'settingsData.json'; function getSettings() { if (fs.existsSync(settingsFilePath)) { let data = fs.readFileSync(settingsFilePath); return JSON.parse(data); } return {}; } function u...
const fs = require('fs'); const helpers = require('../helpers'); const settingsFilePath = 'settingsData.json' function getSettings() { if (fs.existsSync(settingsFilePath)) { let data = fs.readFileSync(settingsFilePath); return JSON.parse(data); } return {}; } function update(argv) { let settingsData ...
Simplify arguments passed to exec.
var gulp = require("gulp"); var CFG = require("./utils/config.js"); var $ = require("gulp-load-plugins")(); var exec = require("child_process").exec; var path = require("path"); var notify = require("./utils/notify-style-lint"); /** * style:lint * @see github.com/causes/scss-lint * @see rubygems.org/g...
var gulp = require("gulp"); var CFG = require("./utils/config.js"); var $ = require("gulp-load-plugins")(); var exec = require("child_process").exec; var path = require("path"); var notify = require("./utils/notify-style-lint"); /** * style:lint * @see github.com/causes/scss-lint * @see rubygems.org/g...
Update page titles on Lessons.
import Passthrough from 'components/shared/passthrough.jsx'; import { getParameterByName } from 'libs/getParameterByName'; const playRoute = { path: ':lessonID', onEnter: (nextState, replaceWith) => { document.title = 'Quill Lessons'; }, getComponent: (nextState, cb) => { System.import(/* webpackChunk...
import Passthrough from 'components/shared/passthrough.jsx'; import { getParameterByName } from 'libs/getParameterByName'; const playRoute = { path: ':lessonID', getComponent: (nextState, cb) => { System.import(/* webpackChunkName: "teach-classroom-lesson" */'components/classroomLessons/play/container.tsx') ...
Fix extension to work with latest state changes Refs flarum/core#2150.
import { extend } from 'flarum/extend'; import LinkButton from 'flarum/components/LinkButton'; import IndexPage from 'flarum/components/IndexPage'; import DiscussionListState from 'flarum/states/DiscussionListState'; export default function addSubscriptionFilter() { extend(IndexPage.prototype, 'navItems', function(i...
import { extend } from 'flarum/extend'; import LinkButton from 'flarum/components/LinkButton'; import IndexPage from 'flarum/components/IndexPage'; import DiscussionList from 'flarum/components/DiscussionList'; export default function addSubscriptionFilter() { extend(IndexPage.prototype, 'navItems', function(items) ...
Update node-notifier initialization as per the new version.
var notifier = new require("node-notifier"); var extend = require("extend"); var path = require("path"); var CFG = require("./config.js"); var pkg = require(path.join("..", "..", CFG.FILE.config.pkg)); module.exports = { defaults: { title: pkg.name }, showNotification: function (options) { ...
var notifier = new require("node-notifier")({}); var extend = require("extend"); var path = require("path"); var CFG = require("./config.js"); var pkg = require(path.join("..", "..", CFG.FILE.config.pkg)); module.exports = { defaults: { title: pkg.name }, showNotification: function (options)...
Remove obsolete passed argument in config() call … and reuse already instantiated config object variable
<?php namespace Drubo\EventSubscriber; use Drubo\DruboAwareTrait; use Symfony\Component\Console\Event\ConsoleCommandEvent; /** * Event subscriber: Console command. */ class ConsoleCommandSubscriber { use DruboAwareTrait; /** * Check whether a console command is disabled. * * @param \Symfony\Componen...
<?php namespace Drubo\EventSubscriber; use Drubo\DruboAwareTrait; use Symfony\Component\Console\Event\ConsoleCommandEvent; /** * Event subscriber: Console command. */ class ConsoleCommandSubscriber { use DruboAwareTrait; /** * Check whether a console command is disabled. * * @param \Symfony\Componen...
Fix timezone difference with travis.
import datetime from decimal import Decimal from mock import Mock import ubersmith.order # TODO: setup/teardown module with default request handler # TODO: mock out requests library vs mocking out request handler def test_order_list(): handler = Mock() response = { "60": { "client_id": ...
import datetime from decimal import Decimal from mock import Mock import ubersmith.order # TODO: setup/teardown module with default request handler # TODO: mock out requests library vs mocking out request handler def test_order_list(): handler = Mock() response = { "60": { "client_id": ...
Remove unsupported tags in php 5.3
<?php namespace alroniks\dtms\Test; use alroniks\dtms\DateInterval; class DateIntervalTest extends \PHPUnit_Framework_TestCase { public function setUp() { } public function tearDown() { } public function providerIntervalSpec() { } /** * @covers DateInterval::__const...
<?php namespace alroniks\dtms\Test; use alroniks\dtms\DateInterval; class DateIntervalTest extends \PHPUnit_Framework_TestCase { public function setUp() { } public function tearDown() { } public function providerIntervalSpec() { return [ '' => '' ]; ...
Allow script to be invoke from any directory
#!/usr/bin/env node var recast = require('recast'); var messages = require('./transform/messages'); var exec = require('child_process').exec; var fs = require('fs'); var glob = require('glob'); var usage = [ 'Usage: assertion-messages.js "globbing expression"', 'To generate assertion messages for a set of test files,...
#!/usr/bin/env node var recast = require('recast'); var messages = require('./transform/messages'); var exec = require('child_process').exec; var fs = require('fs'); var glob = require('glob'); var usage = [ 'Usage: assertion-messages.js "globbing expression"', 'To generate assertion messages for a set of test files,...
Fix floating IP unit test.
from django.test import TestCase from .. import factories class FloatingIpHandlersTest(TestCase): def test_floating_ip_count_quota_increases_on_floating_ip_creation(self): tenant = factories.TenantFactory() factories.FloatingIPFactory( service_project_link=tenant.service_project_link...
from django.test import TestCase from .. import factories class FloatingIpHandlersTest(TestCase): def test_floating_ip_count_quota_increases_on_floating_ip_creation(self): tenant = factories.TenantFactory() factories.FloatingIPFactory(service_project_link=tenant.service_project_link, status='UP'...
Use core enums for event
<?php /** * @package plugins.bpmEventNotificationIntegration * @subpackage lib.events */ class kBpmEventNotificationIntegrationFlowManager implements kBatchJobStatusEventConsumer { /* (non-PHPdoc) * @see kBatchJobStatusEventConsumer::updatedJob() */ public function updatedJob(BatchJob $dbBatchJob) { $data =...
<?php /** * @package plugins.bpmEventNotificationIntegration * @subpackage lib.events */ class kBpmEventNotificationIntegrationFlowManager implements kBatchJobStatusEventConsumer { /* (non-PHPdoc) * @see kBatchJobStatusEventConsumer::updatedJob() */ public function updatedJob(BatchJob $dbBatchJob) { $data =...
Change the write method for the responses to pass in the http response object.
/** * The authenticate module is responsible to getting the authorization header from the request and attaching * the token to the request. If the credentials are not supplied then the request should fail and not proceed * any further. * * @param req HTTP Request * @param res HTTP Response * @param next Callback...
/** * The authenticate module is responsible to getting the authorization header from the request and attaching * the token to the request. If the credentials are not supplied then the request should fail and not proceed * any further. * * @param req HTTP Request * @param res HTTP Response * @param next Callback...
Add close to NoSQL directory.
package org.lumongo.storage.lucene; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Ve...
package org.lumongo.storage.lucene; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Ve...
Update error message when flask sparql app does not work
(function() { 'use strict'; function SparqlController($scope, AuthenticationService, SparqlService) { this.resultText = ''; this.errorMessage = ''; AuthenticationService.ready.then(function() { SparqlService.doQuery().then(function (result){ if( typeof(result) === 'string' ){ i...
(function() { 'use strict'; function SparqlController($scope, AuthenticationService, SparqlService) { this.resultText = ''; this.errorMessage = ''; AuthenticationService.ready.then(function() { SparqlService.doQuery().then(function (result){ if( typeof(result) === 'string' ){ i...
Remove superfluous / outdated throw NoRecordException
<?php namespace Bugcache\Storage\Mysql; use Amp\Mysql\Pool; use Amp\Mysql\ResultSet; use Amp\Promise; use Bugcache\Storage; use Generator; use function Amp\resolve; class UserRepository implements Storage\UserRepository { private $mysql; public function __construct(Pool $mysql) { $this->mysql = $mys...
<?php namespace Bugcache\Storage\Mysql; use Amp\Mysql\Pool; use Amp\Mysql\ResultSet; use Amp\Promise; use Bugcache\Storage; use Generator; use function Amp\resolve; class UserRepository implements Storage\UserRepository { private $mysql; public function __construct(Pool $mysql) { $this->mysql = $mys...
Create log file on run
var fs = require("fs"); var logPath = __dirname + '/eyebleach.log'; function log(msg) { var d = new Date(); var data = '[' + d.getDate() + '/' + (d.getMonth() + 1) + '/' + d.getFullYear() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds() + '] ' + msg; console.log(data); fs.closeSync(fs.openSyn...
var fs = require("fs"); var logPath = __dirname + '/eyebleach.log'; function log(msg) { var d = new Date(); var data = '[' + d.getDate() + '/' + (d.getMonth() + 1) + '/' + d.getFullYear() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds() + '] ' + msg; console.log(data); fs.access(logPath, fs.R...
Add Numbers and Symbols Exception
# PyArt by MohamadKh75 # 2017-10-05 # ******************** from pathlib import Path # Set the Alphabet folder path folder_path = Path("Alphabet").resolve() # Read all Capital Letters - AA is Capital A def letter_reader(letter): # if it's Capital - AA is Capital A if 65 <= ord(letter) <= 90: letter_...
# PyArt by MohamadKh75 # 2017-10-05 # ******************** from pathlib import Path # Set the Alphabet folder path folder_path = Path("Alphabet").resolve() # Read all Capital Letters - AA is Capital A def letter_reader(letter): # if it's Capital - AA is Capital A if 65 <= ord(letter) <= 90: letter_...
Make link to webpack context explanation permanent
/* eslint-disable prefer-arrow-callback, func-names, class-methods-use-this */ import loader from 'graphql-tag/loader'; export default class GraphQLCompiler { processFilesForTarget(files) { // Fake webpack context // @see https://github.com/apollographql/graphql-tag/blob/57a258713acecde5ebef0c5771a975d644670...
/* eslint-disable prefer-arrow-callback, func-names, class-methods-use-this */ import loader from 'graphql-tag/loader'; export default class GraphQLCompiler { processFilesForTarget(files) { // Fake webpack context // @see https://github.com/apollographql/graphql-tag/blob/master/loader.js#L43 const contex...
Destroy HLS source before component unmount
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Hls from 'hls.js'; const propTypes = { src: PropTypes.string.isRequired, type: PropTypes.string, video: PropTypes.object, }; export default class HLSSource extends Component { constructor(props, context) { super(props, co...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Hls from 'hls.js'; const propTypes = { src: PropTypes.string.isRequired, type: PropTypes.string, video: PropTypes.object, }; export default class HLSSource extends Component { constructor(props, context) { super(props, co...
Fix LabelPart to always report the validated set value
from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta from ..infos import LabelInfo from ..util import set_tags with Anno("Initial value of Block label"): ALabelValue = str class LabelPart(Part): """Part representing a the title of the Block a GUI should display""" def __i...
from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta from ..infos import LabelInfo from ..util import set_tags with Anno("Initial value of Block label"): ALabelValue = str class LabelPart(Part): """Part representing a the title of the Block a GUI should display""" def __i...
resource: Fix Lua resource wrapper function
package resource import ( "github.com/layeh/gopher-luar" "github.com/yuin/gopher-lua" ) // LuaRegisterBuiltin registers resource providers in Lua func LuaRegisterBuiltin(L *lua.LState) { for typ, provider := range providerRegistry { // Wrap resource providers, so that we can properly handle any // errors retur...
package resource import ( "github.com/layeh/gopher-luar" "github.com/yuin/gopher-lua" ) // LuaRegisterBuiltin registers resource providers in Lua func LuaRegisterBuiltin(L *lua.LState) { for typ, provider := range providerRegistry { // Wrap resource providers, so that we can properly handle any // errors retur...
Add missing return, add eslint hint for jsx
'use babel'; /** Eval Console @description Provides a console where user can enter input in order to evaluate Go expressions within the current scope of the debugger in a REPL-esque style TODO: We will need to listen for the enter key from the input element, after hitting enter: - send to Debugge...
'use babel'; /** Eval Console @description Provides a console where user can enter input in order to evaluate Go expressions within the current scope of the debugger in a REPL-esque style TODO: We will need to listen for the enter key from the input element, after hitting enter: - send to Debugge...
Update negative price exception test to use assertRaises.
import unittest from datetime import datetime from stock import Stock class StockTest(unittest.TestCase): def test_new_stock_price(self): """A new stock should have a price that is None. """ stock = Stock("GOOG") self.assertIsNone(stock.price) def test_stock_update(self): ...
import unittest from datetime import datetime from stock import Stock class StockTest(unittest.TestCase): def test_new_stock_price(self): """A new stock should have a price that is None. """ stock = Stock("GOOG") self.assertIsNone(stock.price) def test_stock_update(self): ...
Change source encoding from euckr to cp949
'use strict'; var request = require('request'); var iconv = new require('iconv').Iconv('cp949', 'utf8'); function rqkrCallback(err, response, body) { if (response && response.headers['content-type']) { if (/charset=(ks_c_5601-1987|euc-kr)/i.test(response.headers['content-type'])) { body = iconv.convert(ne...
'use strict'; var request = require('request'); var iconv = new require('iconv').Iconv('euckr', 'utf8'); function rqkrCallback(err, response, body) { if (response && response.headers['content-type']) { if (/charset=(ks_c_5601-1987|euc-kr)/i.test(response.headers['content-type'])) { body = iconv.convert(ne...
Use DI Extension instead of HttpKernel
<?php namespace Palmtree\CanonicalUrlBundle\DependencyInjection; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Loader; class PalmtreeCanonicalUrlExtension e...
<?php namespace Palmtree\CanonicalUrlBundle\DependencyInjection; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader; use Symfony\Component\HttpKernel\DependencyInjection\Extension; /** * This is the class that loads ...
Print Preview: Hook up the cancel button. BUG=57895 TEST=manual Review URL: http://codereview.chromium.org/5151009 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@66822 0039d316-1c4b-4281-b951-d872f2087c98
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var localStrings = new LocalStrings(); /** * Window onload handler, sets up the page. */ function load() { $('cancel-button').addEventListener('c...
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var localStrings = new LocalStrings(); /** * Window onload handler, sets up the page. */ function load() { chrome.send('getPrinters'); }; /** *...
Make all astroplan warnings decend from an AstroplanWarning
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEarthOrientationDa...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEarthOrientationDa...
fix: Add PyQt5 to install requirements Add PyQt5 to install requirements
from setuptools import setup setup( name='broadbean', version='0.9', # We might as well require what we know will work # although older numpy and matplotlib version will probably work too install_requires=['numpy>=1.12.1', 'matplotlib>=2.0.1', 'PyQt5>5.7...
from setuptools import setup setup( name='broadbean', version='0.9', # We might as well require what we know will work # although older numpy and matplotlib version will probably work too install_requires=['numpy>=1.12.1', 'matplotlib>=2.0.1'], author='William H.P. Niels...
Revert "Simplify webpack image loading" This reverts commit 66322ccce2219656114bbc2697cc21956366c1f0.
const ExtractTextPlugin = require('extract-text-webpack-plugin'); const glob = require("glob"); module.exports = { entry: glob.sync("./dist/css/**/*.css"), output: { path: __dirname + '/dist', filename: 'pivotal-ui.js' }, module: { rules: [ { test: /\.css$/, loader: ExtractTex...
const ExtractTextPlugin = require('extract-text-webpack-plugin'); const glob = require("glob"); module.exports = { entry: glob.sync("./dist/css/**/*.css"), output: { path: __dirname + '/dist', filename: 'pivotal-ui.js' }, module: { rules: [ { test: /\.css$/, loader: ExtractTex...
Add LC fee to entity
<?php /* * This file is part of the PayBreak/basket package. * * (c) PayBreak <dev@paybreak.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PayBreak\Sdk\Entities\Product; use WNowicki\Generic\AbstractEntity; /** ...
<?php /* * This file is part of the PayBreak/basket package. * * (c) PayBreak <dev@paybreak.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PayBreak\Sdk\Entities\Product; use WNowicki\Generic\AbstractEntity; /** ...
Upgrade all dependencies to latest version.
from setuptools import setup setup( name='docker-ipsec', version='3.0.0', description='Scripts to start/stop ipsec VPN tunnels while adding/removing iptables rules for docker networking.', author='Christopher Brichford', author_email='chrisb@farmersbusinessnetwork.com', license='Apache License ...
from setuptools import setup setup( name='docker-ipsec', version='2.0.3', description='Scripts to start/stop ipsec VPN tunnels while adding/removing iptables rules for docker networking.', author='Christopher Brichford', author_email='chrisb@farmersbusinessnetwork.com', license='Apache License ...
Fix issues pointed out by JSHint
var test = require('tap').test, SDNV = require('../index'); var buff = new Buffer([0x0A, 0xBC]), sdnv = new SDNV(buff); test('make sure a valid buffer results in a valid SNDV', function (t) { t.ok(sdnv instanceof SDNV, 'should be able to create an SDNV instance'); t.type(sdnv.buffer, "Buffer", 'should ...
var test = require('tap').test, SDNV = require('../index'); var buff = new Buffer([0x0A, 0xBC]), sdnv = new SDNV(buff); test('make sure a valid buffer results in a valid SNDV', function (t) { t.ok(sdnv instanceof SDNV, 'should be able to create an SDNV instance'); t.type(sdnv.buffer, "Buffer", 'should ...
Fix rotation duplicating fragment in sample
package com.jenzz.materialpreference.sample; import android.os.Bundle; import android.preference.PreferenceFragment; import android.support.v7.app.ActionBarActivity; /** * Simple Activity to display example preferences. * * Created by jenzz on 28/01/15. */ public class SettingsActivity extends ActionBarActivity {...
package com.jenzz.materialpreference.sample; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceFragment; import android.support.v7.app.ActionBarActivity; /** * Created by jenzz on 28/01/15. */ public class SettingsActivity extends ActionBarActivity { @Override protected voi...
Put in the necessary pybit dependenies
# -*- coding: utf-8 -*- import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = os.path.join(here, 'README.rst') install_requirements = [ 'requests', # PyBit and dependencies 'pybit', # 'psycopg2', # 'amqplib', 'jsonpickle', ] test_r...
# -*- coding: utf-8 -*- import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = os.path.join(here, 'README.rst') install_requirements = [ 'pybit', 'jsonpickle', 'requests', ] test_requirements = [] # These requirements are specifically for the l...
Make booksOwned of user be an empty array not 404 when there are no owned books of the user
/** * Created by esso on 02.09.15. */ var Books = require('../models/book'); var Crowds = require('../models/crowd.js'); module.exports = { getUser: function(req, res){ var username = req.params.username; var obj = {username: username}; // Add the username Books.findRentedBy(username, fun...
/** * Created by esso on 02.09.15. */ var Books = require('../models/book'); var Crowds = require('../models/crowd.js'); module.exports = { getUser: function(req, res){ var username = req.params.username; var obj = {username: username}; // Add the username Books.findRentedBy(username, fun...
Use thenShowInternal on action condition to avoid visibility colision (cherry picked from commit 2bf2404b3c89ce318481ef9dcc26088a9b472a93)
package fr.openwide.core.wicket.more.markup.html.template.js.jquery.plugins.bootstrap.confirm.component; import org.apache.wicket.model.IModel; import fr.openwide.core.wicket.more.markup.html.action.IAjaxAction; public class AjaxConfirmLinkBuilder<O> extends AbstractConfirmLinkBuilder<AjaxConfirmLink<O>, O> { priva...
package fr.openwide.core.wicket.more.markup.html.template.js.jquery.plugins.bootstrap.confirm.component; import org.apache.wicket.model.IModel; import fr.openwide.core.wicket.more.markup.html.action.IAjaxAction; public class AjaxConfirmLinkBuilder<O> extends AbstractConfirmLinkBuilder<AjaxConfirmLink<O>, O> { priva...
Update test to accept compTarget array
var assert = require("chai").assert; var fs = require("fs-extra"); var glob = require("glob"); var Box = require("truffle-box"); var Profiler = require("truffle-compile/profiler.js"); var Resolver = require("truffle-resolver"); var Artifactor = require("truffle-artifactor"); // TOOD: Move this to truffle-compile! des...
var assert = require("chai").assert; var fs = require("fs-extra"); var glob = require("glob"); var Box = require("truffle-box"); var Profiler = require("truffle-compile/profiler.js"); var Resolver = require("truffle-resolver"); var Artifactor = require("truffle-artifactor"); // TOOD: Move this to truffle-compile! des...
Add 'Primary' annotation so that it is clear for AutoWired
/* * DatasourceConfig.java * * Copyright (C) 2017 [ A Legge Up ] * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ package com.aleggeup.confagrid.config; import javax.sql.DataSource; import org.springframework.boot.autoconfigure.jdbc....
/* * DatasourceConfig.java * * Copyright (C) 2017 [ A Legge Up ] * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ package com.aleggeup.confagrid.config; import javax.sql.DataSource; import org.springframework.boot.autoconfigure.jdbc....
Fix next step for OMIS order creation When removing the subscribers step the next step for market was missed. This fixes that which caused an error after saving the primary market.
const { ClientDetailsController, MarketController, ConfirmController, } = require('./controllers') module.exports = { '/': { entryPoint: true, resetJourney: true, skip: true, next: 'client-details', }, '/client-details': { heading: 'Client details', backLink: null, editable: tru...
const { ClientDetailsController, MarketController, ConfirmController, } = require('./controllers') module.exports = { '/': { entryPoint: true, resetJourney: true, skip: true, next: 'client-details', }, '/client-details': { heading: 'Client details', backLink: null, editable: tru...
Fix videoLength issue (API.totalTime.getTime() -> API.totalTime)
(function(){ 'use strict'; angular.module('uk.ac.soton.ecs.videogular.plugins.cuepoints', []) .directive( 'vgCuepoints', [function() { return { restrict: 'E', require: '^videogular', templateUrl: 'bower_components/videogular-cuepoints/cuepoints.html', scope: { cuepoints: '=vgCuepointsConfig...
(function(){ 'use strict'; angular.module('uk.ac.soton.ecs.videogular.plugins.cuepoints', []) .directive( 'vgCuepoints', [function() { return { restrict: 'E', require: '^videogular', templateUrl: 'bower_components/videogular-cuepoints/cuepoints.html', scope: { cuepoints: '=vgCuepointsConfig...
:sparkles: Add a bugsnag deploy command
<?php namespace App\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { /** * The Artisan commands provided by your application. * * @var array */ protected $commands = [ \App\Console\...
<?php namespace App\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { /** * The Artisan commands provided by your application. * * @var array */ protected $commands = [ \App\Console\...
Change test to only run once
// Karma configuration file, see link for more information // https://karma-runner.github.io/0.13/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '../../', frameworks: ['jasmine', '@angular/cli'], plugins: [ require('karma-jasmine'), ...
// Karma configuration file, see link for more information // https://karma-runner.github.io/0.13/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '../../', frameworks: ['jasmine', '@angular/cli'], plugins: [ require('karma-jasmine'), ...
Revert CreatedAware fpr now as adds complexity to proxy delegate replacement on rollup.
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.nanos.om', name: 'OM', documentation: `An Operational Measure which captures the count of some event.`, javaImports: [ 'foam.core.X' ], properties: [...
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.nanos.om', name: 'OM', documentation: `An Operational Measure which captures the count of some event.`, implements: [ 'foam.nanos.auth.CreatedAware' ], ...
Use env value for client token
import discord import asyncio import os #Set up Client State CLIENT_TOKEN=os.environ['TOKEN'] client = discord.Client() @client.event async def on_ready(): print('Logged in as') print(client.user.name) print(client.user.id) print('------') @client.event async def on_message(message): if message....
import discord import asyncio client = discord.Client() @client.event async def on_ready(): print('Logged in as') print(client.user.name) print(client.user.id) print('------') @client.event async def on_message(message): if message.content.startswith('!test'): counter = 0 tmp = aw...
Fix path to the config file
<?php setlocale(LC_ALL, 'it_IT.UTF-8'); $fname = $_SERVER['DOCUMENT_ROOT'].'/config/config.json'; $data = @file_get_contents($fname); $config = (array)json_decode($data); $start_date = strtotime($config['firstDate']); $now = strtotime("now"); $days = 1 + floor(($start_date - $now)/(60*60*24)); if ($...
<?php setlocale(LC_ALL, 'it_IT.UTF-8'); $fname = 'config/config.json'; $data = @file_get_contents($fname); $config = (array)json_decode($data); $start_date = strtotime($config['firstDate']); $now = strtotime("now"); $days = 1 + floor(($start_date - $now)/(60*60*24)); if ($days <= 0) { return; ...
Fix Iron Grip calculations using incorrect values.
package com.gmail.nossr50.skills.unarmed; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Users; public class IronGripEventHandler { private UnarmedManager manager; private...
package com.gmail.nossr50.skills.unarmed; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import com.gmail.nossr50.util.Misc; public class IronGripEventHandler { private UnarmedManager manager; private Player defender; protected int skillModifier; protected IronGripEventHan...
Add needed constant for SearchImage tests
<?php /** * @author Pierre-Henry Soria <hello@ph7cms.com> * @copyright (c) 2017, Pierre-Henry Soria. All Rights Reserved. * @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. * @package PH7 / Test / Unit */ use PH7\Framework\Loa...
<?php /** * @author Pierre-Henry Soria <hello@ph7cms.com> * @copyright (c) 2017, Pierre-Henry Soria. All Rights Reserved. * @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. * @package PH7 / Test / Unit */ use PH7\Framework\Loa...
Check if its Laravel, avoid publishing the configuration file if its Lumen
<?php namespace NicolasMahe\SlackOutput; use Illuminate\Support\ServiceProvider as ServiceProviderParent; class ServiceProvider extends ServiceProviderParent { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * Bootstrap any application servi...
<?php namespace NicolasMahe\SlackOutput; use Illuminate\Support\ServiceProvider as ServiceProviderParent; class ServiceProvider extends ServiceProviderParent { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * Bootstrap any application servi...
Fix typo "dump" => "dumper"
#!/usr/bin/env node // Requires var _ = require('underscore'); var fs = require('fs'); // Comannder var prog = require('commander'); // etcd-dump's package.json file var pkg = require('../package.json'); // Dumper class var dumper = require('../')(); // General options prog .version(pkg.version) .option('-f, --fi...
#!/usr/bin/env node // Requires var _ = require('underscore'); var fs = require('fs'); // Comannder var prog = require('commander'); // etcd-dump's package.json file var pkg = require('../package.json'); // Dumper class var dumper = require('../')(); // General options prog .version(pkg.version) .option('-f, --fi...
Make class final if private constructor git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1379860 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: 3f465bf45bb0be0db7dd847ad468f1bff0cc6eb0
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Define the provider method in service provider to defer loading
<?php namespace EGALL\Transformer; use Illuminate\Support\ServiceProvider; use EGALL\Transformer\Contracts\Transformer as TransformerContract; use EGALL\Transformer\Contracts\CollectionTransformer as CollectionTransformerContract; /** * Transformer service provider. * * @package EGALL\Transformer * @author Erik ...
<?php namespace EGALL\Transformer; use Illuminate\Support\ServiceProvider; use EGALL\Transformer\Contracts\Transformer as TransformerContract; use EGALL\Transformer\Contracts\CollectionTransformer as CollectionTransformerContract; /** * Transformer service provider. * * @package EGALL\Transformer * @author Erik ...
Remove pointer-events: none from title bar, fixing window drag
import React from "react"; import styled from "styled-components"; import AddIcon from "@atlaskit/icon/glyph/add"; import ListIcon from "@atlaskit/icon/glyph/list"; import Button, { ButtonGroup } from "@atlaskit/button"; import { createNewDoc, switchToList } from "../actions"; const TitleBarWrapper = styled.div` hei...
import React from "react"; import styled from "styled-components"; import AddIcon from "@atlaskit/icon/glyph/add"; import ListIcon from "@atlaskit/icon/glyph/list"; import Button, { ButtonGroup } from "@atlaskit/button"; import { createNewDoc, switchToList } from "../actions"; const TitleBarWrapper = styled.div` hei...
Remove person resource methods for photo User photos are only fetched by img tags
/* * Copyright 2016 Studentmediene i Trondheim AS * * 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 ...
/* * Copyright 2016 Studentmediene i Trondheim AS * * 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 moduleDirectory instead of paths for import/resolver
module.exports = { parser: 'babel-eslint', extends: [ 'airbnb', 'plugin:flowtype/recommended', 'prettier', 'prettier/flowtype', 'prettier/react', ], env: { browser: true, node: true, es6: true, }, plugins: ['flowtype'], rules: { // import 'import/prefer-default-expo...
const paths = require('./paths'); module.exports = { parser: 'babel-eslint', extends: [ 'airbnb', 'plugin:flowtype/recommended', 'prettier', 'prettier/flowtype', 'prettier/react', ], env: { browser: true, node: true, es6: true, }, plugins: ['flowtype'], rules: { // imp...
Add Artist ordering by name
from django.db import models class Artist(models.Model): name = models.CharField(max_length=100) image_url = models.URLField(blank=True) thumb_url = models.URLField(blank=True) events = models.ManyToManyField( 'event.Event', related_name='artists', blank=True, ) class...
from django.db import models class Artist(models.Model): name = models.CharField(max_length=100) image_url = models.URLField(blank=True) thumb_url = models.URLField(blank=True) events = models.ManyToManyField( 'event.Event', related_name='artists', blank=True, ) def _...
Fix broken password reset page
@extends('layouts.master') @section('content') <div class="container"> @include('layouts.alerts') <h1 class="header">Reset Password</h1> <form method="POST" action="/password/email"> {!! csrf_field() !!} <p> <div class="input-field col s12"> ...
@extends('layouts.master') @section('content') <div class="container"> @include('layouts.alerts') <h1 class="header">Reset Password</h1> <form method="POST" action="/password/email"> {!! csrf_field() !!} <input type="hidden" name="token" value="{{ $token }}"> ...
Make offlineimap sync every minute
#!/usr/bin/env python3 import subprocess import threading import time import os # Sync accounts asynchronously, but wait for all syncs to finish def offlineimap(): AAU = subprocess.Popen(['offlineimap', '-a AAU'], stderr = AAUlog) AU = subprocess.Popen(['offlineimap', '-a AU'], stderr = AUlog) AAU.communi...
#!/usr/bin/env python3 import subprocess import threading import time import os # Sync accounts asynchronously, but wait for all syncs to finish def offlineimap(): AAU = subprocess.Popen(['offlineimap', '-a AAU'], stderr = AAUlog) AU = subprocess.Popen(['offlineimap', '-a AU'], stderr = AUlog) AAU.communi...
Test for compatibility python2 and python3
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name = 'ferretmagic', packages = ['ferretmagic'], py_modules = ['ferretmagic'], version = '20181001', description = 'ipython extension for pyferret', author = 'Patrick Brockmann', author_email = 'Patr...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name = 'ferretmagic', packages = ['ferretmagic'], py_modules = ['ferretmagic'], version = '20181001', description = 'ipython extension for pyferret', author = 'Patrick Brockmann', author_email = 'Patr...
Add optional callback to `reload` method in helpers hook
var path = require('path'); var loadHelpers = require('./load-helpers'); module.exports = function(sails) { return { /** * Before any hooks have begun loading... * (called automatically by Sails core) */ configure: function() { sails.helpers = {}; }, initialize: function(cb)...
var path = require('path'); var loadHelpers = require('./load-helpers'); module.exports = function(sails) { return { /** * Before any hooks have begun loading... * (called automatically by Sails core) */ configure: function() { sails.helpers = {}; }, initialize: function(cb)...
Update a version number from trunk r9016 https://mediawiki.org/wiki/Special:Code/pywikipedia/9040
# -*- coding: utf-8 -*- __version__ = '$Id$' import family # The Wikia Search family # user-config.py: usernames['wikia']['wikia'] = 'User name' class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = u'wikia' self.langs = { u'wikia': None,...
# -*- coding: utf-8 -*- __version__ = '$Id$' import family # The Wikia Search family # user-config.py: usernames['wikia']['wikia'] = 'User name' class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = u'wikia' self.langs = { u'wikia': None,...
Add spaces around === to clarify intent
// Static synchronous definition in global context // Implementation of scopeornot API // https://github.com/eric-brechemier/scopeornot /* Function: scope(code,needs,name) Run code immediately, without taking needs into account, and set the return value, if any, to a property with given name in the global contex...
// Static synchronous definition in global context // Implementation of scopeornot API // https://github.com/eric-brechemier/scopeornot /* Function: scope(code,needs,name) Run code immediately, without taking needs into account, and set the return value, if any, to a property with given name in the global contex...
Change code style to google code style.
package com.saintdan.framework.annotation; import org.springframework.security.core.annotation.AuthenticationPrincipal; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Get current user.{@link Auth...
package com.saintdan.framework.annotation; import org.springframework.security.core.annotation.AuthenticationPrincipal; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Get current user.{@link Auth...
Purge from all 11ty template languages.
// @see https://github.com/postcss/postcss-loader#configuration // Standard lib. import { join as joinPath } from 'path'; // Package modules. import autoprefixer from 'autoprefixer'; import purgecss from '@fullhuman/postcss-purgecss'; import reporter from 'postcss-reporter'; import stylelint from 'stylelint'; // Loc...
// @see https://github.com/postcss/postcss-loader#configuration // Standard lib. import { join as joinPath } from 'path'; // Package modules. import autoprefixer from 'autoprefixer'; import purgecss from '@fullhuman/postcss-purgecss'; import reporter from 'postcss-reporter'; import stylelint from 'stylelint'; // Loc...
Fix comment-no-loud only catching first line This changes the approach to looking up comments for the comment-no-loud rule. This rule had an issue where it would only identify comments if they were the first node within an SCSS file. Previously this check matched a regex against `source.input.css` of the comment node...
import { utils } from "stylelint"; import { namespace } from "../../utils"; export const ruleName = namespace("comment-no-loud"); export const messages = utils.ruleMessages(ruleName, { expected: "Expected // for comments instead of /*" }); function rule(primary) { return (root, result) => { const validOption...
import { utils } from "stylelint"; import { namespace } from "../../utils"; export const ruleName = namespace("comment-no-loud"); export const messages = utils.ruleMessages(ruleName, { expected: "Expected // for comments instead of /*" }); function rule(primary) { return (root, result) => { const validOption...
[Routing][Config] Allow patterns of resources to be excluded from config loading
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Tests\Loader; use PHPUnit\Framewo...
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Tests\Loader; use PHPUnit\Framewo...
Fix LineAnimator example to adhere to new pixel edges axis_ranges API.
""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ##############################################################...
""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ##############################################################...
Add consistancy to port logging
var WebSocket = require('faye-websocket'), http = require('http'), reject = require('lodash/collection/reject'), without = require('lodash/array/without'); module.exports = function (config) { var server = http.createServer(), connections = []; // Send to everyone except sender funct...
var WebSocket = require('faye-websocket'), http = require('http'), reject = require('lodash/collection/reject'), without = require('lodash/array/without'); module.exports = function (config) { var server = http.createServer(), connections = []; // Send to everyone except sender funct...
Fix bug where chip cannot be placed in last row
import _ from 'underscore'; class Grid { // The state of a particular game grid constructor({ columnCount = 7, rowCount = 6, columns = _.times(columnCount, () => []), lastPlacedChip = null }) { this.columnCount = columnCount; this.rowCount = rowCount; this.columns = columns; this.lastPlacedChip = ...
import _ from 'underscore'; class Grid { // The state of a particular game grid constructor({ columnCount = 7, rowCount = 6, columns = _.times(columnCount, () => []), lastPlacedChip = null }) { this.columnCount = columnCount; this.rowCount = rowCount; this.columns = columns; this.lastPlacedChip = ...
[core] Fix import error for Python3 Import exceptions module only for Python2. fixes #22
import shlex import subprocess try: from exceptions import RuntimeError except ImportError: # Python3 doesn't require this anymore pass def bytefmt(num): for unit in [ "", "Ki", "Mi", "Gi" ]: if num < 1024.0: return "{:.2f}{}B".format(num, unit) num /= 1024.0 return "{:0...
import shlex import exceptions import subprocess def bytefmt(num): for unit in [ "", "Ki", "Mi", "Gi" ]: if num < 1024.0: return "{:.2f}{}B".format(num, unit) num /= 1024.0 return "{:05.2f%}{}GiB".format(num) def durationfmt(duration): minutes, seconds = divmod(duration, 60) ...
Add multiline test for canonical representation
package net.sf.jabref.model.entry; import org.junit.Assert; import org.junit.Test; public class CanonicalBibEntryTest { @Test public void simpleCanonicalRepresentation() { BibEntry e = new BibEntry("id", BibtexEntryTypes.ARTICLE); e.setField(BibEntry.KEY_FIELD, "key"); e.setField("aut...
package net.sf.jabref.model.entry; import org.junit.Assert; import org.junit.Test; public class CanonicalBibEntryTest { /** * Simple test for the canonical format */ @Test public void canonicalRepresentation() { BibEntry e = new BibEntry("id", BibtexEntryTypes.ARTICLE); e.setFie...
Fix routing to /bolt to / in tests
'use strict'; describe('Routing', function () { var $route; beforeEach(module('bolt')); beforeEach(inject(function ($injector) { $route = $injector.get('$route'); })); it('Should have /signup route, template, and controller', function () { expect($route.routes['/signup']).to.be.defined; expect(...
'use strict'; describe('Routing', function () { var $route; beforeEach(module('bolt')); beforeEach(inject(function ($injector) { $route = $injector.get('$route'); })); it('Should have /signup route, template, and controller', function () { expect($route.routes['/signup']).to.be.defined; expect(...
Fix system defaults overriding all args
'use strict'; const { mapValues, omitBy } = require('../../../utilities'); const { defaults } = require('./defaults'); // Apply system-defined defaults to input, including input arguments const systemDefaults = async function (nextFunc, input) { const { serverOpts } = input; const argsA = getDefaultArgs({ serve...
'use strict'; const { mapValues, omitBy } = require('../../../utilities'); const { defaults } = require('./defaults'); // Apply system-defined defaults to input, including input arguments const systemDefaults = async function (nextFunc, input) { const { serverOpts } = input; const argsA = getDefaultArgs({ serve...
Remove dependency on apply() since it gets injected anyways.
/** * Provides a bridge to provide configuration data for plugins. Consumes an * optional config object containing the configuration data and produces a * function. This function consumes a plugin and returns another plugin with * the given configuration applied to it. * Several configure() calls can be made...
import apply from './apply'; /** * Provides a bridge to provide configuration data for plugins. Consumes an * optional config object containing the configuration data and produces a * function. This function consumes a plugin and returns another plugin with * the given configuration applied to it. * Several...
Update consumer key and secret usage in auth tests
import random import unittest from .config import * from tweepy import API, OAuthHandler class TweepyAuthTests(unittest.TestCase): def testoauth(self): auth = OAuthHandler(consumer_key, consumer_secret) # test getting access token auth_url = auth.get_authorization_url() print('P...
import random import unittest from .config import * from tweepy import API, OAuthHandler class TweepyAuthTests(unittest.TestCase): def testoauth(self): auth = OAuthHandler(oauth_consumer_key, oauth_consumer_secret) # test getting access token auth_url = auth.get_authorization_url() ...
Make Diagnosis come before PMH closes #5
""" Define acute schemas. """ from acute import models list_columns = [ models.Demographics, models.Location, models.Diagnosis, models.PastMedicalHistory, models.Plan, models.Rescuscitation ] list_columns_take = [ models.Demographics, models.Location, models.Clerking, models.Di...
""" Define acute schemas. """ from acute import models list_columns = [ models.Demographics, models.Location, models.PastMedicalHistory, models.Diagnosis, models.Plan, models.Rescuscitation ] list_columns_take = [ models.Demographics, models.Location, models.Clerking, models.Pa...