text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Add alias "test" to "nodeunit" task
module.exports = function( grunt ) { "use strict"; grunt.initConfig({ bump: { options: { files: [ "package.json" ], // Commit commit: true, commitMessage: "Release v%VERSION%", commitFiles: [ "package.json" ], ...
module.exports = function( grunt ) { "use strict"; grunt.initConfig({ bump: { options: { files: [ "package.json" ], // Commit commit: true, commitMessage: "Release v%VERSION%", commitFiles: [ "package.json" ], ...
Use the real path to load yaml resources
<?php namespace LAG\AdminBundle\Resource\Loader; use Exception; use Symfony\Component\Filesystem\Exception\FileNotFoundException; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; use Symfony\Component\Yaml\Yaml; class ResourceLoader { /** * Load admins configuration in the y...
<?php namespace LAG\AdminBundle\Resource\Loader; use Exception; use Symfony\Component\Filesystem\Exception\FileNotFoundException; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; use Symfony\Component\Yaml\Yaml; class ResourceLoader { /** * Load admins configuration in the y...
Make it just return the string if it is not base64
import zlib import base64 import binascii from django.db import models from django.core import exceptions class ZipField(models.Field): def db_type(self, connection): return 'bytea' def pre_save(self, model_instance, add): value = getattr(model_instance, self.attname) assert isinsta...
import zlib import base64 import binascii from django.db import models from django.core import exceptions class ZipField(models.Field): def db_type(self, connection): return 'bytea' def pre_save(self, model_instance, add): value = getattr(model_instance, self.attname) assert isinsta...
Remove return state from main `main`
import time import transitions from panoptes.utils.logger import has_logger @has_logger class PanState(transitions.State): """ Base class for PANOPTES transitions """ def __init__(self, *args, **kwargs): name = kwargs.get('name', self.__class__) self.panoptes = kwargs.get('panoptes', None)...
import time import transitions from panoptes.utils.logger import has_logger @has_logger class PanState(transitions.State): """ Base class for PANOPTES transitions """ def __init__(self, *args, **kwargs): name = kwargs.get('name', self.__class__) self.panoptes = kwargs.get('panoptes', None)...
Replace reference to non-existent Precondtions2 Removed in jclouds 1.6.
/** * Licensed to jclouds, Inc. (jclouds) under one or more * contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. jclouds licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
/** * Licensed to jclouds, Inc. (jclouds) under one or more * contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. jclouds licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
Add check for active and registered users
""" This migration subscribes each user to USER_SUBSCRIPTIONS_AVAILABLE if a subscription does not already exist. """ import logging import sys from website.app import init_app from website import models from website.notifications.model import NotificationSubscription from website.notifications import constants from ...
""" This migration subscribes each user to USER_SUBSCRIPTIONS_AVAILABLE if a subscription does not already exist. """ import logging import sys from website.app import init_app from website import models from website.notifications.model import NotificationSubscription from website.notifications import constants from ...
Fix a problem with this object passed to each expanded test function
/*! * data-driven * Copyright(c) 2013 Fluent Software Solutions Ltd <info@fluentsoftware.co.uk> * MIT Licensed */ module.exports = function(data, fn) { var mochaIt = it var mochaBefore = before data.forEach(function(testData) { try { it = function(title, f) { for (...
/*! * data-driven * Copyright(c) 2013 Fluent Software Solutions Ltd <info@fluentsoftware.co.uk> * MIT Licensed */ module.exports = function(data, fn) { var mochaIt = it var mochaBefore = before data.forEach(function(testData) { try { it = function(title, f) { for (...
Add support for 'scenario' blocks
import sublime, sublime_plugin, re class ToggleRspecFocusCommand(sublime_plugin.TextCommand): def run(self, edit, surplus=False): for region in self.view.sel(): line = self.view.line(region) line_contents = self.view.substr(line) focus_regex = r'.*(?:it|describe|context...
import sublime, sublime_plugin, re class ToggleRspecFocusCommand(sublime_plugin.TextCommand): def run(self, edit, surplus=False): for region in self.view.sel(): line = self.view.line(region) line_contents = self.view.substr(line) focus_regex = r'.*(?:it|describe|context...
Make actions and properties module conform to plugin-api
const Plugin = require('imdone-api') const _path = require('path') const { statSync } = require('fs') module.exports = class ExtensionPlugin extends Plugin { constructor(project) { super(project) console.log('loading extensions') this.configDir = _path.join(project.path, '.imdone') this.cardActionsF...
const Plugin = require('imdone-api') const _path = require('path') const { statSync } = require('fs') module.exports = class ExtensionPlugin extends Plugin { constructor(project) { super(project) console.log('loading extensions') this.configDir = _path.join(project.path, '.imdone') this.cardActionsF...
Use null user by default instead of 0
<?php namespace Yajra\Auditable; use Illuminate\Database\Eloquent\Model; class AuditableTraitObserver { /** * Model's creating event hook. * * @param Model $model */ public function creating(Model $model) { if (! $model->created_by) { $model->created_by = $this->ge...
<?php namespace Yajra\Auditable; use Illuminate\Database\Eloquent\Model; class AuditableTraitObserver { /** * Model's creating event hook. * * @param Model $model */ public function creating(Model $model) { if (! $model->created_by) { $model->created_by = $this->ge...
Add missing import to getTILrc
import fs from 'fs'; import { getTILrc } from './helpers'; export function mkdir(dir) { return new Promise((resolve, reject) => { fs.mkdir(dir, (err) => { if (err) { reject(err); } else { resolve(); } }); }); } export function exists(dir) { return new Promise((resolve, ...
import fs from 'fs'; export function mkdir(dir) { return new Promise((resolve, reject) => { fs.mkdir(dir, (err) => { if (err) { reject(err); } else { resolve(); } }); }); } export function exists(dir) { return new Promise((resolve, reject) => { // TODO check for cor...
Add newline to end of file
<?php namespace Paulboco\Powerball\Drawings; class DrawingFacade { /** * The file handler instance. * * @var Paulboco\Powerball\Drawings\FileHandler */ private $handler; /** * The file handler instance. * * @var Paulboco\Powerball\Drawings\FileParser */ private...
<?php namespace Paulboco\Powerball\Drawings; class DrawingFacade { /** * The file handler instance. * * @var Paulboco\Powerball\Drawings\FileHandler */ private $handler; /** * The file handler instance. * * @var Paulboco\Powerball\Drawings\FileParser */ private...
Revert omission of image size Turns out this is still required in SVG mode :D
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <toby.zerner@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Flarum\Emoji\Listener; use Flarum\Event\ConfigureFormatter; use Illuminate\Contracts\E...
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <toby.zerner@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Flarum\Emoji\Listener; use Flarum\Event\ConfigureFormatter; use Illuminate\Contracts\E...
Use a bit better regex for XML error workaround, actually failable compile
import re import xml.etree.ElementTree as ET from os import path from tmc.exercise_tests.basetest import BaseTest, TestResult class CheckTest(BaseTest): def __init__(self): super().__init__("Check") def applies_to(self, exercise): return path.isfile(path.join(exercise.path(), "Makefile")) ...
import xml.etree.ElementTree as ET from os import path from tmc.exercise_tests.basetest import BaseTest, TestResult class CheckTest(BaseTest): def __init__(self): super().__init__("Check") def applies_to(self, exercise): return path.isfile(path.join(exercise.path(), "Makefile")) def te...
Remove interest group delete button I think we decided sometime that we'd make it not possible to delete groups, so it doens't make any sense having the button here.
// @flow import React, { Component } from 'react'; import GroupForm from 'app/components/GroupForm'; import styles from './InterestGroup.css'; import { Flex, Content } from 'app/components/Layout'; import { Link } from 'react-router'; import Button from 'app/components/Button'; export default class InterestGroupEdit e...
// @flow import React, { Component } from 'react'; import GroupForm from 'app/components/GroupForm'; import styles from './InterestGroup.css'; import { Flex, Content } from 'app/components/Layout'; import { Link } from 'react-router'; import Button from 'app/components/Button'; export default class InterestGroupEdit e...
Send json to semanticizer stdin
import json import subprocess class Semanticizer: ''' Wrapper for semanticizest go implementation. ''' def __init__(self, model='nl.go.model', stPath='./bin/semanticizest'): ''' Create an instance of Semanticizer. Arguments: model -- Language model created by semanticizest-dumpparse...
import json import subprocess class Semanticizer: ''' Wrapper for semanticizest go implementation. ''' def __init__(self, model='nl.go.model', stPath='./bin/semanticizest'): ''' Create an instance of Semanticizer. Arguments: model -- Language model created by semanticizest-dumpparse...
Check if not already started before starting updates
'use strict'; var postal = require('postal'); var raf = require('raf'); var FluzoStore = require('fluzo-store')(postal); var fluzo_channel = postal.channel('fluzo'); var render_pending = false; var render_suscriptions = []; var updating = false; var Fluzo = { Store: FluzoStore, action: FluzoStore.action, ...
'use strict'; var postal = require('postal'); var raf = require('raf'); var FluzoStore = require('fluzo-store')(postal); var fluzo_channel = postal.channel('fluzo'); var render_pending = false; var render_suscriptions = []; var updating = false; var Fluzo = { Store: FluzoStore, action: FluzoStore.action, ...
Fix utilities path from helpers to commands
var elixir = require('laravel-elixir'); var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var pngquant = require('imagemin-pngquant'); var notify = require('gulp-notify'); var _ = require('underscore'); var utilities = require('laravel-elixir/ingredients/commands/utilities'); /* |------------------...
var elixir = require('laravel-elixir'); var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var pngquant = require('imagemin-pngquant'); var notify = require('gulp-notify'); var _ = require('underscore'); var utilities = require('laravel-elixir/ingredients/helpers/utilities'); /* |-------------------...
Fix default branch selection in post-commit UI. The refactoring and improvements I did to `RB.CollectionView` broke the selection of the default branch in the post-commit section of the New Review Request UI. This wasn't super critical, except in the case where there's only a single branch, in which case the commits w...
/* * A view for a collection of branches. * * This is presented as a <select> in the document. * * Users can listen to the "selected" event to know which branch is currently * chosen. This event will be triggered with the branch model as its argument. */ RB.BranchesView = RB.CollectionView.extend({ tagName: ...
/* * A view for a collection of branches. * * This is presented as a <select> in the document. * * Users can listen to the "selected" event to know which branch is currently * chosen. This event will be triggered with the branch model as its argument. */ RB.BranchesView = RB.CollectionView.extend({ tagName: ...
Make logged in user endpoint available w/o token
from rest_framework import serializers, views, permissions, response from .models import User class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ('id', 'private') def to_representation(self, obj): default = super(UserSerializer, self).to_r...
from rest_framework import serializers, views, permissions, response from oauth2_provider.contrib.rest_framework import TokenHasScope from .models import User class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ('id',) def to_representation(self, ...
Fix exceptions in dependency injection configuration
<?php namespace Bundle\DoctrineUserBundle\DependencyInjection; use Symfony\Components\DependencyInjection\Extension\Extension; use Symfony\Components\DependencyInjection\Loader\XmlFileLoader; use Symfony\Components\DependencyInjection\Loader\YamlFileLoader; use Symfony\Components\DependencyInjection\ContainerBuilder;...
<?php namespace Bundle\DoctrineUserBundle\DependencyInjection; use Symfony\Components\DependencyInjection\Extension\Extension; use Symfony\Components\DependencyInjection\Loader\XmlFileLoader; use Symfony\Components\DependencyInjection\Loader\YamlFileLoader; use Symfony\Components\DependencyInjection\ContainerBuilder;...
Fix remove core source dependency
import { error } from '../debug'; function camelToDash(str) { return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); } export default function style({ node, expr }, ...propertyNames) { if (!propertyNames.length) { return (list, { type: globalType, oldValue, changelog }) => { switch (globalType) {...
import { camelToDash } from '@hybrids/core/src/utils'; import { error } from '../debug'; export default function style({ node, expr }, ...propertyNames) { if (!propertyNames.length) { return (list, { type: globalType, oldValue, changelog }) => { switch (globalType) { case 'modify': Object...
Return Count Check compilable UT input
package com.puppycrawl.tools.checkstyle.coding; /* ะบะพะผะผะตะฝั‚ะฐั€ะธะน ะฝะฐ ั€ัƒััะบะพะผ */ public class InputReturnCount { public boolean equals(Object obj) { int i = 1; switch (i) { case 1: return true; case 2: return true; case 3: return true; case 4: return true; case 5:...
package com.puppycrawl.tools.checkstyle.checks.coding; /* ะบะพะผะผะตะฝั‚ะฐั€ะธะน ะฝะฐ ั€ัƒััะบะพะผ */ public class InputReturnCount { public boolean equals(Object obj) { int i = 1; switch (i) { case 1: return true; case 2: return true; case 3: return true; case 4: return true; ...
Remove banner comment from minified bundled file. Fixes #55
'use strict'; module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), browserify: { dist: { files: { 'build/stanzaio.bundle.js': ['<%= pkg.main %>'] }, options: { ...
'use strict'; module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), browserify: { dist: { files: { 'build/stanzaio.bundle.js': ['<%= pkg.main %>'] }, options: { ...
:bug: Fix static css source map
// @flow import path from 'path' import invariant from 'assert' import { createChunkGenerator, getFileKey } from 'pundle-api' import manifest from '../package.json' function createComponent() { return createChunkGenerator({ name: 'pundle-chunk-generator-static', version: manifest.version, async callbac...
// @flow import path from 'path' import invariant from 'assert' import { createChunkGenerator, getFileKey } from 'pundle-api' import manifest from '../package.json' function createComponent() { return createChunkGenerator({ name: 'pundle-chunk-generator-static', version: manifest.version, async callbac...
Set local debug to true.
<?php // direct access protection if(!defined('KIRBY')) die('Direct access is not allowed'); /* ----------------------------------------------------------------------------- Troubleshooting -------------------------------------------------------------------------------- */ c::set('troubleshoot', false); /* ------...
<?php // direct access protection if(!defined('KIRBY')) die('Direct access is not allowed'); /* ----------------------------------------------------------------------------- Troubleshooting -------------------------------------------------------------------------------- */ c::set('troubleshoot', false); /* ------...
[FIX] medical_prescription_sale: Add dependency * Add dependency on stock to manifest file. This is needed by some of the demo data in the module, which was not installing due to its absence.
# -*- coding: utf-8 -*- # ยฉ 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Prescription Sales', 'summary': 'Create Sale Orders from Prescriptions', 'version': '9.0.0.1.0', 'author': "LasLabs, Odoo Community Association (OCA)", 'category': ...
# -*- coding: utf-8 -*- # ยฉ 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Prescription Sales', 'summary': 'Create Sale Orders from Prescriptions', 'version': '9.0.0.1.0', 'author': "LasLabs, Odoo Community Association (OCA)", 'category': ...
Adjust root url setting for production build
/* eslint-env node */ var pkg = require('../package.json'); module.exports = function (environment) { var rootURL = environment === 'production' ? '' : '/'; var ENV = { modulePrefix: 'purecloud-skype', environment: environment, rootURL: rootURL, locationType: 'hash', Em...
/* eslint-env node */ var pkg = require('../package.json'); module.exports = function (environment) { var rootURL = '/'; var ENV = { modulePrefix: 'purecloud-skype', environment: environment, rootURL: rootURL, locationType: 'hash', EmberENV: { FEATURES: { ...
Update gulp paths to scan recusrively
var gulp = require('gulp'); var phpunit = require('gulp-phpunit'); var phplint = require('gulp-phplint'); var watch = require('gulp-watch'); var notifier = require('node-notifier'); var debug = require('gulp-debug'); var map = ['src/**/*.php', 'tests/**/*.php']; gulp.task('dev', function(cb) { var options = { ...
var gulp = require('gulp'); var phpunit = require('gulp-phpunit'); var phplint = require('gulp-phplint'); var watch = require('gulp-watch'); var notifier = require('node-notifier'); var debug = require('gulp-debug'); var map = ['src/*.php', 'tests/*.php']; gulp.task('dev', function(cb) { var options = { ...
Fix transpilation error to support React Native Recent versions of Babel will throw a TransformError in certain runtimes if any property on `Symbol` is assigned a value. This fixes the issue, which is the last remaining issue for React Native support.
var objectTypes = { "boolean": false, "function": true, "object": true, "number": false, "string": false, "undefined": false }; /*eslint-disable */ var _root = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window); var freeGlobal = objectTypes[typeof global] && global; i...
var objectTypes = { "boolean": false, "function": true, "object": true, "number": false, "string": false, "undefined": false }; /*eslint-disable */ var _root = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window); var freeGlobal = objectTypes[typeof global] && global; i...
Return new AppUtil instance from init call
module.exports = { init: init }; var util = require("util"); var FrameInputStream = require("./frame_input_stream"); function AppUtil(argv){ this.argv = argv; } function init(argv){ return new AppUtil(argv); } AppUtil.prototype.log = function(message){ if(this.argv.verbose){ util.print(messa...
module.exports = new AppUtil(); var util = require("util"); var FrameInputStream = require("./frame_input_stream"); function AppUtil(){ } AppUtil.prototype.init = function(argv){ this.argv = argv; return this; }; AppUtil.prototype.log = function(message){ if(this.argv.verbose){ util.print(m...
Allow integer-only session name and hash for the example
#!/usr/bin/env python3 import traceback from telethon.interactive_telegram_client import (InteractiveTelegramClient, print_title) def load_settings(path='api/settings'): """Loads the user settings located under `api/`""" result = {} with open(path, 'r', e...
#!/usr/bin/env python3 import traceback from telethon.interactive_telegram_client import (InteractiveTelegramClient, print_title) def load_settings(path='api/settings'): """Loads the user settings located under `api/`""" result = {} with open(path, 'r', e...
Allow to set context to null
<?php /* * Mendo Framework * * (c) Mathieu Decaffmeyer <mdecaffmeyer@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mendo\Router; use Mendo\Http\Request\HttpRequestInterface; /** * @author Mathieu Decaffm...
<?php /* * Mendo Framework * * (c) Mathieu Decaffmeyer <mdecaffmeyer@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mendo\Router; use Mendo\Http\Request\HttpRequestInterface; /** * @author Mathieu Decaffm...
Fix the response from Wit:
'use strict'; const _ = require('lodash'); const Promise = require('bluebird'); const Facebook = require('./facebook'); const sessions = require('./sessions'); const keepr = require('./keepr'); const config = require('../../config'); module.exports = { actions: { send: ({sessionId}, {text}) => { const re...
'use strict'; const _ = require('lodash'); const Promise = require('bluebird'); const Facebook = require('./facebook'); const sessions = require('./sessions'); const keepr = require('./keepr'); const config = require('../../config'); module.exports = { actions: { send: (request, response) => { const sess...
Throw SQLException and ClassNotFoundException from getJdbcConnection method
package database; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; /** * Connect to SQL Server database using ConnectionCredentials object. */ public class DatabaseConnector { private String connectionUrl = ""; private ConnectionCredentials credentials; /** ...
package database; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; /** * Connect to SQL Server database using ConnectionCredentials object. */ public class DatabaseConnector { private String connectionUrl = ""; private ConnectionCredentials credentials; /** ...
Add the import for CommandError
# This script deactivates a particular generation from optparse import make_option from django.core.management.base import BaseCommand, CommandError from mapit.models import Generation class Command(BaseCommand): help = 'Deactivate a generation' args = '<GENERATION-ID>' option_list = BaseCommand.option_li...
# This script deactivates a particular generation from optparse import make_option from django.core.management.base import BaseCommand from mapit.models import Generation class Command(BaseCommand): help = 'Deactivate a generation' args = '<GENERATION-ID>' option_list = BaseCommand.option_list + ( ...
Copy doc to index.html to fix the project page.
/*jshint node: true, camelcase: false */ 'use strict'; module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { files: [ 'Gruntfile.js', 'jquery.iframe-transport.js' ], options: { jshintrc: '.jshintrc' } }...
/*jshint node: true, camelcase: false */ 'use strict'; module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { files: [ 'Gruntfile.js', 'jquery.iframe-transport.js' ], options: { jshintrc: '.jshintrc' } }...
Fix weird "0" notification numbers Summary: The JsShrink change swapped an "== 0" for "=== 0" in JS, but we're currently sending a string down. Fixes T3230. Test Plan: I'm not 100% sure this actually fixes it but probably? Let me know if you still see it. Reviewers: chad, btrahan Reviewed By: chad CC: aran Maniph...
<?php final class PhabricatorNotificationPanelController extends PhabricatorNotificationController { public function processRequest() { $request = $this->getRequest(); $user = $request->getUser(); $query = new PhabricatorNotificationQuery(); $query->setViewer($user); $query->setUserPHID($use...
<?php final class PhabricatorNotificationPanelController extends PhabricatorNotificationController { public function processRequest() { $request = $this->getRequest(); $user = $request->getUser(); $query = new PhabricatorNotificationQuery(); $query->setViewer($user); $query->setUserPHID($use...
Move template functions out of `Config.load()`
import os import yaml from subprocess import check_output, CalledProcessError from colors import red from jinja2 import Template class Config(): @staticmethod def env(key): """Return the value of the `key` environment variable.""" try: return os.environ[key] except KeyErr...
import os import yaml from subprocess import check_output, CalledProcessError from colors import red from jinja2 import Template class Config(): @staticmethod def load(config_file='brume.yml'): """Return the YAML configuration for a project based on the `config_file` template.""" template_fu...
BAP-10771: Migrate data audit command to be executed in new message queue. Sort entities in data audit grid filter alphabetically
<?php namespace Oro\Bundle\DataAuditBundle\Datagrid; use Oro\Bundle\DataAuditBundle\Provider\AuditConfigProvider; use Oro\Bundle\DataGridBundle\Datasource\ResultRecord; use Oro\Bundle\EntityBundle\Provider\EntityClassNameProviderInterface; class EntityTypeProvider { /** @var EntityClassNameProviderInterface */ ...
<?php namespace Oro\Bundle\DataAuditBundle\Datagrid; use Oro\Bundle\DataAuditBundle\Provider\AuditConfigProvider; use Oro\Bundle\DataGridBundle\Datasource\ResultRecord; use Oro\Bundle\EntityBundle\Provider\EntityClassNameProviderInterface; class EntityTypeProvider { /** @var EntityClassNameProviderInterface */ ...
Fix rootURL issue with docs
'use strict'; module.exports = function(environment) { const ENV = { modulePrefix: 'dummy', environment, rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: ...
'use strict'; module.exports = function(environment) { const ENV = { modulePrefix: 'dummy', environment, rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: ...
Update lazy helper to support the idea of a reset on bad state.
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): import os if cls._driver is None: from pyvirtualdisplay import Display cls._display = display display = Display(visible=0...
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): import os if cls._driver is None: from pyvirtualdisplay import Display display = Display(visible=0, size=(800, 600)) disp...
Fix get images array index
<?php namespace Milax\Mconsole\Http\Controllers\API; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Milax\Mconsole\Models\Image as ImageModel; use Image; use File; class ImagesController extends Controller { protected $uploadDir; protected $uploadUrl; protected $scriptUrl; ...
<?php namespace Milax\Mconsole\Http\Controllers\API; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Milax\Mconsole\Models\Image as ImageModel; use Image; use File; class ImagesController extends Controller { protected $uploadDir; protected $uploadUrl; protected $scriptUrl; ...
Remove before normalization and use blue light as default
<?php namespace Avanzu\AdminThemeBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://s...
<?php namespace Avanzu\AdminThemeBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://s...
Fix super call for python2
import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): try: s...
import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): super().__init__(c...
CHange name so it isn't reset
import sys import os ''' Easier searching for good RFI flagging values ''' try: ms_name = sys.argv[1] except IndexError: ms_name = raw_input("Input vis? : ") # Just want the number of SPWs tb.open(os.path.join(ms_name, "SPECTRAL_WINDOW")) nchans = tb.getcol('NUM_CHAN') tb.close() spws = range(len(nchans)) ...
import sys import os ''' Easier searching for good RFI flagging values ''' try: vis = sys.argv[1] except IndexError: vis = raw_input("Input vis? : ") # Just want the number of SPWs tb.open(os.path.join(vis, "SPECTRAL_WINDOW")) nchans = tb.getcol('NUM_CHAN') tb.close() spws = range(len(nchans)) default('fl...
Change redirects to project form
ProjectsController.$inject = [ 'TbUtils', 'projects', '$rootScope' ]; function ProjectsController(TbUtils, projects, $rootScope) { const vm = this; vm.searchObj = term => { return { Name: term }; }; vm.searchResults = []; vm.pageSize = 9; vm.get = projects.getProjectsWithPagination; vm.getAll...
ProjectsController.$inject = [ 'TbUtils', 'projects', '$rootScope' ]; function ProjectsController(TbUtils, projects, $rootScope) { const vm = this; vm.searchObj = term => { return { Name: term }; }; vm.searchResults = []; vm.pageSize = 9; vm.get = projects.getProjectsWithPagination; vm.getAll...
Fix strategizer choice view choice selection in update view
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.u2.view', name: 'StrategizerChoiceView', extends: 'foam.u2.view.ChoiceView', documentation: 'A choice view that gets its choices array from Strategizer.', i...
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.u2.view', name: 'StrategizerChoiceView', extends: 'foam.u2.view.ChoiceView', documentation: 'A choice view that gets its choices array from Strategizer.', i...
Use .search for browser compatibility.
module.exports = WatchIgnorePlugin function WatchIgnorePlugin(paths) { this.paths = paths } WatchIgnorePlugin.prototype.apply = function (compiler) { compiler.plugin('after-environment', function () { compiler.watchFileSystem = new IgnoringWatchFileSystem(compiler.watchFileSystem, this.paths) }.bi...
module.exports = WatchIgnorePlugin function WatchIgnorePlugin(paths) { this.paths = paths } WatchIgnorePlugin.prototype.apply = function (compiler) { compiler.plugin('after-environment', function () { compiler.watchFileSystem = new IgnoringWatchFileSystem(compiler.watchFileSystem, this.paths) }.bi...
Change default welcome page to include menu (We'll jettison the welcome page in due course)
<!DOCTYPE html> <html> <head> <title>Laravel</title> <link href="//fonts.googleapis.com/css?family=Lato:300" rel="stylesheet" type="text/css"> <style> html, body { height: 100%; } body { margin: 0; padding...
<!DOCTYPE html> <html> <head> <title>Laravel</title> <link href="//fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> <style> html, body { height: 100%; } body { margin: 0; padding...
Correct unit tests to comply with new team name RE
from django.test import TestCase from django.template.defaultfilters import slugify from django.core.exceptions import ValidationError from competition.validators import greater_than_zero, non_negative, validate_name class ValidationFunctionTest(TestCase): def test_greater_than_zero(self): """Check grea...
from django.test import TestCase from django.template.defaultfilters import slugify from django.core.exceptions import ValidationError from competition.validators import greater_than_zero, non_negative, validate_name class ValidationFunctionTest(TestCase): def test_greater_than_zero(self): """Check grea...
Load fixtures for the Abac tests
<?php namespace PhpAbac\Test; use PhpAbac\Abac; class AbacTest extends AbacTestCase { /** @var Abac **/ protected $abac; public function setUp() { $this->abac = new Abac(new \PDO( 'mysql:host=' . $GLOBALS['MYSQL_DB_HOST'] . ';' . 'dbname=' . $GLOBALS['MYSQL_DB_DBNAME'...
<?php namespace PhpAbac\Test; use PhpAbac\Abac; class AbacTest extends \PHPUnit_Framework_TestCase { public function setUp() { new Abac(new \PDO( 'mysql:host=' . $GLOBALS['MYSQL_DB_HOST'] . ';' . 'dbname=' . $GLOBALS['MYSQL_DB_DBNAME'], $GLOBALS['MYSQL_DB_USER'], ...
FIX mailing_contact merge fields value
############################################################################## # # Copyright (C) 2021 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # #####################...
############################################################################## # # Copyright (C) 2021 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # #####################...
Fix main failing on no event_callback
"""Read events and parameters from your Axis device.""" import asyncio import argparse import logging import sys from axis import AxisDevice async def main(args): loop = asyncio.get_event_loop() device = AxisDevice( loop=loop, host=args.host, username=args.username, password=args.password, p...
"""Read events and parameters from your Axis device.""" import asyncio import argparse import logging import sys from axis import AxisDevice async def main(args): loop = asyncio.get_event_loop() device = AxisDevice( loop=loop, host=args.host, username=args.username, password=args.password, p...
Enable Wikidata for Wikimedia Commons Change-Id: Ibc8734f65dcd97dc7af9674efe8655fe01dc61d3
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikimedia Commons family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'commons' self.langs = { 'commons': 'commons.wikimedia.org', ...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikimedia Commons family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'commons' self.langs = { 'commons': 'commons.wikimedia.org', ...
Secure index access and type safe comparision in statistic median
<?php declare(strict_types=1); namespace Phpml\Math\Statistic; use Phpml\Exception\InvalidArgumentException; class Mean { /** * @param array $numbers * * @return float * * @throws InvalidArgumentException */ public static function arithmetic(array $numbers) { self::...
<?php declare(strict_types=1); namespace Phpml\Math\Statistic; use Phpml\Exception\InvalidArgumentException; class Mean { /** * @param array $numbers * * @return float * * @throws InvalidArgumentException */ public static function arithmetic(array $numbers) { self::...
Fix unaesthetic bug where All Questions sidebar item is highlighted even when New Question sidebar item is selected and All Questions is not
// @flow import React, { Component } from "react"; import "./AdminSidebar.css"; import { Col, Nav, NavItem, NavLink } from "reactstrap"; import { NavLink as Link } from "react-router-dom"; import LessonSidebar from "../LessonSidebar"; class AdminSidebar extends Component { render() { return ( <Col sm="3" ...
// @flow import React, { Component } from "react"; import "./AdminSidebar.css"; import { Col, Nav, NavItem, NavLink } from "reactstrap"; import { NavLink as Link } from "react-router-dom"; import LessonSidebar from "../LessonSidebar"; class AdminSidebar extends Component { render() { return ( <Col sm="3" ...
Sort rules lists (take 2)
(function () { var cogClass = function () {}; cogClass.prototype.exec = function (params, request, response) { var oops = this.utils.apiError; var sys = this.sys; var ruleGroupID = params.groupid; console.log("ruleGroupID="+ruleGroupID); var sql = 'SELECT ruleID,string,ad...
(function () { var cogClass = function () {}; cogClass.prototype.exec = function (params, request, response) { var oops = this.utils.apiError; var sys = this.sys; var ruleGroupID = params.groupid; console.log("ruleGroupID="+ruleGroupID); var sql = 'SELECT ruleID,string,ad...
Set default value for city
var User = require('../models/user.js'); var TwitterStrategy = require('passport-twitter').Strategy; module.exports = function (passport) { passport.use(new TwitterStrategy({ consumerKey: process.env.NMDICO_CONSUMER_KEY, consumerSecret: process.env.NMDICO_CONSUMER_SECRET, callbackURL: process.env.N...
var User = require('../models/user.js'); var TwitterStrategy = require('passport-twitter').Strategy; module.exports = function (passport) { passport.use(new TwitterStrategy({ consumerKey: process.env.NMDICO_CONSUMER_KEY, consumerSecret: process.env.NMDICO_CONSUMER_SECRET, callbackURL: process.env.N...
Fix a typo: patform -> platform
import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-platform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().to_string() ...
import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-patform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().to_string() ...
Add code comment for server-start-chatting
import io from 'socket.io-client'; function realtimeConnector(cookie, realtimeUrl, roomId, handleNewMessageCallback, handleNextCallback, disableChatCallback) { this._chatting = false; this._socket = io.connect(realtimeUrl, {'forceNew': true}); this._socket.on('connect', () => { this._socket.emit('c...
import io from 'socket.io-client'; function realtimeConnector(cookie, realtimeUrl, roomId, handleNewMessageCallback, handleNextCallback, disableChatCallback) { this._chatting = false; this._socket = io.connect(realtimeUrl, {'forceNew': true}); this._socket.on('connect', () => { this._socket.emit('c...
Fix type hint, setEncryption accept string parameter
<?php /* * This file is part of SwiftMailer. * (c) 2004-2009 Chris Corbyn * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Sends Messages over SMTP with ESMTP support. * @package Swift * @subpackage Transport * @author Ch...
<?php /* * This file is part of SwiftMailer. * (c) 2004-2009 Chris Corbyn * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Sends Messages over SMTP with ESMTP support. * @package Swift * @subpackage Transport * @author Ch...
Use actual constant name (molar_gas_constant)
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) import math def nernst_potential(ion_conc_out, ion_conc_in, charge, T, constants=None, units=None, backend=math): """ Calculates the Nernst potential using the Nernst equation for a particular i...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) import math def nernst_potential(ion_conc_out, ion_conc_in, charge, T, constants=None, units=None, backend=math): """ Calculates the Nernst potential using the Nernst equation for a particular i...
Fix issue with guava preconditions check in logback setup
package com.intuso.housemate.platform.pc; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.util.StatusPrinter; import com.intuso.housemate.client.v1_0.api.HousemateException; import org.sl...
package com.intuso.housemate.platform.pc; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.util.StatusPrinter; import com.google.common.base.Preconditions; import org.slf4j.LoggerFactory; ...
Document finder tests better and use better terminology (the thing that collects found objects isn't a finder, it's a collector)
import unittest from testdoc.finder import find_tests class MockCollector(object): def __init__(self): self.log = [] def got_module(self, module): self.log.append(('module', module)) def got_test_class(self, klass): self.log.append(('class', klass)) def got_test(self, metho...
import unittest from testdoc.finder import find_tests class MockFinder(object): def __init__(self): self.log = [] def got_module(self, module): self.log.append(('module', module)) def got_test_class(self, klass): self.log.append(('class', klass)) def got_test(self, method):...
Fix posting messages with smiles
package com.perm.kate.api; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.TreeMap; import java.util.Map.Entry; public class Params { TreeMap<String, String> args = new TreeMap<String, String>(); String method_name; public Params(String method_name...
package com.perm.kate.api; import java.net.URLEncoder; import java.util.TreeMap; import java.util.Map.Entry; public class Params { TreeMap<String, String> args = new TreeMap<String, String>(); String method_name; public Params(String method_name){ this.method_name=method_name; ...
Add call to AuthService for logout
/** * LoginActions * Actions for helping with login */ import { browserHistory } from 'react-router'; import Parse from 'parse'; import AuthService from '../middleware/api/Authentication'; export const LOGIN_REQUEST = "LOGIN_REQUEST"; export const LOGIN_SUCCESS = "LOGIN_SUCCESS"; export const LOGIN_FAIL = "LOGIN_...
/** * LoginActions * Actions for helping with login */ import { browserHistory } from 'react-router'; import Parse from 'parse'; import AuthService from '../middleware/api/Authentication'; export const LOGIN_REQUEST = "LOGIN_REQUEST"; export const LOGIN_SUCCESS = "LOGIN_SUCCESS"; export const LOGIN_FAIL = "LOGIN_...
Fix layer selector bug not working properly
niclabs.insight.filter.LayerSelector = (function($) { /** * Construct a layer for the dashboard * * The layer selector provides an option to switch between layers of the dashboard * * @class niclabs.insight.filter.LayerSelector * @augments niclabs.insight.filter.Filter * @param ...
niclabs.insight.filter.LayerSelector = (function($) { /** * Construct a layer for the dashboard * * The layer selector provides an option to switch between layers of the dashboard * * @class niclabs.insight.filter.LayerSelector * @augments niclabs.insight.filter.Filter * @param ...
Update tests to match new render names.
const renders = require('../test/renders'); const pretty = require('pretty'); import assert from 'power-assert'; const AllComponents = require('../lib/components').default; const templates = require('../lib/templates').default; describe('Rendering Tests', () => { Object.keys(templates).forEach(framework => { de...
const renders = require('../test/renders'); const pretty = require('pretty'); import assert from 'power-assert'; const AllComponents = require('../lib/components').default; const templates = require('../lib/templates').default; describe('Rendering Tests', () => { Object.keys(templates).forEach(framework => { de...
Fix onLoad loading bug if livereactload transformer is not set
module.exports = { onLoad: function(callback) { if (typeof callback !== 'function') { throw new Error('"onLoad" must have a callback function'); } withLiveReactload(setupOnLoadHandlers) withoutLiveReactload(function() { setupOnLoadHandlers({}) }) function setupOnLoadHandlers(l...
module.exports = { onLoad: function(callback) { if (typeof callback !== 'function') { throw new Error('"onLoad" must have a callback function'); } withLiveReactload(function(lrload) { var winOnload = window.onload; if (!winOnload || !winOnload.__is_livereactload) { window.onlo...
Fix test to handle unkown transport on travis CI testing platform
<?php /** * Created by PhpStorm. * User: evaisse * Date: 02/06/15 * Time: 17:23 */ namespace evaisse\SimpleHttpBundle\Tests\Unit; class SslTest extends AbstractTests { /** * @expectedException evaisse\SimpleHttpBundle\Http\Exception\SslException * @expectedException evaisse\SimpleHttpBundle\Http\...
<?php /** * Created by PhpStorm. * User: evaisse * Date: 02/06/15 * Time: 17:23 */ namespace evaisse\SimpleHttpBundle\Tests\Unit; class SslTest extends AbstractTests { /** * @expectedException evaisse\SimpleHttpBundle\Http\Exception\SslException */ public function testSslValidationException()...
Set default for queue transport.
<?php namespace Vivait\DelayedEventBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * This is the class that validates and merges configuration fr...
<?php namespace Vivait\DelayedEventBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * This is the class that validates and merges configuration fr...
Fix a bug, when token ReflectionClass throws an exception that class is not an interface
<?php /** * Go! OOP&AOP PHP framework * * @copyright Copyright 2012, Lissachenko Alexander <lisachenko.it@gmail.com> * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ namespace Go\Aop\Support; use ReflectionClass; use Go\Aop\PointFilter; use TokenReflection\ReflectionCla...
<?php /** * Go! OOP&AOP PHP framework * * @copyright Copyright 2012, Lissachenko Alexander <lisachenko.it@gmail.com> * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ namespace Go\Aop\Support; use ReflectionClass; use Go\Aop\PointFilter; use TokenReflection\ReflectionCla...
Remove connect task from gruntfile
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-typescript'); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-open'); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), typescript: { base: { ...
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-typescript'); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-open'); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), ...
Use just a random string instead of uuid in shell name. python 2.4 lacks uuid module. Change-Id: I5a1d5339741af2f4defa67d17f557639cd30bb91 Reviewed-on: http://review.couchbase.org/12462 Tested-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com> Tested-by: Farshid Ghods <e312e45b3dfe8923eeb42f1...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provides info about a particular server. """ from usage import usage import restclient import simplejson import subprocess import sys import string import random class Info: def __init__(self): self.debug = False def _remoteShellName(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provides info about a particular server. """ from usage import usage import restclient import simplejson import subprocess import sys from uuid import uuid1 class Info: def __init__(self): self.debug = False def runCmd(self, cmd, server, port, ...
Use CI mode automatically if colours are not supported
<?php namespace Concise\Console; use Concise\Console\TestRunner\DefaultTestRunner; use Concise\Console\ResultPrinter\ResultPrinterProxy; use Concise\Console\ResultPrinter\DefaultResultPrinter; use Concise\Console\ResultPrinter\CIResultPrinter; class Command extends \PHPUnit_TextUI_Command { protected $ci = false...
<?php namespace Concise\Console; use Concise\Console\TestRunner\DefaultTestRunner; use Concise\Console\ResultPrinter\ResultPrinterProxy; use Concise\Console\ResultPrinter\DefaultResultPrinter; use Concise\Console\ResultPrinter\CIResultPrinter; class Command extends \PHPUnit_TextUI_Command { protected $ci = false...
Add mozfile to the dependency list
# 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/. from setuptools import setup, find_packages PACKAGE_VERSION = '0.1' deps = ['flask', 'manifestparser', ...
# 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/. from setuptools import setup, find_packages PACKAGE_VERSION = '0.1' deps = ['flask', 'manifestparser', ...
Add tests for add_header example
import glob from mitmproxy import utils, script from mitmproxy.proxy import config from netlib import tutils as netutils from netlib.http import Headers from . import tservers, tutils from examples import ( add_header, modify_form, ) def test_load_scripts(): example_dir = utils.Data(__name__).path("../...
import glob from mitmproxy import utils, script from mitmproxy.proxy import config from netlib import tutils as netutils from netlib.http import Headers from . import tservers, tutils from examples import ( modify_form, ) def test_load_scripts(): example_dir = utils.Data(__name__).path("../../examples") ...
Copy the type in the copy constructor. git-svn-id: 2eebe84b5b32eb059849d530d3c549d0da009da8@126243 cb919951-1609-0410-8833-993d306c94f7
/** * File: ConstantExpression.java * * Author: David Hay (dhay@localmatters.com) * Creation Date: Apr 22, 2010 * Creation Time: 4:11:11 PM * * Copyright 2010 Local Matters, Inc. * All Rights Reserved * * Last checkin: * $Author$ * $Revision$ * $Date$ */ package org.lesscss4j.model.expression; import ...
/** * File: ConstantExpression.java * * Author: David Hay (dhay@localmatters.com) * Creation Date: Apr 22, 2010 * Creation Time: 4:11:11 PM * * Copyright 2010 Local Matters, Inc. * All Rights Reserved * * Last checkin: * $Author$ * $Revision$ * $Date$ */ package org.lesscss4j.model.expression; import ...
Fix survey ID, machine description display
<h2><span class="label label-default">Pending surveys</span></h2> <table class="table table-striped table-hover"> <thead> <tr> <th>Survey ID</th> <th>Description</th> <th>Date Scheduled</th> <th>Test type</th> <th>Accession</th> <th>Survey Note</th> ...
<h2><span class="label label-default">Pending surveys</span></h2> <table class="table table-striped table-hover"> <thead> <tr> <th>Survey ID</th> <th>Description</th> <th>Date Scheduled</th> <th>Test type</th> <th>Accession</th> <th>Survey Note</th> ...
Use tabs to split request and response.
const React = require('react') const {Card, CardHeader, CardText} = require('material-ui/Card') const {Tabs, Tab} = require('material-ui/Tabs') /* eslint-disable react/jsx-indent */ module.exports = ({ request, response = { headers: [] } }) => { const headerMapper = (header, index) => <li key={`${header.key}-${index...
const React = require('react') const {Card, CardActions, CardHeader, CardText} = require('material-ui/Card') const FlatButton = require('material-ui/FlatButton').default /* eslint-disable react/jsx-indent */ module.exports = ({ request, response = { headers: [] } }) => { const headerMapper = (header, index) => <li k...
Convert lifetime to float instead of sympy type.
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
Tweak YUI `root` to not use "/build/" in URLs
var isProduction = process.env.NODE_ENV === 'production', version = require('../package').version, YUI_VERSION = '3.9.1'; module.exports = { version: YUI_VERSION, config: JSON.stringify({ combine: isProduction, filter : isProduction ? 'min' : 'raw', root : YUI_VERSION +...
var isProduction = process.env.NODE_ENV === 'production', version = require('../package').version; module.exports = { version: '3.9.1', config: JSON.stringify({ combine: isProduction, filter : isProduction ? 'min' : 'raw', modules: { 'mapbox-css': 'http://api.tile...
Fix mix ng1-ng2 example with $ctrl. The name of the default controller of the component is $ctrl.
"use strict"; (function () { angular .module("dummy", []); var upgradeAdapter = new ng.upgrade.UpgradeAdapter(); angular.element(document.body).ready(function () { upgradeAdapter.bootstrap(document.body, ["dummy"]); }); upgradeAdapter.addProvider(ng.http.HTTP_PROVIDER...
"use strict"; (function () { angular .module("dummy", []); var upgradeAdapter = new ng.upgrade.UpgradeAdapter(); angular.element(document.body).ready(function () { upgradeAdapter.bootstrap(document.body, ["dummy"]); }); upgradeAdapter.addProvider(ng.http.HTTP_PROVIDER...
Fix parsing empty content values
var textPattern = /^text\/*/; module.exports = function parseResponse(response) { var key, contentType; for (key in response) { if (Buffer.isBuffer(response[key])) { if (key === 'value') { if (response.content_type && response[key].length !== 0) { conten...
var textPattern = /^text\/*/; module.exports = function parseResponse(response) { var key, contentType; for (key in response) { if (Buffer.isBuffer(response[key])) { if (key === 'value') { if (response.content_type) { contentType = getContentType(respons...
Change deprecated flyway methods to new FluentConfiguration
package com.cloud.flyway; import com.cloud.legacymodel.exceptions.CloudRuntimeException; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; import org.flywaydb.core.Flyway; import org.flywaydb.core.api.FlywayException; import org.flywaydb.core.api.configuration.Flue...
package com.cloud.flyway; import com.cloud.legacymodel.exceptions.CloudRuntimeException; import org.flywaydb.core.Flyway; import org.flywaydb.core.api.FlywayException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.Dat...
Move debugger line to the top
"""lambda_function.py main entry point for aws lambda""" import json import urllib.request from typing import Dict, Optional import settings from logger import logger from spot import to_msw_id def close(fulfillment_state: str, message: Dict[str, str]) -> dict: """Close dialog generator""" return { ...
"""lambda_function.py main entry point for aws lambda""" import json import urllib.request from typing import Dict, Optional import settings from logger import logger from spot import to_msw_id def close(fulfillment_state: str, message: Dict[str, str]) -> dict: """Close dialog generator""" return { ...
Check for when push to buffer is false and break if so
'use strict'; const assert = require ('assert'); const Duplex = require('stream').Duplex; /** * Creates in memory writable and readable stream * @return {MemDuplex} a MemDuplex instance */ class MemDuplex extends Duplex { constructor() { super({ highWaterMark: 8 * 1024 * 1024 }); // 8MB this...
'use strict'; const assert = require ('assert'); const Duplex = require('stream').Duplex; /** * Creates in memory writable and readable stream * @return {MemDuplex} a MemDuplex instance */ class MemDuplex extends Duplex { constructor() { super({ highWaterMark: 8 * 1024 * 1024 }); // 8MB this...
Remove CLIENT_INTERACTIVE flags from config This is very likely the cause of #225. I was not able to re-produce it on my machine, but reading through this makes me think it is the right thing to do: http://dev.mysql.com/doc/refman//5.5/en/mysql-real-connect.html
var ClientConstants = require('./protocol/constants/client'); var Charsets = require('./protocol/constants/charsets'); module.exports = Config; function Config(options) { this.host = options.host || 'localhost'; this.port = options.port || 3306; this.socketPath = options.socketPath; th...
var ClientConstants = require('./protocol/constants/client'); var Charsets = require('./protocol/constants/charsets'); module.exports = Config; function Config(options) { this.host = options.host || 'localhost'; this.port = options.port || 3306; this.socketPath = options.socketPath; th...
Allow translator plugin to store selected language in sessionStorage/cookie and remember the settings
๏ปฟangular.module('emixApp', ['ngRoute', 'ngCookies', 'emixApp.controllers', 'emixApp.directives', 'emixApp.services', 'mgcrea.ngStrap', 'ngMorris', 'pascalprecht.translate' ]) .config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/dashbo...
๏ปฟangular.module('emixApp', ['ngRoute', 'emixApp.controllers', 'emixApp.directives', 'emixApp.services', 'mgcrea.ngStrap', 'ngMorris', //'ngGoogleMap' 'pascalprecht.translate' ]) .config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/das...
Add more flexible entity filter function
/** * Created by faide on 4/21/2015. */ export default class Scene { constructor(id = `scene_${Date.now().toString()}`, entities = [], map = null) { "use strict"; this._name = id; this._id = Symbol(this.name); this.__entities = entities; this.__m...
/** * Created by faide on 4/21/2015. */ export default class Scene { constructor(id = `scene_${Date.now().toString()}`, entities = [], map = null) { "use strict"; this._name = id; this._id = Symbol(this.name); this.__entities = entities; this.__m...
Fix schema misstep in SQL code
(function () { var cogClass = function () {}; cogClass.prototype.exec = function (params, request, response) { var oops = this.utils.apiError; var sys = this.sys; var getRandomKey = this.sys.getRandomKey; var classID = params.classid; var getClassMemberships = this.utils....
(function () { var cogClass = function () {}; cogClass.prototype.exec = function (params, request, response) { var oops = this.utils.apiError; var sys = this.sys; var getRandomKey = this.sys.getRandomKey; var classID = params.classid; var getClassMemberships = this.utils....
Refactor out Object.assign in favor of { ...merge }
const Howl = require('howler').Howl; module.exports = { initialize(soundsData) { let soundOptions; const soundNames = Object.getOwnPropertyNames(soundsData); this.sounds = soundNames.reduce((memo, name) => { soundOptions = soundsData[name]; // Allow strings instead of objects, for when all...
const Howl = require('howler').Howl; module.exports = { initialize(soundsData) { let soundOptions; const soundNames = Object.getOwnPropertyNames(soundsData); this.sounds = soundNames.reduce((memo, name) => { soundOptions = soundsData[name]; // Allow strings instead of objects, for when all...
Add `is_runable` to Producer base class. Signed-off-by: Michael Markert <5eb998b7ac86da375651a4cd767b88c9dad25896@googlemail.com>
class Producer(object): """ Base class for producers. __init__ must be called by inheriting classes. Inheriting classes must implement: - ``_run`` to run the producer, after running `out` attribute has to be set to path to produced output - ``configure(jvm, *options)`` to configure i...
class Producer(object): """ Base class for producers. __init__ must be called by inheriting classes. Inheriting classes must implement: - ``_run`` - to run the producer - ``configure(jvm, *options)`` - to configure itself with the given jvm and options (must set configured to True if ...
fix: Remove going back a directory for properties See also: PSOBAT-1197
"""Create Spinnaker Pipeline.""" import argparse import logging from ..args import add_debug from ..consts import LOGGING_FORMAT from .create_pipeline import SpinnakerPipeline def main(): """Run newer stuffs.""" logging.basicConfig(format=LOGGING_FORMAT) log = logging.getLogger(__name__) parser = ar...
"""Create Spinnaker Pipeline.""" import argparse import logging from ..args import add_debug from ..consts import LOGGING_FORMAT from .create_pipeline import SpinnakerPipeline def main(): """Run newer stuffs.""" logging.basicConfig(format=LOGGING_FORMAT) log = logging.getLogger(__name__) parser = ar...
Address consistent json field case convention - use camelCase
package images import ( "encoding/json" "errors" ) type IdentityImage struct { KeyUID string Name string Payload []byte Width int Height int FileSize int ResizeTarget int } func (i IdentityImage) GetType() (ImageType, error) { it := GetType(i.Payload) if it == UNKNOWN {...
package images import ( "encoding/json" "errors" ) type IdentityImage struct { KeyUID string Name string Payload []byte Width int Height int FileSize int ResizeTarget int } func (i IdentityImage) GetType() (ImageType, error) { it := GetType(i.Payload) if it == UNKNOWN {...
Fix link top on topmenu
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>{{title}}</title> <link rel=stylesheet href=theme/{{theme}}/css/style.css> </head> <body> <header> <h1><a href="?p={{page}}">{{title}}</a></h1> <nav> <ul> ...
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>{{title}}</title> <link rel=stylesheet href=theme/{{theme}}/css/style.css> </head> <body> <header> <h1><a href="?p={{page}}">{{title}}</a></h1> <nav> <ul> ...
Patch added for upcoming events. TicketCo is working on a fix for the API
<?php namespace TicketCo\Resources; use DateTime; class Events extends API { /** * @var string */ protected $resource = 'events'; /** * Get all events * * @param array $filters Filter by providing one or more of these params; * tags - Fi...
<?php namespace TicketCo\Resources; class Events extends API { /** * @var string */ protected $resource = 'events'; /** * Get all events * * @param array $filters Filter by providing one or more of these params; * tags - Filter by tags. E...
Remove numberToString/stringToNumber in pycrypto support package and add some int to long conversions so it can happily pass the tests (I bet this is enough to get it working)
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """PyCrypto RSA implementation.""" from cryptomath import * from .rsakey import * from .python_rsakey import Python_RSAKey if pycryptoLoaded: from Crypto.PublicKey import RSA class PyCrypto_RSAKey(RSAKey): ...
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """PyCrypto RSA implementation.""" from .cryptomath import * from .rsakey import * from .python_rsakey import Python_RSAKey if pycryptoLoaded: from Crypto.PublicKey import RSA class PyCrypto_RSAKey(RSAKey): ...
Fix copy and paste error
from conans.model import Generator from conans.paths import BUILD_INFO_XCODE class XCodeGenerator(Generator): template = ''' HEADER_SEARCH_PATHS = $(inherited) {include_dirs} LIBRARY_SEARCH_PATHS = $(inherited) {lib_dirs} OTHER_LDFLAGS = $(inherited) {linker_flags} {libs} GCC_PREPROCESSOR_DEFINITIONS = $(inheri...
from conans.model import Generator from conans.paths import BUILD_INFO_XCODE class XCodeGenerator(Generator): template = ''' HEADER_SEARCH_PATHS = $(inherited) {include_dirs} LIBRARY_SEARCH_PATHS = $(inherited) {lib_dirs} OTHER_LDFLAGS = $(inherited) {linker_flags} {libs} GCC_PREPROCESSOR_DEFINITIONS = $(inheri...