text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Add unit test for checking the default behavior. - IE does not follow specs when clicking a checkbox that is in an indeterminate state
$(function () { 'use strict'; QUnit.module('indeterminable.js', { beforeEach: function () { this.checkbox = $('<input type="checkbox">'); $('#qunit-fixture').append(this.checkbox); } }); QUnit.test('Regular checkbox cannot be set to "indeterminate"...
$(function () { 'use strict'; QUnit.module('indeterminable.js', { beforeEach: function () { this.checkbox = $('<input type="checkbox">'); $('#qunit-fixture').append(this.checkbox); } }); QUnit.test('Regular checkbox cannot be set to "indeterminate"...
Fix tests with updated generation
<?php namespace Joli\Jane\Swagger\Tests\Expected\Resource; use Joli\Jane\Swagger\Client\QueryParam; use Joli\Jane\Swagger\Client\Resource; class TestResource extends Resource { /** * @param array $parameters List of parameters * @param string $fetch Fetch mode (object or response) * * @r...
<?php namespace Joli\Jane\Swagger\Tests\Expected\Resource; use Joli\Jane\Swagger\Client\QueryParam; use Joli\Jane\Swagger\Client\Resource; class TestResource extends Resource { /** * @param array $parameters * @param string $fetch * * @return \Psr\Http\Message\ResponseInterface */ pub...
[COLAB-2861] Fix staff members widget error
package org.xcolab.service.members.web; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.xcolab.model.tables.p...
package org.xcolab.service.members.web; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web...
Add HTML5 doctype to all rendered pages.
var path = require('path'); var url = require('url'); var compression = require('compression'); var express = require('express'); var ssr = require('../index'); var xhr = require('./xhr'); var proxy = require('./proxy'); var doctype = '<!DOCTYPE html>'; module.exports = function (config) { var app = express() .us...
var path = require('path'); var url = require('url'); var compression = require('compression'); var express = require('express'); var ssr = require('../index'); var xhr = require('./xhr'); var proxy = require('./proxy'); module.exports = function (config) { var app = express() .use(compression()) .use(xhr()); ...
Fix wiblog's use of the anti-spam validator
# This file is part of the FragDev Website. # # the FragDev Website is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # the FragDev W...
# This file is part of the FragDev Website. # # the FragDev Website is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # the FragDev W...
Admin: Add template helper for datetime fields Refs SHOOP-1612
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from bootstrap3.renderers import FormRenderer from django.utils.safestring ...
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from bootstrap3.renderers import FormRenderer from django.utils.safestring ...
Make java file compile under 1.6. I still have 1.6 installed. So the two simple fixes are necessary to make my build pass for now.
package test; import dotty.tools.dotc.core.Contexts; import org.junit.*; import java.lang.ref.WeakReference; import java.util.LinkedList; import java.util.List; public abstract class ContextEscapeDetection { public static class TestContext{ public TestContext(WeakReference<Contexts.Context> context, Str...
package test; import dotty.tools.dotc.core.Contexts; import org.junit.*; import java.lang.ref.WeakReference; import java.util.LinkedList; import java.util.List; public abstract class ContextEscapeDetection { public static class TestContext{ public TestContext(WeakReference<Contexts.Context> context, Str...
Load Google visualization lbirary here so that we don't have to load it in hte inlcuding html.
google.load('visualization', '1', {'packages':['annotatedtimeline']}); function annotatedTimeLineChart(chart_element, url, dataString) { chart_element.text('Loading...'); $.ajax({ url: url, //dataType: 'json', //timeout: 30000, data: dataString, success: function (da...
function annotatedTimeLineChart(chart_element, url, dataString) { var chart_element = $('#line_chart'); chart_element.text('Loading...'); $.ajax({ url: url, //dataType: 'json', //timeout: 30000, data: dataString, success: function (data_perl) { //var dat...
samples: Add quickstarts to root module. Fixes checkstyle errors in samples.
/* Copyright 2016, Google, Inc. 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 in writing...
/* Copyright 2016, Google, Inc. 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 in writing...
Move check for development environment into the getNewAccessToken method. Revision created by MOE tool push_codebase. MOE_MIGRATION=7102
package com.google.appengine.tools.cloudstorage.oauth; import com.google.appengine.api.appidentity.AppIdentityService; import com.google.appengine.api.appidentity.AppIdentityService.GetAccessTokenResult; import com.google.appengine.api.appidentity.AppIdentityServiceFactory; import com.google.appengine.api.utils.System...
package com.google.appengine.tools.cloudstorage.oauth; import com.google.appengine.api.appidentity.AppIdentityService; import com.google.appengine.api.appidentity.AppIdentityService.GetAccessTokenResult; import com.google.appengine.api.appidentity.AppIdentityServiceFactory; import com.google.appengine.api.utils.System...
Use the tempfile module to create system indipendend temporary file for the output. closes #1
import subprocess import os import mail_handler import tempfile from datetime import datetime from settings_handler import settings def execJobs(jobs): try: for job in jobs: if not execJob(job): return False print "Jobs executed" return True except: print "Executed failed" return False def execJob(...
import subprocess import os import mail_handler from datetime import datetime from settings_handler import settings def execJobs(jobs): try: for job in jobs: if not execJob(job): return False print "Jobs executed" return True except: print "Executed failed" return False finally: output = "tmp/out...
Update PyPSA version in requirements
"""This is the docstring for the example.py module. Modules names should have short, all-lowercase names. The module name may have underscores if this improves readability. Every module should have a docstring at the very top of the file. The module's docstring may extend over multiple lines. If your docstring does...
"""This is the docstring for the example.py module. Modules names should have short, all-lowercase names. The module name may have underscores if this improves readability. Every module should have a docstring at the very top of the file. The module's docstring may extend over multiple lines. If your docstring does...
Add dot command not found exception.
package org.enoir.graphvizapi.test; import org.enoir.graphvizapi.*; import org.enoir.graphvizapi.exception.AttributeNotFondException; import org.enoir.graphvizapi.exception.GraphException; import org.junit.Assert; import org.junit.Test; /** * Created by frank on 2014/11/27. */ public class TestException { @Test ...
package org.enoir.graphvizapi.test; import org.enoir.graphvizapi.Attribute; import org.enoir.graphvizapi.Node; import org.enoir.graphvizapi.exception.AttributeNotFondException; import org.junit.Assert; import org.junit.Test; /** * Created by frank on 2014/11/27. */ public class TestException { @Test public v...
Fix fetching content for paths without dashes
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { init } from './redux/page'; import Page from './components/Page'; class FrontendApp extends Component { componentWillMount() { const path = window.location.pathname .replace(/^\//, '') .replace(/\...
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { init } from './redux/page'; import Page from './components/Page'; class FrontendApp extends Component { componentWillMount() { const path = window.location.pathname; const options = { mode: 'no-cors' }; ...
Clear autofill when leaving /new form
import React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { clearPetition } from 'actions/PetitionActions'; import { clearSuggestionInputValue } from 'actions/AutocompleteActions'; import settings from 'settings'; import NewPetition from 'components/NewPetition'; import...
import React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { clearPetition } from 'actions/PetitionActions'; import { clearSuggestionInputValue } from 'actions/AutocompleteActions'; import settings from 'settings'; import NewPetition from 'components/NewPetition'; import...
Add build set status listener
/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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 Licen...
/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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 Licen...
Replace "," with " " before splitting the input.
Template.SearchBoxT.events( { 'submit form' : function( evt, template ) { evt.preventDefault(); var wordList = Session.get( "WordList" ); var newWords = template.find(".search-query") .value .replace(/,/g, " ") ...
Template.SearchBoxT.events( { 'submit form' : function( evt, template ) { evt.preventDefault(); var wordList = Session.get( "WordList" ); var newWords = template.find(".search-query").value.split(/\s+/); _.each( newWords, function( newWord ) { var word = newWord.replace(",", "").t...
Remove transparency param for electron
"use strict"; /* eslint no-undef:0 */ const { app, BrowserWindow, nativeImage } = require("electron"); const path = require("path"); const url = require("url"); let win; let image = nativeImage.createFromPath(path.join(__dirname, "./img/icon.png")); if (app.dock) { app.dock.setIcon(image); } function createWindow(...
"use strict"; /* eslint no-undef:0 */ const { app, BrowserWindow, nativeImage } = require("electron"); const path = require("path"); const url = require("url"); let win; let image = nativeImage.createFromPath(path.join(__dirname, "./img/icon.png")); if (app.dock) { app.dock.setIcon(image); } function createWindow(...
Fix history message user issue
var RtmClient = require('@slack/client').RtmClient; var RTM_CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS.RTM; var RTM_EVENTS = require('@slack/client').RTM_EVENTS; var Conversation = require('watson-developer-cloud/conversation/v1') var conversation = new Conversation({ username: process.env.CONVERSATION_US...
var RtmClient = require('@slack/client').RtmClient; var RTM_CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS.RTM; var RTM_EVENTS = require('@slack/client').RTM_EVENTS; var Conversation = require('watson-developer-cloud/conversation/v1') var conversation = new Conversation({ username: process.env.CONVERSATION_US...
Add fix for reactjs shadowdom
chrome.storage.local.get(null, function(items) { var aliases = items.aliases var aliasKey = items.aliasKey $('body').on('keydown', 'input, textarea', function(e) { var code = (e.keyCode ? e.keyCode : e.which); if(code == aliasKey) { var input = $(this).val().split(" "); for(var i = 0; i < inpu...
chrome.storage.local.get(null, function(items) { var aliases = items.aliases var aliasKey = items.aliasKey $('body').on('keydown', 'input, textarea', function(e) { var code = (e.keyCode ? e.keyCode : e.which); if(code == aliasKey) { var input = $(this).val().split(" "); for(var i = 0; i < inpu...
Tag text is now converted to lowercase before being saved
from django.db import models class Author(models.Model): author_name = models.CharField(max_length=200, unique=True) author_link = models.URLField() def __str__(self): return str(self.name) class Reason(models.Model): reason = models.CharField(max_length=200) def __str__(self): ...
from django.db import models class Author(models.Model): author_name = models.CharField(max_length=200, unique=True) author_link = models.URLField() def __str__(self): return str(self.name) class Reason(models.Model): reason = models.CharField(max_length=200) def __str__(self): ...
Fix some documentation and ugly constant placement
package boil import ( "database/sql" "os" ) var ( // currentDB is a global database handle for the package currentDB Executor ) // Executor can perform SQL queries. type Executor interface { Exec(query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) ...
package boil import ( "database/sql" "os" ) type Executor interface { Exec(query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) QueryRow(query string, args ...interface{}) *sql.Row } type Transactor interface { Commit() error Rollback() error Exe...
Handle PhantomJS child process errors
'use strict'; var app = require('./server/index'); var conf = require('./server/conf'); var logger = conf.logger; var phantom = require('./server/phantom'); if (!module.parent) { logger.info('Running in %s mode', conf.env); var port = conf.port; var fork = require('child_process').fork; var phantomChild = f...
'use strict'; var app = require('./server/index'); var conf = require('./server/conf'); var logger = conf.logger; var phantom = require('./server/phantom'); if (!module.parent) { logger.info('Running in %s mode', conf.env); var port = conf.port; var fork = require('child_process').fork; var phantomChild = f...
Store is using serfnode service discovery
import collections import pickle import redis from .tools import location class Store(collections.MutableMapping): def __init__(self, db=0): host, port = location('redis', 6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): obj = self._db.get...
import collections import pickle import redis from .serf import node class Store(collections.MutableMapping): def __init__(self, db=0): host, port = node(role='redis', port=6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): obj = self._db.ge...
Improve error reporting from server
var request = require('request'); var utils = require('./lib/utils'); function Action(actionPath, payload) { this.actionPath = 'http://test@liferay.com:test@localhost:8080/api/jsonws' + actionPath; this.payload = payload; } Action.prototype.doAction = function(callback) { var payload = this.payload; try { if (...
var request = require('request'); function Action(actionPath, payload) { this.actionPath = 'http://test@liferay.com:test@localhost:8080/api/jsonws' + actionPath; this.payload = payload; } Action.prototype.doAction = function(callback) { var payload = this.payload; try { if (!payload) { throw new Error('Miss...
Rename UMD build product to `ngx-restangular` (to match `package.json`)
'use strict'; const nodeExternals = require('webpack-node-externals'); module.exports = { entry: './src/index.ts', output: { path: __dirname + '/dist/umd', filename: './ngx-restangular.js', libraryTarget: 'umd', library: 'ngx-restangular' }, externals: [nodeExternals()], devtool: 'source-map...
'use strict'; const nodeExternals = require('webpack-node-externals'); module.exports = { entry: './src/index.ts', output: { path: __dirname + '/dist/umd', filename: './ng2-restangular.js', libraryTarget: 'umd', library: 'ng2-restangular' }, externals: [nodeExternals()], devtool: 'source-map...
Add flag to print timestamp with rate
// Count lines of input per second on stdin package main import ( "bufio" "flag" "fmt" "os" "time" ) func readLines(c chan int) { count := 0 bio := bufio.NewReader(os.Stdin) for { _, more, err := bio.ReadLine() if err != nil { fmt.Println(err) os.Exit(1) } if more { continue } count += 1 ...
// Count lines of input per second on stdin package main import ( "bufio" "fmt" "os" "time" "flag" ) func readLines(c chan int) { count := 0 bio := bufio.NewReader(os.Stdin) for { _, more, err := bio.ReadLine() if err != nil { fmt.Println(err) os.Exit(1) } if more { continue } count += 1 ...
Change factory class to abstract
<?php namespace JWX\JWE\CompressionAlgorithm; use JWX\JWA\JWA; use JWX\JWE\CompressionAlgorithm; /** * Factory class to construct compression algorithm instances. */ abstract class CompressionFactory { /** * Mapping from algorithm name to class name. * * @internal * * @var array */ const MAP_ALGO_TO...
<?php namespace JWX\JWE\CompressionAlgorithm; use JWX\JWA\JWA; use JWX\JWE\CompressionAlgorithm; /** * Factory class to construct compression algorithm instances. */ class CompressionFactory { /** * Mapping from algorithm name to class name. * * @internal * * @var array */ const MAP_ALGO_TO_CLASS = ...
Add quotes to cron information page, for the example crontab file
<?php $this->data['header'] = 'Cron information page'; $this->includeAtTemplateBase('includes/header.php'); ?> <div id="content"> <p>Cron is a way to run things regularly on unix systems.</p> <p>Here is a suggestion for a crontab file:</p> <pre style="font-size: x-small; color: #444; padding: 1em; border: 1px s...
<?php $this->data['header'] = 'Cron information page'; $this->includeAtTemplateBase('includes/header.php'); ?> <div id="content"> <p>Cron is a way to run things regularly on unix systems.</p> <p>Here is a suggestion for a crontab file:</p> <pre style="font-size: x-small; color: #444; padding: 1em; border: 1px s...
Add test case for resources docs page
from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.status_code, 200) ...
from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.status_code, 200) ...
Add MotoNyan to mad hax
from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "MotoNyan", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [...
from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [x.lower() for x in m...
Remove include clause from find_packages It's not supported on older versions of pip
from setuptools import find_packages, setup setup( name='tchannel', version='0.10.1.dev0', author='Abhinav Gupta, Aiden Scandella, Bryce Lampe, Grayson Koonce, Junchao Wu', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='htt...
from setuptools import find_packages, setup setup( name='tchannel', version='0.10.1.dev0', author='Abhinav Gupta, Aiden Scandella, Bryce Lampe, Grayson Koonce, Junchao Wu', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='htt...
Remove second ? from URL
import os import sys import json import urllib import urllib2 api_key = os.getenv("MAPS_API_KEY") if api_key == "": sys.exit("Please obtain an API key from https://developers.google.com/maps/documentation/geocoding/start#get-a-key and set the environment variable MAPS_API_KEY") #print api_key url = 'https://maps...
import os import sys import json import urllib import urllib2 api_key = os.getenv("MAPS_API_KEY") if api_key == "": sys.exit("Please obtain an API key from https://developers.google.com/maps/documentation/geocoding/start#get-a-key and set the environment variable MAPS_API_KEY") #print api_key url = 'https://maps...
Use lodash in all modules.
/*! @license ©2014 Ruben Verborgh - Multimedia Lab / iMinds / Ghent University */ /** A DistinctIterator emits the unique items from a source. */ var FilterIterator = require('./FilterIterator'), isEqual = require('lodash').isEqual; // Creates a new DistinctIterator with the given filter function DistinctIterator...
/*! @license ©2014 Ruben Verborgh - Multimedia Lab / iMinds / Ghent University */ /** A DistinctIterator emits the unique items from a source. */ var FilterIterator = require('./FilterIterator'), isEqual = require('underscore').isEqual; // Creates a new DistinctIterator with the given filter function DistinctIter...
Add support for Python 3.5
import os import sys from setuptools import setup from oauth2 import VERSION if sys.version_info < (3, 0, 0): memcache_require = "python-memcached" else: memcache_require = "python3-memcached" setup(name="python-oauth2", version=VERSION, description="OAuth 2.0 provider for python", long_des...
import os import sys from setuptools import setup from oauth2 import VERSION if sys.version_info < (3, 0, 0): memcache_require = "python-memcached" else: memcache_require = "python3-memcached" setup(name="python-oauth2", version=VERSION, description="OAuth 2.0 provider for python", long_des...
Disable the Object Storage tests in Waterford
# -*- coding: utf-8 -*- # Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U # # This file is part of FIWARE project. # # 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://w...
# -*- coding: utf-8 -*- # Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U # # This file is part of FIWARE project. # # 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://w...
Replace manual session handling with spring session scoped bean
package ee.tuleva.onboarding.auth.session; import java.io.Serial; import java.io.Serializable; import java.util.HashMap; import java.util.Map; import java.util.Optional; import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.stereo...
package ee.tuleva.onboarding.auth.session; import java.io.Serializable; import java.util.Optional; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAt...
Fix totally screwed code >:-) Better run once before push.
<?php /* * This file is part of the Assetic package, an OpenSky project. * * (c) 2010-2013 OpenSky Project Inc * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Assetic\Filter; use Assetic\Factory\AssetFactory; /** * L...
<?php /* * This file is part of the Assetic package, an OpenSky project. * * (c) 2010-2013 OpenSky Project Inc * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Assetic\Filter; use Assetic\Factory\AssetFactory; /** * L...
Change my email. Very important. Not actually important at all.
#!/usr/bin/env python from setuptools import setup, find_packages import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='cb-response-surveyor', author='Keith McCammon', author_email='keith@redcanary.com', url='https://github.com/redcanaryco/cb-...
#!/usr/bin/env python from setuptools import setup, find_packages import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='cb-response-surveyor', author='Keith McCammon', author_email='keith@redcanary.co', url='https://github.com/redcanaryco/cb-r...
Fix CodeMirror mode load paths
module.exports = [ 'browser/vendor/codemirror/lib/codemirror.js', 'browser/vendor/codemirror/mode/xml.js', 'browser/vendor/codemirror/mode/javascript.js', 'browser/vendor/codemirror/mode/css.js', 'browser/vendor/codemirror/mode/vbscript.js', 'browser/vendor/codemirror/mode/coffeescript.js', 'b...
module.exports = [ 'browser/vendor/codemirror/lib/codemirror.js', 'browser/vendor/codemirror/mode/xml/xml.js', 'browser/vendor/codemirror/mode/javascript/javascript.js', 'browser/vendor/codemirror/mode/css/css.js', 'browser/vendor/codemirror/mode/vbscript/vbscript.js', 'browser/vendor/codemirror...
openings: Fix tests for positioned stages
from django.test import TestCase from ..factories._applications import ApplicationFactory from ..factories._companysettings import InterviewStageFactory from ..factories._openings import OpeningFactory class OpeningsModelsTests(TestCase): def test_applicants_stats(self): opening = OpeningFactory() ...
from django.test import TestCase from ..factories._applications import ApplicationFactory from ..factories._companysettings import InterviewStageFactory from ..factories._openings import OpeningFactory class OpeningsModelsTests(TestCase): def test_applicants_stats(self): opening = OpeningFactory() ...
Add test for magic value check
<?php namespace adrianclay\git\Pack; use adrianclay\git\Repository; use adrianclay\git\SHA; use PHPUnit\Framework\TestCase; class IndexTest extends TestCase { private $repository; public function setUp(): void { parent::setUp(); $path = __DIR__ . '/../../'; $this->repository = ne...
<?php namespace adrianclay\git\Pack; use adrianclay\git\Repository; use adrianclay\git\SHA; use PHPUnit\Framework\TestCase; class IndexTest extends TestCase { private $repository; public function setUp(): void { parent::setUp(); $path = __DIR__ . '/../../'; $this->repository = ne...
Set alt attr as team member's name
import React from 'react' import { Flex, Box, Heading, Text, Avatar, Badge } from '@hackclub/design-system' const Base = Flex.extend` border-radius: ${props => props.theme.radii[2]}; max-width: 36rem; img { flex-shrink: 0; } ` const Bio = ({ bg, img, name, role, text, ...props }) => ( <Base ...
import React from 'react' import { Flex, Box, Heading, Text, Avatar, Badge } from '@hackclub/design-system' const Base = Flex.extend` border-radius: ${props => props.theme.radii[2]}; max-width: 36rem; img { flex-shrink: 0; } ` const Bio = ({ bg, img, name, role, text, ...props }) => ( <Base ...
Store options with Minimongo indexes if passed
/* eslint-disable no-underscore-dangle */ export const MiniMongo = {} const NAME_TO_CAUSE_MINIMONGO = null if (global.Mongo) { MiniMongo.Collection = class MiniMongoCollection extends global.Mongo.Collection { constructor(name) { super(NAME_TO_CAUSE_MINIMONGO) this._name = name // eslint-disable-...
/* eslint-disable no-underscore-dangle */ export const MiniMongo = {} const NAME_TO_CAUSE_MINIMONGO = null if (global.Mongo) { MiniMongo.Collection = class MiniMongoCollection extends global.Mongo.Collection { constructor(name) { super(NAME_TO_CAUSE_MINIMONGO) this._name = name // eslint-disable-...
Allow SponsorFactory to create active sponsors.
import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") order = factor...
import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") order = factor...
Add startup delay and change interpreter prompts The delay is so that hopefully switch connections don't IMMEDIATELY print all over the prompt. We'll do something better eventually.
#!/usr/bin/python # Set default log level import logging logging.basicConfig(level=logging.DEBUG) from pox.core import core import pox.openflow.openflow import pox.topology.topology import pox.openflow.of_01 import pox.dumb_l3_switch.dumb_l3_switch import pox.messenger.messenger # Turn on extra info for event except...
#!/usr/bin/python # Set default log level import logging logging.basicConfig(level=logging.DEBUG) from pox.core import core import pox.openflow.openflow import pox.topology.topology import pox.openflow.of_01 import pox.dumb_l3_switch.dumb_l3_switch import pox.messenger.messenger # Turn on extra info for event except...
Add GraphQL schema description for args.page
'use strict'; const { GraphQLInt, GraphQLString } = require('graphql'); // Pagination arguments const paginationActionTypes = ['find']; const getPaginationArgument = function ({ action: { actionType, multiple }, defaultPageSize, maxPageSize }) { // Only with safe operations that return an array, i.e. only with fi...
'use strict'; const { GraphQLInt, GraphQLString } = require('graphql'); // Pagination arguments const paginationActionTypes = ['find']; const getPaginationArgument = function ({ action: { actionType, multiple }, defaultPageSize, maxPageSize }) { // Only with safe operations that return an array, i.e. only with fi...
Fix clean-css processing font @import rule
/** * Gulpfile.js */ /* jshint node:true */ 'use strict'; var gulp = require('gulp'), sass = require('gulp-ruby-sass'), autoprefixer = require('gulp-autoprefixer'), cssmin = require('gulp-minify-css'), rename = require('gulp-rename'), sourcemaps = require('gulp-sourcemaps'); // Gulp Tasks // ...
/** * Gulpfile.js */ /* jshint node:true */ 'use strict'; var gulp = require('gulp'), sass = require('gulp-ruby-sass'), autoprefixer = require('gulp-autoprefixer'), cssmin = require('gulp-minify-css'), rename = require('gulp-rename'), sourcemaps = require('gulp-sourcemaps'); // Gulp Tasks // ...
Put paths inside quotes so spaces don't need to be escaped
var sudo = require('sudo-prompt'); var cmdFnPath = require.resolve('cmd-fn'); var setName = sudo.setName; var call = function(options, cb) { // Put paths inside quotes so spaces don't need to be escaped var cmd = '"' + process.execPath +'" "' + cmdFnPath + '"'; if (process.execPath.indexOf("/Contents/MacOS/Ele...
var sudo = require('sudo-prompt'); var cmdFnPath = require.resolve('cmd-fn'); var setName = sudo.setName; var call = function(options, cb) { var cmd = process.execPath + ' ' + cmdFnPath; if (process.execPath.indexOf("/Contents/MacOS/Electron") >= 0) { // If we're running in Electron then make sure that the p...
Set default parser value in constructor.
<?php /** * PHP version 5.6 * * This source file is subject to the license that is bundled with this package in the file LICENSE. */ namespace ComPHPPuebla\DBAL\Fixture\Loader; use Symfony\Component\Yaml\Parser; class YamlLoader implements Loader { /** @var string */ protected $path; /** @var Parser ...
<?php /** * PHP version 5.6 * * This source file is subject to the license that is bundled with this package in the file LICENSE. */ namespace ComPHPPuebla\DBAL\Fixture\Loader; use Symfony\Component\Yaml\Parser; class YamlLoader implements Loader { /** @var string */ protected $path; /** @var Parser ...
Make the technique even more generic --HG-- branch : feature/issue-229
""" Handle loading a package from system or from the bundled copy """ import imp _SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for part in parts: ...
""" Handle loading six package from system or from the bundled copy """ import imp _SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for part in parts: ...
Remove GitHub from the help scripts
// PiscoBot Script var commandDescription = { name: 'GitHub Mention', author: 'Daniel Gallegos [@that_taco_guy]', trigger: '[none]', version: 1.0, description: 'Have the bot reply to new commits on GitHub.', module: 'Core' }; var _ = require('underscore'); global.piscobot.hears(['PiscoBot.*new commits by...
// PiscoBot Script var commandDescription = { name: 'GitHub Mention', author: 'Daniel Gallegos [@that_taco_guy]', trigger: '[none]', version: 1.0, description: 'Have the bot reply to new commits on GitHub.', module: 'Core' }; global.botHelp.push(commandDescription); var _ = require('underscore'); global...
Fix initiativeShow to subscribe to userData
Router.configure({ layoutTemplate: '_layout' }); //From what I can tell this has been depreciated //https://github.com/iron-meteor/iron-router/blob/739bcc1445db3ad6bf90bda4e0cab3203a0ae526/lib/router.js#L88 Router.map(function() { // initiative routes this.route('initiatives', { path: '/', template: 'in...
Router.configure({ layoutTemplate: '_layout' }); //From what I can tell this has been depreciated //https://github.com/iron-meteor/iron-router/blob/739bcc1445db3ad6bf90bda4e0cab3203a0ae526/lib/router.js#L88 Router.map(function() { // initiative routes this.route('initiatives', { path: '/', template: 'in...
Add responseError: takes ErrorType and maps to HTTP error
/* * Copyright (c) 2015-2016, Index Data * All rights reserved. * See the file LICENSE for details. */ package okapi.util; import io.vertx.core.http.HttpServerResponse; import io.vertx.ext.web.RoutingContext; public class HttpResponse { static public void responseError(RoutingContext ctx, ErrorType t, Throwable...
/* * Copyright (c) 2015-2016, Index Data * All rights reserved. * See the file LICENSE for details. */ package okapi.util; import io.vertx.core.http.HttpServerResponse; import io.vertx.ext.web.RoutingContext; public class HttpResponse { static public void responseError(RoutingContext ctx, int code, Throwable c...
Add support for jQuery in compatibility mode
Materialize = {}; // Unique ID Materialize.guid = (function() { function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } return function() { return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); }; })(); Mate...
Materialize = {}; // Unique ID Materialize.guid = (function() { function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } return function() { return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); }; })(); Mate...
Replace SpoonFileCSV with ForkCMS\Utility\Csv\Writer implementation
<?php namespace Backend\Modules\Profiles\Actions; use Backend\Core\Engine\Authentication; use Backend\Core\Engine\Base\ActionAdd as BackendBaseActionAdd; use Common\Exception\RedirectException; use ForkCMS\Utility\Csv\Writer; use PhpOffice\PhpSpreadsheet\Spreadsheet; /** * This is the add-action, it will display a ...
<?php namespace Backend\Modules\Profiles\Actions; use Backend\Core\Engine\Base\ActionAdd as BackendBaseActionAdd; /** * This is the add-action, it will display a form to add a new profile. */ class ExportTemplate extends BackendBaseActionAdd { public function execute(): void { $this->checkToken(); ...
Fix Initiative sorting on landing page.
Router.configure({ layoutTemplate: '_layout' }); //From what I can tell this has been depreciated //https://github.com/iron-meteor/iron-router/blob/739bcc1445db3ad6bf90bda4e0cab3203a0ae526/lib/router.js#L88 Router.map(function() { // initiative routes this.route('initiatives', { path: '/', template: 'ini...
Router.configure({ layoutTemplate: '_layout' }); //From what I can tell this has been depreciated //https://github.com/iron-meteor/iron-router/blob/739bcc1445db3ad6bf90bda4e0cab3203a0ae526/lib/router.js#L88 Router.map(function() { // initiative routes this.route('initiatives', { path: '/', template: 'ini...
Add an addiction event dispatcher test
<?php namespace SmoothPhp\Tests\EventDispatcher; use SmoothPhp\EventDispatcher\SimpleEventDispatcher; /** * Class SimpleEventDispatcherTest * @package SmoothPhp\Tests\EventDispatcher * @author Simon Bennett <simon@smoothphp.com> */ final class SimpleEventDispatcherTest extends \PHPUnit_Framework_TestCase { /...
<?php namespace SmoothPhp\Tests\EventDispatcher; use SmoothPhp\EventDispatcher\SimpleEventDispatcher; /** * Class SimpleEventDispatcherTest * @package SmoothPhp\Tests\EventDispatcher * @author Simon Bennett <simon@smoothphp.com> */ final class SimpleEventDispatcherTest extends \PHPUnit_Framework_TestCase { /...
Update report_rendering test to use ReportExport
# coding: utf-8 from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from corehq.apps.userreports.reports.view import ConfigurableReportView from corehq.apps.userreports.reports.util import ReportExport class VeryFakeReportExport(ReportExport): de...
# coding: utf-8 from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from corehq.apps.userreports.reports.view import ConfigurableReportView class VeryFakeReportView(ConfigurableReportView): # note: this is very coupled to what it tests below, but i...
Add a test for making a file
import os from os.path import isdir import pytest from filesystem_tree import FilesystemTree @pytest.yield_fixture def fs(): fs = FilesystemTree() yield fs fs.remove() def test_it_can_be_instantiated(): assert FilesystemTree().__class__.__name__ == 'FilesystemTree' def test_args_go_to_mk_not_root(...
import os from os.path import isdir import pytest from filesystem_tree import FilesystemTree @pytest.yield_fixture def fs(): fs = FilesystemTree() yield fs fs.remove() def test_it_can_be_instantiated(): assert FilesystemTree().__class__.__name__ == 'FilesystemTree' def test_args_go_to_mk_not_root(...
[assets] Fix the way asset types are retrieved Get relations to retrieve the related workflow.
import client from '@/store/api/client' export default { getAssetTypes (callback) { client.get('/api/data/asset-types?relations=true', callback) }, getAssetType (assetTypeId, callback) { client.get(`/api/data/entity-types/${assetTypeId}`, callback) }, newAssetType (assetType, callback) { const ...
import client from '@/store/api/client' export default { getAssetTypes (callback) { client.get('/api/data/asset-types', callback) }, getAssetType (assetTypeId, callback) { client.get(`/api/data/entity-types/${assetTypeId}`, callback) }, newAssetType (assetType, callback) { const data = { ...
Fix code which executes on module load.
from pkg_resources import iter_entry_points from spicedham.config import load_config _plugins = None def load_plugins(): """ If not already loaded, load plugins. """ if _plugins == None load_config() _plugins = [] for plugin in iter_entry_points(group='spicedham.classifiers', ...
from pkg_resources import iter_entry_points from spicedham.config import config # TODO: Wrap all of this in an object with this in an __init__ function plugins = [] for plugin in iter_entry_points(group='spicedham.classifiers', name=None): pluginClass = plugin.load() plugins.append(pluginClass()) def train(...
Use SVGPointList API in test
describe('svgStar', function () { var $compile, $rootScope; beforeEach(module('md5.svg-star')); beforeEach(inject(function (_$compile_, _$rootScope_) { $compile = _$compile_; $rootScope = _$rootScope_; })); it('should work as an element', function () { var elt = angular.element('<svg-star...
describe('svgStar', function () { var $compile, $rootScope; beforeEach(module('md5.svg-star')); beforeEach(inject(function (_$compile_, _$rootScope_) { $compile = _$compile_; $rootScope = _$rootScope_; })); it('should work as an element', function () { var elt = angular.element('<svg-star...
Add `pytest-cov` to collect test coverages
#!/usr/bin/env python from __future__ import with_statement from setuptools import setup, find_packages import re version = "0.0.1.dev.0" with open("tdclient/version.py") as fp: m = re.search(r"^__version__ *= *\"([^\"]*)\" *$", fp.read(), re.MULTILINE) if m is not None: version = m.group(1) setup( ...
#!/usr/bin/env python from __future__ import with_statement from setuptools import setup, find_packages import re version = "0.0.1.dev.0" with open("tdclient/version.py") as fp: m = re.search(r"^__version__ *= *\"([^\"]*)\" *$", fp.read(), re.MULTILINE) if m is not None: version = m.group(1) setup( ...
Convert everything other than assets to app config We're using Laravel's config resolving classes: ```PHP $config = $app->make('config'); $config->get('app.version'); // '5.7.0b2' ```
<?php namespace Concrete\Core\Config; use Illuminate\Config\FileLoader; use Illuminate\Filesystem\Filesystem; class ConfigLoader extends FileLoader { protected $config; public function __construct(Filesystem $files, Config $config) { $this->config = $config; parent::__construct($files, DIR_A...
<?php namespace Concrete\Core\Config; use Illuminate\Config\FileLoader; use Illuminate\Filesystem\Filesystem; class ConfigLoader extends FileLoader { protected $config; public function __construct(Filesystem $files, Config $config) { $this->config = $config; parent::__construct($files, DIR_A...
Clean up view name in render performance tree
/** A tree structure for assembling a list of render calls so they can be grouped and displayed nicely afterwards. @class ProfileNode **/ var ProfileNode = function(start, payload, parent) { this.start = start; this.timestamp = Date.now(); if (payload) { if (payload.template) { this.name = payload.templa...
/** A tree structure for assembling a list of render calls so they can be grouped and displayed nicely afterwards. @class ProfileNode **/ var ProfileNode = function(start, payload, parent) { this.start = start; this.timestamp = Date.now(); if (payload) { if (payload.template) { this.name = payload.templa...
Use base name as default package name
var webpack = require('webpack'); var path = require('path'); var fs = require('fs'); var assignDeep = require('assign-deep'); var values = require('object-values'); var configureCommon = require('./configureCommon'); var configureDevelopment = require('./configureDevelopment'); module.exports = function(port, entryFi...
var webpack = require('webpack'); var path = require('path'); var fs = require('fs'); var assignDeep = require('assign-deep'); var values = require('object-values'); var configureCommon = require('./configureCommon'); var configureDevelopment = require('./configureDevelopment'); module.exports = function(port, entryFi...
Save Interactive State in addition to URL Since calling `setLearnerUrl` does not alter the app behavior, we also call `interactiveState` and post the current URL in a JSON blob there. This does get saved on their end, and allows us to devise a redirection mechanism to this saved URL when the user comes back.
"use strict"; var _ = require('lodash'), iframePhone = require('iframe-phone'), EMBED_FLAG = 'itsi_embed', QUERY_SUFFIX = EMBED_FLAG + '=true'; var ItsiEmbed = function() { this.phone = new iframePhone.getIFrameEndpoint(); this.url = window.location.href + '?' + QUERY_SUFFIX; this.interactiv...
"use strict"; var _ = require('lodash'), iframePhone = require('iframe-phone'), EMBED_FLAG = 'itsi_embed', QUERY_SUFFIX = EMBED_FLAG + '=true'; var ItsiEmbed = function() { this.phone = new iframePhone.getIFrameEndpoint(); this.url = window.location.href + '?' + QUERY_SUFFIX; this.setLearner...
Upgrade the version to force reinstall by wheels
from setuptools import setup import os setup( name = "cmsplugin-bootstrap-carousel", packages = ['cmsplugin_bootstrap_carousel',], package_data = { '': [ 'templates/cmsplugin_bootstrap_carousel/*.html', ] }, version = "0.1.3", description = "Bootstrap carousel plug...
from setuptools import setup import os setup( name = "cmsplugin-bootstrap-carousel", packages = ['cmsplugin_bootstrap_carousel',], package_data = { '': [ 'templates/cmsplugin_bootstrap_carousel/*.html', ] }, version = "0.1.2", description = "Bootstrap carousel plug...
Make variable names more explicit
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, division, absolute_import from openfisca_core.commons import to_unicode def build_entities(tax_benefit_system): entities = { entity.key: build_entity(entity) for entity in tax_benefit_system.entities } re...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, division, absolute_import from openfisca_core.commons import to_unicode def build_entities(tax_benefit_system): entities = { entity.key: build_entity(entity) for entity in tax_benefit_system.entities } re...
Remove some fork specific documentation
<?php namespace SumoCoders\FrameworkCoreBundle\ValueObject; use Doctrine\ORM\Mapping as ORM; /** * The following things are mandatory to use this class. * * You need to implement the method getUploadDir. * When using this class in an entity certain life cycle callbacks should be called * prepareToUpload for @OR...
<?php namespace SumoCoders\FrameworkCoreBundle\ValueObject; use Doctrine\ORM\Mapping as ORM; /** * The following things are mandatory to use this class. * * You need to implement the method getUploadDir. * When using this class in an entity certain life cycle callbacks should be called * prepareToUpload for @OR...
Set default race and class without extra database queries
from django.shortcuts import get_object_or_404, redirect, render from characters.forms import CharacterForm from characters.models import Character, Class, Race def index(request): all_characters = Character.objects.all() context = {'all_characters': all_characters} return render(request, 'characters/ind...
from django.shortcuts import get_object_or_404, redirect, render from characters.forms import CharacterForm from characters.models import Character, Class, Race def index(request): all_characters = Character.objects.all() context = {'all_characters': all_characters} return render(request, 'characters/ind...
Add correction between CodeMirror lint plugin to display warning on expected line number
/*jslint browser*/ // This file is the shim layer to connect jslint to CodeMirror editor import jslint from "./jslint.mjs"; const CodeMirror = window.CodeMirror; function validator(text, options) { let data = jslint(text, options, options.globals); let warnings = data.warnings; let output = []; if (d...
/*jslint browser*/ // This file is the shim layer to connect jslint to CodeMirror editor import jslint from "./jslint.mjs"; const CodeMirror = window.CodeMirror; function validator(text, options) { let data = jslint(text, options, options.globals); let warnings = data.warnings; let output = []; if (d...
Load OSM tiles via https
"use strict"; import React from "react"; import ReactDOM from "react-dom"; import Leaflet from "leaflet"; export default class DocMap extends React.Component { componentDidMount() { this.map = Leaflet.map(ReactDOM.findDOMNode(this)); this.map.addLayer(Leaflet.tileLayer("https://{s}.tile.openstreetmap.org/{z...
"use strict"; import React from "react"; import ReactDOM from "react-dom"; import Leaflet from "leaflet"; export default class DocMap extends React.Component { componentDidMount() { this.map = Leaflet.map(ReactDOM.findDOMNode(this)); this.map.addLayer(Leaflet.tileLayer("http://{s}.tile.openstreetmap.org/{z}...
Remove warn only from fabric file
from fabric.api import local CMD_MANAGE = "python manage.py " def auto_schema(): schema('rockit.foundation.core') schema('rockit.plugins.mailout') schema('rockit.plugins.razberry') def build(): migrate('rockit.foundation.core') migrate('rockit.plugins.mailout') migrate('rockit.plugins.razberr...
from fabric.api import local from fabric.api import warn_only CMD_MANAGE = "python manage.py " def auto_schema(): with warn_only(): schema('rockit.foundation.core') schema('rockit.plugins.mailout') schema('rockit.plugins.razberry') def build(): migrate('rockit.foundation.core') mi...
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 in temp client data.
<?php /* * Bear CMS addon for Bear Framework * https://bearcms.com/ * Copyright (c) 2016 Amplilabs Ltd. * Free to use under the MIT license. */ namespace BearCMS\Internal; use BearFramework\App; class TempClientData { static function get($key) { $app = App::get(); $dataHash = substr($k...
<?php /* * Bear CMS addon for Bear Framework * https://bearcms.com/ * Copyright (c) 2016 Amplilabs Ltd. * Free to use under the MIT license. */ namespace BearCMS\Internal; use BearFramework\App; class TempClientData { static function get($key) { $app = App::get(); $dataHash = substr($k...
gltfpack: Fix texture compression spawn in node.js Our previous code blindly replaced the executable in the input command with the env. variable value, which actually didn't handle cases when the environment variable wasn't set and additionally didn't handle paths with spaces well. We now use shell:false execution op...
#!/usr/bin/env node // This file is part of gltfpack and is distributed under the terms of MIT License. var gltfpack = require('./library.js'); var fs = require('fs'); var cp = require('child_process'); var args = process.argv.slice(2); var paths = { "basisu": process.env["BASISU_PATH"], "toktx": process.env["TOKT...
#!/usr/bin/env node // This file is part of gltfpack and is distributed under the terms of MIT License. var gltfpack = require('./library.js'); var fs = require('fs'); var cp = require('child_process'); var args = process.argv.slice(2); var paths = { "basisu": process.env["BASISU_PATH"], "toktx": process.env["TOKT...
FIx null pointer in gcm registration service
package com.rehivetech.beeeon.gcm; import android.app.IntentService; import android.content.Intent; import com.google.android.gms.gcm.GoogleCloudMessaging; import com.google.android.gms.iid.InstanceID; import com.rehivetech.beeeon.R; import com.rehivetech.beeeon.controller.Controller; import com.rehivetech.beeeon.mod...
package com.rehivetech.beeeon.gcm; import android.app.IntentService; import android.content.Intent; import com.google.android.gms.gcm.GoogleCloudMessaging; import com.google.android.gms.iid.InstanceID; import com.rehivetech.beeeon.R; import com.rehivetech.beeeon.controller.Controller; import com.rehivetech.beeeon.mod...
Remove namespace package metadata to fix sdist
from setuptools import setup with open('README.md') as desc: long_description = desc.read() setup(name='beets-check', version='0.9.0-beta.2', description='beets plugin verifying file integrity with checksums', long_description=long_description, author='Thomas Scholtes', author_email='...
from setuptools import setup with open('README.md') as desc: long_description = desc.read() setup(name='beets-check', version='0.9.0-beta.2', description='beets plugin verifying file integrity with checksums', long_description=long_description, author='Thomas Scholtes', author_email='...
Add documentation of the new functions
"""Example of reversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxns_reversible.xml") parser = Parser.ReactionParser(xml_f...
"""Example of reversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxns_reversible.xml") parser = Parser.ReactionParser(xml_f...
Update deps to pull in YAML support
#!/usr/bin/env python import os, sys, glob from setuptools import setup, find_packages setup( name='aegea', version='0.2.0', url='https://github.com/kislyuk/aegea', license='Proprietary', author='Andrey Kislyuk', author_email='kislyuk@gmail.com', description='Amazon Web Services Operator I...
#!/usr/bin/env python import os, sys, glob from setuptools import setup, find_packages setup( name='aegea', version='0.1.0', url='https://github.com/kislyuk/aegea', license='Proprietary', author='Andrey Kislyuk', author_email='kislyuk@gmail.com', description='Amazon Web Services Operator I...
Fix tests using testdata with trailing newlines by slicing off whitespace
package mbtest import ( "bytes" "io/ioutil" "path/filepath" "testing" ) const testdataDir = "testdata" // Testdata returns a file's bytes based on the path relative to the testdata // directory. It fails the test if the testdata file can not be read. func Testdata(t *testing.T, relativePath string) []byte { pat...
package mbtest import ( "bytes" "io/ioutil" "path/filepath" "testing" ) const testdataDir = "testdata" // Testdata returns a file's bytes based on the path relative to the testdata // directory. It fails the test if the testdata file can not be read. func Testdata(t *testing.T, relativePath string) []byte { pat...
Replace manual packages list with find_packages
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name='LoadStone', version='0.1', description='Interface for FFXIV Lodestone', author='Sami Elahmadie', author_email='s.elahmadie@gmail.com', url='https://github.com/Demotivated/loadstone/', packages=find_packages(), ...
#!/usr/bin/env python3 from setuptools import setup setup( name='LoadStone', version='0.1', description='Interface for FFXIV Lodestone', author='Sami Elahmadie', author_email='s.elahmadie@gmail.com', url='https://github.com/Demotivated/loadstone/', packages=['api'], install_requires=[ ...
Add a line break between each version in changelog.
<?php $template->assign('PageTopic','Change Log'); $db2 = new SmrMySqlDatabase(); $db->query('SELECT * FROM version WHERE version_id <= ' . $var['version_id'] . ' ORDER BY version_id DESC'); while ($db->nextRecord()) { $version_id = $db->getField('version_id'); $version = $db->getField('major_version') . ...
<?php $template->assign('PageTopic','Change Log'); $db2 = new SmrMySqlDatabase(); $db->query('SELECT * FROM version WHERE version_id <= ' . $var['version_id'] . ' ORDER BY version_id DESC'); while ($db->nextRecord()) { $version_id = $db->getField('version_id'); $version = $db->getField('major_version') ....
Reset methode toegevoegd voor de resetKnop
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package keygamep3; /** * * @author rubenvde */ public class Dimensie { private int x; private int y; public Dimens...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package keygamep3; /** * * @author rubenvde */ public class Dimensie { private int x; private int y; public Dimens...
Use ASTRUNDIR, not /tmp, for the lockfile Use "scheduler.lock" as the lockfile name. Need to read in the configuration files first, so we know which directory will hold the lock.
#!/usr/bin/env php <?php // vim: set ai ts=4 sw=4 ft=php: // License for all code of this FreePBX module can be found in the license file inside the module directory // Copyright 2013 Schmooze Com Inc. // // Dashboard Scheduler. // Runs every minute. // // Start quickly. $bootstrap_settings['freepbx_auth'] = false; /...
#!/usr/bin/env php <?php // vim: set ai ts=4 sw=4 ft=php: // License for all code of this FreePBX module can be found in the license file inside the module directory // Copyright 2013 Schmooze Com Inc. // // Dashboard Scheduler. // Runs every minute. // $lockfile = "/tmp/scheduler-lock"; // Sleep to fix crazy issues ...
Make sure serialized content don't get unserialized
var cookie = require('cookie'); var _cookies = cookie.parse((typeof document !== 'undefined') ? document.cookie : ''); for (var key in _cookies) { try { _cookies[key] = JSON.parse(_cookies[key]); } catch(e) { // Not serialized object } } function load(name) { return _cookies[name]; } function save(n...
var cookie = require('cookie'); var _cookies = cookie.parse((typeof document !== 'undefined') ? document.cookie : ''); for (var key in _cookies) { try { _cookies[key] = JSON.parse(_cookies[key]); } catch(e) { // Not serialized object } } function load(name) { return _cookies[name]; } function save(n...
Optimize heavily called function `isSameNodeType()`
import { clone, isString, toLowerCase, hasOwnProperty } from '../util'; import { isFunctionalComponent } from './functional-component'; import { getNodeType } from '../dom'; /** Check if two nodes are equivalent. * @param {Element} node * @param {VNode} vnode * @private */ export function isSameNodeType(node, vno...
import { clone, toLowerCase, isFunction, isString, hasOwnProperty } from '../util'; import { isFunctionalComponent } from './functional-component'; import { getNodeType } from '../dom/index'; /** Check if two nodes are equivalent. * @param {Element} node * @param {VNode} vnode * @private */ export function isSame...
[FAB-9222] Fix ledger test race condition There seems to be contention for a base ledger directory used throughout the tests. This change adds a random directory to the paths for tests in the base package. Change-Id: I25a9f4312cf0f4b55596d69e46ab0b4b07f0912c Signed-off-by: Gari Singh <10008a422f4be611b73174084ba2f7f...
/* Copyright IBM Corp. 2016 All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
/* Copyright IBM Corp. 2016 All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
Add a reference to jasmine typings
/// <reference path="typings/globals/jasmine/index.d.ts" /> 'use strict'; describe('javaScript', function () { it('Revealing prototype pattern', function () { var Calculator = function(seed){ this.seed = seed; }; Calculator.prototype = function (){ function add (ite...
'use strict'; describe('javaScript', function () { it('Revealing prototype pattern', function () { var Calculator = function(seed){ this.seed = seed; }; Calculator.prototype = function (){ function add (item){ return this.seed + item; }; ...
Fix eclipse build: “UnicodeDecodeError: 'ascii' codec can't decode byte” Closes https://github.com/espressif/esp-idf/pull/6505
#!/usr/bin/env python # # Wrapper to run make and preprocess any paths in the output from MSYS Unix-style paths # to Windows paths, for Eclipse from __future__ import division, print_function import os.path import re import subprocess import sys UNIX_PATH_RE = re.compile(r'(/[^ \'"]+)+') paths = {} def check_path(...
#!/usr/bin/env python # # Wrapper to run make and preprocess any paths in the output from MSYS Unix-style paths # to Windows paths, for Eclipse from __future__ import division, print_function import os.path import re import subprocess import sys UNIX_PATH_RE = re.compile(r'(/[^ \'"]+)+') paths = {} def check_path(...
Use the new API to register a build plugin
Package.describe({ summary: "Jade template language", version: "0.2.9", name: "mquandalle:jade", git: "https://github.com/mquandalle/meteor-jade.git" }); Package.registerBuildPlugin({ name: "compileJade", use: [ "underscore", "htmljs", "html-tools", "spacebars-compiler", ], sources: [ ...
Package.describe({ summary: "Jade template language", version: "0.2.9", name: "mquandalle:jade", git: "https://github.com/mquandalle/meteor-jade.git" }); Package._transitional_registerBuildPlugin({ name: "compileJade", use: [ "underscore", "htmljs", "html-tools", "spacebars-compiler", ], ...
Fix type cache getting result on func calls
import { GraphQLObjectType, GraphQLID } from 'graphql'; import buildAttributes from './buildAttributes'; import buildRelationships from './buildRelationships'; import titleizeType from './titleizeType'; const getDefaultDescription = (name) => `The ${titleizeType(name)} Cohere model.`; const typeCache = {}; export def...
import { GraphQLObjectType, GraphQLID } from 'graphql'; import buildAttributes from './buildAttributes'; import buildRelationships from './buildRelationships'; import titleizeType from './titleizeType'; const getDefaultDescription = (name) => `The ${titleizeType(name)} Cohere model.`; export default (schema) => { c...
Make plugin work on case-sensitive systems JSON5 package is published as `json5` not `JSON5` to npm. Requiring it as `JSON5` make case-sensitive systems fail
var path = require('path'); var gutil = require('gulp-util'); var map = require('map-stream'); var JSON5 = require('json5'); var PluginError = gutil.PluginError; const PLUGIN_NAME = 'gulp-json5'; module.exports = function(options) { options = typeof options !== 'object' ? {} : options; options.beautify = option...
var path = require('path'); var gutil = require('gulp-util'); var map = require('map-stream'); var JSON5 = require('JSON5'); var PluginError = gutil.PluginError; const PLUGIN_NAME = 'gulp-json5'; module.exports = function(options) { options = typeof options !== 'object' ? {} : options; options.beautify = option...
Update manipulator include for setup
document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/merged/seg_desktop.js"></script>'); document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/src/beta-u-notifier.js"></script>'); document.write('<script type="text/javascript" src="/...
document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/merged/seg_desktop.js"></script>'); document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/src/beta-u-notifier.js"></script>'); document.write('<script type="text/javascript" src="/...
Fix delete client: authorizations should be removed. Signed-off-by: François de Metz <4073ce8ed0c8af431a3bf625d935cc2c9542ae9c@af83.com> Signed-off-by: Virtuo <ff019a5748a52b5641624af88a54a2f0e46a9fb5@ruyssen.fr>
/* Where is defined the DB connection. * * We got the following collections (cf. schema.js): * - User * - Client * - Grant * */ require.paths.unshift(__dirname + "/../vendors/rest-mongo/src") var events = require('events') , rest_mongo = require("rest-mongo/core") , mongo_backend = require("rest-mongo/...
/* Where is defined the DB connection. * * We got the following collections (cf. schema.js): * - User * - Client * - Grant * */ require.paths.unshift(__dirname + "/../vendors/rest-mongo/src") var events = require('events') , rest_mongo = require("rest-mongo/core") , mongo_backend = require("rest-mongo/...
Adjust day size to 100k. Change status flag placement.
import capture from picamera import PiCamera import time def image_cap_loop(camera, status=None): """Set image parameters, capture image, set wait time, repeat""" resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image_size(latest[1]) ...
import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image...
Fix find_neighbours_2D to ignore out of bounds points ... rather than 'trim' the coords, which made no sense.
from __future__ import division import itertools def get_offsets(span): """ Get matrix offsets for a square of distance `span`. """ if span < 0: raise ValueError('Cannot return neighbours for negative distance') all_offsets = set(itertools.product([x for x in range(-span, span + 1)], rep...
from __future__ import division import itertools def get_offsets(span): """ Get matrix offsets for a square of distance `span`. """ if span < 0: raise ValueError('Cannot return neighbours for negative distance') all_offsets = set(itertools.product([x for x in range(-span, span + 1)], rep...
Use newer interface for filtering The image provided by `plone.app.contenttypes` does reintroduce the global IImage identifier lost during the transition to dexterity based types
# -*- coding: utf-8 -*- """Module providing views for asset storage folder""" from Products.Five.browser import BrowserView from plone import api from plone.app.contenttypes.interfaces import IImage class AssetRepositoryView(BrowserView): """ Folderish content page default view """ def contained_items(self, u...
# -*- coding: utf-8 -*- """Module providing views for asset storage folder""" from Products.Five.browser import BrowserView from plone import api from plone.app.blob.interfaces import IATBlobImage class AssetRepositoryView(BrowserView): """ Folderish content page default view """ def contained_items(self, ui...