text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Set default logging level to ERROR, to avoid excessive "No handlers could be found" messages.
# urllib3/__init__.py # Copyright 2008-2011 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ urllib3 - Thread-safe connection pooling and re-using. """ __author__ = "Andrey Petrov (a...
# urllib3/__init__.py # Copyright 2008-2011 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ urllib3 - Thread-safe connection pooling and re-using. """ __author__ = "Andrey Petrov (a...
Add utility method to get attribute value
/* * oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ package org.xdi.ldap.model; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.gluu.site.ldap.persistence.annotation.LdapAttributesL...
/* * oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ package org.xdi.ldap.model; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.gluu.site.ldap.persistence.annotation.LdapAttributesL...
Increase timeout time for "slow" systems
package com.torodb.packaging; import com.torodb.packaging.config.model.Config; import com.torodb.packaging.config.model.backend.derby.Derby; import com.torodb.packaging.config.model.generic.LogLevel; import com.torodb.packaging.config.util.ConfigUtils; import java.time.Clock; import java.util.concurrent.TimeUnit; impo...
package com.torodb.packaging; import com.torodb.packaging.config.model.Config; import com.torodb.packaging.config.model.backend.derby.Derby; import com.torodb.packaging.config.model.generic.LogLevel; import com.torodb.packaging.config.util.ConfigUtils; import java.time.Clock; import java.util.concurrent.TimeUnit; impo...
Fix name of production CSS file
const MiniCssExtractPlugin = require('mini-css-extract-plugin') const externals = require('webpack-node-externals') const path = require('path') const devMode = process.env.NODE_ENV !== 'production' module.exports = [ { mode: devMode ? 'development' : 'production', entry: './client', output: { pat...
const MiniCssExtractPlugin = require('mini-css-extract-plugin') const externals = require('webpack-node-externals') const path = require('path') const devMode = process.env.NODE_ENV !== 'production' module.exports = [ { mode: devMode ? 'development' : 'production', entry: './client', output: { pat...
Make ExpParser also handle dates.
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ package foam.lib.json; import foam.lib.parse.*; import java.util.concurrent.ConcurrentHashMap; import java.util.Map; public class ExprParser extends foam.lib.parse.ProxyParser { private fin...
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ package foam.lib.json; import foam.lib.parse.*; import java.util.concurrent.ConcurrentHashMap; import java.util.Map; public class ExprParser extends foam.lib.parse.ProxyParser { private fin...
Update URL to current point to gitlab.com
#!/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://git.barrera.io/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points...
Add Javadoc for factory methods.
package org.hamcrest.text; import java.util.regex.Pattern; import org.hamcrest.Description; import org.hamcrest.Factory; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; public class MatchesPattern extends TypeSafeMatcher<String> { private final Pattern pattern; public MatchesPattern(Patter...
package org.hamcrest.text; import java.util.regex.Pattern; import org.hamcrest.Description; import org.hamcrest.Factory; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; public class MatchesPattern extends TypeSafeMatcher<String> { private final Pattern pattern; public MatchesPattern(Patter...
Add styling and some navigation to header.
import React from 'react'; import { Link, IndexLink } from 'react-router'; import AppBar from 'material-ui/AppBar'; import IconButton from 'material-ui/IconButton'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import MoreVertIcon from 'material-ui/svg-icons/navigation/more-...
import React from 'react'; import { Link, IndexLink } from 'react-router'; import AppBar from 'material-ui/AppBar'; import IconButton from 'material-ui/IconButton'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import MoreVertIcon from 'material-ui/svg-icons/navigation/more-...
Use ipv4 in wincat port forward
// +build windows /* Copyright 2019 The Kubernetes Authors. 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 agr...
// +build windows /* Copyright 2019 The Kubernetes Authors. 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 agr...
Hide nav on document click
$(function(){ 'use strict'; //--- Global variables ---// //--- Helper functions ---// //--- In-page scroll ---// $('.scroll').on('click',function(e,target){ e.preventDefault(); var o = 0, t = 900; //offset (px), time delay (ms) var $anchor = $(this).attr('href'); $('html, body').stop().animate({ s...
$(function(){ 'use strict'; //--- Global variables ---// //--- Helper functions ---// //--- In-page scroll ---// $('.scroll').on('click',function(e,target){ e.preventDefault(); var o = 0, t = 900; //offset (px), time delay (ms) var $anchor = $(this).attr('href'); $('html, body').stop().animate({ s...
Change type for private blog settings refs #5614 and #5503 - update private blog type, including update to settings.edit - switch order of populate settings & update fixtures + populate all settings Private blog settings should not be returned by public endpoints therefore they need a type which is not `blog` or `th...
import AuthenticatedRoute from 'ghost/routes/authenticated'; import CurrentUserSettings from 'ghost/mixins/current-user-settings'; import styleBody from 'ghost/mixins/style-body'; export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { titleToken: 'Settings - General', classNames: ['setting...
import AuthenticatedRoute from 'ghost/routes/authenticated'; import CurrentUserSettings from 'ghost/mixins/current-user-settings'; import styleBody from 'ghost/mixins/style-body'; export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { titleToken: 'Settings - General', classNames: ['setting...
Add hash_id column to user-info output
''' This module will retrieve info about students registered in the course ''' def user_info(edx_obj): edx_obj.collections = ['certificates_generatedcertificate', 'auth_userprofile','user_id_map','student_courseenrollment'] cursor = edx_obj.collections['auth_userprofile'].find() result = [] for item ...
''' This module will retrieve info about students registered in the course ''' def user_info(edx_obj): edx_obj.collections = ['certificates_generatedcertificate', 'auth_userprofile','user_id_map','student_courseenrollment'] cursor = edx_obj.collections['auth_userprofile'].find() result = [] for item ...
Add Android Virtual Device IP
package com.example.todocloud.app; public class AppConfig { /*private static String prefix = "http://192.168.1.100/todo_cloud/";*/ // LAN IP /*private static String prefix = "http://192.168.56.1/todo_cloud/";*/ // Genymotion IP private static String prefix = "http://10.0.2.2/todo_cloud/"; // AVD IP /*priva...
package com.example.todocloud.app; public class AppConfig { private static String prefix = "http://192.168.1.100/todo_cloud/"; // LAN IP /*private static String prefix = "http://192.168.56.1/todo_cloud/";*/ // Genymotion IP /*private static String prefix = "http://192.168.173.1/todo_cloud/";*/ // ad hoc netw...
Add PlayTime class and tie it to user profiles Created a PlayTime class in account with from and to times. Added ManyToManyField to UserProfile to keep track of play times.
from django.db import models from django.contrib.auth.models import User, Group from evewspace.Map.models import Map from django.db.models.signals import post_save # Create your models here. class PlayTime(models.Model): """PlayTime represents a choice of play times for use in several forms.""" fromtime = ...
from django.db import models from django.contrib.auth.models import User, Group from evewspace.Map.models import Map from django.db.models.signals import post_save # Create your models here. class UserProfile(models.Model): """UserProfile defines custom fields tied to each User record in the Django auth DB."...
Test the new tos view
# Yith Library Server is a password storage server. # Copyright (C) 2012 Yaco Sistemas # Copyright (C) 2012 Alejandro Blanco Escudero <alejandro.b.e@gmail.com> # Copyright (C) 2012 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is free software:...
# Yith Library Server is a password storage server. # Copyright (C) 2012 Yaco Sistemas # Copyright (C) 2012 Alejandro Blanco Escudero <alejandro.b.e@gmail.com> # Copyright (C) 2012 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is free software:...
Remove default value for createSleepPromise options
// Store a reference to the global setTimeout, // in case it gets replaced (e.g. sinon.useFakeTimers()) const cachedSetTimeout = setTimeout; function createSleepPromise(timeout, { useCachedSetTimeout }) { const timeoutFunction = useCachedSetTimeout ? cachedSetTimeout : setTimeout; return new Promise((resolve)...
// Store a reference to the global setTimeout, // in case it gets replaced (e.g. sinon.useFakeTimers()) const cachedSetTimeout = setTimeout; function createSleepPromise(timeout, { useCachedSetTimeout } = {}) { const timeoutFunction = useCachedSetTimeout ? cachedSetTimeout : setTimeout; return new Promise((res...
Revert "Fixed typo in javadoc" This reverts commit b95fda354b618a5fa75b57f0400719e47cb7f91f.
/* * 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 ...
/* * 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 ...
Fix database connection leak in tests Without this, each flask app created in tests will hold one database connection until all tests are finished. This may result in test failure if database limits number of concurrent connections.
"""Unit and functional test suite for SkyLines.""" import os import shutil from skylines.model import db from tests.data.bootstrap import bootstrap __all__ = ['setup_db', 'setup_app', 'teardown_db'] def setup_db(): """Method used to build a database""" db.create_all() def setup_dirs(app): filesdir = a...
"""Unit and functional test suite for SkyLines.""" import os import shutil from skylines.model import db from tests.data.bootstrap import bootstrap __all__ = ['setup_db', 'setup_app', 'teardown_db'] def setup_db(): """Method used to build a database""" db.create_all() def setup_dirs(app): filesdir = a...
Add New Class To Link
;(function() { "use strict"; angular. module("bookApp"). component("bookApp", { template: ` <div class="nav"><a href="new-book" class="nav-click">Add new book</a></div> <div class="book-container" ng-repeat="book in $ctrl.books"> <h3>{{book.title}}</h3> <img ng-sr...
;(function() { "use strict"; angular. module("bookApp"). component("bookApp", { template: ` <div class="nav"><a href="new-book">Add new book</a></div> <div class="book-container" ng-repeat="book in $ctrl.books"> <h3>{{book.title}}</h3> <img ng-src="http://theproac...
Reduce to 3 the number of days for the method test.
package cl.fatman.capital.fund; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; public class ControllerTest { private static Co...
package cl.fatman.capital.fund; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; public class ControllerTest { private static Co...
Use Array.map to transform classes response
/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('SlateAdmin.store.people.UserClasses', { extend: 'Ext.data.Store', requires: [ 'SlateAdmin.proxy.API' ], idProperty: 'value', fields: [{ name: 'value', type: 'string' }], proxy: { type: 'slateap...
/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('SlateAdmin.store.people.UserClasses', { extend: 'Ext.data.Store', requires: [ 'SlateAdmin.proxy.API' ], idProperty: 'value', fields: [{ name: 'value', type: 'string' }], proxy: { type: 'slateap...
Add logic to handle function summaries
<?php namespace Phamda\Builder; use Phamda\Phamda; use PhpParser\Node\Expr; class SimpleMethodBuilder extends AbstractMethodBuilder { const COMMENT_ROW_PREFIX = ' *'; public function build() { return parent::build()->makeStatic(); } protected function createComment() { $...
<?php namespace Phamda\Builder; use PhpParser\Node\Expr; class SimpleMethodBuilder extends AbstractMethodBuilder { const COMMENT_ROW_PREFIX = ' *'; public function build() { return parent::build()->makeStatic(); } protected function createComment() { $rows = explode("\n"...
Remove header added to gold file
""" python TestPostprocessorPluginManager_test_script.py """ import matplotlib.pyplot as plt import mooseutils # Create Figure and Axes figure = plt.figure(facecolor='white') axes0 = figure.add_subplot(111) axes1 = axes0.twinx() # Read Postprocessor Data data = mooseutils.PostprocessorReader('../input/white_elephant_...
#* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html """ python ...
Revert "Try a lambda instead of a method reference for java 8 support" This reverts commit 84d3e987405adeeab8ab60bd8a4e2e54e227a253.
package me.proxer.library.api; import me.proxer.library.util.ProxerUtils; import retrofit2.Converter; import retrofit2.Retrofit; import java.lang.annotation.Annotation; import java.lang.reflect.Type; /** * @author Ruben Gees */ final class EnumRetrofitConverterFactory extends Converter.Factory { @Override ...
package me.proxer.library.api; import me.proxer.library.util.ProxerUtils; import retrofit2.Converter; import retrofit2.Retrofit; import java.lang.annotation.Annotation; import java.lang.reflect.Type; /** * @author Ruben Gees */ final class EnumRetrofitConverterFactory extends Converter.Factory { @Override ...
Make constructor of DefaultFilterSet compatible - arguments had different names than FilterSet before
import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data = data.copy() ...
import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data = data.copy() ...
Fix XSS on API Integrations H1 1753684
<?php defined('C5_EXECUTE') or die("Access Denied."); /** * @var \Concrete\Core\Search\Pagination\Pagination $pagination */ if ($pagination->getTotalResults() > 0) { ?> <table class="ccm-search-results-table"> <thead> <tr> <th><?=t('ID')?></th> <th><?=t('Name')?></th> ...
<?php defined('C5_EXECUTE') or die("Access Denied."); /** * @var \Concrete\Core\Search\Pagination\Pagination $pagination */ if ($pagination->getTotalResults() > 0) { ?> <table class="ccm-search-results-table"> <thead> <tr> <th><?=t('ID')?></th> <th><?=t('Name')?></th> ...
Fix fatal error when using Logger::devLog - Error message is "Call to a member function log() on null in src/Core/Logger.php:304"
<?php namespace Friendica\Factory; use Friendica\App; use Friendica\Core\Config\Cache; use Friendica\Factory; use Friendica\Util\BasePath; class DependencyFactory { /** * Setting all default-dependencies of a friendica execution * * @param string $channel The channel of this execution * @param string $dir...
<?php namespace Friendica\Factory; use Friendica\App; use Friendica\Core\Config\Cache; use Friendica\Factory; use Friendica\Util\BasePath; class DependencyFactory { /** * Setting all default-dependencies of a friendica execution * * @param string $channel The channel of this execution * @param string $dir...
Add cellContents: nbsp for now
var rows = 0; var cols = 10; var table; var edit_border = "thin dotted grey"; function text(str) { return document.createTextNode(str); } function cellContents(rowindex, colindex) { return "&nbsp;"; } function init() { table = document.getElementById("wftable"); addRows(4); } function addRows(numrow...
var rows = 0; var cols = 10; var table; var edit_border = "thin dotted grey"; function text(str) { return document.createTextNode(str); } function init() { table = document.getElementById("wftable"); addRows(4); } function addRows(numrows) { numrows += rows; if (table.tBodies.length < 1) { tabl...
Add new line at the end of test files
const Alfred = require('../index'); const Builder = Alfred.Builder; const bot = new Alfred(); bot.login('username', 'password') .then(() => bot.send('servernotifyregister', { 'event': 'server' })) .then(() => bot.send('servernotifyregister', { 'event': 'textprivate' })) .then(() => console.log('Connected ...
const Alfred = require('../index'); const Builder = Alfred.Builder; const bot = new Alfred(); bot.login('username', 'password') .then(() => bot.send('servernotifyregister', { 'event': 'server' })) .then(() => bot.send('servernotifyregister', { 'event': 'textprivate' })) .then(() => console.log('Connected ...
Add module.py test and modify some others for better coverage. Remove files not used.
import pytest import os from SCNIC.general import simulate_correls from SCNIC.between_correls import between_correls @pytest.fixture() def args(): class Arguments(object): def __init__(self): self.table1 = "table1.biom" self.table2 = "table2.biom" self.output = "out_dir...
import pytest import os from SCNIC.general import simulate_correls from SCNIC.between_correls import between_correls @pytest.fixture() def args(): class Arguments(object): def __init__(self): self.table1 = "table1.biom" self.table2 = "table2.biom" self.output = "out_dir...
Fix some bullshit with generics.
package codechicken.lib.util.registry; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.LegacyNamespacedRegistry; import javax.annotation.Nullable; import java.util.HashMap; public class DuplicateValueRegistry extends LegacyNamespacedRegistry { private final LegacyNamesp...
package codechicken.lib.util.registry; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.LegacyNamespacedRegistry; import javax.annotation.Nullable; import java.util.HashMap; public class DuplicateValueRegistry<V> extends LegacyNamespacedRegistry<V> { private final Legacy...
Refactor react-counter example to "redux style"
import React, { Component, PropTypes } from 'react'; const reducer = (state = { counter: 0 }, action) => { switch (action.type) { case 'INCREMENT': return { counter: state.counter + 1 }; case 'DECREMENT': return { counter: state.counter - 1 }; default: return state; } }; class Counte...
import React, { Component, PropTypes } from 'react'; class Counter extends Component { constructor() { super(); this.state = { counter: 0 }; this.increment = this.increment.bind(this); this.decrement = this.decrement.bind(this); } increment() { this.setState({ counter: this.state.counte...
Fix comment describing pypi incantation
#from distutils.core import setup from setuptools import setup, find_packages setup( name='Flask-MongoMyAdmin', version='0.1', url='http://github.com/classicspecs/Flask-MongoMyAdmin/', author='Jay Goel', author_email='jay@classicspecs.com', description='Simple MongoDB Administrative Interface ...
#from distutils.core import setup from setuptools import setup, find_packages setup( name='Flask-MongoMyAdmin', version='0.1', url='http://github.com/classicspecs/Flask-MongoMyAdmin/', author='Jay Goel', author_email='jay@classicspecs.com', description='Simple MongoDB Administrative Interface ...
Remove keyboard shortcuts used in design
$(document).ready(function($) { // header dropdowns $('.mainItem a, ul.dropdown').hover(function() { $(this).parent().toggleClass('hover'); }); // sticky footer $(window).bind('load resize', function() { var h = $(window).height(); var a = $('#about').outerHeight(); ...
$(document).ready(function($) { // header dropdowns $('.mainItem a, ul.dropdown').hover(function() { $(this).parent().toggleClass('hover'); }); // sticky footer $(window).bind('load resize', function() { var h = $(window).height(); var a = $('#about').outerHeight(); ...
Include recently added matchers in callee.__all__
""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.collections import Dict, List, Mapping, Iterable, Sequence, Set from callee.general import \ Any, ArgThat, IsA...
""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.general import \ Any, ArgThat, IsA, Inherits, InstanceOf, Matching, SubclassOf from callee.strings import Byte...
Use variables to initialize the maze
(function(document, MazeGenerator, MazePainter, MazeInteraction) { 'use strict'; // DOM Elements var canvas = document.getElementById('maze'); var bGenerate = document.getElementById('bGenerate'); var bSolve = document.getElementById('bSolve'); // Initialization variables var cellSize = 20; var cellCo...
(function(document, MazeGenerator, MazePainter, MazeInteraction) { 'use strict'; // DOM Elements var canvas = document.getElementById('maze'); var bGenerate = document.getElementById('bGenerate'); var bSolve = document.getElementById('bSolve'); // Start painting loop MazePainter.startPainting(); bGen...
Update grunt to watch for sass changes
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-sass'); grunt.initConfig({ watch: { sass: { files: ['xmd/style/**/*.scss', 'actions/**/css/*.scss', 'inc/widgets/**/css/*.scss', 'modules/**/css/*.scss', '!**/_*.scss'], tasks: ['sass:dev'], ...
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-sass'); grunt.initConfig({ watch: { sass: { files: ['xmd/style/**/*.scss', 'actions/**/css/*.scss', 'inc/widgets/**/css/*.scss', 'modules/**/css/*.scss'], tasks: ['sass'] } }, sass: { ...
Use DisplayIf in the licence.
import React from 'react'; import PropTypes from 'prop-types'; import { areWeFunYet, translate as $t } from '../../helpers'; import ExternalLink from './external-link.js'; import DisplayIf from './display-if'; let showLicense = areWeFunYet(); const LoadingMessage = props => { let message = props.message || $t('c...
import React from 'react'; import PropTypes from 'prop-types'; import { areWeFunYet, translate as $t } from '../../helpers'; import ExternalLink from './external-link.js'; let showLicense = areWeFunYet(); const LoadingMessage = props => { let message = props.message || $t('client.spinner.generic'); let lice...
Clean up File edit view
from __future__ import unicode_literals from flask import url_for from flask_mongoengine.wtf import model_form from mongoengine import * from core.observables import Observable from core.database import StringListField class File(Observable): value = StringField(verbose_name="Value") mime_type = StringFie...
from __future__ import unicode_literals from mongoengine import * from core.observables import Observable from core.observables import Hash class File(Observable): value = StringField(verbose_name="SHA256 hash") mime_type = StringField(verbose_name="MIME type") hashes = DictField(verbose_name="Hashes"...
Use the first workload owner id in e2e test
const expect = require('chai').expect const dataHelper = require('../helpers/data/aggregated-data-helper') var workloadOwnerId var workloadOwnerGrade describe('View overview', function () { before(function () { return dataHelper.selectIdsForWorkloadOwner() .then(function (results) { var workloadO...
const expect = require('chai').expect const dataHelper = require('../helpers/data/aggregated-data-helper') var workloadOwnerId var workloadOwnerGrade describe('View overview', function () { before(function () { return dataHelper.selectIdsForWorkloadOwner() .then(function (results) { var workloadO...
Add more helpful output to the user
package cmd import ( "fmt" "log" "github.com/codegangsta/cli" "github.com/exercism/cli/api" "github.com/exercism/cli/config" "github.com/exercism/cli/user" ) // Tracks lists available tracks. func Tracks(ctx *cli.Context) { c, err := config.New(ctx.GlobalString("config")) if err != nil { log.Fatal(err) } ...
package cmd import ( "fmt" "log" "github.com/codegangsta/cli" "github.com/exercism/cli/api" "github.com/exercism/cli/config" "github.com/exercism/cli/user" ) // Tracks lists available tracks. func Tracks(ctx *cli.Context) { c, err := config.New(ctx.GlobalString("config")) if err != nil { log.Fatal(err) } ...
Add resource name to FlightStatus
from ..base import Resource from .flight_segment import FlightSegment class FlightStatus(Resource): _resource_name = 'flight_statuses' _as_is_fields = [ 'current_segment', 'departure_service_action', 'flags', 'href', 'id', 'internal', 'segments_order',...
from ..base import Resource from .flight_segment import FlightSegment class FlightStatus(Resource): _as_is_fields = [ 'current_segment', 'departure_service_action', 'flags', 'href', 'id', 'internal', 'segments_order', 'state', ] @property ...
Simplify the way modes are loaded into a lattice
import os import csv from pml import lattice, element, device def load(directory, mode, control_system): lat = lattice.Lattice(mode, control_system) with open(os.path.join(directory, mode, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: e...
import os import csv from pml import lattice, element, device def load(directory, name, control_system): lat = lattice.Lattice(name, control_system) with open(os.path.join(directory, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: e = ele...
Use gwtSetup instead of constructor in gwt test
/* * Copyright 2013, The gwtquery 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 agreed...
/* * Copyright 2013, The gwtquery 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 agreed...
Set autocrlf=false in Git configurations in Eclipse. Testing...
import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.WindowConstants; public class CardTrick extends JFrame { public static void main(String[] args) { new CardTrick(); } CardTrick() { setDefaultC...
import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.WindowConstants; public class CardTrick extends JFrame { public static void main(String[] args) { new CardTrick(); } CardTrick() { setDefaultCloseOperation(Win...
Make the addition of hosts sync It now adds a host and continues to the next. It's a shame we cant use promises, and do it all aync. Maybe the splice of the hosts array is a bit strange, and a index with counter on it would be better. Ref: #2
import hostile from 'hostile'; function addHosts(done) { // TODO: Get data from configuration manager var dummyDataHosts = [ { ip: '127.0.0.1', hostname: 'localhost.example.com' }, { ip: '127.0.0.1', hostname: 'localhost2.example.com' }, { ip: '127.0.0.1', hostname: 'localhost3.example.c...
import hostile from 'hostile'; function addHosts(done) { // TODO: Get data from configuration manager var dummyDataHosts = [ { ip: '127.0.0.1', hostname: 'localhost.example.com' }, { ip: '127.0.0.1', hostname: 'localhost2.example.com' }, { ip: '127.0.0.1', hostname: 'localhost3.example.c...
Disable rollbar for test env Fixes #12
/* jshint node: true */ 'use strict'; var fs = require('fs'); var path = require('path'); var merge = require('lodash-node/modern/object/merge'); var template = require('lodash-node/modern/string/template'); module.exports = { name: 'ember-cli-rollbar', contentFor: function(type, config) { var environment = t...
/* jshint node: true */ 'use strict'; var fs = require('fs'); var path = require('path'); var merge = require('lodash-node/modern/object/merge'); var template = require('lodash-node/modern/string/template'); module.exports = { name: 'ember-cli-rollbar', contentFor: function(type, config) { var environment = t...
Set petitions page title to "Petitionen"
import React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { fetchPetitions } from 'actions/PetitionActions'; import Petitions from 'components/Petitions'; const PetitionsContainer = React.createClass({ componentDidMount () { this.props.fetchPetitions(this.props);...
import React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { fetchPetitions } from 'actions/PetitionActions'; import Petitions from 'components/Petitions'; const PetitionsContainer = React.createClass({ componentDidMount () { this.props.fetchPetitions(this.props);...
Add type annotation to worker_shutdown_stop, which was called in a typed context
#!/usr/bin/env python """TaskProcess class to provide helper methods around worker task's process. Attributes: log (logging.Logger): the log object for this module """ import asyncio import logging import os import signal from asyncio.subprocess import Process log = logging.getLogger(__name__) class TaskProce...
#!/usr/bin/env python """TaskProcess class to provide helper methods around worker task's process. Attributes: log (logging.Logger): the log object for this module """ import asyncio import logging import os import signal from asyncio.subprocess import Process log = logging.getLogger(__name__) class TaskProce...
Remove trailing slashes from routes.
import StringIO import base64 import signal import flask from quiver.plotter import FieldPlotter app = flask.Flask(__name__) @app.route('/') def quiver(): '''Route for homepage''' return flask.render_template('quiver.html') @app.route('/plot', methods=['GET',]) def plot(): equation_string = flask.reque...
import StringIO import base64 import signal import flask from quiver.plotter import FieldPlotter app = flask.Flask(__name__) @app.route('/') def quiver(): '''Route for homepage''' return flask.render_template('quiver.html') @app.route('/plot/', methods=['GET',]) def plot(): equation_string = flask.requ...
Update TwitterStatus test to remove mock of Twit module
jest.dontMock('../lib/twitter-status'); import TwitterStatus from '../lib/twitter-status'; var Twit = require('twit'); var client = new Twit({}); describe('TwitterStatus', function() { describe('#showStatusFor', function() { it('calls with correct params', function() { var twitterStatus = new TwitterStat...
jest.dontMock('../lib/twitter-status'); import TwitterStatus from '../lib/twitter-status'; jest.mock('Twit'); var ReadYaml = require('read-yaml'); var Twit = require('twit'); var config = ReadYaml.sync('twitter.yml'); var client = new Twit({}); describe('TwitterStatus', function() { describe('#showStatusFor', fun...
Allow reserving both tokens and percentage for same address
import { observable, action } from 'mobx'; class ReservedTokenStore { @observable tokens; constructor(tokens = []) { this.tokens = tokens; } @action addToken = (token) => { const currentToken = this.tokens.find(t => t.addr === token.addr && t.dim == token.dim) if (currentToken) { const in...
import { observable, action } from 'mobx'; class ReservedTokenStore { @observable tokens; constructor(tokens = []) { this.tokens = tokens; } @action addToken = (token) => { const currentToken = this.tokens.find(t => t.addr === token.addr) if (currentToken) { const index = this.tokens.inde...
Check firm object exists to avoid error
<!--- <?php if (!empty(Yii::app()->session['user'])) { $user = Yii::app()->session['user']; } else { $user = User::model()->findByPk(Yii::app()->user->id); } $firm = Firm::model()->findByPk($this->selectedFirmId); if (file_exists("/etc/hostname")) { $hostname = trim(file_get_contents("/etc/hostname")); } else { $h...
<!--- <?php if (!empty(Yii::app()->session['user'])) { $user = Yii::app()->session['user']; } else { $user = User::model()->findByPk(Yii::app()->user->id); } $firm = Firm::model()->findByPk($this->selectedFirmId); if (file_exists("/etc/hostname")) { $hostname = trim(file_get_contents("/etc/hostname")); } else { $h...
Fix click and dblclick toggling bug After triggering click event to keep the text unfolded, toggling it back with dblclick wouldn't work as CSS wouldn't fire.
const elements = document.querySelectorAll('bracket-less'); function expandBrackets() { this.innerHTML = this.dataset.bracketless; this.classList.toggle('bracket-less'); } function collapseBrackets() { this.innerHTML = '...'; this.classList.toggle('bracket-less'); } elements.forEach(el => el.addEventListener('...
const elements = document.querySelectorAll('bracket-less'); function expandBrackets() { this.innerHTML = this.dataset.bracketless; this.classList.remove('bracket-less'); } function collapseBrackets() { this.innerHTML = '...'; this.classList.add('bracket-less'); } elements.forEach(el => el.addEventListener('cli...
fix(uglify): Fix the order of uglify.
const browserify = require('browserify') const path = require('path') const uglifyify = require('uglifyify') const transform = require('./js-transform') module.exports = function ({ config, entry, env, minify }) { const pipeline = browserify(entry, { basedir: process.cwd(), cache: {}, debug: tru...
const browserify = require('browserify') const path = require('path') const uglifyify = require('uglifyify') const transform = require('./js-transform') module.exports = function ({ config, entry, env, minify }) { const pipeline = browserify(entry, { basedir: process.cwd(), cache: {}, debug: tru...
Exclude test project from package - round 2 Also change development status to Alpha
from setuptools import setup, find_packages import django_cassandra_engine as meta DESCRIPTION = 'Cassandra backend for Django-nonrel' LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except IOError: pass setup( name='django-cassandra-engine', version='.'.join(map(str, meta....
from setuptools import setup, find_packages import django_cassandra_engine as meta DESCRIPTION = 'Cassandra backend for Django-nonrel' LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except IOError: pass setup( name='django-cassandra-engine', version='.'.join(map(str, meta....
Add Subject and Keyword fields to PDF metadata
<?php # THIS ONE DOES NOT HAVE AddPageByArray ANY MORE :-) include("../mpdf.php"); $html_data = file_get_contents("body.html"); $html = substr($html_data, 12, strlen($html_data)-27); $style_data = file_get_contents("style_current.css"); $frontmatter_data = file_get_contents("frontmatter_current.html"); // Create new...
<?php # THIS ONE DOES NOT HAVE AddPageByArray ANY MORE :-) include("../mpdf.php"); $html_data = file_get_contents("body.html"); $html = substr($html_data, 12, strlen($html_data)-27); $style_data = file_get_contents("style_current.css"); $frontmatter_data = file_get_contents("frontmatter_current.html"); // Create new...
Fix the way the combineReducer handles paths.
import get from 'lodash.get'; import isFunction from 'lodash.isfunction'; export function combineReducers(stateReducerMap, rootPath) { return function(state, action) { let changed = false; const nextState = {}; Object.entries(stateReducerMap).forEach(([path, module]) => { const fullPath = rootPath...
import get from 'lodash.get'; import isFunction from 'lodash.isfunction'; export function combineReducers(stateReducerMap, rootPath) { return function(state, action) { let changed = false; const nextState = {}; Object.entries(stateReducerMap).forEach(([path, module]) => { const fullPath = rootPath...
Make lifecycle component a React class component since it requires React-Lifecycle states
/* * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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/li...
/* * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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/li...
Include req.baseUrl is asset path If app is namespaced under another route then this needs to be taken into account when importing assets
var path = require('path'), servestatic = require('serve-static'); var basedir = path.dirname(require.resolve('govuk_template_mustache/package.json')); module.exports = { setup: function (app, options) { options = options || {}; options.path = options.path || '/govuk-assets'; app.use...
var path = require('path'), servestatic = require('serve-static'); var basedir = path.dirname(require.resolve('govuk_template_mustache/package.json')); module.exports = { setup: function (app, options) { options = options || {}; options.path = options.path || '/govuk-assets'; app.use...
Replace URLSearchParams with Edge/IE-compatible regex Fix #589
/** * User login. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict'; (function() { var form = document.getElementById('login-form'); var emai...
/** * User login. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict'; (function() { var form = document.getElementById('login-form'); var emai...
Clean up memory on tab close
// Storage var tabs = {} // Incoming request chrome.extension.onRequest.addListener( function( request, sender, response ) { switch( request.action ) { // Bird spotted case 'twitterUser': // new tab, or tab changed URL if( tabs[ 't'+ sender.tab.id ] === undefined || tabs[ 't'+ sender.tab.id ].href !=...
// Storage var tabs = {} // Incoming request chrome.extension.onRequest.addListener( function( request, sender, response ) { switch( request.action ) { // Bird spotted case 'twitterUser': // new tab, or tab changed URL if( tabs[ 't'+ sender.tab.id ] === undefined || tabs[ 't'+ sender.tab.id ].href !=...
Fix a problem with the celery cli commoand Allows runserver to be used separately from celery.
# manage.py import os import subprocess from flask_migrate import Migrate, MigrateCommand from flask_script import Manager, Shell, Command from app import create_app, db from app.models import Users, Agencies, Requests, Responses, Events, Reasons, Permissions, Roles app = create_app(os.getenv('FLASK_CONFIG') or 'def...
# manage.py import os import subprocess from flask_migrate import Migrate, MigrateCommand from flask_script import Manager, Shell from app import create_app, db from app.models import Users, Agencies, Requests, Responses, Events, Reasons, Permissions, Roles app = create_app(os.getenv('FLASK_CONFIG') or 'default') ma...
Use !empty instead of isset to prevent accidental deletion of the last used repository URL when firmware update gitsync settings have been saved without a repository URL.
#!/usr/local/bin/php -f <?php /* upgrade embedded users serial console */ require_once("globals.inc"); require_once("config.inc"); require_once("functions.inc"); if(file_exists("/usr/local/bin/git") && isset($config['system']['gitsync']['synconupgrade'])) { if(!empty($config['system']['gitsync']['repositoryur...
#!/usr/local/bin/php -f <?php /* upgrade embedded users serial console */ require_once("globals.inc"); require_once("config.inc"); require_once("functions.inc"); if(file_exists("/usr/local/bin/git") && isset($config['system']['gitsync']['synconupgrade'])) { if(isset($config['system']['gitsync']['repositoryurl...
Change .env to settings.ini file
from decouple import AutoConfig from ereuse_workbench.test import TestDataStorageLength class WorkbenchConfig: # Path where find settings.ini file config = AutoConfig(search_path='/home/user/') # Env variables for DH parameters DH_TOKEN = config('DH_TOKEN') DH_HOST = config('DH_HOST') DH_DAT...
from decouple import AutoConfig from ereuse_workbench.test import TestDataStorageLength class WorkbenchConfig: # Path where find .env file config = AutoConfig(search_path='/home/user/') # Env variables for DH parameters DH_TOKEN = config('DH_TOKEN') DH_HOST = config('DH_HOST') DH_DATABASE = ...
Fix up put webpack build
const nodeExternals = require('webpack-node-externals'); const path = require('path'); module.exports = { target: 'node', externals: [nodeExternals()], entry: { authorizerGithub: ['./bootstrap', './src/authorizers/github.js'], put: ['./bootstrap', './src/put/index.js'], get: ['./bootstrap', './src/ge...
const nodeExternals = require('webpack-node-externals'); const path = require('path'); module.exports = { target: 'node', externals: [nodeExternals()], entry: { authorizerGithub: ['./bootstrap', './src/authorizers/github.js'], put: ['./bootstrap', './src/put.js'], get: ['./bootstrap', './src/get/inde...
Fix : add default value for homepage portal
package fr.treeptik.cloudunit.controller; import fr.treeptik.cloudunit.dto.AboutResource; import fr.treeptik.cloudunit.dto.HomepageResource; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springfram...
package fr.treeptik.cloudunit.controller; import fr.treeptik.cloudunit.dto.AboutResource; import fr.treeptik.cloudunit.dto.HomepageResource; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springfram...
Disable unit test console logging
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html const path = require('path'); process.env.CHROME_BIN = require('puppeteer').executablePath(); module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine...
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html const path = require('path'); process.env.CHROME_BIN = require('puppeteer').executablePath(); module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine...
Update view to include count of complete files awaiting review.
function viewCollectionDetails(collectionName) { $.ajax({ url: "/zebedee/collection/" + collectionName, type: "get", headers:{ "X-Florence-Token":accessToken() }, crossDomain: true }).done(function (data) { var collection_summary = '<h1>' + data.name + '</h1>' + '<p>' + data.inProg...
function viewCollectionDetails(collectionName) { $.ajax({ url: "/zebedee/collection/" + collectionName, type: "get", headers:{ "X-Florence-Token":accessToken() }, crossDomain: true }).done(function (data) { var collection_summary = '<h1>' + data.name + '</h1>' + '<p>0 New pages (to...
Fix resolution of revision steps
// BusinessProcess processing steps resolution 'use strict'; var memoize = require('memoizee/plain') , defineMultipleProcess = require('../lib/multiple-process') , defineProcessingStepBase = require('../processing-step-base') , defineBusinessProcess = require('./base'); module.exports = ...
// BusinessProcess processing steps resolution 'use strict'; var memoize = require('memoizee/plain') , defineMultipleProcess = require('../lib/multiple-process') , defineProcessingStepBase = require('../processing-step-base') , defineBusinessProcess = require('./base'); module.exports = ...
Use get_include instead of get_numpy_include.
#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable by people who do...
#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable by people who do...
Add the appropriate file header.
/** * SurveyViewTrigger component. * * Site Kit by Google, Copyright 2021 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2...
/** * External dependencies */ import { useMount } from 'react-use'; import PropTypes from 'prop-types'; /** * Internal dependencies */ import Data from 'googlesitekit-data'; import { CORE_SITE } from '../../googlesitekit/datastore/site/constants'; import { CORE_USER } from '../../googlesitekit/datastore/user/cons...
Allow functions in global exposure bodies
import createGraph from '../query/lib/createGraph.js'; import {Match} from 'meteor/check'; export const ExposureDefaults = { blocking: false, method: true, publication: true, }; export const ExposureSchema = { firewall: Match.Maybe( Match.OneOf(Function, [Function]) ), maxLimit: Match....
import createGraph from '../query/lib/createGraph.js'; import {Match} from 'meteor/check'; export const ExposureDefaults = { blocking: false, method: true, publication: true, }; export const ExposureSchema = { firewall: Match.Maybe( Match.OneOf(Function, [Function]) ), maxLimit: Match....
Add verbose name to Conf model.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.db import models from django.db.models.signals import post_save from django.contrib.sites.models import Site from django.dispatch import receiver class Conf(models.Model): site = models.OneT...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.db import models from django.db.models.signals import post_save from django.contrib.sites.models import Site from django.dispatch import receiver class Conf(models.Model): site = models.OneT...
Change author_email to my own email My personal email is definitely the one that'll keep working in the long run.
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name='django-afip', version='0.8.0', description='AFIP integration for django', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/django-afip', license='ISC', packag...
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name='django-afip', version='0.8.0', description='AFIP integration for django', author='Hugo Osvaldo Barrera', author_email='hbarrera@z47.io', url='https://gitlab.com/hobarrera/django-afip', license='ISC', packag...
Add clientsClaim and skipWaiting options
let pkg = require('./package.json'); module.exports = { baseUrl: process.env.NODE_ENV === 'production' ? '/guess-them-all/' : '/', pwa: { name: pkg.description, themeColor: '#448AFF', appleMobileWebAppCapable: true, // configure the workbox plugin workboxOptions: { ...
let pkg = require('./package.json'); module.exports = { baseUrl: process.env.NODE_ENV === 'production' ? '/guess-them-all/' : '/', pwa: { name: pkg.description, themeColor: '#448AFF', appleMobileWebAppCapable: true, // configure the workbox plugin workboxOptions: { ...
Clear the error message after it has been displayed once
<!DOCTYPE HTML> <?php session_start(); if($_SESSION['errorMessage'] == null) { $_SESSION['errorMessage']=""; } else { $errorMessage = $_SESSION['errorMessage']; $_SESSION['errorMessage']=""; } $uName=""; $pWord=""; ?> <html> <head> <title>Login</title> <meta charset="utf-8" /> <link rel="stylesheet" type="te...
<!DOCTYPE HTML> <?php session_start(); if($_SESSION['errorMessage'] == null) { $_SESSION['errorMessage']=""; } $uName=""; $pWord=""; ?> <html> <head> <title>Login</title> <meta charset="utf-8" /> <link rel="stylesheet" type="text/css" href="main.css" /> </head> <header><h1>Login</h1></header> <body> <br> ...
Make it work on flusspferd.
exports.setup = function(Tests){ var Suite = require('lib/suite').Suite; Tests.describe('Suites', function(it, setup){ setup('beforeEach', function(){ }); it('should error out if no `it` named argument is declared', function(expect){ var error = null; try { new Suite('Fail', function(){}); } catch(e){ ...
exports.setup = function(Tests){ var Suite = require('lib/suite').Suite; Tests.describe('Suites', function(it, setup){ setup('beforeEach', function(){ }); it('should error out if no `it` named argument is declared', function(expect){ var error = null; try { new Suite('Fail', function(){}); } catch(e){ ...
Add the ability to override the readFile function
import { createFilter } from 'rollup-pluginutils'; import { resolve as resolveSourceMap } from 'source-map-resolve'; import * as fs from 'fs'; export default function sourcemaps({ include, exclude, readFile = fs.readFile } = {}) { const filter = createFilter(include, exclude); return { name: 'sourcemaps', ...
import { createFilter } from 'rollup-pluginutils'; import { resolve as resolveSourceMap } from 'source-map-resolve'; import { readFile } from 'fs'; export default function sourcemaps({ include, exclude } = {}) { const filter = createFilter(include, exclude); return { name: 'sourcemaps', load(id) { ...
Fix bump version to federal senate script
from setuptools import setup REPO_URL = 'http://github.com/datasciencebr/serenata-toolbox' setup( author='Serenata de Amor', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language...
from setuptools import setup REPO_URL = 'http://github.com/datasciencebr/serenata-toolbox' setup( author='Serenata de Amor', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language...
Add filtering for "Best BLAHBLAHBLAH ever made"
// ==UserScript== // @name Steam Review filter // @namespace https://github.com/somoso/steam_user_review_filter/raw/master/steam_user_review_filter.user.js // @version 0.31 // @description try to filter out the crap on steam // @author You // @match http://store.steampowered.com/app/* // @...
// ==UserScript== // @name Steam Review filter // @namespace https://github.com/somoso/steam_user_review_filter/raw/master/steam_user_review_filter.user.js // @version 0.31 // @description try to filter out the crap on steam // @author You // @match http://store.steampowered.com/app/* // @...
Make Primitive\Num tests much more nicer
<?php declare(strict_types=1); namespace test\Primitive; use Eris\TestTrait; use Eris\Generator; use Widmogrod\Helpful\SetoidLaws; use Widmogrod\Primitive\Num; class NumTest extends \PHPUnit\Framework\TestCase { use TestTrait; public function test_it_should_obay_setoid_laws() { $this->forAll( ...
<?php declare(strict_types=1); namespace test\Primitive; use Widmogrod\Helpful\SetoidLaws; use Widmogrod\Primitive\Num; class NumTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideSetoidLaws */ public function test_it_should_obay_setoid_laws( $a, $b, $c ...
Update switch schema to eliminate Meta and add standard top-level fields
package schema // Sample is an individual measurement taken by DISCO. type Sample struct { Timestamp int64 `json:"timestamp,int64" bigquery:"timestamp"` Value float32 `json:"value,float32" bigquery:"value"` } // SwitchStats represents a row of data taken from the raw DISCO export file. type SwitchStats struct...
package schema // TODO: copy disco schema here. // Meta contains the archive and parse metadata. type Meta struct { FileName string `json:"task_filename,string" bigquery:"task_filename"` TestName string `json:"test_id,string" bigquery:"test_id"` ParseTime int64 `json:"parse_time,int64" bigquery:"parse_time"` } ...
Fix typo and throw exception.
<?php namespace mcordingley\ProbabilityDistribution\Discrete; use InvalidArgumentException; use mcordingley\ProbabilityDistribution\AbstractProbabilityDistribution; abstract class AbstractDiscreteProbabilityDistribution extends AbstractProbabilityDistribution { /* These versions of getCdf and getPpf are guarant...
<?php namespace mcordingley\ProbabilityDistribution\Discrete; use mcordingley\ProbabilityDistribution\AbstractProbabilityDistribution; abstract class AbstractDiscreteProbabilityDistribution extends AbstractProbabilityDistribution { /* These versions of getCdf and getPpf are guaranteed to be correct for * a...
Exclude Windows tests from linter.
//+build windows // Copyright (c) 2017-2018 Tigera, 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 // // U...
// Copyright (c) 2017 Tigera, 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 appli...
[FIX] medical_prescription_sale_stock_us: Add dependency * Add dependency on medical_prescription_us to manifest file. This is needed for successful installation.
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Prescription Sale Stock - US', 'summary': 'Provides US Locale to Medical Prescription Sale Stock', 'version': '9.0.1.0.0', 'author': "LasLabs, Odoo Community Associatio...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Prescription Sale Stock - US', 'summary': 'Provides US Locale to Medical Prescription Sale Stock', 'version': '9.0.1.0.0', 'author': "LasLabs, Odoo Community Associatio...
Use composer version of jQuery IAS only
<?php namespace kop\y2sp\assets; use yii\web\AssetBundle; /** * This is "InfiniteAjaxScrollAsset" class. * * This class is an asset bundle for {@link http://infiniteajaxscroll.com/ JQuery Infinite Ajax Scroll plugin}. * * @link http://kop.github.io/yii2-scroll-pager Y2SP project page. * @license https:/...
<?php namespace kop\y2sp\assets; use yii\web\AssetBundle; /** * This is "InfiniteAjaxScrollAsset" class. * * This class is an asset bundle for {@link http://infiniteajaxscroll.com/ JQuery Infinite Ajax Scroll plugin}. * * @link http://kop.github.io/yii2-scroll-pager Y2SP project page. * @license https:/...
Use null coalescing for indicator value indicator getter
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import Realm from 'realm'; /** * An abstract object which contains metadata describing an indicator row or column. * * @property {string} id * @property {string} storeId * @property {Period} period * @pro...
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import Realm from 'realm'; /** * An abstract object which contains metadata describing an indicator row or column. * * @property {string} id * @property {string} storeId * @property {Period} period * @pro...
Change of arguments, remove unused modules, source is now a directory
import json import click import subprocess import utils import os import logging @click.command() @click.argument('sources', type=click.Path(exists=True), required=True) @click.argument('output', type=click.Path(exists=True), required=True) @click.argument('min_zoom', default=5) @click.argument('max_zoom', default...
import json import os from urlparse import urlparse import zipfile import click import adapters from filters import BasicFilterer import utils import subprocess @click.command() @click.argument('file', type=click.Path(exists=True), required=True) def vectorTiling(file): """ Function that creates vector tiles ...
Add constants for authorization scopes.
/* * Copyright 2014 Open mHealth * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
/* * Copyright 2014 Open mHealth * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
Move registration box to news page
import React from 'react'; import { get } from '../fetcher'; import NewsPost from './NewsPost'; import RegistrationBox from './RegistrationBox' const NewsPage = React.createClass({ getInitialState() { return { posts: [] }; }, componentDidMount() { get('/posts').then(po...
import React from 'react'; import { get } from '../fetcher'; import NewsPost from './NewsPost'; const NewsPage = React.createClass({ getInitialState() { return { posts: [] }; }, componentDidMount() { get('/posts').then(posts => this.setState({ posts })); }, ren...
Add missing setters for handshake.
package net.md_5.bungee.protocol.packet; import io.netty.buffer.ByteBuf; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; @Getter @Setter @ToString @EqualsAndHashCode(callSuper = false) public class Packet2Handshake extends DefinedPacket { private byte protocol...
package net.md_5.bungee.protocol.packet; import io.netty.buffer.ByteBuf; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; @Getter @ToString @EqualsAndHashCode(callSuper = false) public class Packet2Handshake extends DefinedPacket { private byte protocolVersion; private String us...
Set stories_set to read only field
from rest_framework import serializers from users.serializers import AuthorSerializer from .models import Story, StoryLine class StoryLineSerializer(serializers.ModelSerializer): class Meta: model = StoryLine fields = ('id', 'content', 'posted_on') class StorySerializer(serializers.ModelSeriali...
from rest_framework import serializers from users.serializers import AuthorSerializer from .models import Story, StoryLine class StoryLineSerializer(serializers.ModelSerializer): class Meta: model = StoryLine fields = ('id', 'content', 'posted_on') class StorySerializer(serializers.ModelSeriali...
Fix Permission denied on Configuration tab for Administrator Strangely, `this.get('session.user.isAdmin')` returned undefined even though session.user was correctly set. Replacing with working `this.get('session').get('user').get('isAdmin')`
/** * Nanocloud turns any traditional software into a cloud solution, without * changing or redeveloping existing source code. * * Copyright (C) 2016 Nanocloud Software * * This file is part of Nanocloud. * * Nanocloud is free software; you can redistribute it and/or modify * it under the terms of the GNU Affe...
/** * Nanocloud turns any traditional software into a cloud solution, without * changing or redeveloping existing source code. * * Copyright (C) 2016 Nanocloud Software * * This file is part of Nanocloud. * * Nanocloud is free software; you can redistribute it and/or modify * it under the terms of the GNU Affe...
Add back code which is needed.
# Licensed to the StackStorm, Inc ('StackStorm') 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 not use th...
# Licensed to the StackStorm, Inc ('StackStorm') 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 not use th...
Add global navigator setting to modify the error, 'navigator is not defined', in testing with react-router link
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
Introduce a warning to test the shiny new CI
package main import ( "bufio" "fmt" "net/http" "net/http/httptest" "net/http/httputil" "golang.org/x/crypto/ssh" ) func handleDirectTCPIPChannel(channel ssh.Channel, port uint32) (string, error) { switch port { case 80: return handleHTTPChannel(channel) return "", nil default: return "", fmt.Errorf("u...
package main import ( "bufio" "fmt" "net/http" "net/http/httptest" "net/http/httputil" "golang.org/x/crypto/ssh" ) func handleDirectTCPIPChannel(channel ssh.Channel, port uint32) (string, error) { switch port { case 80: return handleHTTPChannel(channel) default: return "", fmt.Errorf("unsupported port %...
Switch libraryTarget from var to umd
module.exports = { context: __dirname, entry: './src/index.jsx', output: { path: './build', filename: 'index.js', library: 'CalendarHeatmap', libraryTarget: 'umd' }, resolve: { extensions: ['', '.js', '.jsx'], modulesDirectories: ['node_modules'] }, externals: { 'react': { ...
module.exports = { context: __dirname, entry: './src/index.jsx', output: { path: './build', filename: 'index.js', library: 'CalendarHeatmap', libraryTarget: 'var' }, resolve: { extensions: ['', '.js', '.jsx'], modulesDirectories: ['node_modules'] }, externals: { 'react': { ...
Add exception if instagram result has non 200 status
<?php namespace Codenetix\SocialMediaImporter\Importers; use Codenetix\SocialMediaImporter\Exceptions\ImportException; use Codenetix\SocialMediaImporter\Exceptions\RequestedDataNotFoundException; use Codenetix\SocialMediaImporter\FactoryMethods\InstagramMediaAdapterFactoryMethod; use Codenetix\SocialMediaImporter\Scr...
<?php namespace Codenetix\SocialMediaImporter\Importers; use Codenetix\SocialMediaImporter\Exceptions\RequestedDataNotFoundException; use Codenetix\SocialMediaImporter\FactoryMethods\InstagramMediaAdapterFactoryMethod; use Codenetix\SocialMediaImporter\Scrapers\InstagramScraper; /** * @author Andrey Vorobiov<andrew...
Add servlet to handle text request submissions and send to Dialogflow
// Copyright 2019 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// Copyright 2019 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...