text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Check the value of the Boolean as well. Props @m4dc4p
package com.tozny.sdk.realm.methods.link_challenge; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonProperty; import com.tozny.sdk.ToznyApiRequest; import javax.annotation.Nullable; /** * Constructs a Request for invoking the "realm.link_challenge" method. */ @Js...
package com.tozny.sdk.realm.methods.link_challenge; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonProperty; import com.tozny.sdk.ToznyApiRequest; import javax.annotation.Nullable; /** * Constructs a Request for invoking the "realm.link_challenge" method. */ @Js...
Move expected test failure to TestCase class.
"""Django DDP Accounts test suite.""" from __future__ import unicode_literals import sys from dddp import tests # gevent-websocket doesn't work with Python 3 yet @tests.expected_failure_if(sys.version_info.major == 3) class AccountsTestCase(tests.DDPServerTestCase): def test_login_no_accounts(self): soc...
"""Django DDP Accounts test suite.""" from __future__ import unicode_literals import sys from dddp import tests class AccountsTestCase(tests.DDPServerTestCase): # gevent-websocket doesn't work with Python 3 yet @tests.expected_failure_if(sys.version_info.major == 3) def test_login_no_accounts(self): ...
Add endpoints for external transform and debug
package util; import com.google.gson.JsonObject; import okhttp3.RequestBody; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.http.*; /** * Retrofit interfaces wrapping Filestack API. */ public class FilestackService { public interface Api { String URL = "https://www.filestackapi.co...
package util; import com.google.gson.JsonObject; import okhttp3.RequestBody; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.http.*; /** * Retrofit interfaces wrapping Filestack API. */ public class FilestackService { public interface Api { String URL = "https://www.filestackapi.co...
Add transfering timeout callback arguments to done Closes: #150 PR-URL: https://github.com/metarhia/metasync/pull/153 Reviewed-By: Timur Shemsedinov <6dc7cb6a9fcface2186172df883b5c9ab417ae33@gmail.com>
'use strict'; module.exports = (api) => { api.metasync.throttle = ( // Function throttling timeout, // time interval fn, // function to be executed once per timeout args // arguments array for fn (optional) ) => { let timer = null; let wait = false; return function throttled() { ...
'use strict'; module.exports = (api) => { api.metasync.throttle = ( // Function throttling timeout, // time interval fn, // function to be executed once per timeout args // arguments array for fn (optional) ) => { let timer = null; let wait = false; return function throttled() { ...
Fix missing LICENCE in dist package
#!/usr/bin/env python import sys from setuptools import setup, find_packages if sys.version_info < (3, 3): sys.exit('Sorry, Python < 3.3 is not supported') setup( name='pyecore', version='0.5.5-dev', description=('A Python(ic) Implementation of the Eclipse Modeling ' 'Framework (EMF/...
#!/usr/bin/env python import sys from setuptools import setup, find_packages if sys.version_info < (3, 3): sys.exit('Sorry, Python < 3.3 is not supported') setup( name='pyecore', version='0.5.5-dev', description=('A Python(ic) Implementation of the Eclipse Modeling ' 'Framework (EMF/...
Include templates, etc, with install
from setuptools import setup, find_packages from sys import version_info assert version_info >= (2,7) setup( name='molly', version='2.0dev', packages=find_packages(exclude=['tests']), include_package_data=True, url='http://mollyproject.org/', author='The Molly Project', setup_requires=['se...
from setuptools import setup, find_packages from sys import version_info assert version_info >= (2,7) setup( name='molly', version='2.0dev', packages=find_packages(exclude=['tests']), url='http://mollyproject.org/', author='The Molly Project', setup_requires=['setuptools'], tests_require=[...
Update Hearts lambda function to new DB schema.
'use strict'; const db = require('../utils/database'); /** * Fetches a user ID from the database. * @constructor * @param {integer} userId - The user's ID * @return {integer} The number of Hearts a user has. */ const getHeartsForUser = (userId) => { return db.get({ TableName: 'Users', Key: { id: u...
'use strict'; const db = require('../utils/database'); /** * Fetches a user ID from the database. * @constructor * @param {integer} userId - The user's ID * @return {integer} The number of Hearts a user has. */ const getHeartsForUser = (userId) => { return db.get({ TableName: 'Users', Key: { UserI...
Fix wrong module name in migrations
from django.utils.encoding import smart_str from kitsune.products.models import Product from taggit.models import Tag from kitsune.questions.models import Question tags_to_migrate = { # source tag -> product 'desktop': ['firefox'], 'mobile': ['mobile'] } def assert_equals(a, b): assert a == b, '%s !...
from django.utils.encoding import smart_str from kitsune.products.models import Product from kitsune.taggit.models import Tag from kitsune.questions.models import Question tags_to_migrate = { # source tag -> product 'desktop': ['firefox'], 'mobile': ['mobile'] } def assert_equals(a, b): assert a == ...
Break lines so they don't overstep right margin
package org.CG.infrastructure; import javax.media.opengl.GL; /** * * @author ldavid */ public abstract class Drawing { protected Point start; protected ColorByte color; protected boolean finished; protected int glDrawingType = GL.GL_POINTS; public Drawing() { // All drawings, except b...
package org.CG.infrastructure; import javax.media.opengl.GL; /** * * @author ldavid */ public abstract class Drawing { protected Point start; protected ColorByte color; protected boolean finished; protected int glDrawingType = GL.GL_POINTS; public Drawing() { // All drawings, except b...
Allow late subscribers to immediately get the visibility status
package com.gramboid.rxappfocus; import android.app.Activity; import android.app.Application; import android.app.Application.ActivityLifecycleCallbacks; import rx.Observable; import rx.subjects.ReplaySubject; /** * Provides Observables to monitor app visibility. */ public class AppFocusProvider { private bool...
package com.gramboid.rxappfocus; import android.app.Activity; import android.app.Application; import android.app.Application.ActivityLifecycleCallbacks; import rx.Observable; import rx.subjects.PublishSubject; /** * Provides Observables to monitor app visibility. */ public class AppFocusProvider { private boo...
BUGFIX: Fix typo 'showNotificatons' -> 'showNotifications'.
package repo type SettingsData struct { PaymentDataInQR *bool `json:"paymentDataInQR"` ShowNotifications *bool `json:"showNotifications"` ShowNsfw *bool `json:"showNsfw"` ShippingAddresses *[]ShippingAddress `json:"shippingAddresses"` LocalCurrency *strin...
package repo type SettingsData struct { PaymentDataInQR *bool `json:"paymentDataInQR"` ShowNotifications *bool `json:"showNotificatons"` ShowNsfw *bool `json:"showNsfw"` ShippingAddresses *[]ShippingAddress `json:"shippingAddresses"` LocalCurrency *string...
Save one request at feed managing.
angular.module('caco.feed.crtl') .controller('FeedManageCrtl', function ($rootScope, $scope, $stateParams, $location, Feeds, FeedREST, FeedUrlLookupREST) { $rootScope.module = 'feed'; $rootScope.modulePath = $location.path(); if ($stateParams.id) { Feeds.getOne($stateParams.id, ...
angular.module('caco.feed.crtl') .controller('FeedManageCrtl', function ($rootScope, $scope, $stateParams, $location, Feeds, FeedREST, FeedUrlLookupREST) { $rootScope.module = 'feed'; $rootScope.modulePath = $location.path(); Feeds.get(function (feeds) { $scope.feeds = feeds; ...
Add Firefox 3.6 to Sauce
"use strict"; module.exports = function(config) { var customLaunchers = { iOSSafari: { base: "SauceLabs", browserName: "iphone", version: "5.1" }, ie7: { base: "SauceLabs", browserName: "internet explorer", version: "7...
"use strict"; module.exports = function(config) { var customLaunchers = { iOSSafari: { base: "SauceLabs", browserName: "iphone", version: "5.1" }, ie7: { base: "SauceLabs", browserName: "internet explorer", version: "7...
Fix creation of json for image (pandoc 1.12.3.3) At least with pandoc 1.12.3.3 otherwise you get an error pandoc: when expecting a [a], encountered Object instead
#!/usr/bin/env python """ Pandoc filter to process code blocks with class "graphviz" into graphviz-generated images. """ import pygraphviz import hashlib import os import sys from pandocfilters import toJSONFilter, Str, Para, Image def sha1(x): return hashlib.sha1(x).hexdigest() imagedir = "graphviz-images" def ...
#!/usr/bin/env python """ Pandoc filter to process code blocks with class "graphviz" into graphviz-generated images. """ import pygraphviz import hashlib import os import sys from pandocfilters import toJSONFilter, Str, Para, Image def sha1(x): return hashlib.sha1(x).hexdigest() imagedir = "graphviz-images" def ...
Use JavaScript to intercept space bar event.
var Cloudy = { isPlayerPage: function() { return $("#audioplayer").length == 1; }, sendEpisodeToCloudy: function() { var episodeTitle = $(".titlestack .title").text(); var showTitle = $(".titlestack .caption2").text(); var details = { "show_title": showTitle, ...
var Cloudy = { isPlayerPage: function() { return $("#audioplayer").length == 1; }, sendEpisodeToCloudy: function() { var episodeTitle = $(".titlestack .title").text(); var showTitle = $(".titlestack .caption2").text(); var details = { "show_title": showTitle, ...
Set webpack mode to silence warning
var webpack = require('webpack'); var path = require('path'); var fs = require('fs'); var nodeModules = {}; // This is to filter out node_modules as we don't want them // to be made part of any bundles. fs.readdirSync('node_modules') .filter(function(x) { return ['.bin'].indexOf(x) === -1; }) .forEach(funct...
var webpack = require('webpack'); var path = require('path'); var fs = require('fs'); var nodeModules = {}; // This is to filter out node_modules as we don't want them // to be made part of any bundles. fs.readdirSync('node_modules') .filter(function(x) { return ['.bin'].indexOf(x) === -1; }) .forEach(funct...
[MOD] Use browse record instead of ids
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, api class StockQuant(model...
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, api class StockQuant(model...
Fix wrong sessions time interval parameter datatype
<?php declare(strict_types=1); namespace Cortex\Fort\Http\Controllers\Backend; use Carbon\Carbon; use Cortex\Fort\Models\Role; use Cortex\Fort\Models\User; use Cortex\Fort\Models\Ability; use Rinvex\Fort\Models\Session; use Illuminate\Support\Facades\DB; use Cortex\Foundation\Http\Controllers\AuthorizedController; ...
<?php declare(strict_types=1); namespace Cortex\Fort\Http\Controllers\Backend; use Carbon\Carbon; use Cortex\Fort\Models\Role; use Cortex\Fort\Models\User; use Cortex\Fort\Models\Ability; use Rinvex\Fort\Models\Session; use Illuminate\Support\Facades\DB; use Cortex\Foundation\Http\Controllers\AuthorizedController; ...
Fix REPL and add quit() command
import sys import code import traceback from diesel import Application, Pipe, until QUIT_STR = "quit()\n" DEFAULT_PROMPT = '>>> ' def diesel_repl(): '''Simple REPL for use inside a diesel app''' # Import current_app into locals for use in REPL from diesel.app import current_app print 'Diesel Console'...
''' Sample REPL code to integrate with Diesel Using InteractiveInterpreter broke block handling (if/def/etc.), but exceptions were handled well and the return value of code was printed. Using exec runs the input in the current context, but exception handling and other features of InteractiveInterpreter are lost. ''' ...
Copy uploads from correct source
var config = require('../src/config/config') var client = require('mongodb').MongoClient var fs = require('fs-extra') client.connect(config.database.host+'vegodev', function(err, db){ if (err) throw err //Drop vegodev database if it exists db.dropDatabase(function(err, result) { var adminDb = db.admin() ...
var config = require('../src/config/config') var client = require('mongodb').MongoClient var fs = require('fs-extra') client.connect(config.database.host+'vegodev', function(err, db){ if (err) throw err //Drop vegodev database if it exists db.dropDatabase(function(err, result) { var adminDb = db.admin() ...
Allow running tests with postgres
#!/usr/bin/env python import sys from os.path import dirname, abspath from django.conf import settings if len(sys.argv) > 1 and 'postgres' in sys.argv: sys.argv.remove('postgres') db_engine = 'postgresql_psycopg2' db_name = 'test_main' else: db_engine = 'sqlite3' db_name = '' if not settings.conf...
#!/usr/bin/env python import sys from os.path import dirname, abspath from django.conf import settings if not settings.configured: settings.configure( DATABASE_ENGINE = 'sqlite3', SITE_ID = 1, TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', ...
Fix AnyUrlField migration issue on Django 1.11.
""" Optional integration with django-any-urlfield """ from __future__ import absolute_import from django.db import models from fluent_utils.django_compat import is_installed if is_installed('any_urlfield'): from any_urlfield.models import AnyUrlField as BaseUrlField else: BaseUrlField = models.URLField # s...
""" Optional integration with django-any-urlfield """ from __future__ import absolute_import from django.db import models from fluent_utils.django_compat import is_installed if is_installed('any_urlfield'): from any_urlfield.models import AnyUrlField as BaseUrlField else: BaseUrlField = models.URLField # s...
Reduce frequency of 'random' ssl tests.
from cgi import FieldStorage from logging import debug, error, info from time import time from trackon import tracker MAX_MIN_INTERVAL = 60*60*5 DEFAULT_CHECK_INTERVAL = 60*15 def main(): args = FieldStorage() now = int(time()) if 'tracker-address' in args: t = args['tracker-address'].value ...
from cgi import FieldStorage from logging import debug, error, info from time import time from trackon import tracker MAX_MIN_INTERVAL = 60*60*5 DEFAULT_CHECK_INTERVAL = 60*15 def main(): args = FieldStorage() now = int(time()) if 'tracker-address' in args: t = args['tracker-address'].value ...
Print email recipients on startup
'use strict'; const schedule = require('node-schedule'); const jenkins = require('./lib/jenkins'); const redis = require('./lib/redis'); const gitter = require('./lib/gitter'); const sendgrid = require('./lib/sendgrid'); const pkg = require('./package.json'); console.log(new Date(), `Staring ${pkg.name} v${pkg.v...
'use strict'; const schedule = require('node-schedule'); const jenkins = require('./lib/jenkins'); const redis = require('./lib/redis'); const gitter = require('./lib/gitter'); const sendgrid = require('./lib/sendgrid'); const pkg = require('./package.json'); console.log(new Date(), `Staring ${pkg.name} v${pkg.v...
BAP-11307: Create notice popup for xlsx grid export - fix maximum number
<?php namespace Oro\Bundle\DataGridBundle\Extension\Export; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; class Configuration implements ConfigurationInterface { const XLSX_MAX_EXPORT_RECORDS = 10000; /** * {@inheritDoc} ...
<?php namespace Oro\Bundle\DataGridBundle\Extension\Export; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; class Configuration implements ConfigurationInterface { const XLSX_MAX_EXPORT_RECORDS = 10; /** * {@inheritDoc} *...
Fix ui/main to call ui/ui correctly.
define(['./client_secrets', 'ui/ui'], function (secrets, ui) { var client_id = secrets.web.client_id, scopes = [ 'https://www.googleapis.com/auth/drive' ], authorization = null; var attemptAuthorization = function (immediate) { gapi.auth.authorize( ...
define(['./client_secrets', 'ui/main'], function (secrets, ui) { var client_id = secrets.web.client_id, scopes = [ 'https://www.googleapis.com/auth/drive' ], authorization = null; var attemptAuthorization = function (immediate) { gapi.auth.authorize( ...
Correct duration when no commands is logged
<?php namespace Blablacar\MemcachedBundle\DataCollector; use Symfony\Component\HttpKernel\DataCollector\DataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Blablacar\MemcachedBundle\Memcached\ClientLogger; class MemcachedDataCollector extends DataCollector ...
<?php namespace Blablacar\MemcachedBundle\DataCollector; use Symfony\Component\HttpKernel\DataCollector\DataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Blablacar\MemcachedBundle\Memcached\ClientLogger; class MemcachedDataCollector extends DataCollector ...
Add filter argument to filter aggregation.
<?php /* * This file is part of the ONGR package. * * (c) NFQ Technologies UAB <info@nfq.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace ONGR\ElasticsearchDSL\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\Typ...
<?php /* * This file is part of the ONGR package. * * (c) NFQ Technologies UAB <info@nfq.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace ONGR\ElasticsearchDSL\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\Typ...
Add comment about async dictionary
define(['./helpers/trie'], function(Trie){ function BoggleSolver(board){ var solutions = new Set(); var solArray; var trie = Trie.loadDictionary(); solve(board, solutions); // with big dictionary, might want to make this asynchronous function addNeighbor(sequence, n) { ...
define(['./helpers/trie'], function(Trie){ function BoggleSolver(board){ var solutions = new Set(); var solArray; var trie = Trie.loadDictionary(); solve(board, solutions); function addNeighbor(sequence, n) { if(!n.visited) solveCell(n, sequence + n.value); ...
Adjust code style to reduce lines of code :bear:
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
Improve speed of targeting by removing unecessary asset updates
import { Component } from "react"; import { withApollo } from "react-apollo"; import gql from "graphql-tag"; const assetPath = `${window.location.protocol}//${window.location.host}/assets`; export default (assetKey, simulatorId, extension, CORS) => { return `${assetPath}${assetKey}/${simulatorId}.${extension}`; }; ...
import { Component } from "react"; import { withApollo } from "react-apollo"; import gql from "graphql-tag"; const assetPath = `${window.location.protocol}//${window.location.host}/assets`; export default (assetKey, simulatorId, extension, CORS) => { return `${assetPath}${assetKey}/${simulatorId}.${extension}`; }; ...
Allow render opts to div.
# -*- coding: utf-8 -*- from riot.layout import render_layout, patch_layout def test_render_div(): assert render_layout([ 'div', {}, [] ]) == [ 'div', { 'div_char': u' ', 'top': 0, 'bottom': 0, } ] def test_render_div_with_opts(): as...
# -*- coding: utf-8 -*- from riot.layout import render_layout, patch_layout def test_render_div(): assert render_layout([ 'div', {}, [] ]) == [ 'div', { 'div_char': u' ', 'top': 0, 'bottom': 0, } ] def test_render_div_with_div_char(): ...
Remove parse in Progam collection.
define([ 'backbone', 'App.config', 'App.models.Program' ], function(Backbone, config, ProgramModel) { 'use strict'; return Backbone.Collection.extend({ model : ProgramModel, url : config.data.programs, findByCandidate: function(id) { return this.find(function(model) { if (mod...
define([ 'App.config', 'App.models.Program', 'backbone' ], function(config, ProgramModel, Backbone) { 'use strict'; return Backbone.Collection.extend({ model : ProgramModel, url : config.data.programs, parse: function(res) { return res.programs; }, findByCandidate: function(...
Handle no roles on users table
import React, {PropTypes} from 'react' const UsersTable = ({users}) => ( <div className="panel panel-minimal"> <div className="panel-body"> <table className="table v-center"> <thead> <tr> <th>User</th> <th>Roles</th> <th>Permissions</th> </tr>...
import React, {PropTypes} from 'react' const UsersTable = ({users}) => ( <div className="panel panel-minimal"> <div className="panel-body"> <table className="table v-center"> <thead> <tr> <th>User</th> <th>Roles</th> <th>Permissions</th> </tr>...
Use ascii in logging message
import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) def content_hook(...
import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) def content_hook(...
Add SCSS support. node-sass already support SCSS but this plugin only allows SASS file extension.
var Q = require('q'); var _ = require('lodash'); var path = require('path'); var fs = require('fs'); var sass = require('node-sass'); // Compile a SASS file into a css function renderSASS(input, output) { var d = Q.defer(); sass.render({ file: input }, function (e, out) { if (e) return d.r...
var Q = require('q'); var _ = require('lodash'); var path = require('path'); var fs = require('fs'); var sass = require('node-sass'); // Compile a SASS file into a css function renderSASS(input, output) { var d = Q.defer(); sass.render({ file: input }, function (e, out) { if (e) return d.r...
Add run solver first exception type
#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class RunSolverFirst(Exception): pass class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def ...
#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def run(self): start_time = datetime.now...
Update PHPDoc on config manifest proxy constructor
<?php namespace LeKoala\DebugBar\Proxy; use SilverStripe\Config\Collections\CachedConfigCollection; class ConfigManifestProxy extends CachedConfigCollection { /** * @var CachedConfigCollection */ protected $parent; /** * @var array */ protected static $configCalls = []; /** ...
<?php namespace LeKoala\DebugBar\Proxy; use SilverStripe\Config\Collections\CachedConfigCollection; class ConfigManifestProxy extends CachedConfigCollection { /** * @var CachedConfigCollection */ protected $parent; /** * @var array */ protected static $configCalls = []; /** ...
Update the commit_over_52 template tag to be more efficient. Replaced several list comprehensions with in-database operations and map calls for significantly improved performance.
from datetime import timedelta from datetime import datetime from django import template from github2.client import Github from package.models import Package, Commit register = template.Library() github = Github() @register.filter def commits_over_52(package): current = datetime.now() weeks = [] comm...
from datetime import timedelta from datetime import datetime from django import template from github2.client import Github from package.models import Package, Commit register = template.Library() github = Github() @register.filter def commits_over_52(package): current = datetime.now() weeks = [] comm...
Use `execFile` instead of `exec`
import {execFile} from 'child_process'; import semver from 'semver'; const {major, minor, patch} = semver.parse(atom.appVersion); const atomVersion = `${major}.${minor}.${patch}`; const requiredVersion = '>=1.14.0'; import GitPromptServer from '../lib/git-prompt-server'; // Will not pass on Appveyor if (process.pla...
import {exec} from 'child_process'; import semver from 'semver'; const {major, minor, patch} = semver.parse(atom.appVersion); const atomVersion = `${major}.${minor}.${patch}`; const requiredVersion = '>=1.14.0'; import GitPromptServer from '../lib/git-prompt-server'; // Will not pass on Appveyor if (process.platfor...
Add a `travis` task for grunt.
module.exports = function(grunt) { 'use strict'; // Configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jscs: { options: { config: '.jscsrc' }, bin: 'bin/**/*.js', grunt: 'Gruntfile.js', lib...
module.exports = function(grunt) { 'use strict'; // Configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jscs: { options: { config: '.jscsrc' }, bin: 'bin/**/*.js', grunt: 'Gruntfile.js', lib...
Fix the imports in the tests of dropbox
import os from path import path from tests.utils.testdriver import TestDriver from tests.utils.tempdirs import dirs from onitu.drivers.dropbox.dropboxDriver import dropboxDriver class Driver(TestDriver): def __init__(self, *args, **options): if 'root' not in options: options['root'] = dirs.cr...
import os from path import path from tests.utils.testdriver import TestDriver from tests.utils.tempdirs import dirs from onitu.drivers.dropbox.libDropbox import LibDropbox class Driver(TestDriver): def __init__(self, *args, **options): if 'root' not in options: options['root'] = dirs.create()...
Add instructions and improve formatting
import React from 'react'; import { Modal } from 'react-bootstrap'; export default class ListSignupFormCreator extends React.Component { constructor(props) { super(props); this.state = { subscribeKey: this.props.subscribeKey, showModal: false }; } showModal() { this.setState({ ...
import React from 'react'; import { Modal } from 'react-bootstrap'; export default class ListSignupFormCreator extends React.Component { constructor(props) { super(props); this.state = { subscribeKey: this.props.subscribeKey, showModal: false }; } showModal() { this.setState({ ...
Clear assets box view cache when starting ccw
<?php use Symfony\Component\Process\Process; class Kwf_Controller_Action_Cli_Web_ClearCacheWatcherController extends Kwf_Controller_Action_Cli_Abstract { public static function getHelp() { return 'watch filesystem for modification and clear affected caches'; } public function indexAction() ...
<?php use Symfony\Component\Process\Process; class Kwf_Controller_Action_Cli_Web_ClearCacheWatcherController extends Kwf_Controller_Action_Cli_Abstract { public static function getHelp() { return 'watch filesystem for modification and clear affected caches'; } public function indexAction() ...
Hide button, enable timer for swal, note confirm color is white swal doesn't completely hide the button
var cancelAppointment = function(timeslot_id) { $("#modal_remote").modal('hide'); swal({ title: "Are you sure?", text: "You will be removed from this appointment.", type: "warning", showCancelButton: true, confirmButtonColor: "#EF5350", confirmButtonText: "Yes, cancel...
var cancelAppointment = function(timeslot_id) { $("#modal_remote").modal('hide'); swal({ title: "Are you sure?", text: "You will be removed from this appointment.", type: "warning", showCancelButton: true, confirmButtonColor: "#EF5350", confirmButtonText: "Yes, cancel...
Add parameter to get single post/user/tag
import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { actions } from 'redux-ghost'; import JsonTree from 'react-json-tree'; import './app.css'; const App = ({ actions, blog }) => { return ( <div className="wrapper"> <h1>Redux Ghost Blog</h1...
import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { actions } from 'redux-ghost'; import JsonTree from 'react-json-tree'; import './app.css'; const App = ({ actions, blog }) => { return ( <div className="wrapper"> <h1>Redux Ghost Blog</h1...
[Tests] Remove twig loader override to use StringLoader. The loader always returns true for template existence checks and it's deprecated. Shouldn't be too big of a problem as we are already project fixture directory.
<?php namespace Bolt\Tests\Controller; use Bolt\Configuration\Validation\Validator; use Bolt\Tests\BoltUnitTest; use Symfony\Component\HttpFoundation\Request; abstract class ControllerUnitTest extends BoltUnitTest { private $app; protected function setUp() { $this->resetDb(); $this->addDe...
<?php namespace Bolt\Tests\Controller; use Bolt\Configuration\Validation\Validator; use Bolt\Tests\BoltUnitTest; use Symfony\Component\HttpFoundation\Request; abstract class ControllerUnitTest extends BoltUnitTest { private $app; protected function setUp() { $this->resetDb(); $this->addDe...
Fix email collection js bug.
$(document).ready(function() { var $join = $('#landing-join'), $landingEmailForm = $join.find('form'), $landingEmailInput = $join.find('.landing-email-input'), $landingEmailSubmit = $join.find('.landing-email-submit'), $landingEmailSpinner = $landingEmailSubmit.find('.fa-spinner'), $land...
$(document).ready(function() { var $join = $('#landing-join'), $landingEmailForm = $join.find('form'), $landingEmailInput = $join.find('.landing-email-input'), $landingEmailSubmit = $join.find('.landing-email-submit'), $landingEmailSpinner = $landingEmailSubmit.find('.fa-spinner'), $land...
Fix typo in package name. Cairp: what you get when you mix cairo with carp. Or perhaps a cairn made of carp?
#!/usr/bin/env python from distutils.core import setup def main (): dlls = ["bin/%s" % dll for dll in ["libcairo-2.dll"]] licenses = ["doc/%s" % license for license in ["LICENSE-LGPL.TXT", "LICENSE-CAIRO.TXT"]] others = ["README.rst", "LICENSE.rst"] long_description = """ This package con...
#!/usr/bin/env python from distutils.core import setup def main (): dlls = ["bin/%s" % dll for dll in ["libcairo-2.dll"]] licenses = ["doc/%s" % license for license in ["LICENSE-LGPL.TXT", "LICENSE-CAIRO.TXT"]] others = ["README.rst", "LICENSE.rst"] long_description = """ This package con...
Convert perms to a string
from resource_management import * import os def create_hdfs_dir(path, owner, perms): Execute('hadoop fs -mkdir -p '+path, user='hdfs') Execute('hadoop fs -chown ' + owner + ' ' + path, user='hdfs') Execute('hadoop fs -chmod ' + str(perms) + ' ' + path, user='hdfs') def package(name): import params Execute(p...
from resource_management import * import os def create_hdfs_dir(path, owner, perms): Execute('hadoop fs -mkdir -p '+path, user='hdfs') Execute('hadoop fs -chown ' + owner + ' ' + path, user='hdfs') Execute('hadoop fs -chmod ' + perms + ' ' + path, user='hdfs') def package(name): import params Execute(params...
Disable prop-types rule because Flow
const commonRules = require("./rules"); module.exports = { parser: "babel-eslint", plugins: ["react", "babel", "flowtype", "prettier", "import"], env: { browser: true, es6: true, jest: true, node: true, }, parserOptions: { sourceType: "module", ecmaFe...
const commonRules = require("./rules"); module.exports = { parser: "babel-eslint", plugins: ["react", "babel", "flowtype", "prettier", "import"], env: { browser: true, es6: true, jest: true, node: true, }, parserOptions: { sourceType: "module", ecmaFe...
Allow partitionAssigners to be configured
const { createLogger, LEVELS: { INFO } } = require('./loggers') const LoggerConsole = require('./loggers/console') const Cluster = require('./cluster') const createProducer = require('./producer') const createConsumer = require('./consumer') const { assign } = Object module.exports = class Client { constructor({ ...
const { createLogger, LEVELS: { INFO } } = require('./loggers') const LoggerConsole = require('./loggers/console') const Cluster = require('./cluster') const createProducer = require('./producer') const createConsumer = require('./consumer') const { assign } = Object module.exports = class Client { constructor({ ...
Clean tmp directory before tests.
'use strict'; const loadGruntTasks = require('load-grunt-tasks'); const rollupPluginBabel = require('rollup-plugin-babel'); module.exports = function register(grunt) { loadGruntTasks(grunt); grunt.initConfig({ eslint: { all: ['lib', 'test'], }, clean: { all: ['dist', 'tmp'], }, ...
'use strict'; const loadGruntTasks = require('load-grunt-tasks'); const rollupPluginBabel = require('rollup-plugin-babel'); module.exports = function register(grunt) { loadGruntTasks(grunt); grunt.initConfig({ eslint: { all: ['lib', 'test'], }, clean: { all: ['dist'], }, rollup...
Add loading_embedly variable to parent scope
/** * Created by moran on 12/06/14. */ (function (module) { module.directive('emEmbed', ['embedlyService', function(embedlyService) { return { restrict: 'E', scope:{ urlsearch: '@', maxwidth: '@' }, controller: 'emEmbedCtrl',...
/** * Created by moran on 12/06/14. */ (function (module) { module.directive('emEmbed', ['embedlyService', function(embedlyService) { return { restrict: 'E', scope:{ urlsearch: '@', maxwidth: '@' }, controller: 'emEmbedCtrl',...
Add h5py as a dep
#!/usr/bin/env python from distutils.core import setup from setuptools import setup, find_packages from setuptools.command.install import install as _install setup(name='tagnews', version='1.0.1', description=('automatically tag articles with justice-related categories' ' and extract ...
#!/usr/bin/env python from distutils.core import setup from setuptools import setup, find_packages from setuptools.command.install import install as _install setup(name='tagnews', version='1.0.1', description=('automatically tag articles with justice-related categories' ' and extract ...
Make cent package a requirement
''' Flask-Cent ----------- Flask-Cent is a flask extension for centrifugal/cent ''' import os import sys from setuptools import setup module_path = os.path.join(os.path.dirname(__file__), 'flask_cent.py') version_line = [line for line in open(module_path) if line.startswith('__version_inf...
''' Flask-Cent ----------- Flask-Cent is a flask extension for centrifugal/cent ''' import os import sys from setuptools import setup module_path = os.path.join(os.path.dirname(__file__), 'flask_cent.py') version_line = [line for line in open(module_path) if line.startswith('__version_inf...
Store callback as a property - so that it can be overriden
<?php namespace PhpQuickbooks\Auth; use Wheniwork\OAuth1\Client\Server\Intuit; class QuickbooksAuth { /** * @var \Wheniwork\OAuth1\Client\Server\Intuit */ protected $oauth; /** * @var string */ protected $consumer_key; /** * @var string */ protected $consumer_s...
<?php namespace PhpQuickbooks\Auth; use Wheniwork\OAuth1\Client\Server\Intuit; class QuickbooksAuth { /** * @var \Wheniwork\OAuth1\Client\Server\Intuit */ protected $oauth; /** * @var string */ protected $consumer_key; /** * @var string */ protected $consumer_s...
Use implode instead of join function
<?php /* * This file is part of the SKTwigExtensionsBundle package. * * (c) Sebastian Kroczek <sk@xbug.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SK\TwigExtensionsBundle\Twig; use Symfony\Component\Routing\Rou...
<?php /* * This file is part of the SKTwigExtensionsBundle package. * * (c) Sebastian Kroczek <sk@xbug.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SK\TwigExtensionsBundle\Twig; use Symfony\Component\Routing\Rou...
Add the signature for compose()
<?php namespace F; function curry($f, array $args) { $meta = new \ReflectionFunction($f); return curryN($meta->getNumberOfParameters(), $f, $args); } function curryN($arity, $f, array $args) { $accumulate = function (array $appliedArgs, $totalArgsCount) use ($f, $args, &$accumulate) { if (cou...
<?php namespace F; function curry($f, array $args) { $meta = new \ReflectionFunction($f); return curryN($meta->getNumberOfParameters(), $f, $args); } function curryN($arity, $f, array $args) { $accumulate = function (array $appliedArgs, $totalArgsCount) use ($f, $args, &$accumulate) { if (cou...
Use arrow functions instead of vm variable (WAL-400)
const volumeSnapshots = { templateUrl: 'views/partials/filtered-list.html', controller: VolumeSnapshotsListController, controllerAs: 'ListController', bindings: { resource: '<' } }; export default volumeSnapshots; // @ngInject function VolumeSnapshotsListController( baseResourceListController, $scop...
const volumeSnapshots = { templateUrl: 'views/partials/filtered-list.html', controller: VolumeSnapshotsListController, controllerAs: 'ListController', bindings: { resource: '<' } }; export default volumeSnapshots; // @ngInject function VolumeSnapshotsListController( baseResourceListController, $scop...
Change error message when caching fails see also: http://stackoverflow.com/questions/27722349/less-js-error-msg-failed-to-save/27750286
// Cache system is a bit outdated and could do with work module.exports = function(window, options, logger) { var cache = null; if (options.env !== 'development') { try { cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage; } catch (_) {} } ret...
// Cache system is a bit outdated and could do with work module.exports = function(window, options, logger) { var cache = null; if (options.env !== 'development') { try { cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage; } catch (_) {} } ret...
Remove console log statement in sidebar controller.
angular.module('app.sidebar').controller('SidebarCtrl', ['$scope', 'organizationService', 'spaceService', function ($scope, organizationService, spaceService) { $scope.organizations = []; // get all spaces var getSpacesPromise = spaceService.getSpaces(); // get all organizations organizationService.getOrgan...
angular.module('app.sidebar').controller('SidebarCtrl', ['$scope', 'organizationService', 'spaceService', function ($scope, organizationService, spaceService) { $scope.organizations = []; // get all spaces var getSpacesPromise = spaceService.getSpaces(); // get all organizations organizationService.getOrgan...
Fix copyright notice in source file
/** * JavaScript Utm Extractor v0.1.0 * https://github.com/ertrade/js-utm-extractor * * Copyright JSC ERTrade, 2016 * Released under the MIT license */ (function (factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof exports === 'object')...
/** * JavaScript Utm Extractor v0.1.0 * https://github.com/ertrade/js-utm-extractor * * Copyright Anton Vakhrushev, 2016 * Released under the MIT license */ (function (factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof exports === 'obj...
Improve performance of CollectionConfigurationManager by replacing XmldbURI with CollectionURI. svn path=/trunk/eXist/; revision=6526
package org.exist.collections; import static org.junit.Assert.*; import org.junit.Test; public class CollectionURITest { @Test public void append() { CollectionURI uri = new CollectionURI("/db"); uri.append("test1"); assertTrue(uri.equals(new CollectionURI("/db/test1"))); assertEquals(uri.toString(), "/db...
package org.exist.collections; import static org.junit.Assert.*; import org.junit.Test; public class CollectionURITest { @Test public void append() { CollectionURI uri = new CollectionURI("/db"); uri.append("test1"); assertTrue(uri.equals(new CollectionURI("/db/test1"))); assertEquals(uri.toString(), "/db...
Update package version to 2.1.0
# encoding: utf-8 import os from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-emoji', version='2.1.0', packages=find_packages(exclude=('...
# encoding: utf-8 import os from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-emoji', version='2.0.0', packages=find_packages(exclude=('...
Move contextual task execution to make more sense
package com.jenjinstudios.io.concurrency; import com.jenjinstudios.io.ExecutionContext; import com.jenjinstudios.io.Message; import java.util.Collection; import java.util.List; import java.util.function.Consumer; /** * Executes ExecutableMessage objects which have been read. * * @author Caleb Brinkman */ public ...
package com.jenjinstudios.io.concurrency; import com.jenjinstudios.io.ExecutionContext; import com.jenjinstudios.io.Message; import java.util.Collection; import java.util.List; import java.util.function.Consumer; /** * Executes ExecutableMessage objects which have been read. * * @author Caleb Brinkman */ public ...
Change shortcut key for deploy to server
/** * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
/** * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
Use existing date to calculate
package com.alexstyl.specialdates.date; import android.content.res.Resources; import com.alexstyl.specialdates.R; import com.alexstyl.specialdates.contact.Contact; import com.alexstyl.specialdates.events.peopleevents.EventType; /** * A representation of an event, affiliated to a contact */ public final class Conta...
package com.alexstyl.specialdates.date; import android.content.res.Resources; import com.alexstyl.specialdates.R; import com.alexstyl.specialdates.contact.Contact; import com.alexstyl.specialdates.events.peopleevents.EventType; /** * A representation of an event, affiliated to a contact */ public final class Conta...
Use build() result for test
!function (assert, path) { 'use strict'; require('vows').describe('Integration test').addBatch({ 'When minifying a CSS file': { topic: function () { var callback = this.callback, topic; require('publishjs')({ cache: fa...
!function (assert, path) { 'use strict'; require('vows').describe('Integration test').addBatch({ 'When minifying a CSS file': { topic: function () { var callback = this.callback, topic; require('publishjs')({ cache: fa...
Refactor and extend test for Feature
/******************************************************************************* * Copyright 2014, 2016 gwt-ol3 * * 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...
/******************************************************************************* * Copyright 2014, 2016 gwt-ol3 * * 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...
Fix incorrect libxau library name
from conans import ConanFile, AutoToolsBuildEnvironment, tools import os class LibxauConan(ConanFile): name = "libxau" version = "1.0.8" license = "Custom https://cgit.freedesktop.org/xorg/lib/libXau/tree/COPYING" url = "https://github.com/trigger-happy/conan-packages" description = "X11 authorisa...
from conans import ConanFile, AutoToolsBuildEnvironment, tools import os class LibxauConan(ConanFile): name = "libxau" version = "1.0.8" license = "Custom https://cgit.freedesktop.org/xorg/lib/libXau/tree/COPYING" url = "https://github.com/trigger-happy/conan-packages" description = "X11 authorisa...
Fix typos in Result and Check docstrings
# -*- coding: utf-8 -*- """Base classes.""" import time class Result(object): """Provides results of a Check. Attributes: availability (bool): Availability, usually reflects outcome of a check. runtime (float): Time consumed running the check, in seconds. message (string): Additional...
# -*- coding: utf-8 -*- """Base classes.""" import time class Result(object): """Provides results of a Check. Attributes: availability (bool): Availability, usually reflects outcome of a check. runtime (float): Time consumed running the check, in seconds. message (string): Additional...
Use single quotes for strings
import React, { Component, PropTypes } from 'react'; import FormControl from 'react-bootstrap/lib/FormControl'; class Filter extends Component { constructor(props){ super(props); this.state = {filterValue : this.props.query}; this.inputChanged = this.inputChanged.bind(this); } com...
import React, { Component, PropTypes } from 'react'; import FormControl from 'react-bootstrap/lib/FormControl'; class Filter extends Component { constructor(props){ super(props); this.state = {filterValue : this.props.query}; this.inputChanged = this.inputChanged.bind(this); } com...
Remove the file name display when attempting to read
package goatee import ( "encoding/json" "io/ioutil" "log" "os" ) type configuration struct { Redis Redis Web Web } type Redis struct { Host string } type Web struct { Host string } var ( DEBUG = false Config = new(configuration) ) func getEnv() string { env := os.Getenv("GO_ENV") if env == "" || en...
package goatee import ( "encoding/json" "io/ioutil" "log" "os" ) type configuration struct { Redis Redis Web Web } type Redis struct { Host string } type Web struct { Host string } var ( DEBUG = false Config = new(configuration) ) func getEnv() string { env := os.Getenv("GO_ENV") if env == "" || en...
Fix making threads daemonic on Python 3.2
# # Copyright 2014 Infoxchange Australia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
# # Copyright 2014 Infoxchange Australia # # 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...
Add missing space before link
/*globals $, GOVUK, suchi */ /*jslint white: true, browser: true */ $(function() { "use strict"; function browserWarning() { var container = $('<div id="global-browser-prompt"></div>'), text = $('<p>For a safer, faster, better experience online you should upgrade your browser. </p>'), findMor...
/*globals $, GOVUK, suchi */ /*jslint white: true, browser: true */ $(function() { "use strict"; function browserWarning() { var container = $('<div id="global-browser-prompt"></div>'), text = $('<p>For a safer, faster, better experience online you should upgrade your browser.</p>'), findMore...
Fix JS error after project pdf file.
(function () { 'use strict'; angular.module('OpenSlidesApp.mediafiles.projector', ['OpenSlidesApp.mediafiles']) .config([ 'slidesProvider', function(slidesProvider) { slidesProvider.registerSlide('mediafiles/mediafile', { template: 'static/templates/mediafiles/slide_mediafile.html' ...
(function () { 'use strict'; angular.module('OpenSlidesApp.mediafiles.projector', ['OpenSlidesApp.mediafiles']) .config([ 'slidesProvider', function(slidesProvider) { slidesProvider.registerSlide('mediafiles/mediafile', { template: 'static/templates/mediafiles/slide_mediafile.html' ...
Revert "Remove resolve in top level" This reverts commit 27c6b92e18e69f1e705596414467abd9ff660157.
import commonjs from '@rollup/plugin-commonjs'; import glslify from 'rollup-plugin-glslify'; import resolve from '@rollup/plugin-node-resolve'; import copy from "rollup-plugin-copy"; export default { input: ['source/gltf-sample-viewer.js'], output: [ { file: 'dist/gltf-viewer.js', ...
import commonjs from '@rollup/plugin-commonjs'; import glslify from 'rollup-plugin-glslify'; import resolve from '@rollup/plugin-node-resolve'; import copy from "rollup-plugin-copy"; export default { input: ['source/gltf-sample-viewer.js'], output: [ { file: 'dist/gltf-viewer.js', ...
Update to follow the new observation format (follow the vision input of OpenAI ATARI environment)
import numpy as np import matplotlib.pyplot as plt class Agent(object): def __init__(self, dim_action): self.dim_action = dim_action def act(self, ob, reward, done, vision_on): #print("ACT!") # Get an Observation from the environment. # Each observation vectors are numpy array...
import numpy as np import matplotlib.pyplot as plt class Agent(object): def __init__(self, dim_action): self.dim_action = dim_action def act(self, ob, reward, done, vision): #print("ACT!") # Get an Observation from the environment. # Each observation vectors are numpy array. ...
Add trailing newline in file
import urllib import logging from jenkinsapi.jenkinsbase import JenkinsBase from jenkinsapi.plugin import Plugin log = logging.getLogger(__name__) class Plugins(JenkinsBase): def __init__(self, url, jenkins_obj): self.jenkins_obj = jenkins_obj JenkinsBase.__init__(self, url) # print 'DE...
import urllib import logging from jenkinsapi.jenkinsbase import JenkinsBase from jenkinsapi.plugin import Plugin log = logging.getLogger(__name__) class Plugins(JenkinsBase): def __init__(self, url, jenkins_obj): self.jenkins_obj = jenkins_obj JenkinsBase.__init__(self, url) # print 'DE...
Improve method name for search input change
import { updateQuery, fetchQuery, addSearch, isSearching } from '../actions'; import { search } from '../actions/SearchAPI'; import Icon from './Icon'; export default class SearchForm extends React.Component { constructor() { super() this._debouncedSearch = _.debounce(this._debouncedSearch, 300) } rende...
import { updateQuery, fetchQuery, addSearch, isSearching } from '../actions'; import { search } from '../actions/SearchAPI'; import Icon from './Icon'; export default class SearchForm extends React.Component { constructor() { super() this._debouncedSearch = _.debounce(this._debouncedSearch, 300) } rende...
Set date lang on the localized middleware
<?php /* * This file is part of Cachet. * * (c) Alt Three Services Limited * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace CachetHQ\Cachet\Http\Middleware; use Closure; use Illuminate\Config\Repository; use Jenssegers\...
<?php /* * This file is part of Cachet. * * (c) Alt Three Services Limited * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace CachetHQ\Cachet\Http\Middleware; use Closure; use Illuminate\Config\Repository; class Localize...
Load jpg and gif via file-loader
const path = require('path'); const webpack = require('webpack'); const ExtractTextPlugin = require("extract-text-webpack-plugin"); const extractSass = new ExtractTextPlugin({ filename: "index.css" }); const config = { entry: "./src/js/index.ts", output: { filename: "bundle.js", path: path....
const path = require('path'); const webpack = require('webpack'); const ExtractTextPlugin = require("extract-text-webpack-plugin"); const extractSass = new ExtractTextPlugin({ filename: "index.css" }); const config = { entry: "./src/js/index.ts", output: { filename: "bundle.js", path: path....
Remove mensagem de erro bem chata
<?php /** * Created by PhpStorm. * User: eduardo * Date: 04/02/14 * Time: 10:54 */ namespace Cacic\RelatorioBundle\Menu; use Knp\Menu\FactoryInterface; use Symfony\Component\DependencyInjection\ContainerAware; class Builder extends ContainerAware { public function relatorioMenu(FactoryInterface $factory, ar...
<?php /** * Created by PhpStorm. * User: eduardo * Date: 04/02/14 * Time: 10:54 */ namespace Cacic\RelatorioBundle\Menu; use Knp\Menu\FactoryInterface; use Symfony\Component\DependencyInjection\ContainerAware; class Builder extends ContainerAware { public function relatorioMenu(FactoryInterface $factory, ar...
Change package name from falcor-server to falcor-express Reviewed by @jhusain
var express = require('express'); var app = express(); var FalcorServer = require('falcor-express'); var Cache = require('../../data/Cache'); var falcor = require('../../../index'); var Rx = require('rx'); var edgeCaseCache = require('./../../data/EdgeCase')(); var fullCacheModel = new falcor.Model({cache: Cache()}).ma...
var express = require('express'); var app = express(); var FalcorServer = require('falcor-server'); var Cache = require('../../data/Cache'); var falcor = require('../../../index'); var Rx = require('rx'); var edgeCaseCache = require('./../../data/EdgeCase')(); var fullCacheModel = new falcor.Model({cache: Cache()}).mat...
Add child_id params as well to prevent clash in some cases
(function($) { jQuery.fn.comboEdit = function(options){ options.selector = jQuery(this).selector; var onClick = function(e){ var toBeReplaced = jQuery(this); var data = {}; var parent_id = jQuery(this).parent().parent().find("."+options.parentIdClass).val(); ...
(function($) { jQuery.fn.comboEdit = function(options){ options.selector = jQuery(this).selector; var onClick = function(e){ var toBeReplaced = jQuery(this); var data = {}; var parent_id = jQuery(this).parent().parent().find("."+options.parentIdClass).val(); ...
Fix "logout" preference after crash fix. (became no longer clickable) Now giving an onClickListener to a preference only if it doesn't already have a listener. Change-Id: I93b25da9485477737f877abae34188d0243bebd4
package org.wikipedia.settings; import android.content.ActivityNotFoundException; import android.content.Context; import android.preference.Preference; import android.util.AttributeSet; import android.view.View; import android.widget.TextView; import android.widget.Toast; import org.wikipedia.R; public class Prefere...
package org.wikipedia.settings; import android.content.ActivityNotFoundException; import android.content.Context; import android.preference.Preference; import android.util.AttributeSet; import android.view.View; import android.widget.TextView; import android.widget.Toast; import org.wikipedia.R; public class Prefere...
Remove unused properties from popover component.
FileDrop.ConfirmPopoverComponent = Ember.Component.extend({ classNames: ['popover-confirm'], isShowingDidChange: function () { !!this.get('isShowing') ? this.show() : this.hide(); }.observes('isShowing'), didInsertElement: function () { this._super(); this.$().hide(); }, ...
FileDrop.ConfirmPopoverComponent = Ember.Component.extend({ classNames: ['popover-confirm'], // TODO: move 'label' and 'filename' somewhere else (separate view)? label: function () { var email = this.get('peer.email'), addr = this.get('peer.local_ip'); return email || addr; ...
Move that block to see if that is what is causing the issue
<h3>Change Access</h3> <form class="form-horizontal"> <!-- Select Basic --> <div class="form-group"> <label class="col-md-8 control-label" for="access-type">Select Access Type</label> <div class="col-md-8"> <?php $types = $dal->getAccessTypes(); $selected_user = $_GET['for']; $curr ...
<h3>Change Access</h3> <form class="form-horizontal"> <!-- Select Basic --> <div class="form-group"> <label class="col-md-8 control-label" for="access-type">Select Access Type</label> <div class="col-md-8"> <select id="access-type" name="access-type" class="form-control"> <option disabled>Sel...
Allow CORS access to the /info/ endpoint
package org.marsik.elshelves.backend.app.servlet; import org.springframework.stereotype.Component; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import ...
package org.marsik.elshelves.backend.app.servlet; import org.springframework.stereotype.Component; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import ...
Fix repository interface generator bug that ignores their namespace
<?php namespace Graze\Dal\Generator; class RepositoryGenerator extends AbstractClassGenerator implements GeneratorInterface { /** * @var array */ private $config; /** * @var bool */ private $generateInterfaces; /** * @param array $config * @param bool $generateInter...
<?php namespace Graze\Dal\Generator; class RepositoryGenerator extends AbstractClassGenerator implements GeneratorInterface { /** * @var array */ private $config; /** * @var bool */ private $generateInterfaces; /** * @param array $config * @param bool $generateInter...
Enable switches if it's function is to switch on/off lights.
import R from 'ramda'; import React, {PropTypes} from 'react'; import {Switch} from 'react-mdl/lib'; import Component from 'react-pure-render/component'; export default class AddrLine extends Component { static propTypes = { actions: PropTypes.object, address: PropTypes.object, msg: PropTypes.object, ...
import R from 'ramda'; import React, {PropTypes} from 'react'; import {Switch} from 'react-mdl/lib'; import Component from 'react-pure-render/component'; export default class AddrLine extends Component { static propTypes = { actions: PropTypes.object, address: PropTypes.object, msg: PropTypes.object, ...
[android] Revert discount value for hotel price
package com.mapswithme.maps.widget.placepage; import android.support.annotation.NonNull; public class HotelPriceInfo { @NonNull private final String mId; @NonNull private final String mPrice; @NonNull private final String mCurrency; private final int mDiscount; private final boolean mHasSmartDeal; ...
package com.mapswithme.maps.widget.placepage; import android.support.annotation.NonNull; public class HotelPriceInfo { @NonNull private final String mId; @NonNull private final String mPrice; @NonNull private final String mCurrency; private final int mDiscount; private final boolean mHasSmartDeal; ...
Fix blog - Part 2
<!DOCTYPE html> <html> <head> <title>OpenSprites Blog</title> <link href='../navbar.css' type="text/css" rel=stylesheet> <link href='/blogmainstyle.css' type="text/css" rel=stylesheet> <?php include("header.php"); ?> </head> <body> <?php include("includes.php"); ?> ...
<!DOCTYPE html> <html> <head> <title>OpenSprites Blog</title> <link href='../navbar.css' type="text/css" rel=stylesheet> <link href='../main-style.css' type="text/css" rel=stylesheet> <?php include("header.php"); ?> </head> <body> <?php include("includes.php"); ?> ...
Add Tom Hanks in a way that's actually reachable
import re from pal.services.service import Service from pal.services.service import wrap_response class JokeService(Service): _JOKES = { 'open the pod bay doors pal': "I'm sorry, Jeff, I'm afraid I can't do that.", 'laws of robotics': "1. A robot may not injure a human bei...
import re from pal.services.service import Service from pal.services.service import wrap_response class JokeService(Service): _JOKES = { 'open the pod bay doors pal': "I'm sorry, Jeff, I'm afraid I can't do that.", 'laws of robotics': "1. A robot may not injure a human bei...
Fix missing constants for CRONUS calculator
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); define('CRONUS_BASE', 'http://hess.ess.washington.edu/'); define('CRONUS_URI', CRONUS_BASE . 'cgi-bin/matweb'); class Calculator { function send($submitText, $calcType) { // prepare for a curl call $fields = array( ...
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Calculator { function send($submitText, $calcType) { // prepare for a curl call $fields = array( 'requesting_ip' => getRealIp(), 'mlmfile' => 'al_be_' . $calcType . '_many_v22', 'text...
Reorder close order of HttpConnection resources In theory it's probably a good idea to close the various streams associated with a socket before we close the socket itself.
package net.zephyrizing.http_server; import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.net.Socket; import java.util.ArrayList; import java.util.List; import net.zephyrizing.http_server.HttpRequest; public class HttpConnectionImpl implements HttpConnection { priva...
package net.zephyrizing.http_server; import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.net.Socket; import java.util.ArrayList; import java.util.List; import net.zephyrizing.http_server.HttpRequest; public class HttpConnectionImpl implements HttpConnection { priva...
Fix incorrect text range selection in annotator
package org.plugin.dot; import com.intellij.codeInspection.ProblemHighlightType; import com.intellij.lang.annotation.Annotation; import com.intellij.lang.annotation.AnnotationHolder; import com.intellij.lang.annotation.Annotator; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import o...
package org.plugin.dot; import com.intellij.codeInspection.ProblemHighlightType; import com.intellij.lang.annotation.Annotation; import com.intellij.lang.annotation.AnnotationHolder; import com.intellij.lang.annotation.Annotator; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import o...
Remove extra dependency for class builder
package org.xblackcat.sjpu.builder; import java.lang.reflect.Method; import java.lang.reflect.Modifier; /** * Functional builder allows only one abstract method per class/interface. * * @author xBlackCat */ public class FunctionalClassBuilder<Base> extends ClassBuilder<Base> { public FunctionalClassBuilder(ID...
package org.xblackcat.sjpu.builder; import org.xblackcat.sjpu.storage.IFunctionalAH; import java.lang.reflect.Method; import java.lang.reflect.Modifier; /** * Functional builder allows only one abstract method per class/interface. * * @author xBlackCat */ public class FunctionalClassBuilder<Base> extends ClassBu...
Add missing packages to backend
from setuptools import setup, find_packages setup( name="maguire", version="0.1", url='https://github.com/picsadotcom/maguire', license='BSD', author='Picsa', author_email='admin@picsa.com', packages=find_packages(), include_package_data=True, install_requires=[ 'Django', ...
from setuptools import setup, find_packages setup( name="maguire", version="0.1", url='https://github.com/picsadotcom/maguire', license='BSD', author='Picsa', author_email='admin@picsa.com', packages=find_packages(), include_package_data=True, install_requires=[ 'Django', ...