Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Add time cache to static cache
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js') const staticCache = 'react-base-static-v1' const dynamicCache = 'react-base-dynamic-v1' const timeCache = 30 * 24 * 60 * 60 self.workbox.skipWaiting() self.workbox.clientsClaim() workbox.core.setCacheNameDetails({ precache: st...
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js') const staticCache = 'react-base-static-v1' const dynamicCache = 'react-base-dynamic-v1' const timeCache = 30 * 24 * 60 * 60 self.workbox.skipWaiting() self.workbox.clientsClaim() workbox.core.setCacheNameDetails({ precache: st...
Add tra to plugin info git-svn-id: 9bac41f8ebc9458fc3e28d41abfab39641e8bd1c@31175 b456876b-0849-0410-b77d-98878d47e9d5
<?php // (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ function wikiplugin_attributes_info() { return arr...
<?php // (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ function wikiplugin_attributes_info() { return arr...
Add caching to Elron provider (api)
const got = require('got'); const cache = require('../utils/cache.js'); const time = require('../utils/time.js'); // Get trips for stop. async function getTrips(id) { const now = time.getSeconds(); return (await cache.use('elron-trips', id, async () => { const data = JSON.parse((await got(`http://elron.ee/...
const got = require('got'); const cache = require('../utils/cache.js'); const time = require('../utils/time.js'); // Get trips for stop. async function getTrips(id) { const now = time.getSeconds(); const data = JSON.parse((await got(`http://elron.ee/api/v1/stop?stop=${encodeURIComponent(id)}`)).body).data; if ...
zjsunit: Use modern spread arguments syntax. Signed-off-by: Anders Kaseorg <dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulipchat.com>
const _ = require('underscore/underscore.js'); // Stubs don't do any magical modifications to your namespace. They // just provide you a function that records what arguments get passed // to it. To use stubs as something more like "spies," use something // like set_global() to override your namespace. exports.make_...
const _ = require('underscore/underscore.js'); // Stubs don't do any magical modifications to your namespace. They // just provide you a function that records what arguments get passed // to it. To use stubs as something more like "spies," use something // like set_global() to override your namespace. exports.make_...
Remove @Before, not useful for static classes
package com.alexrnl.commons.gui.swing; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; import org.junit.Test; /** * Test suite for the...
package com.alexrnl.commons.gui.swing; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; import org.junit.Before; import org.junit.Test; ...
Add example for generic file tree to Javadoc `SingletonFileTree`s aren't generic file trees.
/* * Copyright 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
/* * Copyright 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
Change doc style in addEvent()
/* Helper function to add an event listener. * @param {Element} el - The element we want to add an event listener to. * @param {Event} event - The event we want to listen to. * @param {function} callback - The callback function to call when the event is * transmitted. */ function addEvent(el, event, callback) { ...
/* Helper function to add an event listener. * @param el The element we want to add an event listener to. * @param event The event we want to listen to. * @param callback The callback function to call when the event is transmitted. */ function addEvent(el, event, callback) { if ('addEventListener' in el) { el...
Fix invalid annotation. The type of `self` in base class should be left to be deduced to the child type.
"""Context manager base class man-in-the-middling the global stdout.""" import sys class Error(Exception): """Base class for all exception of this module.""" class InvalidUsageError(Error): """Error raised on incorrect API uses.""" class StdoutInterceptor(): """Context manager base class man-in-the-middlin...
"""Context manager base class man-in-the-middling the global stdout.""" import sys class Error(Exception): """Base class for all exception of this module.""" class InvalidUsageError(Error): """Error raised on incorrect API uses.""" class StdoutInterceptor(): """Context manager base class man-in-the-middlin...
Fix the way it uses the 'src' dir so the package is no longer installed as 'src'. Note that although there is this fancy package_dir renaming functionality available to setup.py, and it will work if you do a setup.py install, it doesn't work properly when you run setup.py develop.
import setuptools from src.version import __VERSION_STR__ setuptools.setup( name='powser', version=__VERSION_STR__, description=( 'Front-end package manager inspired by bower utilizing cdnjs. ' 'See https://github.com/JDeuce/powser for more.' ), author='Josh Jaques', author_em...
import setuptools from src.version import __VERSION_STR__ setuptools.setup( name='powser', version=__VERSION_STR__, description=( 'Front-end package manager inspired by bower utilizing cdnjs. ' 'See https://github.com/JDeuce/powser for more.' ), author='Josh Jaques', author_em...
Remove all permisson for contact API
from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = serializers.Email...
from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = serializers.Email...
Add a words per line function
"""Class to show file manipulations""" import sys original_file = open('wasteland.txt', mode='rt', encoding='utf-8') file_to_write = open('wasteland-copy.txt', mode='wt', encoding='utf-8') file_to_write.write("What are the roots that clutch, ") file_to_write.write('what branches grow\n') file_to_write.close() file_r...
"""Class to show file manipulations""" import sys original_file = open('wasteland.txt', mode='rt', encoding='utf-8') file_to_write = open('wasteland-copy.txt', mode='wt', encoding='utf-8') file_to_write.write("What are the roots that clutch, ") file_to_write.write('what branches grow\n') file_to_write.close() file_...
Update to use newer oauth style
import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to he...
import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to he...
Use spec reporter to know which specs hang
"use babel" import Mocha from 'mocha' import fs from 'fs-plus' import {assert} from 'chai' export default function (testPaths) { global.assert = assert const mocha = new Mocha({reporter: 'spec'}) for (let testPath of testPaths) { if (fs.isDirectorySync(testPath)) { for (let testFilePath of fs.listTre...
"use babel" import Mocha from 'mocha' import fs from 'fs-plus' import {assert} from 'chai' export default function (testPaths) { global.assert = assert const mocha = new Mocha({reporter: 'dot'}) for (let testPath of testPaths) { if (fs.isDirectorySync(testPath)) { for (let testFilePath of fs.listTree...
Use explicit py-amqp transport instead of amqp in integration tests
from __future__ import absolute_import, unicode_literals import os import pytest import kombu from .common import BasicFunctionality def get_connection( hostname, port, vhost): return kombu.Connection('pyamqp://{}:{}'.format(hostname, port)) @pytest.fixture() def connection(request): # this fixtu...
from __future__ import absolute_import, unicode_literals import os import pytest import kombu from .common import BasicFunctionality def get_connection( hostname, port, vhost): return kombu.Connection('amqp://{}:{}'.format(hostname, port)) @pytest.fixture() def connection(request): # this fixture...
Call the methods only if they exist.
package org.torquebox.stomp.component; import org.projectodd.stilts.stomp.StompException; import org.projectodd.stilts.stomp.StompMessage; import org.projectodd.stilts.stomplet.Stomplet; import org.projectodd.stilts.stomplet.StompletConfig; import org.projectodd.stilts.stomplet.Subscriber; public class DirectStomplet...
package org.torquebox.stomp.component; import org.projectodd.stilts.stomp.StompException; import org.projectodd.stilts.stomp.StompMessage; import org.projectodd.stilts.stomplet.Stomplet; import org.projectodd.stilts.stomplet.StompletConfig; import org.projectodd.stilts.stomplet.Subscriber; public class DirectStomplet...
Update and try fix bug with migration
<?php use yii\db\Migration; class m160219_091156_createUser extends Migration { public function up() { $userName = 'webmaster'; $tableName = \dektrium\user\models\User::tableName(); $query = 'SELECT COUNT(*) FROM '.$tableName.' WHERE `username`=:username'; $count = \Yii::$app-...
<?php use yii\db\Migration; class m160219_091156_createUser extends Migration { public function up() { $userName = 'webmaster'; $tableName = \dektrium\user\models\User::tableName(); $query = 'SELECT COUNT(*) FROM '.$tableName.' WHERE `username`=:username'; $count = Yii::$app->...
Increase datagrid icon column width
/* * Copyright 2016 Crown Copyright * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
/* * Copyright 2016 Crown Copyright * * 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...
Add manual method to trigger dialogs
package tv.rocketbeans.supermafiosi.core; import java.util.ArrayList; import java.util.List; import com.badlogic.gdx.InputAdapter; import tv.rocketbeans.supermafiosi.i18n.Bundle; public class DialogManager extends InputAdapter { private List<Dialog> dialogs = new ArrayList<Dialog>(); private Dialog currentDia...
package tv.rocketbeans.supermafiosi.core; import java.util.ArrayList; import java.util.List; import com.badlogic.gdx.InputAdapter; import tv.rocketbeans.supermafiosi.i18n.Bundle; public class DialogManager extends InputAdapter { private List<Dialog> dialogs = new ArrayList<Dialog>(); private Dialog currentDia...
Moderator: Update name being sent to the server Update the name being sent to the server to be the name that was put into the currentName variable.
var socket = io(); //var verifyNameFormState = false; socket.on('moderate name', function(msg){ $('#currentName').text(msg); }); $('#accept').click(function(e){ // Prevent JavaScript from doing normal functionality e.preventDefault(); // Serialize the name and whether the name is valid var nameInfo = JSO...
var socket = io(); //var verifyNameFormState = false; socket.on('moderate name', function(msg){ $('#currentName').text(msg); }); $('#accept').click(function(e){ // Prevent JavaScript from doing normal functionality e.preventDefault(); // Serialize the name and whether the name is valid var nameInfo = JSO...
Remove size keyword when generating netlist
#!/usr/bin/env python from distutils.core import setup setup(name='lcapy', version='0.21.6', description='Symbolic linear circuit analysis', author='Michael Hayes', requires=['sympy', 'numpy', 'scipy'], author_email='michael.hayes@canterbury.ac.nz', url='https://github.com/mph-/lca...
#!/usr/bin/env python from distutils.core import setup setup(name='lcapy', version='0.21.5', description='Symbolic linear circuit analysis', author='Michael Hayes', requires=['sympy', 'numpy', 'scipy'], author_email='michael.hayes@canterbury.ac.nz', url='https://github.com/mph-/lca...
Add the learnerCanLoginWithNoPassword at the default facility config.
// a name for every URL pattern const PageNames = { CLASS_MGMT_PAGE: 'CLASS_MGMT_PAGE', CLASS_EDIT_MGMT_PAGE: 'CLASS_EDIT_MGMT_PAGE', CLASS_ENROLL_MGMT_PAGE: 'CLASS_ENROLL_MGMT_PAGE', USER_MGMT_PAGE: 'USER_MGMT_PAGE', DATA_EXPORT_PAGE: 'DATA_EXPORT_PAGE', FACILITY_CONFIG_PAGE: 'FACILITY_CONFIG_PAGE', }; //...
// a name for every URL pattern const PageNames = { CLASS_MGMT_PAGE: 'CLASS_MGMT_PAGE', CLASS_EDIT_MGMT_PAGE: 'CLASS_EDIT_MGMT_PAGE', CLASS_ENROLL_MGMT_PAGE: 'CLASS_ENROLL_MGMT_PAGE', USER_MGMT_PAGE: 'USER_MGMT_PAGE', DATA_EXPORT_PAGE: 'DATA_EXPORT_PAGE', FACILITY_CONFIG_PAGE: 'FACILITY_CONFIG_PAGE', }; //...
Remove this test case for now... still segfaulting for some crazy reason...
var $ = require('../') , assert = require('assert') $.import('Foundation') $.NSAutoreleasePool('alloc')('init') // Subclass 'NSObject', creating a new class named 'NRTest' var NRTest = $.NSObject.extend('NRTest') , counter = 0 // Add a new method to the NRTest class responding to the "description" selector NRTes...
var $ = require('../') , assert = require('assert') $.import('Foundation') $.NSAutoreleasePool('alloc')('init') // Subclass 'NSObject', creating a new class named 'NRTest' var NRTest = $.NSObject.extend('NRTest') , counter = 0 // Add a new method to the NRTest class responding to the "description" selector NRTes...
Fix the `release` step of deploy lol
from fabric.api import cd, run, sudo, env, roles, execute from datetime import datetime env.roledefs = { 'webuser': ['bloge@andrewlorente.com'], 'sudoer': ['alorente@andrewlorente.com'], } env.hosts = ['andrewlorente.com'] def deploy(): release_id = datetime.now().strftime("%Y%m%d%H%M%S") execute(buil...
from fabric.api import cd, run, sudo, env, roles, execute from datetime import datetime env.roledefs = { 'webuser': ['bloge@andrewlorente.com'], 'sudoer': ['alorente@andrewlorente.com'], } env.hosts = ['andrewlorente.com'] def deploy(): release_id = datetime.now().strftime("%Y%m%d%H%M%S") execute(buil...
Fix bug when creating a cache request responses to convert had failed.
package com.yo1000.vis.component.scheduler; import com.yo1000.vis.model.data.RequestHistory; import com.yo1000.vis.model.service.RequestHistoryService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotatio...
package com.yo1000.vis.component.scheduler; import com.yo1000.vis.model.data.RequestHistory; import com.yo1000.vis.model.service.RequestHistoryService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotatio...
Fix pip install failing due to wtforms monkeypatch
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
Fix file headers for missing BSD license. git-svn-id: fe6d842192ccfb78748eb71580d1ce65f168b559@1713 9830eeb5-ddf4-0310-9ef7-f4b9a3e3227e
/* * Copyright (C) 2009 XStream Committers. * All rights reserved. * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * * Created on 15. August 2009 by Joerg Schaible */ package com.thought...
/* * Copyright (C) 2009 XStream Committers. * All rights reserved. * * Created on 15. August 2009 by Joerg Schaible */ package com.thoughtworks.xstream.io.xml; /** * A XmlFriendlyNameCoder to support backward compatibility with XStream 1.1. * * @author J&ouml;rg Schaible * @since upcoming */ public class X...
Use find_packages for package discovery
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.markdown')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-paiji2-weat...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.markdown')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-paiji2-weather', versi...
Comment out GUI - maintain compilable submission
package reversi.GUI; /* * Possibly use "GridLayout" class. * Not sure of the limits, still checking. */ import java.awt.*; import javax.swing.*; /* public class guiBoard extends JFrame { //DisplayGui(); }*/ /* * Variable will allow switching between menu display and game board display */ /*private void va...
package reversi.GUI; /* * Possibly use "GridLayout" class. * Not sure of the limits, still checking. */ import java.awt.*; import javax.swing.*; public class guiBoard extends JFrame { DisplayGui(); } /* * Variable will allow switching between menu display and game board display */ private void variableGa...
Add valid module name test case
import unittest import kyoto.server import kyoto.tests.dummy import kyoto.client class ServiceTestCase(unittest.TestCase): def setUp(self): self.address = ('localhost', 1337) self.server = kyoto.server.BertRPCServer([kyoto.tests.dummy]) self.server.start() self.service = kyoto.cli...
import unittest import kyoto.server import kyoto.tests.dummy import kyoto.client class ServiceTestCase(unittest.TestCase): def setUp(self): self.address = ('localhost', 1337) self.server = kyoto.server.BertRPCServer([kyoto.tests.dummy]) self.server.start() self.service = kyoto.cli...
Add blank lines according to hound
from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_get(cls, path, p...
from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_get(cls, path, pa...
Rename `initialize_episode` --> `__call__` in `composer.Initializer` PiperOrigin-RevId: 234775654
# Copyright 2018 The dm_control Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# Copyright 2018 The dm_control Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
Set data cache home directory to ~/.cache/paddle/dataset
import hashlib import os import shutil import urllib2 __all__ = ['DATA_HOME', 'download'] DATA_HOME = os.path.expanduser('~/.cache/paddle/dataset') if not os.path.exists(DATA_HOME): os.makedirs(DATA_HOME) def download(url, md5): filename = os.path.split(url)[-1] assert DATA_HOME is not None filepat...
import hashlib import os import shutil import urllib2 __all__ = ['DATA_HOME', 'download'] DATA_HOME = os.path.expanduser('~/.cache/paddle_data_set') if not os.path.exists(DATA_HOME): os.makedirs(DATA_HOME) def download(url, md5): filename = os.path.split(url)[-1] assert DATA_HOME is not None filepa...
Write the extraction script properly.
#!/usr/bin/env python '''Extract the momentum distribution from an analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys def main(args): if (len(sys.argv) < 2): print ("Usage: extract_n_k.py file bval") sys.exit() bval = float(sys.argv[2]) data = pd.read_csv(s...
#!/usr/bin/env python '''Extract the momentum distribution from a analysed DMQMC simulation.''' import pandas as pd import numpy as np import sys # [review] - JSS: use if __name__ == '__main__' and functions so code can easily be reused in another script if necessary. if (len(sys.argv) < 2): print ("Usage: extra...
Revert "Add verbose flag to compiler options (testing)." This reverts commit 2406e30851b65cd78981eecd76d966fb17259fa4.
## # Template file for site configuration - copy it to site_cfg.py: # $ cp site_cfg_template.py site_cfg.py # Force python version (e.g. '2.4'), or left 'auto' for autodetection. python_version = 'auto' # Operating system - one of 'posix', 'windows' or None for automatic # determination. system = None # Extra flags ...
## # Template file for site configuration - copy it to site_cfg.py: # $ cp site_cfg_template.py site_cfg.py # Force python version (e.g. '2.4'), or left 'auto' for autodetection. python_version = 'auto' # Operating system - one of 'posix', 'windows' or None for automatic # determination. system = None # Extra flags ...
Check the length of the screencap before indexing into it
import logging import re import time class TransportAsync: async def transport(self, connection): cmd = "host:transport:{}".format(self.serial) await connection.send(cmd) return connection async def shell(self, cmd, timeout=None): conn = await self.create_connection(timeout=t...
import logging import re import time class TransportAsync: async def transport(self, connection): cmd = "host:transport:{}".format(self.serial) await connection.send(cmd) return connection async def shell(self, cmd, timeout=None): conn = await self.create_connection(timeout=t...
Exclude test folder from package DHC-1102 Ignore the test directory when looking for python packages to avoid having the files installed Change-Id: Ia30e821109c0f75f0f0c51bb995b2099aa30e063 Signed-off-by: Rosario Di Somma <73b2fe5f91895aea2b4d0e8942a5edf9f18fa897@dreamhost.com>
from setuptools import setup, find_packages setup( name='akanda-rug', version='0.1.5', description='Akanda Router Update Generator manages tenant routers', author='DreamHost', author_email='dev-community@dreamhost.com', url='http://github.com/dreamhost/akanda-rug', license='BSD', instal...
from setuptools import setup, find_packages setup( name='akanda-rug', version='0.1.5', description='Akanda Router Update Generator manages tenant routers', author='DreamHost', author_email='dev-community@dreamhost.com', url='http://github.com/dreamhost/akanda-rug', license='BSD', instal...
Support UTF-8 for encoding/decoding widget links.
angular.module("Prometheus.services").factory('UrlConfigDecoder', function($location) { return function(defaultHash) { var hash = $location.hash() || defaultHash; if (!hash) { return {}; } // Decodes UTF-8 // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64.btoa#Unicode_Strings ...
angular.module("Prometheus.services").factory('UrlConfigDecoder', function($location) { return function(defaultHash) { var hash = $location.hash() || defaultHash; if (!hash) { return {}; } var configJSON = atob(hash); var config = JSON.parse(configJSON); return config; }; }); angular....
[MOD] Server: Reduce delays for invalid passwords
package org.basex.server; import org.basex.util.*; import org.basex.util.hash.*; /** * This class delays blocked clients. * * @author BaseX Team 2005-18, BSD License * @author Christian Gruen */ public final class ClientBlocker { /** Temporarily blocked clients. */ private final TokenIntMap blocked = new Tok...
package org.basex.server; import org.basex.util.*; import org.basex.util.hash.*; /** * This class delays blocked clients. * * @author BaseX Team 2005-18, BSD License * @author Christian Gruen */ public final class ClientBlocker { /** Temporarily blocked clients. */ private final TokenIntMap blocked = new Tok...
Change 'init' to true on each save.
import { Meteor } from 'meteor/meteor'; import { check } from 'meteor/check'; import { settingsLive } from './collections'; import defaultSettings from './defaultSettings'; import { checkSiteIdOwnership, checkUserLoggedIn } from '../utils'; Meteor.methods({ saveSettings(settings) { const userId = this.userId; ...
import { Meteor } from 'meteor/meteor'; import { check } from 'meteor/check'; import { settingsLive } from './collections'; import defaultSettings from './defaultSettings'; import { checkSiteIdOwnership, checkUserLoggedIn } from '../utils'; Meteor.methods({ saveSettings(settings) { const userId = this.userId; ...
Fix for running exported function instead of result of last statement.
"use strict" var JavaScriptPlaygroundEditor = require("./JavaScriptPlaygroundEditor.js") , vm = require("vm") var JavaScriptPlayground = module.exports = function (playgroundElement, jsStubText) { this._playgroundElem = playgroundElement var jsEditorElement = document.createElement("div") jsEditorElement.sty...
"use strict" var JavaScriptPlaygroundEditor = require("./JavaScriptPlaygroundEditor.js") , vm = require("vm") var JavaScriptPlayground = module.exports = function (playgroundElement, jsStubText) { this._playgroundElem = playgroundElement var jsEditorElement = document.createElement("div") jsEditorElement.sty...
Use new dmagellan worker tarball (854e51d)
# run this with python -i import dask, distributed from distributed import Client from distributed.deploy.adaptive import Adaptive from dask_condor import HTCondorCluster import logging, os logging.basicConfig(level=0) logging.getLogger("distributed.comm.tcp").setLevel(logging.ERROR) logging.getLogger("distributed.dep...
# run this with python -i import dask, distributed from distributed import Client from distributed.deploy.adaptive import Adaptive from dask_condor import HTCondorCluster import logging, os logging.basicConfig(level=0) logging.getLogger("distributed.comm.tcp").setLevel(logging.ERROR) logging.getLogger("distributed.dep...
Apply latest changes in FWBundle recipe See https://github.com/symfony/recipes/pull/611
<?php use Symfony\Component\Dotenv\Dotenv; require dirname(__DIR__).'/vendor/autoload.php'; // Load cached env vars if the .env.local.php file exists // Run "composer dump-env prod" to create it (requires symfony/flex >=1.2) if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { foreach ($env as $k ...
<?php use Symfony\Component\Dotenv\Dotenv; require dirname(__DIR__).'/vendor/autoload.php'; // Load cached env vars if the .env.local.php file exists // Run "composer dump-env prod" to create it (requires symfony/flex >=1.2) if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { $_ENV += $env; } els...
Switch to nose test runners - probably shouldn't use fabric in this project.
#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, nose_test_runner, webpy_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trinity" env.path = "/var/tornado...
#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, tornado_test_runner, tornado_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trinity" env.path = ...
Remove unnecessary iframeResize option from multi-page-test-project
var gulp = require('gulp'); var path = require('path'); var defs = [ { title: 'Test Index Title', path: '', description: 'Test index description', twitterImage: '20euro.png', openGraphImage: '50euro.png', schemaImage: '100euro.png' }, { path: '/subpage', title: 'Test Subpage Titl...
var gulp = require('gulp'); var path = require('path'); var defs = [ { title: 'Test Index Title', path: '', description: 'Test index description', twitterImage: '20euro.png', openGraphImage: '50euro.png', schemaImage: '100euro.png' }, { path: '/subpage', title: 'Test Subpage Titl...
Update languages literals in subscription selector
define([], function() { /** * List of the key languages of the platform */ var languageList = { en: 'English', zh: '中文', fr: 'Français', id: 'Bahasa Indonesia', pt_BR: 'Português', es_MX: 'Español' }; var languagesHelper = { /** * Returns the list of key languages *...
define([], function() { /** * List of the key languages of the platform */ var languageList = { en: 'English', zh: '中文', fr: 'Français', id: 'Bahasa Indonesia', pt_BR: 'Português (Brasil)', es_MX: 'Español (Mexico)' }; var languagesHelper = { /** * Returns the list of ke...
Rename parameter to match color component name git-svn-id: ef215b97ec449bc9c69e2ae1448853f14b3d8f41@1648315 13f79535-47bb-0310-9956-ffa450edef68
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Make sure `n` is defined and use `alert` Checking that `n` is not undefined before calling `n.length` prevents an exception. Droplr now also overrides `console.log` (and other console functions) so changed it to `alert`.
// First dump var amount = 100; var coll = Droplr.DropList; function fetchNext() { coll.fetch({ data: { type: coll.type, amount: amount, offset: coll.offset, sortBy: coll.sortBy, order: coll.order, search: coll.search }, update: !0, remove: !1, success: functi...
// First dump var amount = 100; var coll = Droplr.DropList; function fetchNext() { coll.fetch({ data: { type: coll.type, amount: amount, offset: coll.offset, sortBy: coll.sortBy, order: coll.order, search: coll.search }, update: !0, remove: !1, success: functi...
Remove padding call from tutorial.
function makeBarChart() { var xScale = new Plottable.OrdinalScale().rangeType("bands"); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom", function(d) { return d; }); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.BarRenderer(barData, xS...
function makeBarChart() { var xScale = new Plottable.OrdinalScale().rangeType("bands"); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom", function(d) { return d; }); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.BarRenderer(barData, xS...
Allow a null model for the NoDatabaseUserProvider
<?php namespace Adldap\Laravel\Events; use Adldap\Models\User; use Illuminate\Contracts\Auth\Authenticatable; class AuthenticatedWithCredentials { /** * The authenticated LDAP user. * * @var User */ public $user; /** * The authenticated LDAP users model. * * @var Authe...
<?php namespace Adldap\Laravel\Events; use Adldap\Models\User; use Illuminate\Contracts\Auth\Authenticatable; class AuthenticatedWithCredentials { /** * The authenticated LDAP user. * * @var User */ public $user; /** * The authenticated LDAP users model. * * @var Authe...
Remove const that is not supported in older php versions
<?php class myKuserUtils { const NON_EXISTING_USER_ID = -1; const USERS_DELIMITER = ','; const DOT_CHAR = '.'; const SPACE_CHAR = ' '; public static function preparePusersToKusersFilter( $puserIdsCsv ) { $kuserIdsArr = array(); $puserIdsArr = explode(self::USERS_DELIMITER, $puserIdsCsv); $kuserArr = kuser...
<?php class myKuserUtils { const SPECIAL_CHARS = array('+', '=', '-', '@', ','); const NON_EXISTING_USER_ID = -1; const USERS_DELIMITER = ','; const DOT_CHAR = '.'; const SPACE_CHAR = ' '; public static function preparePusersToKusersFilter( $puserIdsCsv ) { $kuserIdsArr = array(); $puserIdsArr = explode(se...
Fix the metadata for posts.
""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: "$title" date: "$date" --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the type specif...
""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: $title date: $date --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the type specified....
Change file logHandler to use configured path for log files
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handl...
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
Include a critical truthy value in asBool test
package backend import ( "fmt" "net/http" "testing" "github.com/stretchr/testify/assert" ) type recordingHTTPTransport struct { req *http.Request } func (t *recordingHTTPTransport) RoundTrip(req *http.Request) (*http.Response, error) { t.req = req return nil, fmt.Errorf("recording HTTP transport impl") } fu...
package backend import ( "fmt" "net/http" "testing" "github.com/stretchr/testify/assert" ) type recordingHTTPTransport struct { req *http.Request } func (t *recordingHTTPTransport) RoundTrip(req *http.Request) (*http.Response, error) { t.req = req return nil, fmt.Errorf("recording HTTP transport impl") } fu...
Remove physician_us depends in first_databank
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs", 'license...
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs", 'license...
Make sure to immediately do apt-get update when adding a repository
from kokki import * apt_list_path = '/etc/apt/sources.list.d/cloudera.list' apt = ( "deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n" "deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n" ).format(distro=env.system.lsb['codename']) Execute("apt-get update", action="nothing") Ex...
from kokki import * apt_list_path = '/etc/apt/sources.list.d/cloudera.list' apt = ( "deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n" "deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n" ).format(distro=env.system.lsb['codename']) Execute("apt-get update", action="nothing") Ex...
Add Color math operations (add, multiply, multiplyScalar).
/*jshint bitwise:false*/ 'use strict'; var lerp = require( './utils' ).lerp; // RGB values are ints from [0, 255]. function Color( r, g, b ) { this.r = r || 0; this.g = g || 0; this.b = b || 0; } Color.prototype.toString = function() { return 'rgb(' + ( this.r | 0 ) + ', ' + ( this.g | 0 ) + ', ' + ...
/*jshint bitwise:false*/ 'use strict'; var lerp = require( './utils' ).lerp; // RGB values are ints from [0, 255]. function Color( r, g, b ) { this.r = r || 0; this.g = g || 0; this.b = b || 0; } Color.prototype.toString = function() { return 'rgb(' + ( this.r | 0 ) + ', ' + ( this.g | 0 ) + ', ' + ...
Allow typed predicate to handle nulls
/* * #%L * BroadleafCommerce Common Libraries * %% * Copyright (C) 2009 - 2013 Broadleaf Commerce * %% * 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...
/* * #%L * BroadleafCommerce Common Libraries * %% * Copyright (C) 2009 - 2013 Broadleaf Commerce * %% * 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...
Drop <pre> to make long commands readable.
package termite import ( "fmt" "http" ) func (me *WorkerDaemon) httpHandler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "<html><head><title>Termite worker</head></title>") fmt.Fprintf(w, "<h1>Termite worker status</h1>") fmt.Fprintf(w, "<body>") me.masterMapMutex.Lock() defer me.masterMapMutex.Unl...
package termite import ( "fmt" "http" ) func (me *WorkerDaemon) httpHandler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "<html><head><title>Termite worker</head></title>") fmt.Fprintf(w, "<h1>Termite worker status</h1>") fmt.Fprintf(w, "<body><pre>") me.masterMapMutex.Lock() defer me.masterMapMute...
Add getter for the fluid handler
package info.u_team.u_team_core.container; import info.u_team.u_team_core.api.fluid.IFluidHandlerModifiable; import net.minecraftforge.fluids.FluidStack; public class FluidSlot { private final IFluidHandlerModifiable fluidHandler; private final int index; private final int x; private final int y; public int ...
package info.u_team.u_team_core.container; import info.u_team.u_team_core.api.fluid.IFluidHandlerModifiable; import net.minecraftforge.fluids.FluidStack; public class FluidSlot { private final IFluidHandlerModifiable fluidHandler; private final int index; private final int x; private final int y; public int ...
Use argparse instead of sys.argv
#! /usr/bin/env python3 import sys import argparse from gitaccount import GitAccount def main(): parser = argparse.ArgumentParser( prog='gitcloner', description='Clone all the repositories from a github user/org\naccount to the current directory') group = parser.add_mutually_exclusiv...
#! /usr/bin/env python3 import sys from gitaccount import GitAccount def main(): if len(sys.argv) < 2: print("""Usage: gitcloner.py [OPTION] [NAME] OPTIONS: -u - for user repositories -o - for organization repositories NAME: Username or Organization Name """) ...
Disable idleTimer on iOS for appified apps
/* * This is a template used when TiShadow "appifying" a titanium project. * See the README. */ Titanium.App.idleTimerDisabled = true; var TiShadow = require("/api/TiShadow"); var Compression = require('ti.compression'); // Need to unpack the bundle on a first load; var path_name = "{{app_name}}".replace(/ /g,"_...
/* * This is a template used when TiShadow "appifying" a titanium project. * See the README. */ var TiShadow = require("/api/TiShadow"); var Compression = require('ti.compression'); // Need to unpack the bundle on a first load; var path_name = "{{app_name}}".replace(/ /g,"_"); var target = Ti.Filesystem.getFile(T...
Add Retrofit to licenses list.
package com.levibostian.pantrypirate.model; import com.levibostian.pantrypirate.vo.License; import java.util.ArrayList; public class LicensesModel { private ArrayList<License> mLicenses; public LicensesModel() { mLicenses = new ArrayList<License>(); setUpLicenses(); } private void ...
package com.levibostian.pantrypirate.model; import com.levibostian.pantrypirate.vo.License; import java.util.ArrayList; public class LicensesModel { private ArrayList<License> mLicenses; public LicensesModel() { mLicenses = new ArrayList<License>(); setUpLicenses(); } private void ...
Remove react devtools exact path
const { app, BrowserWindow } = require('electron'); //Window settings const WINDOW_WIDTH = 1280; const WINDOW_HEIGHT = 720; const WINDOW_FRAME = false; const WINDOW_SHOW = true; const WINDOW_FOCUS = true; const WINDOW_THICK_FRAME = true; const WINDOW_BACKGROUND_COLOR = '#141B23'; //Set window params const setWindowPa...
const { app, BrowserWindow } = require('electron'); //Window settings const WINDOW_WIDTH = 1280; const WINDOW_HEIGHT = 720; const WINDOW_FRAME = false; const WINDOW_SHOW = true; const WINDOW_FOCUS = true; const WINDOW_THICK_FRAME = true; const WINDOW_BACKGROUND_COLOR = '#141B23'; //Set window params const setWindowPa...
Handle null tags when getting video - Grpc doesn't allow null for fields and cassandra may return null for tags
import Promise from 'bluebird'; import { GetVideoResponse, VideoLocationType } from './protos'; import { toCassandraUuid, toProtobufTimestamp, toProtobufUuid } from '../common/protobuf-conversions'; import { NotFoundError } from '../common/grpc-errors'; import { getCassandraClient } from '../../common/cassandra'; /** ...
import Promise from 'bluebird'; import { GetVideoResponse, VideoLocationType } from './protos'; import { toCassandraUuid, toProtobufTimestamp, toProtobufUuid } from '../common/protobuf-conversions'; import { NotFoundError } from '../common/grpc-errors'; import { getCassandraClient } from '../../common/cassandra'; /** ...
Update linkset preview to use POST not GET
<?php defined('SYSPATH') OR die('No direct script access.'); /** * * @package BoomCMS * @category Chunks * @category Controllers * @author Rob Taylor * @copyright Hoop Associates */ class Boom_Controller_Cms_Chunk_Linkset extends Boom_Controller_Cms_Chunk { public function action_edit() { $this->template = ...
<?php defined('SYSPATH') OR die('No direct script access.'); /** * * @package BoomCMS * @category Chunks * @category Controllers * @author Rob Taylor * @copyright Hoop Associates */ class Boom_Controller_Cms_Chunk_Linkset extends Boom_Controller_Cms_Chunk { public function action_edit() { $this->template = ...
Add documentation and tidy up a bit git-svn-id: 52ad764cdf1b64a6e804f4e5ad13917d3c4b2253@349151 13f79535-47bb-0310-9956-ffa450edef68
/* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
/* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
Fix failing test due to change in taskmanager name
package seedu.manager.commons.core; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import seedu.manager.commons.core.Config; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class Confi...
package seedu.manager.commons.core; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import seedu.manager.commons.core.Config; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class Confi...
Add Exclude Formats to skip
$(function() { $('form').preventDoubleSubmission(); $('form').on('submit', function(e){ $(this).find('button').text('Processing...') }); select_profiles_tab_from_url_hash(); disable_modal_links(); }); function disable_modal_links(){ if( !bootstrap_enabled() ){ $("a[data-toggle='modal'").hide(); ...
$(function() { $('form').preventDoubleSubmission(); $('form').on('submit', function(e){ $(this).find('button').text('Processing...') }); select_profiles_tab_from_url_hash(); disable_modal_links(); }); function disable_modal_links(){ if( !bootstrap_enabled() ){ $("a[data-toggle='modal'").hide(); ...
Fix missing call to Params
package handle import ( "github.com/smotti/ircx" "github.com/smotti/tad/config" "github.com/smotti/tad/report" "github.com/sorcix/irc" ) // CmdHostOs handles the CMD_HOST_OS bot command, by sending back data about // the hosts operating system gathered by CFEngine. func CmdHostOs(s ircx.Sender, m *irc.Message) { ...
package handle import ( "github.com/smotti/ircx" "github.com/smotti/tad/config" "github.com/smotti/tad/report" "github.com/sorcix/irc" ) // CmdHostOs handles the CMD_HOST_OS bot command, by sending back data about // the hosts operating system gathered by CFEngine. func CmdHostOs(s ircx.Sender, m *irc.Message) { ...
Revert "Replace browser history for detail page when movie is deleted" This reverts commit 3d1c57b5a9830682e8a3c12cc46db64f83848679.
angular.module('jamm') .controller('MovieDetailController', function ($scope, MovieService, $stateParams, $state) { var movies = MovieService.movies; var movieId = $stateParams.id; if (movieId) { $scope.originalMovie = _.find(movies, { id: movieId }); $scope.movie = _.cloneDeep($scope.origi...
angular.module('jamm') .controller('MovieDetailController', function ($scope, MovieService, $stateParams, $state) { var movies = MovieService.movies; var movieId = $stateParams.id; if (movieId) { $scope.originalMovie = _.find(movies, { id: movieId }); $scope.movie = _.cloneDeep($scope.origi...
Fix issue with ‘respect user's privacy’ code! It’s Js and not PHP, stupid!
<?php /////////////////////////////////////////////////////// // ---------------------------------------------------------- // SNIPPET // ---------------------------------------------------------- // Google analytics.js // ---------------------------------------------------------- // Enable and set analytics ID/API KEY...
<?php /////////////////////////////////////////////////////// // ---------------------------------------------------------- // SNIPPET // ---------------------------------------------------------- // Google analytics.js // ---------------------------------------------------------- // Enable and set analytics ID/API KEY...
Fix the PF themes used in the default UX/UI selection.
package router; import javax.servlet.http.HttpServletRequest; import org.skyve.impl.web.UserAgent.UserAgentType; import org.skyve.metadata.router.UxUi; import org.skyve.metadata.router.UxUiSelector; public class DefaultUxUiSelector implements UxUiSelector { private static final UxUi PHONE = new UxUi("phone", "water...
package router; import javax.servlet.http.HttpServletRequest; import org.skyve.impl.web.UserAgent.UserAgentType; import org.skyve.metadata.router.UxUi; import org.skyve.metadata.router.UxUiSelector; public class DefaultUxUiSelector implements UxUiSelector { private static final UxUi PHONE = new UxUi("phone", "water...
Use api without rate limit for example
import * as Github from './api/github'; import * as Wikipedia from './api/wikipedia'; import { createDatastore, registerApi, registerMiddleware, build } from 'datastore'; import * as Caching from 'caching'; function run() { let datastore = createDatastore(); datastore = registerMiddleware('Caching', Caching, d...
import * as Github from './api/github'; import * as Wikipedia from './api/wikipedia'; import { createDatastore, registerApi, registerMiddleware, build } from 'datastore'; import * as Caching from 'caching'; function run() { let datastore = createDatastore(); datastore = registerMiddleware('Caching', Caching, d...
Reset apollo store when logging out fbshipit-source-id: 957b820
import Analytics from '../api/Analytics'; import LocalStorage from '../storage/LocalStorage'; import ApolloClient from '../api/ApolloClient'; import Auth0Api from '../api/Auth0Api'; export default { setSession(session) { return async (dispatch) => { await LocalStorage.saveSessionAsync(session); retur...
import Analytics from '../api/Analytics'; import LocalStorage from '../storage/LocalStorage'; import ApolloClient from '../api/ApolloClient'; import Auth0Api from '../api/Auth0Api'; export default { setSession(session) { return async (dispatch) => { await LocalStorage.saveSessionAsync(session); retur...
Make test_multi_keyframe demonstrate what it's supposed to I was testing a cache that wasn't behaving correctly for unrelated reasons.
import os import shutil import pytest from LiSE.engine import Engine from LiSE.examples.kobold import inittest def test_keyframe_load_init(tempdir): """Can load a keyframe at start of branch, including locations""" eng = Engine(tempdir) inittest(eng) eng.branch = 'new' eng.snap_keyframe() e...
import os import shutil import pytest from LiSE.engine import Engine from LiSE.examples.kobold import inittest def test_keyframe_load_init(tempdir): """Can load a keyframe at start of branch, including locations""" eng = Engine(tempdir) inittest(eng) eng.branch = 'new' eng.snap_keyframe() e...
Remove error from the struct, since its uneeded.
package main import ( "fmt" "strings" ) type APRSPacket struct { Callsign string PacketType string Latitude string Longitude string Altitude string GPSTime string RawData string Symbol string Heading string PHG string Speed string Destinat...
package main import ( "fmt" "strings" ) type APRSPacket struct { Callsign string PacketType string Latitude string Longitude string Altitude string GPSTime string RawData string Symbol string Heading string PHG string Speed string Destinat...
Insert custom commands through the getCommands() function.
<?php /** * @version $Id$ * @category Nooku * @package Nooku_Server * @subpackage Users * @copyright Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net). * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> * @link http://www.nooku.org */ /** * Users Toolbar Class * * @author...
<?php /** * @version $Id$ * @category Nooku * @package Nooku_Server * @subpackage Users * @copyright Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net). * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> * @link http://www.nooku.org */ /** * Users Toolbar Class * * @author...
Connect protractor directly with browsers
'use strict'; var gulpConfig = require(__dirname + '/../gulpfile').config; var sessionPage = require(__dirname + '/e2e/pages/session'); exports.config = { allScriptsTimeout: 90000, // Connect directly to chrome and firefox // Solves issues with stalled Sellenium server // https://github.com/angular/protract...
'use strict'; var gulpConfig = require(__dirname + '/../gulpfile').config; var sessionPage = require(__dirname + '/e2e/pages/session'); exports.config = { allScriptsTimeout: 90000, specs: [ 'e2e/**/*.js' ], multiCapabilities: [{ 'browserName': 'chrome', 'chromeOptions' : { args: ['--lang=e...
Remove ID from default GameObjects
package net.mueller_martin.turirun; import java.util.HashMap; import java.util.ArrayList; import net.mueller_martin.turirun.gameobjects.GameObject; /** * Created by DM on 06.11.15. */ public class ObjectController { private HashMap<Integer,GameObject> objs_map = new HashMap<Integer,GameObject>(); private ArrayLi...
package net.mueller_martin.turirun; import java.util.HashMap; import java.util.ArrayList; import net.mueller_martin.turirun.gameobjects.GameObject; /** * Created by DM on 06.11.15. */ public class ObjectController { private static int next_id = 0; private HashMap<Integer,GameObject> objs_map = new HashMap<Intege...
Use flush and fsync to ensure data is written to disk
"""Main Module of PDF Splitter""" import argparse import os from PyPDF2 import PdfFileWriter from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages parser = \ argparse.ArgumentParser( description='Split all the pages of multiple PDF files in a directory by document number' ...
"""Main Module of PDF Splitter""" import argparse from PyPDF2 import PdfFileWriter from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages parser = \ argparse.ArgumentParser( description='Split all the pages of multiple PDF files in a directory by document number' ) parser.a...
Add comments to Path Bounds tests.
module('Path Bounds'); test('path.bounds', function() { var doc = new Doc(); var path = new Path([ new Segment(new Point(121, 334), new Point(-19, 38), new Point(30.7666015625, -61.53369140625)), new Segment(new Point(248, 320), new Point(-42, -74), new Point(42, 74)), new Segment(new Point(205, 420.9448242187...
module('Path Bounds'); test('path.bounds', function() { var doc = new Doc(); var path = new Path([ new Segment(new Point(121, 334), new Point(-19, 38), new Point(30.7666015625, -61.53369140625)), new Segment(new Point(248, 320), new Point(-42, -74), new Point(42, 74)), new Segment(new Point(205, 420.9448242187...
devlogin: Fix handling of fragments in the URL. When a fragment (i.e. section starting with `#`) is present in the URL when landing the development login page, dev-login.js used to append it to the appends it to the `formaction` attribute of all the input tag present in the `dev_login.html`. This made sense before 13...
"use strict"; $(() => { // This code will be executed when the user visits /login and // dev_login.html is rendered. if ($("[data-page-id='dev-login']").length > 0) { if (window.location.hash.substring(0, 1) === "#") { /* We append the location.hash to the input field with name next so ...
"use strict"; $(() => { // This code will be executed when the user visits /login and // dev_login.html is rendered. if ($("[data-page-id='dev-login']").length > 0) { if (window.location.hash.substring(0, 1) === "#") { /* We append the location.hash to the formaction so that URL can be ...
Fix for checkboxes and descriptions
(function($){ $.entwine('ss', function($){ $('.field label.right, .field.span.description').entwine({ onadd:function() { this.hide(); var field = this.closest('.field'); if (!field.hasClass('checkbox')) field.addClass('help-text'); } }); $('.field.help-text label.left').entwine({ onmouseen...
(function($){ $.entwine('ss', function($){ $('.field label.right').entwine({ onadd:function() { this.hide(); this.closest('.field').addClass('help-text'); } }); $('.field.help-text label.left').entwine({ onmouseenter:function() { var field = this.closest('.field'), helpText = field.fin...
Use of peg interface in server
package com.adrienbrault.jastermind.server; import com.adrienbrault.jastermind.model.CodePeg; import com.adrienbrault.jastermind.model.Peg; import java.net.Socket; import java.util.Random; /** * Created by IntelliJ IDEA. * * @Author: adrienbrault * @Date: 04/06/11 12:26 */ public class CodeMakerService implemen...
package com.adrienbrault.jastermind.server; import com.adrienbrault.jastermind.model.CodePeg; import java.net.Socket; import java.util.Random; /** * Created by IntelliJ IDEA. * * @Author: adrienbrault * @Date: 04/06/11 12:26 */ public class CodeMakerService implements Runnable { final static int CODE_SIZE ...
Switch to Orion90's fork of the go portaudio wrapper, for fixes to run with go 1.6
package main import ( "github.com/Orion90/portaudio" ) const playBufferSize = 8192 func playTune(tune []int32, sampleRate float64) error { err := portaudio.Initialize() if err != nil { return err } defer portaudio.Terminate() buffer := make([]int32, playBufferSize) stream, err := portaudio.OpenDefaultStream...
package main import ( "github.com/gordonklaus/portaudio" ) const playBufferSize = 8192 func playTune(tune []int32, sampleRate float64) error { err := portaudio.Initialize() if err != nil { return err } defer portaudio.Terminate() buffer := make([]int32, playBufferSize) stream, err := portaudio.OpenDefaultSt...
Add the new modid field in the common construct bus register
package info.u_team.u_team_test.init; import info.u_team.u_team_core.api.construct.*; import info.u_team.u_team_core.util.registry.BusRegister; import info.u_team.u_team_test.TestMod; @Construct(modid = TestMod.MODID) public class TestCommonBusRegister implements IModConstruct { @Override public void construct() ...
package info.u_team.u_team_test.init; import info.u_team.u_team_core.api.construct.*; import info.u_team.u_team_core.util.registry.BusRegister; @Construct public class TestCommonBusRegister implements IModConstruct { @Override public void construct() { BusRegister.registerMod(TestBiomes::registerMod); BusRegi...
Add comment explaining why it is unnecessary to patch .catch
'use strict'; function PromiseWrap() {} module.exports = function patchPromise() { const hooks = this._hooks; const state = this._state; const Promise = global.Promise; /* As per ECMAScript 2015, .catch must be implemented by calling .then, as * such we need needn't patch .catch as well. see: * http:/...
'use strict'; function PromiseWrap() {} module.exports = function patchPromise() { const hooks = this._hooks; const state = this._state; const Promise = global.Promise; const oldThen = Promise.prototype.then; Promise.prototype.then = wrappedThen; function makeWrappedHandler(fn, handle, uid) { if ('f...
Use stable dev/platforms for CI
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
Make it clear where we are getting LazySettings from
# coding: utf-8 import os import pytest from dynaconf.base import LazySettings @pytest.fixture(scope='module') def settings(): """Settings fixture with some defaults""" mode = 'TRAVIS' if os.environ.get('TRAVIS') else 'TEST' os.environ['DYNA%s_HOSTNAME' % mode] = 'host.com' os.environ['DYNA%s_PORT' %...
# coding: utf-8 import os import pytest from dynaconf import LazySettings @pytest.fixture(scope='module') def settings(): """Settings fixture with some defaults""" mode = 'TRAVIS' if os.environ.get('TRAVIS') else 'TEST' os.environ['DYNA%s_HOSTNAME' % mode] = 'host.com' os.environ['DYNA%s_PORT' % mode...
Add session utility functions. Re-implement power resource so it loads devices instead of systems
package com.intuso.housemate.client.v1_0.rest; import com.intuso.housemate.client.v1_0.api.object.Device; import com.intuso.housemate.client.v1_0.rest.model.Page; import javax.ws.rs.*; /** * Created by tomc on 21/01/17. */ @Path("/power") public interface PowerResource { @GET @Produces("application/json")...
package com.intuso.housemate.client.v1_0.rest; import com.intuso.housemate.client.v1_0.api.object.System; import com.intuso.housemate.client.v1_0.rest.model.Page; import javax.ws.rs.*; /** * Created by tomc on 21/01/17. */ @Path("/power") public interface PowerResource { @GET @Produces("application/json")...
Fix error in db config
<?php require_once __DIR__.'/../vendor/autoload.php'; Kohana::modules(array( 'database' => MODPATH.'database', 'auth' => MODPATH.'auth', 'cache' => MODPATH.'cache', 'functest' => __DIR__.'/..', 'test' => __DIR__.'/../tests/testmodule', )); Kohana::$config ->load('database') ->set(Kohana::TESTING,...
<?php require_once __DIR__.'/../vendor/autoload.php'; Kohana::modules(array( 'database' => MODPATH.'database', 'auth' => MODPATH.'auth', 'cache' => MODPATH.'cache', 'functest' => __DIR__.'/..', 'test' => __DIR__.'/../tests/testmodule', )); Kohana::$config ->load('database') ->set(Kohana::TESTING,...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
19