text
stringlengths
2
99.9k
meta
dict
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package width import ( "unicode/utf8" "golang.org/x/text/transform" ) type foldTransform struct { transform.NopResetter } func (foldTransform) Span(src []byte, atEOF bool) (n int, err error) { for n < len(src) { if src[n] < utf8.RuneSelf { // ASCII fast path. for n++; n < len(src) && src[n] < utf8.RuneSelf; n++ { } continue } v, size := trie.lookup(src[n:]) if size == 0 { // incomplete UTF-8 encoding if !atEOF { err = transform.ErrShortSrc } else { n = len(src) } break } if elem(v)&tagNeedsFold != 0 { err = transform.ErrEndOfSpan break } n += size } return n, err } func (foldTransform) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { for nSrc < len(src) { if src[nSrc] < utf8.RuneSelf { // ASCII fast path. start, end := nSrc, len(src) if d := len(dst) - nDst; d < end-start { end = nSrc + d } for nSrc++; nSrc < end && src[nSrc] < utf8.RuneSelf; nSrc++ { } n := copy(dst[nDst:], src[start:nSrc]) if nDst += n; nDst == len(dst) { nSrc = start + n if nSrc == len(src) { return nDst, nSrc, nil } if src[nSrc] < utf8.RuneSelf { return nDst, nSrc, transform.ErrShortDst } } continue } v, size := trie.lookup(src[nSrc:]) if size == 0 { // incomplete UTF-8 encoding if !atEOF { return nDst, nSrc, transform.ErrShortSrc } size = 1 // gobble 1 byte } if elem(v)&tagNeedsFold == 0 { if size != copy(dst[nDst:], src[nSrc:nSrc+size]) { return nDst, nSrc, transform.ErrShortDst } nDst += size } else { data := inverseData[byte(v)] if len(dst)-nDst < int(data[0]) { return nDst, nSrc, transform.ErrShortDst } i := 1 for end := int(data[0]); i < end; i++ { dst[nDst] = data[i] nDst++ } dst[nDst] = data[i] ^ src[nSrc+size-1] nDst++ } nSrc += size } return nDst, nSrc, nil } type narrowTransform struct { transform.NopResetter } func (narrowTransform) Span(src []byte, atEOF bool) (n int, err error) { for n < len(src) { if src[n] < utf8.RuneSelf { // ASCII fast path. for n++; n < len(src) && src[n] < utf8.RuneSelf; n++ { } continue } v, size := trie.lookup(src[n:]) if size == 0 { // incomplete UTF-8 encoding if !atEOF { err = transform.ErrShortSrc } else { n = len(src) } break } if k := elem(v).kind(); byte(v) == 0 || k != EastAsianFullwidth && k != EastAsianWide && k != EastAsianAmbiguous { } else { err = transform.ErrEndOfSpan break } n += size } return n, err } func (narrowTransform) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { for nSrc < len(src) { if src[nSrc] < utf8.RuneSelf { // ASCII fast path. start, end := nSrc, len(src) if d := len(dst) - nDst; d < end-start { end = nSrc + d } for nSrc++; nSrc < end && src[nSrc] < utf8.RuneSelf; nSrc++ { } n := copy(dst[nDst:], src[start:nSrc]) if nDst += n; nDst == len(dst) { nSrc = start + n if nSrc == len(src) { return nDst, nSrc, nil } if src[nSrc] < utf8.RuneSelf { return nDst, nSrc, transform.ErrShortDst } } continue } v, size := trie.lookup(src[nSrc:]) if size == 0 { // incomplete UTF-8 encoding if !atEOF { return nDst, nSrc, transform.ErrShortSrc } size = 1 // gobble 1 byte } if k := elem(v).kind(); byte(v) == 0 || k != EastAsianFullwidth && k != EastAsianWide && k != EastAsianAmbiguous { if size != copy(dst[nDst:], src[nSrc:nSrc+size]) { return nDst, nSrc, transform.ErrShortDst } nDst += size } else { data := inverseData[byte(v)] if len(dst)-nDst < int(data[0]) { return nDst, nSrc, transform.ErrShortDst } i := 1 for end := int(data[0]); i < end; i++ { dst[nDst] = data[i] nDst++ } dst[nDst] = data[i] ^ src[nSrc+size-1] nDst++ } nSrc += size } return nDst, nSrc, nil } type wideTransform struct { transform.NopResetter } func (wideTransform) Span(src []byte, atEOF bool) (n int, err error) { for n < len(src) { // TODO: Consider ASCII fast path. Special-casing ASCII handling can // reduce the ns/op of BenchmarkWideASCII by about 30%. This is probably // not enough to warrant the extra code and complexity. v, size := trie.lookup(src[n:]) if size == 0 { // incomplete UTF-8 encoding if !atEOF { err = transform.ErrShortSrc } else { n = len(src) } break } if k := elem(v).kind(); byte(v) == 0 || k != EastAsianHalfwidth && k != EastAsianNarrow { } else { err = transform.ErrEndOfSpan break } n += size } return n, err } func (wideTransform) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { for nSrc < len(src) { // TODO: Consider ASCII fast path. Special-casing ASCII handling can // reduce the ns/op of BenchmarkWideASCII by about 30%. This is probably // not enough to warrant the extra code and complexity. v, size := trie.lookup(src[nSrc:]) if size == 0 { // incomplete UTF-8 encoding if !atEOF { return nDst, nSrc, transform.ErrShortSrc } size = 1 // gobble 1 byte } if k := elem(v).kind(); byte(v) == 0 || k != EastAsianHalfwidth && k != EastAsianNarrow { if size != copy(dst[nDst:], src[nSrc:nSrc+size]) { return nDst, nSrc, transform.ErrShortDst } nDst += size } else { data := inverseData[byte(v)] if len(dst)-nDst < int(data[0]) { return nDst, nSrc, transform.ErrShortDst } i := 1 for end := int(data[0]); i < end; i++ { dst[nDst] = data[i] nDst++ } dst[nDst] = data[i] ^ src[nSrc+size-1] nDst++ } nSrc += size } return nDst, nSrc, nil }
{ "pile_set_name": "Github" }
/*! * Express * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ /** * Module dependencies. */ var connect = require('connect') , HTTPSServer = require('./https') , HTTPServer = require('./http') , Route = require('./router/route') /** * Re-export connect auto-loaders. * * This prevents the need to `require('connect')` in order * to access core middleware, so for example `express.logger()` instead * of `require('connect').logger()`. */ var exports = module.exports = connect.middleware; /** * Framework version. */ exports.version = '2.3.3'; /** * Shortcut for `new Server(...)`. * * @param {Function} ... * @return {Server} * @api public */ exports.createServer = function(options){ if ('object' == typeof options) { return new HTTPSServer(options, Array.prototype.slice.call(arguments, 1)); } else { return new HTTPServer(Array.prototype.slice.call(arguments)); } }; /** * Expose constructors. */ exports.HTTPServer = HTTPServer; exports.HTTPSServer = HTTPSServer; exports.Route = Route; /** * View extensions. */ require('./view'); /** * Response extensions. */ require('./response'); /** * Request extensions. */ require('./request'); // Error handler title exports.errorHandler.title = 'Express';
{ "pile_set_name": "Github" }
// Copyright 2009 the Sputnik authors. All rights reserved. /** * The Date.prototype.setTime property "length" has { ReadOnly, DontDelete, DontEnum } attributes * * @path ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T1.js * @description Checking ReadOnly attribute */ x = Date.prototype.setTime.length; Date.prototype.setTime.length = 1; if (Date.prototype.setTime.length !== x) { $ERROR('#1: The Date.prototype.setTime.length has the attribute ReadOnly'); }
{ "pile_set_name": "Github" }
<?php /** * @copyright Copyright (c) 2013 2amigOS! Consulting Group LLC * @link http://2amigos.us * @license http://www.opensource.org/licenses/bsd-license.php New BSD License */ Yii::import('bootstrap.helpers.TbArray'); Yii::import('bootstrap.helpers.TbHtml'); /** * WhFontSizes widget class * * @author Antonio Ramirez <amigo.cobos@gmail.com> * @package YiiWheels.widgets.formhelpers * @uses YiiStrap.helpers.TbArray * @uses YiiStrap.helpers.TbHtml */ class WhFontSizes extends CInputWidget { /** * Editor options that will be passed to the editor. * * - family * * @see http://vincentlamanna.com/BootstrapFormHelpers/fontsize.html */ public $pluginOptions = array(); /** * @var bool whether to use bootstrap helper select Box widget */ public $useHelperSelectBox = false; /** * @var array extra config options for helper select box */ public $helperOptions = array(); /** * Widget's initialization method * @throws CException */ public function init() { $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin')); TbHtml::addCssClass('bfh-fontsizes', $this->htmlOptions); } /** * Runs the widget. */ public function run() { $this->renderField(); $this->registerClientScript(); } /** * Renders the input file field */ public function renderField() { list($name, $id) = $this->resolveNameID(); TbArray::defaultValue('id', $id, $this->htmlOptions); TbArray::defaultValue('name', $name, $this->htmlOptions); if ($this->useHelperSelectBox) { $select = Yii::createComponent( CMap::mergeArray( $this->helperOptions, array( 'class' => 'yiiwheels.widgets.formhelpers.WhSelectBox', 'htmlOptions' => $this->htmlOptions, 'model' => $this->model, 'attribute' => $this->attribute, 'name' => $this->name, 'value' => $this->value, 'wrapperOptions' => array( 'class' => 'bfh-fontsizes', 'data-size' => $this->hasModel() ? $this->model->{$this->attribute} : $this->value, ) ) ) ); $select->init(); $select->run(); } else { $this->htmlOptions['data-size'] = $this->hasModel() ? $this->model->{$this->attribute} : $this->value; if ($this->hasModel()) { echo CHtml::activeDropDownList($this->model, $this->attribute, array(), $this->htmlOptions); } else { echo CHtml::dropDownList($name, $this->value, array(), $this->htmlOptions); } } } /** * Registers client script */ public function registerClientScript() { /* publish assets dir */ $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets'; $assetsUrl = $this->getAssetsUrl($path); /* @var $cs CClientScript */ $cs = Yii::app()->getClientScript(); $cs->registerCssFile($assetsUrl . '/css/bootstrap-formhelpers.css'); $cs->registerScriptFile($assetsUrl . '/js/bootstrap-formhelpers-fontsizes.codes.js'); $cs->registerScriptFile($assetsUrl . '/js/bootstrap-formhelpers-fontsizes.js'); /* initialize plugin */ if (!$this->useHelperSelectBox) { $selector = '#' . TbArray::getValue('id', $this->htmlOptions, $this->getId()); $this->getApi()->registerPlugin('bfhfontsizes', $selector, $this->pluginOptions); } } }
{ "pile_set_name": "Github" }
# Deploy a Spark cluster in Azure HDInsight ![Azure Public Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/101-hdinsight-spark-linux/PublicLastTestDate.svg) ![Azure Public Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/101-hdinsight-spark-linux/PublicDeployment.svg) ![Azure US Gov Last Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/101-hdinsight-spark-linux/FairfaxLastTestDate.svg) ![Azure US Gov Last Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/101-hdinsight-spark-linux/FairfaxDeployment.svg) ![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/101-hdinsight-spark-linux/BestPracticeResult.svg) ![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/101-hdinsight-spark-linux/CredScanResult.svg) [![Deploy To Azure](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazure.svg?sanitize=true)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-hdinsight-spark-linux%2Fazuredeploy.json) [![Deploy To Azure US Gov](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazuregov.svg?sanitize=true)](https://portal.azure.us/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-hdinsight-spark-linux%2Fazuredeploy.json) [![Visualize](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/visualizebutton.svg?sanitize=true)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-hdinsight-spark-linux%2Fazuredeploy.json) This template allows you to a Spark cluster in HDInsight with the dependent Azure storage account. To learn more about how to deploy the template, see the [quickstart](https://docs.microsoft.com/azure/hdinsight/spark/apache-spark-jupyter-spark-sql) article.
{ "pile_set_name": "Github" }
// Copyright 2004-2010 Castle Project - http://www.castleproject.org/ // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by 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. namespace Castle.DynamicProxy.Tests.GenInterfaces { public interface GenInterfaceWithGenMethodsAndGenReturn<T> { Z DoSomething<Z>(Z z, T t); } public class GenInterfaceWithGenMethodsAndGenReturnImpl<T> : GenInterfaceWithGenMethodsAndGenReturn<T> { public Z DoSomething<Z>(Z z, T t) { return z; } } }
{ "pile_set_name": "Github" }
// // InboxViewController.swift // Slide for Reddit // // Created by Carlos Crane on 1/23/17. // Copyright © 2017 Haptic Apps. All rights reserved. // import Anchorage import MaterialComponents.MaterialTabs import reddift import UIKit class InboxViewController: UIPageViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate, UIScrollViewDelegate, UIGestureRecognizerDelegate, UINavigationControllerDelegate { public static let inboxIntent = "me.ccrama.redditslide.OpenInbox" var content: [MessageWhere] = [] var isReload = false var session: Session? var vCs: [UIViewController] = [] override var preferredStatusBarStyle: UIStatusBarStyle { if ColorUtil.theme.isLight && SettingValues.reduceColor { if #available(iOS 13, *) { return .darkContent } else { return .default } } else { return .lightContent } } public init() { self.session = (UIApplication.shared.delegate as! AppDelegate).session self.content = InboxViewController.doDefault() for place in content { vCs.append(ContentListingViewController.init(dataSource: InboxContributionLoader(whereContent: place))) } super.init(transitionStyle: .scroll, navigationOrientation: .horizontal, options: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } static func doDefault() -> [MessageWhere] { return [MessageWhere.inbox, MessageWhere.messages, MessageWhere.unread] } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.navigationController?.delegate = self self.title = "Inbox" UIApplication.shared.applicationIconBadgeNumber = 0 navigationController?.setNavigationBarHidden(false, animated: true) setupBaseBarColors() let edit = UIButton.init(type: .custom) edit.setImage(UIImage(sfString: SFSymbol.pencil, overrideString: "edit")?.navIcon(), for: UIControl.State.normal) edit.addTarget(self, action: #selector(self.new(_:)), for: UIControl.Event.touchUpInside) edit.frame = CGRect.init(x: 0, y: 0, width: 30, height: 30) let editB = UIBarButtonItem.init(customView: edit) let read = UIButton.init(type: .custom) read.setImage(UIImage(sfString: .eyeFill, overrideString: "seen")?.navIcon(), for: UIControl.State.normal) read.addTarget(self, action: #selector(self.read(_:)), for: UIControl.Event.touchUpInside) read.frame = CGRect.init(x: 0, y: 0, width: 30, height: 30) let readB = UIBarButtonItem.init(customView: read) navigationItem.rightBarButtonItems = [editB, readB] } @objc func new(_ sender: AnyObject) { VCPresenter.presentAlert(TapBehindModalViewController.init(rootViewController: ReplyViewController.init(completion: {(_) in DispatchQueue.main.async(execute: { () -> Void in BannerUtil.makeBanner(text: "Message sent!", seconds: 3, context: self) }) })), parentVC: self) } @objc func read(_ sender: AnyObject) { do { try session?.markAllMessagesAsRead(completion: { (result) in switch result { case .success: DispatchQueue.main.async { BannerUtil.makeBanner(text: "All messages marked as read", seconds: 5, context: self) } default: break } }) } catch { } } var time: Double = 0 func close() { self.navigationController?.popViewController(animated: true) } var tabBar = MDCTabBar() override func viewDidLoad() { super.viewDidLoad() if let navigationController = navigationController { if navigationController.viewControllers.count == 1 { navigationItem.leftBarButtonItem = UIBarButtonItem.init(title: "Close", style: .done, target: self, action: #selector(closeButtonPressed)) } } var items: [String] = [] for i in content { items.append(i.description) } tabBar = MDCTabBar.init(frame: CGRect.zero) tabBar.backgroundColor = ColorUtil.getColorForSub(sub: "", true) tabBar.itemAppearance = .titles tabBar.selectedItemTintColor = (SettingValues.reduceColor ? ColorUtil.theme.fontColor : UIColor.white) tabBar.unselectedItemTintColor = (SettingValues.reduceColor ? ColorUtil.theme.fontColor : UIColor.white).withAlphaComponent(0.45) tabBar.items = content.enumerated().map { index, source in return UITabBarItem(title: source.description, image: nil, tag: index) } tabBar.delegate = self tabBar.inkColor = UIColor.clear tabBar.selectedItem = tabBar.items[0] tabBar.tintColor = ColorUtil.accentColorForSub(sub: "NONE") self.view.addSubview(tabBar) tabBar.heightAnchor == 48 self.edgesForExtendedLayout = UIRectEdge.all self.extendedLayoutIncludesOpaqueBars = true self.automaticallyAdjustsScrollViewInsets = false var isModal13 = false if #available(iOS 13, *), (self.navigationController?.viewControllers[0] == self) { isModal13 = true } let topAnchorOffset = (self.navigationController?.navigationBar.frame.size.height ?? 64) + (isModal13 ? 0 : UIApplication.shared.statusBarFrame.height) tabBar.topAnchor == self.view.topAnchor + topAnchorOffset tabBar.horizontalAnchors == self.view.horizontalAnchors tabBar.sizeToFit() time = History.getInboxSeen() History.inboxSeen() view.backgroundColor = ColorUtil.theme.backgroundColor // set up style before super view did load is executed // - self.dataSource = self self.delegate = self self.navigationController?.view.backgroundColor = UIColor.clear let firstViewController = vCs[0] for view in view.subviews { if view is UIScrollView { (view as! UIScrollView).delegate = self break } } if self.navigationController?.interactivePopGestureRecognizer != nil { for view in view.subviews { if let scrollView = view as? UIScrollView { scrollView.panGestureRecognizer.require(toFail: self.navigationController!.interactivePopGestureRecognizer!) } } } setViewControllers([firstViewController], direction: .forward, animated: true, completion: nil) } var selected = false func pageViewController(_ pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool) { guard completed else { return } let page = vCs.firstIndex(of: self.viewControllers!.first!) if !selected { tabBar.setSelectedItem(tabBar.items[page!], animated: true) } selected = false currentIndex = page! } var currentIndex = 0 var lastPosition: CGFloat = 0 func scrollViewDidScroll(_ scrollView: UIScrollView) { self.lastPosition = scrollView.contentOffset.x if currentIndex == 0 && scrollView.contentOffset.x < scrollView.bounds.size.width { scrollView.contentOffset = CGPoint(x: scrollView.bounds.size.width, y: 0) } else if currentIndex == vCs.count - 1 && scrollView.contentOffset.x > scrollView.bounds.size.width { scrollView.contentOffset = CGPoint(x: scrollView.bounds.size.width, y: 0) } } //From https://stackoverflow.com/a/25167681/3697225 func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) { if currentIndex == 0 && scrollView.contentOffset.x <= scrollView.bounds.size.width { targetContentOffset.pointee = CGPoint(x: scrollView.bounds.size.width, y: 0) } else if currentIndex == vCs.count - 1 && scrollView.contentOffset.x >= scrollView.bounds.size.width { targetContentOffset.pointee = CGPoint(x: scrollView.bounds.size.width, y: 0) } } func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? { guard let viewControllerIndex = vCs.firstIndex(of: viewController) else { return nil } let previousIndex = viewControllerIndex - 1 guard previousIndex >= 0 else { return nil } guard vCs.count > previousIndex else { return nil } return vCs[previousIndex] } func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? { guard let viewControllerIndex = vCs.firstIndex(of: viewController) else { return nil } let nextIndex = viewControllerIndex + 1 let orderedViewControllersCount = vCs.count guard orderedViewControllersCount != nextIndex else { return nil } guard orderedViewControllersCount > nextIndex else { return nil } return vCs[nextIndex] } } extension InboxViewController: MDCTabBarDelegate { func tabBar(_ tabBar: MDCTabBar, didSelect item: UITabBarItem) { let firstViewController = vCs[tabBar.items.firstIndex(of: item)!] currentIndex = tabBar.items.firstIndex(of: item)! setViewControllers([firstViewController], direction: .forward, animated: false, completion: nil) } } // MARK: - Actions extension InboxViewController { @objc func closeButtonPressed() { dismiss(animated: true, completion: nil) } }
{ "pile_set_name": "Github" }
'use strict' // This is the webpack config used for unit tests. const utils = require('./utils') const webpack = require('webpack') const merge = require('webpack-merge') const baseWebpackConfig = require('./webpack.base.conf') const webpackConfig = merge(baseWebpackConfig, { // use inline sourcemap for karma-sourcemap-loader module: { rules: utils.styleLoaders() }, devtool: '#inline-source-map', resolveLoader: { alias: { // necessary to to make lang="scss" work in test when using vue-loader's ?inject option // see discussion at https://github.com/vuejs/vue-loader/issues/724 'scss-loader': 'sass-loader' } }, plugins: [ new webpack.DefinePlugin({ 'process.env': require('../config/test.env') }) ] }) // no need for app entry during tests delete webpackConfig.entry module.exports = webpackConfig
{ "pile_set_name": "Github" }
@import '../utils.sass' @import '~bulma/sass/components/media.sass'
{ "pile_set_name": "Github" }
/** * @file HoughLines.cpp * @brief mex interface for cv::HoughLines * @ingroup imgproc * @author Kota Yamaguchi * @date 2011 */ #include "mexopencv.hpp" #include "opencv2/imgproc.hpp" using namespace std; using namespace cv; /** * Main entry called from Matlab * @param nlhs number of left-hand-side arguments * @param plhs pointers to mxArrays in the left-hand-side * @param nrhs number of right-hand-side arguments * @param prhs pointers to mxArrays in the right-hand-side */ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { // Check the number of arguments nargchk(nrhs>=1 && (nrhs%2)==1 && nlhs<=1); // Argument vector vector<MxArray> rhs(prhs, prhs+nrhs); // Option processing double rho = 1; double theta = CV_PI/180; int threshold = 80; double srn = 0; double stn = 0; double min_theta = 0; double max_theta = CV_PI; for (int i=1; i<nrhs; i+=2) { string key(rhs[i].toString()); if (key == "Rho") rho = rhs[i+1].toDouble(); else if (key == "Theta") theta = rhs[i+1].toDouble(); else if (key == "Threshold") threshold = rhs[i+1].toInt(); else if (key == "SRN") srn = rhs[i+1].toDouble(); else if (key == "STN") stn = rhs[i+1].toDouble(); else if (key == "MinTheta") min_theta = rhs[i+1].toDouble(); else if (key == "MaxTheta") max_theta = rhs[i+1].toDouble(); else mexErrMsgIdAndTxt("mexopencv:error", "Unrecognized option %s", key.c_str()); } // Process Mat image(rhs[0].toMat(CV_8U)); vector<Vec2f> lines; HoughLines(image, lines, rho, theta, threshold, srn, stn, min_theta, max_theta); plhs[0] = MxArray(lines); }
{ "pile_set_name": "Github" }
/* * Copyright 2015-2020 Alexandr Evstigneev * * 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. */ package com.perl5.lang.mojolicious.idea.findusages; import com.intellij.lang.cacheBuilder.WordsScanner; import com.perl5.lang.perl.idea.findusages.PerlFindUsagesProvider; import org.jetbrains.annotations.Nullable; public class MojoliciousFindUsagesProvider extends PerlFindUsagesProvider { @Override public @Nullable WordsScanner getWordsScanner() { return new MojoliciousWordsScanner(); } }
{ "pile_set_name": "Github" }
namespace NBTExplorer.Windows.Search { partial class StringRuleForm { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose (bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent () { this.label1 = new System.Windows.Forms.Label(); this._textName = new System.Windows.Forms.TextBox(); this._textValue = new System.Windows.Forms.TextBox(); this._selectOperator = new System.Windows.Forms.ComboBox(); this._ruleGroup = new System.Windows.Forms.GroupBox(); this.label2 = new System.Windows.Forms.Label(); this._buttonOK = new System.Windows.Forms.Button(); this._buttonCancel = new System.Windows.Forms.Button(); this._ruleGroup.SuspendLayout(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(6, 22); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(60, 13); this.label1.TabIndex = 0; this.label1.Text = "Tag Name:"; // // _textName // this._textName.Location = new System.Drawing.Point(102, 19); this._textName.Name = "_textName"; this._textName.Size = new System.Drawing.Size(142, 20); this._textName.TabIndex = 1; // // _textValue // this._textValue.Location = new System.Drawing.Point(102, 72); this._textValue.Name = "_textValue"; this._textValue.Size = new System.Drawing.Size(142, 20); this._textValue.TabIndex = 2; // // _selectOperator // this._selectOperator.FormattingEnabled = true; this._selectOperator.Location = new System.Drawing.Point(102, 45); this._selectOperator.Name = "_selectOperator"; this._selectOperator.Size = new System.Drawing.Size(142, 21); this._selectOperator.TabIndex = 3; // // _ruleGroup // this._ruleGroup.Controls.Add(this.label2); this._ruleGroup.Controls.Add(this._textName); this._ruleGroup.Controls.Add(this._selectOperator); this._ruleGroup.Controls.Add(this.label1); this._ruleGroup.Controls.Add(this._textValue); this._ruleGroup.Location = new System.Drawing.Point(12, 12); this._ruleGroup.Name = "_ruleGroup"; this._ruleGroup.Size = new System.Drawing.Size(250, 98); this._ruleGroup.TabIndex = 4; this._ruleGroup.TabStop = false; this._ruleGroup.Text = "Rule"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(6, 75); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(59, 13); this.label2.TabIndex = 5; this.label2.Text = "Tag Value:"; // // _buttonOK // this._buttonOK.Location = new System.Drawing.Point(186, 116); this._buttonOK.Name = "_buttonOK"; this._buttonOK.Size = new System.Drawing.Size(75, 23); this._buttonOK.TabIndex = 5; this._buttonOK.Text = "OK"; this._buttonOK.UseVisualStyleBackColor = true; this._buttonOK.Click += new System.EventHandler(this._buttonOK_Click); // // _buttonCancel // this._buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this._buttonCancel.Location = new System.Drawing.Point(105, 116); this._buttonCancel.Name = "_buttonCancel"; this._buttonCancel.Size = new System.Drawing.Size(75, 23); this._buttonCancel.TabIndex = 6; this._buttonCancel.Text = "Cancel"; this._buttonCancel.UseVisualStyleBackColor = true; // // ValueRuleForm // this.AcceptButton = this._buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this._buttonCancel; this.ClientSize = new System.Drawing.Size(273, 151); this.Controls.Add(this._buttonCancel); this.Controls.Add(this._buttonOK); this.Controls.Add(this._ruleGroup); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ValueRuleForm"; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Text = "Edit Value Rule"; this.TopMost = true; this._ruleGroup.ResumeLayout(false); this._ruleGroup.PerformLayout(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.Label label1; private System.Windows.Forms.TextBox _textName; private System.Windows.Forms.TextBox _textValue; private System.Windows.Forms.ComboBox _selectOperator; private System.Windows.Forms.GroupBox _ruleGroup; private System.Windows.Forms.Label label2; private System.Windows.Forms.Button _buttonOK; private System.Windows.Forms.Button _buttonCancel; } }
{ "pile_set_name": "Github" }
<?php return [ /* |-------------------------------------------------------------------------- | Default Database Connection Name |-------------------------------------------------------------------------- | | Here you may specify which of the database connections below you wish | to use as your default connection for all database work. Of course | you may use many connections at once using the Database library. | */ 'default' => env('DB_CONNECTION', 'mysql'), /* |-------------------------------------------------------------------------- | Database Connections |-------------------------------------------------------------------------- | | Here are each of the database connections setup for your application. | Of course, examples of configuring each database platform that is | supported by Laravel is shown below to make development simple. | | | All database work in Laravel is done through the PHP PDO facilities | so make sure you have the driver for your particular database of | choice installed on your machine before you begin development. | */ 'connections' => [ 'sqlite' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', ], 'sqlite_testing' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE_TESTING', database_path('testing.database.sqlite')), 'prefix' => '', ], 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, ], 'pgsql' => [ 'driver' => 'pgsql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', 'sslmode' => 'prefer', ], 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', ], ], /* |-------------------------------------------------------------------------- | Migration Repository Table |-------------------------------------------------------------------------- | | This table keeps track of all the migrations that have already run for | your application. Using this information, we can determine which of | the migrations on disk haven't actually been run in the database. | */ 'migrations' => 'migrations', /* |-------------------------------------------------------------------------- | Redis Databases |-------------------------------------------------------------------------- | | Redis is an open source, fast, and advanced key-value store that also | provides a richer set of commands than a typical key-value systems | such as APC or Memcached. Laravel makes it easy to dig right in. | */ 'redis' => [ 'client' => 'predis', 'default' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => 0, ], ], ];
{ "pile_set_name": "Github" }
/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ 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_SPIRIT_INCLUDE_KARMA_NO_DELIMIT #define BOOST_SPIRIT_INCLUDE_KARMA_NO_DELIMIT #if defined(_MSC_VER) #pragma once #endif #include <boost/spirit/home/karma/directive/no_delimit.hpp> #endif
{ "pile_set_name": "Github" }
package com.github.megatronking.svg.iconlibs; import android.content.Context; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.Paint; import com.github.megatronking.svg.support.SVGRenderer; /** * AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * SVG-Generator. It should not be modified by hand. */ public class ic_loyalty extends SVGRenderer { public ic_loyalty(Context context) { super(context); mAlpha = 1.0f; mWidth = dip2px(24.0f); mHeight = dip2px(24.0f); } @Override public void render(Canvas canvas, int w, int h, ColorFilter filter) { final float scaleX = w / 24.0f; final float scaleY = h / 24.0f; mPath.reset(); mRenderPath.reset(); mFinalPathMatrix.setValues(new float[]{1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}); mFinalPathMatrix.postScale(scaleX, scaleY); mPath.moveTo(21.41f, 11.58f); mPath.rLineTo(-9.0f, -9.0f); mPath.cubicTo(12.05f, 2.22f, 11.55f, 2.0f, 11.0f, 2.0f); mPath.lineTo(4.0f, 2.0f); mPath.rCubicTo(-1.1f, 0.0f, -2.0f, 0.9f, -2.0f, 2.0f); mPath.rLineTo(0f, 7.0f); mPath.rCubicTo(0.0f, 0.55f, 0.22f, 1.05f, 0.59f, 1.42f); mPath.rLineTo(9.0f, 9.0f); mPath.rCubicTo(0.36f, 0.36f, 0.86f, 0.58f, 1.41f, 0.58f); mPath.rCubicTo(0.55f, 0.0f, 1.05f, -0.22f, 1.41f, -0.59f); mPath.rLineTo(7.0f, -7.0f); mPath.rCubicTo(0.37f, -0.36f, 0.59f, -0.86f, 0.59f, -1.41f); mPath.rCubicTo(0.0f, -0.55f, -0.23f, -1.06f, -0.59f, -1.42f); mPath.close(); mPath.moveTo(21.41f, 11.58f); mPath.moveTo(5.5f, 7.0f); mPath.cubicTo(4.67f, 7.0f, 4.0f, 6.33f, 4.0f, 5.5f); mPath.cubicTo(4.0f, 4.67f, 4.67f, 4.0f, 5.5f, 4.0f); mPath.cubicTo(6.33f, 4.0f, 7.0f, 4.67f, 7.0f, 5.5f); mPath.cubicTo(7.0f, 6.33f, 6.33f, 7.0f, 5.5f, 7.0f); mPath.close(); mPath.moveTo(5.5f, 7.0f); mPath.rMoveTo(11.77f, 8.27f); mPath.lineTo(13.0f, 19.54f); mPath.rLineTo(-4.27f, -4.27f); mPath.cubicTo(8.28f, 14.81f, 8.0f, 14.19f, 8.0f, 13.5f); mPath.rCubicTo(0.0f, -1.38f, 1.12f, -2.5f, 2.5f, -2.5f); mPath.rCubicTo(0.69f, 0.0f, 1.32f, 0.28f, 1.77f, 0.74f); mPath.rLineTo(0.73f, 0.72f); mPath.rLineTo(0.73f, -0.73f); mPath.rCubicTo(0.45f, -0.45f, 1.08f, -0.73f, 1.77f, -0.73f); mPath.rCubicTo(1.38f, 0.0f, 2.5f, 1.12f, 2.5f, 2.5f); mPath.rCubicTo(0.0f, 0.69f, -0.28f, 1.32f, -0.73f, 1.77f); mPath.close(); mPath.moveTo(17.27f, 15.27f); mRenderPath.addPath(mPath, mFinalPathMatrix); if (mFillPaint == null) { mFillPaint = new Paint(); mFillPaint.setStyle(Paint.Style.FILL); mFillPaint.setAntiAlias(true); } mFillPaint.setColor(applyAlpha(-16777216, 1.0f)); mFillPaint.setColorFilter(filter); canvas.drawPath(mRenderPath, mFillPaint); } }
{ "pile_set_name": "Github" }
name = "All strings"; description = "Strings and heredocs in one place. <?php $string = 'string'; $query = <<<SQL Heredoc SQL; ?> "; clearphp = ""; severity = ""; timetofix = ""; exakatSince = "0.10.1";
{ "pile_set_name": "Github" }
<Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netcoreapp3.1</TargetFramework> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\..\src\ImageSharp.Web\ImageSharp.Web.csproj" /> </ItemGroup> </Project>
{ "pile_set_name": "Github" }
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in 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. using Google.Api.Gax; using Microsoft.AspNetCore.Http; using System.Collections.Generic; using System.Linq; using LabelsCommon = Google.Cloud.Diagnostics.Common.TraceLabels; namespace Google.Cloud.Diagnostics.AspNetCore { /// <summary> /// A helper class to handle span labels. /// </summary> internal static class Labels { ///<summary>The label to denote the ASP.NET Core request trace identifier.</summary> public const string CoreTraceId = "/aspnetcore/trace_identifier"; /// <summary> /// Gets a map with the label for the agent which contains the agent's name and version. /// </summary> internal static Dictionary<string, string> AgentLabel { get; } = LabelsCommon.GetAgentLabel(); /// <summary> /// Gets a map of labels for a span from an <see cref="HttpContext"/>, such as request size, /// method, status code, etc. /// </summary> internal static Dictionary<string, string> FromHttpContext(HttpContext httpContext) { GaxPreconditions.CheckNotNull(httpContext, nameof(httpContext)); var requestHeaders = FromHttpRequest(httpContext.Request); var responseHeader = FromHttpResponse(httpContext.Response); return requestHeaders.Union(responseHeader).ToDictionary(k => k.Key, v => v.Value); } internal static Dictionary<string, string> FromHttpRequest(HttpRequest request) { GaxPreconditions.CheckNotNull(request, nameof(request)); var labels = new Dictionary<string, string> { { LabelsCommon.HttpRequestSize, request.ContentLength.ToString() }, { LabelsCommon.HttpHost, request.Host.ToString() }, { LabelsCommon.HttpMethod, request.Method } }; if (!string.IsNullOrEmpty(request.HttpContext.TraceIdentifier)) { labels[CoreTraceId] = request.HttpContext.TraceIdentifier; } return labels; } internal static Dictionary<string, string> FromHttpResponse(HttpResponse response) { GaxPreconditions.CheckNotNull(response, nameof(response)); return new Dictionary<string, string> { { LabelsCommon.HttpStatusCode, response.StatusCode.ToString() } }; } } }
{ "pile_set_name": "Github" }
Category: desktop Board URL: https://www.asus.com/Motherboards/A88XME/ ROM package: DIP8 ROM protocol: SPI ROM socketed: y Flashrom support: y (without AmdSpiRomProtect modules) Release year: 2014
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://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.apache.tools.ant.taskdefs.optional.junit; import org.junit.Test; /** */ public class VmCrash { @Test public void testCrash() { System.exit(0); } }
{ "pile_set_name": "Github" }
/* Copyright 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. */ // Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" core_v1 "k8s.io/api/core/v1" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" v1 "k8s.io/client-go/listers/core/v1" cache "k8s.io/client-go/tools/cache" ) // ConfigMapInformer provides access to a shared informer and lister for // ConfigMaps. type ConfigMapInformer interface { Informer() cache.SharedIndexInformer Lister() v1.ConfigMapLister } type configMapInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } // NewConfigMapInformer constructs a new informer for ConfigMap type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewConfigMapInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredConfigMapInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredConfigMapInformer constructs a new informer for ConfigMap type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredConfigMapInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ConfigMaps(namespace).List(options) }, WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ConfigMaps(namespace).Watch(options) }, }, &core_v1.ConfigMap{}, resyncPeriod, indexers, ) } func (f *configMapInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredConfigMapInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *configMapInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&core_v1.ConfigMap{}, f.defaultInformer) } func (f *configMapInformer) Lister() v1.ConfigMapLister { return v1.NewConfigMapLister(f.Informer().GetIndexer()) }
{ "pile_set_name": "Github" }
function log(o) { // console.log(o); } function retIsOk(ret) { if(ret && typeof ret == "object" && ret.Ok == 1) { return true; } return false; } var urlPrefix = ''; var getMsg = parent.getMsg; if (!getMsg) { getMsg = function(msg) { return msg; }; } // load image function getImageSize(url, callback) { var img = document.createElement('img'); function done(width, height) { img.parentNode.removeChild(img); callback({width: width, height: height}); } img.onload = function() { done(img.clientWidth, img.clientHeight); }; img.onerror = function() { done(); }; img.src = url; var style = img.style; style.visibility = 'hidden'; style.position = 'fixed'; style.bottom = style.left = 0; style.width = style.height = 'auto'; document.body.appendChild(img); } var o = { maxSelected: G.maxSelected, selectedZoneO:$("#preview"), previewO: $("#preview"), selectedImages:[], // selected urls imageAttrs: {}, // src => {width, height, title} pageNum: 1, pagination: function(count) { var self = this; $(".pagination").pagination(count, { items_per_page: G.perPageItems, prev_text: getMsg('Prev'), next_text: getMsg('Next'), callback: function(pageNum) { self.pageNum = pageNum+1; self.renderImages($("#albumsForList").val(), self.pageNum, false); } }); }, showMsg: function(msg) { $("#msg").html(msg).css("display", "inline"); setTimeout(function() { $("#msg").fadeOut(); }, 2000); }, pageAddAlbum: function(ret) { var html = '<option value="' + ret.AlbumId + '">' + ret.Name + '</option>'; $("#albumsForUpload").append(html).val(ret.AlbumId); $("#albumsForList").append(html); }, pageUpdateAlbum: function(albumId, albumName) { $('option[value="' + albumId + '"]').html(albumName); }, // add, delete, update album processAlbum: function() { var self = this; var isAddAlbum = true; var curAlbum = ""; function toggleAddAlbum() { if($("#addOrUpdateAlbumForm").is(":hidden")) { $("#addOrUpdateAlbumForm").show(); $("#albumSelect").hide(); } else { $("#addOrUpdateAlbumForm").hide(); $("#albumSelect").show(); } } // rename $("#renameAlbumBtn").click(function(){ curAlbum = $("#albumsForUpload").val(); if(!curAlbum) { alert(getMsg("Cannot rename default album")); return; } toggleAddAlbum(); $("#addOrUpdateAlbumBtn").html(getMsg("Rename Album")); $("#albumName").val($("#albumsForUpload option:selected").html()).focus(); isAddAlbum = false; }); // add album $("#addAlbumBtn").click(function() { toggleAddAlbum(); $("#addOrUpdateAlbumBtn").html(getMsg("Add Album")); $("#albumName").val("").focus(); isAddAlbum = true; }); $("#cancelAlbumBtn").click(function() { toggleAddAlbum(); }); // add or update album $("#addOrUpdateAlbumBtn").click(function() { var albumName = $("#albumName").val(); if(!albumName) { $("#albumName").focus(); return; } if(isAddAlbum) { $.get("/album/addAlbum", {name: albumName}, function(ret) { if(typeof ret == "object" && ret.AlbumId != "") { $("#albumName").val(""); self.showMsg(getMsg("Add Success!")); self.pageAddAlbum(ret); setTimeout(function() { toggleAddAlbum(); }, 200); } else { alert(getMsg("error")); } }); } else { $.get("/album/updateAlbum", {albumId: curAlbum, name: albumName}, function(ret) { if(typeof ret == "boolean" && ret) { $("#albumName").val(""); self.showMsg(getMsg("Rename Success!")); self.pageUpdateAlbum(curAlbum, albumName); setTimeout(function() { toggleAddAlbum(); }, 200); } else { alert(getMsg("error!")); } }); } }) // delete album $("#deleteAlbumBtn").click(function() { var albumId = $("#albumsForUpload").val(); if(!albumId) { alert(getMsg("Cannot delete default album")); return; } $.get("/album/deleteAlbum", {albumId: albumId}, function(ret) { if(typeof ret == "object" && ret.Ok == true) { self.showMsg(getMsg("Delete Success!")); // delete this album from select $("#albumsForUpload option[value='" + albumId + "']").remove(); // if the albumsForList has select this album, it must refresh list after delete it; if($("#albumsForList").val() == albumId) { self.needRefresh = true; } $("#albumsForList option[value='" + albumId + "']").remove(); } else { alert(getMsg("This album has images, please delete it's images at first.")); } }); }); }, renderAlbums: function() { var self = this; $.get("/album/getAlbums", function(ret) { if(!ret) return; var html = ""; for(var i in ret) { var each = ret[i]; var option = '<option value="' + each.AlbumId + '">' + each.Name+ '</option>'; html += option; } $("#albumsForUpload").append(html); $("#albumsForList").append(html); var albumId = $("#albumsForList").val(); self.renderImages(albumId, 1, true); }); }, imageMaskO: $("#imageMask"), noImagesO: $("#noImages"), loadingO: $("#loading"), loadingStart: function() { if(this.imageMaskO.is(":hidden")) { this.imageMaskO.css("opacity", 0.8).show(); } this.noImagesO.hide(); this.loadingO.show(); }, loadingEnd: function() { this.imageMaskO.hide(); }, noImages: function () { this.imageMaskO.show().css("opacity", 1); this.noImagesO.show(); this.loadingO.hide(); }, search: function() { var self = this; var t1 = 1; $("#key").on("keyup", function() { var t2 = ++t1; var key = $(this).val(); var albumId = $("#albumsForList").val(); self.renderImages(albumId, 1, true, key, function(){ return t1 == t2; }); }); }, renderImages: function(albumId, page, needRenderPagination, key, needRender) { var self = this; if(!page) { page = 1; } self.loadingStart(); $.get("/file/getImages", {albumId: albumId, page: page, key: key}, function(ret) { if(!ret || !ret.Count) { self.noImages(); return; } self.loadingEnd(); var datas = ret.List; var selectedMap = {}; for(var i in self.selectedImages) { var src = self.selectedImages[i]; // src include G.imageSrcPrefix selectedMap[src] = true; } // log(self.selectedImages); var html = ""; for(var i in datas){ var each = datas[i]; var classes = ""; // life edit // 之前的 if(each.Path != "" && each.Path[0] == "/") { each.Path = each.Path.substr(1); } if(each.Path != "" && each.Path.substr(0, 7) == "upload/") { var src = urlPrefix + "/" + each.Path; } else { var src = urlPrefix + "/api/file/getImage?fileId=" + each.FileId; } // log(src); if(selectedMap[src]) { classes = 'class="selected"'; } html += '<li ' + classes + '>'; html += '<a title="" href="javascript:;" class="a-img"><img alt="" src="' + src + '" data-original="' + src + '" ></a>'; // html += '<div class="tools"><a href="javascript:;" class="del" data-id="' + each.FileId + '"><span class="fa fa-trash"></span></a></div>'; html += '<div class="tools clearfix" data-id="' + each.FileId + '"><div class="file-title pull-left">' + each.Title + '</div><div class="pull-right"><a href="javascript:;" class="del" data-id="' + each.FileId + '"><span class="fa fa-trash"></span></a></div></div>'; html += "</li>"; } // var html = $("#tImage").render(datas); $("#imageList").html(html); if(needRenderPagination) { self.pagination(ret.Count); } // $("#imageList img").lazyload({effect : "fadeIn"}); // $("#imageList img").lazyload(); }); }, // 初始化已选择的图片区域 initSelectedZones: function() { var self = this; num = this.maxSelected; self.previewO.html(""); for(var i = 1; i <= num; ++i) { // self.previewO.append("<li>" + i + "</li>"); self.previewO.append("<li>?</li>"); } }, reRenderSelectedImages: function(isRemove, addSrc) { var self = this; var lis = this.selectedZoneO.find("li"); var size = this.selectedImages.length-1; for(var i = 0; i < this.maxSelected; ++i) { var target = lis.eq(i); if(i > size) { target.html('?'); } else { src = this.selectedImages[i]; var data = self.imageAttrs[src]; var attrs = ""; if(data) { if(data.width) attrs += ' data-width="' + data.width + '"'; if(data.height) attrs += ' data-height="' + data.height + '"'; if(data.title) attrs += ' data-title="' + data.title + '"'; } target.html('<img ' + attrs + ' src="' + src + '" width="60"/><div class="tools"><a title="' + getMsg('click to remove this image') + '" href="javascript:;" class="del"><span class="fa fa-trash"></span></a></div>'); } // remove selected if(isRemove) { target.removeClass("selected"); } else { // is add // trigger click and set attrs if(addSrc == src) { target.click(); } } } }, removeSelectedImage: function($li) { var self = this; var src = $li.find("img").attr('src'); for(var i in this.selectedImages) { if(this.selectedImages[i] == src) { this.selectedImages.splice(i, 1) } } this.reRenderSelectedImages(true); // clear attrs and disable it self.clearAttrs(); }, addSelectedImage: function($li) { if(this.maxSelected > 1 && this.maxSelected <= this.selectedImages.length) { return false; } // life 为了图片安全 if(typeof $li == "object") { var src = $li.find("img").attr('src'); } else { // 也有可能来自url if($li.indexOf("http://") != -1 || $li.indexOf("https://") != -1) { src = $li; } else { // 来自内部 src = urlPrefix + "/api/file/getImage?fileId=" + $li; } } // 如果只允许选1个 if(this.maxSelected == 1) { // 先把其它的去掉 $("#imageList li").removeClass("selected"); this.selectedImages = [src]; } else { this.selectedImages.push(src); } this.reRenderSelectedImages(false, src); return true; }, initDataFromTinymce: function() { var self = this; var datas = top.LEAUI_DATAS; var lastSrc = ""; if(datas && datas.length > 0) { for(var i in datas) { var data = datas[i]; data.constrain = true; lastSrc = data.src; self.selectedImages.push(data.src); self.imageAttrs[data.src] = data; } self.reRenderSelectedImages(false, lastSrc); } }, init: function() { var self = this; self.processAlbum(); $("#albumsForList").change(function() { var albumId = $(this).val(); self.renderImages(albumId, 1, true); }); $("#imageList").on("click", 'li', function() { if($(this).hasClass("selected")) { $(this).removeClass("selected"); self.removeSelectedImage($(this)); } else { if(self.addSelectedImage($(this))){ $(this).addClass("selected"); } } }); // delete file $("#imageList").on("click", '.del', function(e) { var t = this; e.stopPropagation(); if(confirm(getMsg("Are you sure to delete this image ?"))) { var fileId = $(this).data('id'); $.get("/file/deleteImage", {fileId: fileId}, function(ret) { if(ret) { var $li = $(t).closest('li'); if($li.hasClass("selected")) { self.removeSelectedImage($li); } $(t).closest('li').remove(); } }); } }); // edit file title $("#imageList").on("click", '.file-title', function(e) { var p = this; var t = this; e.stopPropagation(); if($(this).children().eq(0).is("input")){ return; } var fileId = $(p).parent().data('id'); var fileTitle = $(this).text(); $(this).html('<input type="text" value="' + fileTitle + '" />'); var $input = $(this).find("input"); $input.focus(); $input.keydown(function(e){ if(e.keyCode==13){ $(this).trigger("blur"); } }); $input.blur(function() { var title = $(this).val(); if(!title) { title = fileTitle; } else { $.post("/file/updateImageTitle", {fileId: fileId, title: title}); } $(p).html(title); }); }); // remove preview $("#preview").on("click", '.del', function(e) { e.stopPropagation(); var $li = $(this).closest("li"); var src = $li.find("img").attr("src"); self.removeSelectedImage($li); // 在当前的imagesList下看是否有 $("#imageList img").each(function() { var src2 = $(this).attr('src'); if(src == src2) { $(this).parent().parent().removeClass("selected"); } }); }); // $("#goAddImageBtn").click(function() { $("#albumsForUpload").val($("#albumsForList").val()); $('#myTab li:eq(1) a').tab('show'); }); // toggle tab // refresh $('#myTab a').on('shown.bs.tab', function(e) { e.preventDefault() $(this).tab('show'); var href = $(this).attr("href"); if(self.needRefresh && href == "#images") { setTimeout(function(){ var albumId = $("#albumsForList").val(); var key = $("#key").val(); self.renderImages(albumId, self.pageNum, true, key); }, 200); self.needRefresh = false; } if(href == "#url") { $("#imageUrl").focus(); } }); $("#refresh").click(function() { var albumId = $("#albumsForList").val(); var key = $("#key").val(); self.renderImages(albumId, self.pageNum, false, key); }); // add url $("#addImageUrlBtn").click(function(e) { e.preventDefault(); var url = $.trim($("#imageUrl").val()); if(!url) { $("#imageUrl").focus(); return; } getImageSize(url, function(ret) { if(!ret.width || !ret.height){ $("#msgForUrl").show(); return; } $("#msgForUrl").hide(); $("#imageUrl").val(""); self.addSelectedImage(url); }); }); // 设置属性 $("#preview").on("click", 'li', function() { if($(this).hasClass("selected")) { // $(this).removeClass("selected"); } else { if($(this).find("img").length){ $("#preview li").removeClass("selected"); $(this).addClass("selected"); self.initAttr($(this)); } } }); $("#attrTitle, #attrWidth, #attrHeight").on("keyup", function(){ self.modifyAttr($(this)); }); $("#attrConstrain").on("click", function(){ self.modifyAttr($(this)); }); // file search self.search(); self.initSelectedZones(); self.initDataFromTinymce(); self.renderAlbums(); //... self.initUploader(); }, // 设置 curSrc: "", curLi: null, attrTitleO: $("#attrTitle"), attrWidthO: $("#attrWidth"), attrHeightO: $("#attrHeight"), attrConstrainO: $("#attrConstrain"), // clear attrs and disable it clearAttrs: function() { var self = this; self.attrTitleO.val("").attr("disabled", true); self.attrHeightO.val("").attr("disabled", true); self.attrWidthO.val("").attr("disabled", true); self.attrConstrainO.prop("checked", false).attr("disabled", true); }, scale: function(isWidth) { var self = this; var autoScale = self.attrConstrainO.is(":checked"); var width = +self.attrWidthO.val(); var height = +self.attrHeightO.val(); if(isNaN(width) || isNaN(height)) { return; } var curAttrs = self.getCurAttrs(); var preWidth = curAttrs.preWidth || curAttrs.width; var preHeight = curAttrs.preHeight || curAttrs.height; if(autoScale && preWidth && preHeight) { if(isWidth) { height = parseInt((width/preWidth) * preHeight); self.attrHeightO.val(height); } else { width = parseInt((height/preHeight) * preWidth); self.attrWidthO.val(width); } } var ret = {width: width, height: height}; return ret; }, getCurAttrs: function() { var self = this; return self.imageAttrs[self.curSrc]; }, setCurDataAttrs: function(attrs) { var self = this; var img = self.curLi.find("img"); img.attr("data-width", attrs.width); img.attr("data-height", attrs.height); img.attr("data-title", attrs.title); self.imageAttrs[self.curSrc] = attrs; }, // 修改属性 modifyAttr: function($target){ var self = this; var id = $target.attr("id"); var val = $target.val(); var curAttrs = self.getCurAttrs(); if(!curAttrs) { return; } switch(id) { case "attrConstrain": val = 0; if($target.is(":checked")) { val = 1; } curAttrs['constrain'] = val; break; case "attrTitle": curAttrs['title'] = val; break; case "attrWidth": $.extend(curAttrs, self.scale(true)); break; case "attrHeight": $.extend(curAttrs, self.scale(false)); break; } self.setCurDataAttrs(curAttrs); }, // when click preview li initAttr: function($li) { var self = this; if(typeof $li != "object") { $li = $("#preview").find('img[src="' + $li + '"]').parent(); }; var src = $li.find("img").attr("src"); self.curSrc = src; self.curLi = $li; var attrs = self.imageAttrs[src]; function setAttr(attrs) { attrs = attrs || {}; self.attrTitleO.val(attrs.title).attr("disabled", false); self.attrWidthO.val(attrs.width).attr("disabled", false); self.attrHeightO.val(attrs.height).attr("disabled", false); self.attrConstrainO.attr("disabled", false); if(attrs.constrain) { self.attrConstrainO.prop('checked', true); } else { self.attrConstrainO.prop('checked', false); } self.setCurDataAttrs(attrs); } attrs = attrs || {}; if(!attrs || !attrs.width || !attrs.height) { getImageSize(src, function(ret) { ret.title = attrs.title || ""; ret.constrain = 1; ret.preWidth = ret.width; ret.preHeight = ret.height; if(src != self.curSrc) { self.imageAttrs[src] = ret; // in case user click fast self.setCurDataAttrs(attrs); return; } // set attrs setAttr(ret); return; }); } else { setAttr(attrs); } }, needRefresh: false, uploadRefreshImageList: function() { var self = this; // check albumId var albumId = $("#albumsForList").val(); if(albumId == $("#albumsForUpload").val()){ self.needRefresh = true; } }, initUploader: function() { var self = this; var ul = $('#upload ul'); $('#drop a').click(function() { // trigger to show file select $(this).parent().find('input').click(); }); // Initialize the jQuery File Upload plugin $('#upload').fileupload({ dataType: 'json', pasteZone: '', acceptFileTypes: /(\.|\/)(gif|jpg|jpeg|png|jpe)$/i, // maxFileSize: 210000, // This element will accept file drag/drop uploading dropZone: $('#drop'), formData: function(form) { return [{name: 'albumId', value: $("#albumsForUpload").val()}] }, /* urlFunc: function() { return 'server/index.php?action=file:uploadImage&album_id=' + $("#albumsForUpload").val(); }, */ // This function is called when a file is added to the queue; // either via the browse button, or via drag/drop: add: function(e, data) { // 文件大小限制 var size = data.files[0].size; var maxFileSize = +parent.GlobalConfigs["uploadImageSize"] || 100; if(typeof size == 'number' && size > 1024 * 1024 * maxFileSize) { var tpl = $('<li><div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a></div></li>'); tpl.find('div').append('<b>Warning:</b> ' + data.files[0].name + ' <small>[<i>' + formatFileSize(data.files[0].size) + '</i>] is bigger than ' + maxFileSize + 'M</small> '); tpl.appendTo(ul); return; } var tpl = $('<li><div class="alert alert-info"><img class="loader" src="/public/album/images/ajax-loader.gif"> <a class="close" data-dismiss="alert">×</a></div></li>'); // Append the file name and file size tpl.find('div').append(data.files[0].name + ' <small>[<i>' + formatFileSize(data.files[0].size) + '</i>]</small>'); // Add the HTML to the UL element data.context = tpl.appendTo(ul); // data.form[0].action += "&album_id=" + $("#albumsForUpload").val(); // Automatically upload the file once it is added to the queue var jqXHR = data.submit(); }, done: function(e, data) { if (data.result.Ok == true) { data.context.remove(); // add image to preview self.addSelectedImage(data.result.Id); // reresh image list self.uploadRefreshImageList(); } else { data.context.empty(); var tpl = $('<li><div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a></div></li>'); tpl.find('div').append('<b>' + getMsg('Error') + ':</b> ' + data.files[0].name + ' <small>[<i>' + formatFileSize(data.files[0].size) + '</i>]</small> ' + data.result.Msg); data.context.append(tpl); setTimeout((function(tpl) { return function() { tpl.remove(); } })(tpl), 3000); } $("#upload-msg").scrollTop(1000); }, fail: function(e, data) { data.context.empty(); var tpl = $('<li><div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a></div></li>'); tpl.find('div').append('<b>Error:</b> ' + data.files[0].name + ' <small>[<i>' + formatFileSize(data.files[0].size) + '</i>]</small> ' + data.errorThrown); data.context.append(tpl); $("#upload-msg").scrollTop(1000); } }); // Prevent the default action when a file is dropped on the window $(document).on('drop dragover', function(e) { e.preventDefault(); }); // Helper function that formats the file sizes function formatFileSize(bytes) { if (typeof bytes !== 'number') { return ''; } if (bytes >= 1000000000) { return (bytes / 1000000000).toFixed(2) + ' GB'; } if (bytes >= 1000000) { return (bytes / 1000000).toFixed(2) + ' MB'; } return (bytes / 1000).toFixed(2) + ' KB'; } // drag css $(document).bind('dragover', function (e) { var dropZone = $('#drop'), timeout = window.dropZoneTimeout; if (!timeout) { dropZone.addClass('in'); } else { clearTimeout(timeout); } var found = false, node = e.target; do { if (node === dropZone[0]) { found = true; break; } node = node.parentNode; } while (node != null); if (found) { dropZone.addClass('hover'); } else { dropZone.removeClass('hover'); } window.dropZoneTimeout = setTimeout(function () { window.dropZoneTimeout = null; dropZone.removeClass('in hover'); }, 100); }); } } $(function() { o.init(); }); // 为md得到图片链接 function mdGetImgSrc() { if(o.selectedImages && o.selectedImages.length) { return o.selectedImages[0]; } return ""; }
{ "pile_set_name": "Github" }
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // <locale> // template <> class ctype<char>; // const char* tolower(char* low, const char* high) const; #include <locale> #include <string> #include <cassert> #include "test_macros.h" int main(int, char**) { std::locale l = std::locale::classic(); { typedef std::ctype<char> F; const F& f = std::use_facet<F>(l); std::string in(" A\x07.a1"); assert(f.tolower(&in[0], in.data() + in.size()) == in.data() + in.size()); assert(in[0] == ' '); assert(in[1] == 'a'); assert(in[2] == '\x07'); assert(in[3] == '.'); assert(in[4] == 'a'); assert(in[5] == '1'); } return 0; }
{ "pile_set_name": "Github" }
package Paws::Forecast::DeleteForecast; use Moose; has ForecastArn => (is => 'ro', isa => 'Str', required => 1); use MooseX::ClassAttribute; class_has _api_call => (isa => 'Str', is => 'ro', default => 'DeleteForecast'); class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response'); class_has _result_key => (isa => 'Str', is => 'ro'); 1; ### main pod documentation begin ### =head1 NAME Paws::Forecast::DeleteForecast - Arguments for method DeleteForecast on L<Paws::Forecast> =head1 DESCRIPTION This class represents the parameters used for calling the method DeleteForecast on the L<Amazon Forecast Service|Paws::Forecast> service. Use the attributes of this class as arguments to method DeleteForecast. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DeleteForecast. =head1 SYNOPSIS my $forecast = Paws->service('Forecast'); $forecast->DeleteForecast( ForecastArn => 'MyArn', ); Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/forecast/DeleteForecast> =head1 ATTRIBUTES =head2 B<REQUIRED> ForecastArn => Str The Amazon Resource Name (ARN) of the forecast to delete. =head1 SEE ALSO This class forms part of L<Paws>, documenting arguments for method DeleteForecast in L<Paws::Forecast> =head1 BUGS and CONTRIBUTIONS The source code is located here: L<https://github.com/pplu/aws-sdk-perl> Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> =cut
{ "pile_set_name": "Github" }
Rem Assert generates a BlitzMax runtime error if the specified condition is false. End Rem a=LoadImage("nonexistant image file") Assert a,"Image Failed to Load"
{ "pile_set_name": "Github" }
<?php /************************************************************************************* * oracle11.php * ----------- * Author: Guy Wicks (Guy.Wicks@rbs.co.uk) * Contributions: * - Updated for 11i by Simon Redhead * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter) * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * Oracle 11i language file for GeSHi. * * CHANGES * ------- * 2008/04/08 (1.0.8) * - SR changes to oracle8.php to support Oracle 11i reserved words. * 2005/01/29 (1.0.0) * - First Release * * TODO (updated 2004/11/27) * ------------------------- * ************************************************************************************* * * This file is part of GeSHi. * * GeSHi 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. * * GeSHi 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 GeSHi; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ************************************************************************************/ $language_data = array ( 'LANG_NAME' => 'Oracle 11 SQL', 'COMMENT_SINGLE' => array(1 => '--'), 'COMMENT_MULTI' => array('/*' => '*/'), 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, 'QUOTEMARKS' => array("'", '"', '`'), 'ESCAPE_CHAR' => '\\', 'KEYWORDS' => array( //Put your package names here - e.g. select distinct ''''|| lower(name) || ''',' from user_source; // 6 => array( // ), //Put your table names here - e.g. select distinct ''''|| lower(table_name) || ''',' from user_tables; // 5 => array( // ), //Put your view names here - e.g. select distinct ''''|| lower(view_name) || ''',' from user_views; // 4 => array( // ), //Put your table field names here - e.g. select distinct ''''|| lower(column_name) || ''',' from user_tab_columns; // 3 => array( // ), //Put ORACLE reserved keywords here (11i). I like mine uppercase. 1 => array( 'ABS', 'ACCESS', 'ACOS', 'ADD', 'ADD_MONTHS', 'ALL', 'ALTER', 'ANALYZE', 'AND', 'ANY', 'APPENDCHILDXML', 'ARRAY', 'AS', 'ASC', 'ASCII', 'ASCIISTR', 'ASIN', 'ASSOCIATE', 'AT', 'ATAN', 'ATAN2', 'AUDIT', 'AUTHID', 'AVG', 'BEGIN', 'BETWEEN', 'BFILENAME', 'BIN_TO_NUM', 'BINARY_INTEGER', 'BITAND', 'BODY', 'BOOLEAN', 'BULK', 'BY', 'CALL', 'CARDINALITY', 'CASCADE', 'CASE', 'CAST', 'CEIL', 'CHAR', 'CHAR_BASE', 'CHARTOROWID', 'CHECK', 'CHR', 'CLOSE', 'CLUSTER', 'CLUSTER_ID', 'CLUSTER_PROBABILITY', 'CLUSTER_SET', 'COALESCE', 'COLLECT', 'COLUMN', 'COMMENT', 'COMMIT', 'COMPOSE', 'COMPRESS', 'CONCAT', 'CONNECT', 'CONSTANT', 'CONSTRAINT', 'CONSTRAINTS', 'CONTEXT', 'CONTROLFILE', 'CONVERT', 'CORR', 'CORR_K', 'CORR_S', 'COS', 'COSH', 'COST', 'COUNT', 'COVAR_POP', 'COVAR_SAMP', 'CREATE', 'CUBE_TABLE', 'CUME_DIST', 'CURRENT', 'CURRENT_DATE', 'CURRENT_TIMESTAMP', 'CURRVAL', 'CURSOR', 'CV', 'DATABASE', 'DATAOBJ_TO_PARTITION', 'DATE', 'DAY', 'DBTIMEZONE', 'DECIMAL', 'DECLARE', 'DECODE', 'DECOMPOSE', 'DEFAULT', 'DELETE', 'DELETEXML', 'DENSE_RANK', 'DEPTH', 'DEREF', 'DESC', 'DIMENSION', 'DIRECTORY', 'DISASSOCIATE', 'DISTINCT', 'DO', 'DROP', 'DUMP', 'ELSE', 'ELSIF', 'EMPTY_BLOB', 'EMPTY_CLOB', 'END', 'EXCEPTION', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTS', 'EXISTSNODE', 'EXIT', 'EXP', 'EXPLAIN', 'EXTENDS', 'EXTRACT', 'EXTRACTVALUE', 'FALSE', 'FEATURE_ID', 'FEATURE_SET', 'FEATURE_VALUE', 'FETCH', 'FILE', 'FIRST', 'FIRST_VALUE', 'FLOAT', 'FLOOR', 'FOR', 'FORALL', 'FROM', 'FROM_TZ', 'FUNCTION', 'GOTO', 'GRANT', 'GREATEST', 'GROUP', 'GROUP_ID', 'GROUPING', 'GROUPING_ID', 'HAVING', 'HEAP', 'HEXTORAW', 'HOUR', 'IDENTIFIED', 'IF', 'IMMEDIATE', 'IN', 'INCREMENT', 'INDEX', 'INDEXTYPE', 'INDICATOR', 'INITCAP', 'INITIAL', 'INSERT', 'INSERTCHILDXML', 'INSERTXMLBEFORE', 'INSTR', 'INSTRB', 'INTEGER', 'INTERFACE', 'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ISOLATION', 'ITERATION_NUMBER', 'JAVA', 'KEY', 'LAG', 'LAST', 'LAST_DAY', 'LAST_VALUE', 'LEAD', 'LEAST', 'LENGTH', 'LENGTHB', 'LEVEL', 'LIBRARY', 'LIKE', 'LIMITED', 'LINK', 'LN', 'LNNVL', 'LOCALTIMESTAMP', 'LOCK', 'LOG', 'LONG', 'LOOP', 'LOWER', 'LPAD', 'LTRIM', 'MAKE_REF', 'MATERIALIZED', 'MAX', 'MAXEXTENTS', 'MEDIAN', 'MIN', 'MINUS', 'MINUTE', 'MLSLABEL', 'MOD', 'MODE', 'MODIFY', 'MONTH', 'MONTHS_BETWEEN', 'NANVL', 'NATURAL', 'NATURALN', 'NCHR', 'NEW', 'NEW_TIME', 'NEXT_DAY', 'NEXTVAL', 'NLS_CHARSET_DECL_LEN', 'NLS_CHARSET_ID', 'NLS_CHARSET_NAME', 'NLS_INITCAP', 'NLS_LOWER', 'NLS_UPPER', 'NLSSORT', 'NOAUDIT', 'NOCOMPRESS', 'NOCOPY', 'NOT', 'NOWAIT', 'NTILE', 'NULL', 'NULLIF', 'NUMBER', 'NUMBER_BASE', 'NUMTODSINTERVAL', 'NUMTOYMINTERVAL', 'NVL', 'NVL2', 'OCIROWID', 'OF', 'OFFLINE', 'ON', 'ONLINE', 'OPAQUE', 'OPEN', 'OPERATOR', 'OPTION', 'OR', 'ORA_HASH', 'ORDER', 'ORGANIZATION', 'OTHERS', 'OUT', 'OUTLINE', 'PACKAGE', 'PARTITION', 'PATH', 'PCTFREE', 'PERCENT_RANK', 'PERCENTILE_CONT', 'PERCENTILE_DISC', 'PLAN', 'PLS_INTEGER', 'POSITIVE', 'POSITIVEN', 'POWER', 'POWERMULTISET', 'POWERMULTISET_BY_CARDINALITY', 'PRAGMA', 'PREDICTION', 'PREDICTION_BOUNDS', 'PREDICTION_COST', 'PREDICTION_DETAILS', 'PREDICTION_PROBABILITY', 'PREDICTION_SET', 'PRESENTNNV', 'PRESENTV', 'PREVIOUS', 'PRIMARY', 'PRIOR', 'PRIVATE', 'PRIVILEGES', 'PROCEDURE', 'PROFILE', 'PUBLIC', 'RAISE', 'RANGE', 'RANK', 'RATIO_TO_REPORT', 'RAW', 'RAWTOHEX', 'RAWTONHEX', 'REAL', 'RECORD', 'REF', 'REFTOHEX', 'REGEXP_COUNT', 'REGEXP_INSTR', 'REGEXP_REPLACE', 'REGEXP_SUBSTR', 'REGR_AVGX', 'REGR_AVGY', 'REGR_COUNT', 'REGR_INTERCEPT', 'REGR_R2', 'REGR_SLOPE', 'REGR_SXX', 'REGR_SXY', 'REGR_SYY', 'RELEASE', 'REMAINDER', 'RENAME', 'REPLACE', 'RESOURCE', 'RETURN', 'RETURNING', 'REVERSE', 'REVOKE', 'ROLE', 'ROLLBACK', 'ROUND', 'ROW', 'ROW_NUMBER', 'ROWID', 'ROWIDTOCHAR', 'ROWIDTONCHAR', 'ROWNUM', 'ROWS', 'ROWTYPE', 'RPAD', 'RTRIM', 'SAVEPOINT', 'SCHEMA', 'SCN_TO_TIMESTAMP', 'SECOND', 'SEGMENT', 'SELECT', 'SEPERATE', 'SEQUENCE', 'SESSION', 'SESSIONTIMEZONE', 'SET', 'SHARE', 'SIGN', 'SIN', 'SINH', 'SIZE', 'SMALLINT', 'SOUNDEX', 'SPACE', 'SQL', 'SQLCODE', 'SQLERRM', 'SQRT', 'START', 'STATISTICS', 'STATS_BINOMIAL_TEST', 'STATS_CROSSTAB', 'STATS_F_TEST', 'STATS_KS_TEST', 'STATS_MODE', 'STATS_MW_TEST', 'STATS_ONE_WAY_ANOVA', 'STATS_T_TEST_INDEP', 'STATS_T_TEST_INDEPU', 'STATS_T_TEST_ONE', 'STATS_T_TEST_PAIRED', 'STATS_WSR_TEST', 'STDDEV', 'STDDEV_POP', 'STDDEV_SAMP', 'STOP', 'SUBSTR', 'SUBSTRB', 'SUBTYPE', 'SUCCESSFUL', 'SUM', 'SYNONYM', 'SYS_CONNECT_BY_PATH', 'SYS_CONTEXT', 'SYS_DBURIGEN', 'SYS_EXTRACT_UTC', 'SYS_GUID', 'SYS_TYPEID', 'SYS_XMLAGG', 'SYS_XMLGEN', 'SYSDATE', 'SYSTEM', 'SYSTIMESTAMP', 'TABLE', 'TABLESPACE', 'TAN', 'TANH', 'TEMPORARY', 'THEN', 'TIME', 'TIMESTAMP', 'TIMESTAMP_TO_SCN', 'TIMEZONE_ABBR', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', 'TIMEZONE_REGION', 'TIMING', 'TO', 'TO_BINARY_DOUBLE', 'TO_BINARY_FLOAT', 'TO_CHAR', 'TO_CLOB', 'TO_DATE', 'TO_DSINTERVAL', 'TO_LOB', 'TO_MULTI_BYTE', 'TO_NCHAR', 'TO_NCLOB', 'TO_NUMBER', 'TO_SINGLE_BYTE', 'TO_TIMESTAMP', 'TO_TIMESTAMP_TZ', 'TO_YMINTERVAL', 'TRANSACTION', 'TRANSLATE', 'TREAT', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNC', 'TRUNCATE', 'TYPE', 'TZ_OFFSET', 'UI', 'UID', 'UNION', 'UNIQUE', 'UNISTR', 'UPDATE', 'UPDATEXML', 'UPPER', 'USE', 'USER', 'USERENV', 'USING', 'VALIDATE', 'VALUE', 'VALUES', 'VAR_POP', 'VAR_SAMP', 'VARCHAR', 'VARCHAR2', 'VARIANCE', 'VIEW', 'VSIZE', 'WHEN', 'WHENEVER', 'WHERE', 'WHILE', 'WIDTH_BUCKET', 'WITH', 'WORK', 'WRITE', 'XMLAGG', 'XMLCAST', 'XMLCDATA', 'XMLCOLATTVAL', 'XMLCOMMENT', 'XMLCONCAT', 'XMLDIFF', 'XMLELEMENT', 'XMLEXISTS', 'XMLFOREST', 'XMLPARSE', 'XMLPATCH', 'XMLPI', 'XMLQUERY', 'XMLROOT', 'XMLSEQUENCE', 'XMLSERIALIZE', 'XMLTABLE', 'XMLTRANSFORM', 'YEAR', 'ZONE' ) ), 'SYMBOLS' => array( '(', ')', '=', '<', '>', '|', '+', '-', '*', '/', ',' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, 1 => false, // 3 => false, // 4 => false, // 5 => false, // 6 => false ), 'STYLES' => array( 'KEYWORDS' => array( 1 => 'color: #993333; font-weight: bold; text-transform: uppercase;' ), 'COMMENTS' => array( 1 => 'color: #808080; font-style: italic;', ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( 0 => 'color: #66cc66;' ), 'STRINGS' => array( 0 => 'color: #ff0000;' ), 'NUMBERS' => array( 0 => 'color: #cc66cc;' ), 'METHODS' => array( 1 => 'color: #ff0000;' ), 'SYMBOLS' => array( 0 => 'color: #66cc66;' ), 'SCRIPT' => array( ), 'REGEXPS' => array( ) ), 'URLS' => array( 1 => '', // 3 => '', // 4 => '', // 5 => '', // 6 => '' ), 'OOLANG' => false, 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( ) ); ?>
{ "pile_set_name": "Github" }
## @ingroup Analyses # Analysis.py # # Created: # Modified: Feb 2016, Andrew Wendorff # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- from SUAVE.Core import Data from SUAVE.Core import Container as ContainerBase # ---------------------------------------------------------------------- # Analysis # ---------------------------------------------------------------------- ## @ingroup Analyses class Analysis(Data): """ SUAVE.Analyses.Analysis() The Top Level Analysis Class Assumptions: None Source: N/A """ def __defaults__(self): """This sets the default values and methods for the analysis. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ self.tag = 'analysis' self.features = Data() self.settings = Data() def compile(self,*args,**kwarg): """This is used to compile the data, settings, etc. used in the analysis' specific algorithms. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ return def initialize(self,*args,**kwarg): """This is used to initialize the analysis' specific algorithms. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ return def evaluate(self,*args,**kwarg): """This is used to execute the analysis' specific algorithms. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ raise NotImplementedError return Data() def finalize(self,*args,**kwarg): """This is used to finalize the analysis' specific algorithms. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ return def __call__(self,*args,**kwarg): """This is used to set the class' call behavior to the evaluate function. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ return self.evaluate(*args,**kwarg) # ---------------------------------------------------------------------- # Config Container # ---------------------------------------------------------------------- ## @ingroup Analyses class Container(ContainerBase): """ SUAVE.Analyses.Analysis.Container() The Analysis Container Class Assumptions: None Source: N/A """ def compile(self,*args,**kwarg): """This is used to execute the compile functions of the analyses stored in the container. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ for tag,analysis in self.items(): if hasattr(analysis,'compile'): analysis.compile(*args,**kwarg) def initialize(self,*args,**kwarg): """This is used to execute the initialize functions of the analyses stored in the container. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ for tag,analysis in self.items: if hasattr(analysis,'initialize'): analysis.initialize(*args,**kwarg) def evaluate(self,*args,**kwarg): """This is used to execute the evaluate functions of the analyses stored in the container. Assumptions: None Source: N/A Inputs: None Outputs: Results of the Evaluate Functions Properties Used: N/A """ results = Data() for tag,analysis in self.items(): if hasattr(analysis,'evaluate'): result = analysis.evaluate(*args,**kwarg) else: result = analysis(*args,**kwarg) results[tag] = result return results def finalize(self,*args,**kwarg): """This is used to execute the finalize functions of the analyses stored in the container. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ for tag,analysis in self.items(): if hasattr(analysis,'finalize'): analysis.finalize(*args,**kwarg) def __call__(self,*args,**kwarg): """This is used to set the class' call behavior to the evaluate functions. Assumptions: None Source: N/A Inputs: None Outputs: None Properties Used: N/A """ return self.evaluate(*args,**kwarg) # ------------------------------------------------------------ # Handle Linking # ------------------------------------------------------------ Analysis.Container = Container
{ "pile_set_name": "Github" }
# # Be sure to run `pod lib lint IHProgressHUD.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'IHProgressHUD' s.version = '0.1.5' s.summary = 'A clean and lightweight progress HUD for iOS and tvOS app based on SVProgressHUD, written in Swift.' s.license = 'MIT' s.homepage = 'https://github.com/Swiftify-Corp/IHProgressHUD/' s.swift_version = "5.0" s.author = { 'mdibrahimhassan@gmail.com' => 'mdibrahimhassan@gmail.com' } s.source = { :git => 'https://github.com/Swiftify-Corp/IHProgressHUD.git', :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/IbrahimH_ss_n' s.ios.deployment_target = '8.0' s.ios.deployment_target = '8.0' s.tvos.deployment_target = '9.0' s.framework = 'QuartzCore' s.source_files = 'IHProgressHUD/Classes/**/*.swift' s.resources = 'IHProgressHUD/Classes/IHProgressHUD.bundle' s.requires_arc = true end
{ "pile_set_name": "Github" }
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ // Source Executable: c:\windows\system32\witnesswmiv2provider.dll // Interface ID: a2484e1a-a313-4ea2-8fe9-8a873ea275ba // Interface Version: 1.0 namespace rpc_a2484e1a_a313_4ea2_8fe9_8a873ea275ba_1_0 { #region Marshal Helpers internal class _Marshal_Helper : NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer { public void Write_0(byte[] p0, long p1) { WriteConformantArray<byte>(p0, p1); } } internal class _Unmarshal_Helper : NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer { public _Unmarshal_Helper(NtApiDotNet.Win32.Rpc.RpcClientResponse r) : base(r.NdrBuffer, r.Handles, r.DataRepresentation) { } public _Unmarshal_Helper(byte[] ba) : base(ba) { } public byte[] Read_0() { return ReadConformantArray<byte>(); } } #endregion #region Client Implementation public sealed class Client : NtApiDotNet.Win32.Rpc.RpcClientBase { public Client() : base("a2484e1a-a313-4ea2-8fe9-8a873ea275ba", 1, 0) { } private _Unmarshal_Helper SendReceive(int p, _Marshal_Helper m) { return new _Unmarshal_Helper(SendReceive(p, m.DataRepresentation, m.ToArray(), m.Handles)); } public int SERVER_WitnessrMoveClientRequest(string p0, string p1) { _Marshal_Helper m = new _Marshal_Helper(); m.WriteReferent(p0, new System.Action<string>(m.WriteTerminatedString)); m.WriteReferent(p1, new System.Action<string>(m.WriteTerminatedString)); _Unmarshal_Helper u = SendReceive(0, m); return u.ReadInt32(); } public int SERVER_WitnessrGetWmiObjects(int p0, out int p1, out byte[] p2) { _Marshal_Helper m = new _Marshal_Helper(); m.WriteInt32(p0); _Unmarshal_Helper u = SendReceive(1, m); p1 = u.ReadInt32(); p2 = u.ReadReferent<byte[]>(new System.Func<byte[]>(u.Read_0), false); return u.ReadInt32(); } public int SERVER_WitnessrGetSvcVersion(out int p0) { _Marshal_Helper m = new _Marshal_Helper(); _Unmarshal_Helper u = SendReceive(2, m); p0 = u.ReadInt32(); return u.ReadInt32(); } public int SERVER_WitnessrMoveClientRequestEx(string p0, string p1, string p2, out int p3) { _Marshal_Helper m = new _Marshal_Helper(); m.WriteReferent(p0, new System.Action<string>(m.WriteTerminatedString)); m.WriteReferent(p1, new System.Action<string>(m.WriteTerminatedString)); m.WriteReferent(p2, new System.Action<string>(m.WriteTerminatedString)); _Unmarshal_Helper u = SendReceive(3, m); p3 = u.ReadInt32(); return u.ReadInt32(); } } #endregion }
{ "pile_set_name": "Github" }
// mkerrors.sh -marm // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build arm,netbsd // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -marm _const.go package unix import "syscall" const ( AF_APPLETALK = 0x10 AF_ARP = 0x1c AF_BLUETOOTH = 0x1f AF_CCITT = 0xa AF_CHAOS = 0x5 AF_CNT = 0x15 AF_COIP = 0x14 AF_DATAKIT = 0x9 AF_DECnet = 0xc AF_DLI = 0xd AF_E164 = 0x1a AF_ECMA = 0x8 AF_HYLINK = 0xf AF_IEEE80211 = 0x20 AF_IMPLINK = 0x3 AF_INET = 0x2 AF_INET6 = 0x18 AF_IPX = 0x17 AF_ISDN = 0x1a AF_ISO = 0x7 AF_LAT = 0xe AF_LINK = 0x12 AF_LOCAL = 0x1 AF_MAX = 0x23 AF_MPLS = 0x21 AF_NATM = 0x1b AF_NS = 0x6 AF_OROUTE = 0x11 AF_OSI = 0x7 AF_PUP = 0x4 AF_ROUTE = 0x22 AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 ARPHRD_ARCNET = 0x7 ARPHRD_ETHER = 0x1 ARPHRD_FRELAY = 0xf ARPHRD_IEEE1394 = 0x18 ARPHRD_IEEE802 = 0x6 ARPHRD_STRIP = 0x17 B0 = 0x0 B110 = 0x6e B115200 = 0x1c200 B1200 = 0x4b0 B134 = 0x86 B14400 = 0x3840 B150 = 0x96 B1800 = 0x708 B19200 = 0x4b00 B200 = 0xc8 B230400 = 0x38400 B2400 = 0x960 B28800 = 0x7080 B300 = 0x12c B38400 = 0x9600 B460800 = 0x70800 B4800 = 0x12c0 B50 = 0x32 B57600 = 0xe100 B600 = 0x258 B7200 = 0x1c20 B75 = 0x4b B76800 = 0x12c00 B921600 = 0xe1000 B9600 = 0x2580 BIOCFEEDBACK = 0x8004427d BIOCFLUSH = 0x20004268 BIOCGBLEN = 0x40044266 BIOCGDLT = 0x4004426a BIOCGDLTLIST = 0xc0084277 BIOCGETIF = 0x4090426b BIOCGFEEDBACK = 0x4004427c BIOCGHDRCMPLT = 0x40044274 BIOCGRTIMEOUT = 0x400c427b BIOCGSEESENT = 0x40044278 BIOCGSTATS = 0x4080426f BIOCGSTATSOLD = 0x4008426f BIOCIMMEDIATE = 0x80044270 BIOCPROMISC = 0x20004269 BIOCSBLEN = 0xc0044266 BIOCSDLT = 0x80044276 BIOCSETF = 0x80084267 BIOCSETIF = 0x8090426c BIOCSFEEDBACK = 0x8004427d BIOCSHDRCMPLT = 0x80044275 BIOCSRTIMEOUT = 0x800c427a BIOCSSEESENT = 0x80044279 BIOCSTCPF = 0x80084272 BIOCSUDPF = 0x80084273 BIOCVERSION = 0x40044271 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 BPF_ALIGNMENT = 0x4 BPF_ALIGNMENT32 = 0x4 BPF_ALU = 0x4 BPF_AND = 0x50 BPF_B = 0x10 BPF_DFLTBUFSIZE = 0x100000 BPF_DIV = 0x30 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 BPF_JA = 0x0 BPF_JEQ = 0x10 BPF_JGE = 0x30 BPF_JGT = 0x20 BPF_JMP = 0x5 BPF_JSET = 0x40 BPF_K = 0x0 BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXBUFSIZE = 0x1000000 BPF_MAXINSNS = 0x200 BPF_MEM = 0x60 BPF_MEMWORDS = 0x10 BPF_MINBUFSIZE = 0x20 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 BPF_SUB = 0x10 BPF_TAX = 0x0 BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 CREAD = 0x800 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_MAXNAME = 0xc CTL_NET = 0x4 CTL_QUERY = -0x2 DIOCBSFLUSH = 0x20006478 DLT_A429 = 0xb8 DLT_A653_ICM = 0xb9 DLT_AIRONET_HEADER = 0x78 DLT_AOS = 0xde DLT_APPLE_IP_OVER_IEEE1394 = 0x8a DLT_ARCNET = 0x7 DLT_ARCNET_LINUX = 0x81 DLT_ATM_CLIP = 0x13 DLT_ATM_RFC1483 = 0xb DLT_AURORA = 0x7e DLT_AX25 = 0x3 DLT_AX25_KISS = 0xca DLT_BACNET_MS_TP = 0xa5 DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_CAN20B = 0xbe DLT_CAN_SOCKETCAN = 0xe3 DLT_CHAOS = 0x5 DLT_CISCO_IOS = 0x76 DLT_C_HDLC = 0x68 DLT_C_HDLC_WITH_DIR = 0xcd DLT_DECT = 0xdd DLT_DOCSIS = 0x8f DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 DLT_ENC = 0x6d DLT_ERF = 0xc5 DLT_ERF_ETH = 0xaf DLT_ERF_POS = 0xb0 DLT_FC_2 = 0xe0 DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 DLT_FDDI = 0xa DLT_FLEXRAY = 0xd2 DLT_FRELAY = 0x6b DLT_FRELAY_WITH_DIR = 0xce DLT_GCOM_SERIAL = 0xad DLT_GCOM_T1E1 = 0xac DLT_GPF_F = 0xab DLT_GPF_T = 0xaa DLT_GPRS_LLC = 0xa9 DLT_GSMTAP_ABIS = 0xda DLT_GSMTAP_UM = 0xd9 DLT_HDLC = 0x10 DLT_HHDLC = 0x79 DLT_HIPPI = 0xf DLT_IBM_SN = 0x92 DLT_IBM_SP = 0x91 DLT_IEEE802 = 0x6 DLT_IEEE802_11 = 0x69 DLT_IEEE802_11_RADIO = 0x7f DLT_IEEE802_11_RADIO_AVS = 0xa3 DLT_IEEE802_15_4 = 0xc3 DLT_IEEE802_15_4_LINUX = 0xbf DLT_IEEE802_15_4_NONASK_PHY = 0xd7 DLT_IEEE802_16_MAC_CPS = 0xbc DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 DLT_IPMB = 0xc7 DLT_IPMB_LINUX = 0xd1 DLT_IPNET = 0xe2 DLT_IPV4 = 0xe4 DLT_IPV6 = 0xe5 DLT_IP_OVER_FC = 0x7a DLT_JUNIPER_ATM1 = 0x89 DLT_JUNIPER_ATM2 = 0x87 DLT_JUNIPER_CHDLC = 0xb5 DLT_JUNIPER_ES = 0x84 DLT_JUNIPER_ETHER = 0xb2 DLT_JUNIPER_FRELAY = 0xb4 DLT_JUNIPER_GGSN = 0x85 DLT_JUNIPER_ISM = 0xc2 DLT_JUNIPER_MFR = 0x86 DLT_JUNIPER_MLFR = 0x83 DLT_JUNIPER_MLPPP = 0x82 DLT_JUNIPER_MONITOR = 0xa4 DLT_JUNIPER_PIC_PEER = 0xae DLT_JUNIPER_PPP = 0xb3 DLT_JUNIPER_PPPOE = 0xa7 DLT_JUNIPER_PPPOE_ATM = 0xa8 DLT_JUNIPER_SERVICES = 0x88 DLT_JUNIPER_ST = 0xc8 DLT_JUNIPER_VP = 0xb7 DLT_LAPB_WITH_DIR = 0xcf DLT_LAPD = 0xcb DLT_LIN = 0xd4 DLT_LINUX_EVDEV = 0xd8 DLT_LINUX_IRDA = 0x90 DLT_LINUX_LAPD = 0xb1 DLT_LINUX_SLL = 0x71 DLT_LOOP = 0x6c DLT_LTALK = 0x72 DLT_MFR = 0xb6 DLT_MOST = 0xd3 DLT_MPLS = 0xdb DLT_MTP2 = 0x8c DLT_MTP2_WITH_PHDR = 0x8b DLT_MTP3 = 0x8d DLT_NULL = 0x0 DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 DLT_PPI = 0xc0 DLT_PPP = 0x9 DLT_PPP_BSDOS = 0xe DLT_PPP_ETHER = 0x33 DLT_PPP_PPPD = 0xa6 DLT_PPP_SERIAL = 0x32 DLT_PPP_WITH_DIR = 0xcc DLT_PRISM_HEADER = 0x77 DLT_PRONET = 0x4 DLT_RAIF1 = 0xc6 DLT_RAW = 0xc DLT_RAWAF_MASK = 0x2240000 DLT_RIO = 0x7c DLT_SCCP = 0x8e DLT_SITA = 0xc4 DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xd DLT_SUNATM = 0x7b DLT_SYMANTEC_FIREWALL = 0x63 DLT_TZSP = 0x80 DLT_USB = 0xba DLT_USB_LINUX = 0xbd DLT_USB_LINUX_MMAPPED = 0xdc DLT_WIHART = 0xdf DLT_X2E_SERIAL = 0xd5 DLT_X2E_XORAYA = 0xd6 DT_BLK = 0x6 DT_CHR = 0x2 DT_DIR = 0x4 DT_FIFO = 0x1 DT_LNK = 0xa DT_REG = 0x8 DT_SOCK = 0xc DT_UNKNOWN = 0x0 DT_WHT = 0xe ECHO = 0x8 ECHOCTL = 0x40 ECHOE = 0x2 ECHOK = 0x4 ECHOKE = 0x1 ECHONL = 0x10 ECHOPRT = 0x20 EMUL_LINUX = 0x1 EMUL_LINUX32 = 0x5 EMUL_MAXID = 0x6 ETHERCAP_JUMBO_MTU = 0x4 ETHERCAP_VLAN_HWTAGGING = 0x2 ETHERCAP_VLAN_MTU = 0x1 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERMTU_JUMBO = 0x2328 ETHERTYPE_8023 = 0x4 ETHERTYPE_AARP = 0x80f3 ETHERTYPE_ACCTON = 0x8390 ETHERTYPE_AEONIC = 0x8036 ETHERTYPE_ALPHA = 0x814a ETHERTYPE_AMBER = 0x6008 ETHERTYPE_AMOEBA = 0x8145 ETHERTYPE_APOLLO = 0x80f7 ETHERTYPE_APOLLODOMAIN = 0x8019 ETHERTYPE_APPLETALK = 0x809b ETHERTYPE_APPLITEK = 0x80c7 ETHERTYPE_ARGONAUT = 0x803a ETHERTYPE_ARP = 0x806 ETHERTYPE_AT = 0x809b ETHERTYPE_ATALK = 0x809b ETHERTYPE_ATOMIC = 0x86df ETHERTYPE_ATT = 0x8069 ETHERTYPE_ATTSTANFORD = 0x8008 ETHERTYPE_AUTOPHON = 0x806a ETHERTYPE_AXIS = 0x8856 ETHERTYPE_BCLOOP = 0x9003 ETHERTYPE_BOFL = 0x8102 ETHERTYPE_CABLETRON = 0x7034 ETHERTYPE_CHAOS = 0x804 ETHERTYPE_COMDESIGN = 0x806c ETHERTYPE_COMPUGRAPHIC = 0x806d ETHERTYPE_COUNTERPOINT = 0x8062 ETHERTYPE_CRONUS = 0x8004 ETHERTYPE_CRONUSVLN = 0x8003 ETHERTYPE_DCA = 0x1234 ETHERTYPE_DDE = 0x807b ETHERTYPE_DEBNI = 0xaaaa ETHERTYPE_DECAM = 0x8048 ETHERTYPE_DECCUST = 0x6006 ETHERTYPE_DECDIAG = 0x6005 ETHERTYPE_DECDNS = 0x803c ETHERTYPE_DECDTS = 0x803e ETHERTYPE_DECEXPER = 0x6000 ETHERTYPE_DECLAST = 0x8041 ETHERTYPE_DECLTM = 0x803f ETHERTYPE_DECMUMPS = 0x6009 ETHERTYPE_DECNETBIOS = 0x8040 ETHERTYPE_DELTACON = 0x86de ETHERTYPE_DIDDLE = 0x4321 ETHERTYPE_DLOG1 = 0x660 ETHERTYPE_DLOG2 = 0x661 ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d ETHERTYPE_EXCELAN = 0x8010 ETHERTYPE_EXPERDATA = 0x8049 ETHERTYPE_FLIP = 0x8146 ETHERTYPE_FLOWCONTROL = 0x8808 ETHERTYPE_FRARP = 0x808 ETHERTYPE_GENDYN = 0x8068 ETHERTYPE_HAYES = 0x8130 ETHERTYPE_HIPPI_FP = 0x8180 ETHERTYPE_HITACHI = 0x8820 ETHERTYPE_HP = 0x8005 ETHERTYPE_IEEEPUP = 0xa00 ETHERTYPE_IEEEPUPAT = 0xa01 ETHERTYPE_IMLBL = 0x4c42 ETHERTYPE_IMLBLDIAG = 0x424c ETHERTYPE_IP = 0x800 ETHERTYPE_IPAS = 0x876c ETHERTYPE_IPV6 = 0x86dd ETHERTYPE_IPX = 0x8137 ETHERTYPE_IPXNEW = 0x8037 ETHERTYPE_KALPANA = 0x8582 ETHERTYPE_LANBRIDGE = 0x8038 ETHERTYPE_LANPROBE = 0x8888 ETHERTYPE_LAT = 0x6004 ETHERTYPE_LBACK = 0x9000 ETHERTYPE_LITTLE = 0x8060 ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c ETHERTYPE_MICP = 0x873a ETHERTYPE_MOPDL = 0x6001 ETHERTYPE_MOPRC = 0x6002 ETHERTYPE_MOTOROLA = 0x818d ETHERTYPE_MPLS = 0x8847 ETHERTYPE_MPLS_MCAST = 0x8848 ETHERTYPE_MUMPS = 0x813f ETHERTYPE_NBPCC = 0x3c04 ETHERTYPE_NBPCLAIM = 0x3c09 ETHERTYPE_NBPCLREQ = 0x3c05 ETHERTYPE_NBPCLRSP = 0x3c06 ETHERTYPE_NBPCREQ = 0x3c02 ETHERTYPE_NBPCRSP = 0x3c03 ETHERTYPE_NBPDG = 0x3c07 ETHERTYPE_NBPDGB = 0x3c08 ETHERTYPE_NBPDLTE = 0x3c0a ETHERTYPE_NBPRAR = 0x3c0c ETHERTYPE_NBPRAS = 0x3c0b ETHERTYPE_NBPRST = 0x3c0d ETHERTYPE_NBPSCD = 0x3c01 ETHERTYPE_NBPVCD = 0x3c00 ETHERTYPE_NBS = 0x802 ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PAE = 0x888e ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PPP = 0x880b ETHERTYPE_PPPOE = 0x8864 ETHERTYPE_PPPOEDISC = 0x8863 ETHERTYPE_PRIMENTS = 0x7031 ETHERTYPE_PUP = 0x200 ETHERTYPE_PUPAT = 0x200 ETHERTYPE_RACAL = 0x7030 ETHERTYPE_RATIONAL = 0x8150 ETHERTYPE_RAWFR = 0x6559 ETHERTYPE_RCL = 0x1995 ETHERTYPE_RDP = 0x8739 ETHERTYPE_RETIX = 0x80f2 ETHERTYPE_REVARP = 0x8035 ETHERTYPE_SCA = 0x6007 ETHERTYPE_SECTRA = 0x86db ETHERTYPE_SECUREDATA = 0x876d ETHERTYPE_SGITW = 0x817e ETHERTYPE_SG_BOUNCE = 0x8016 ETHERTYPE_SG_DIAG = 0x8013 ETHERTYPE_SG_NETGAMES = 0x8014 ETHERTYPE_SG_RESV = 0x8015 ETHERTYPE_SIMNET = 0x5208 ETHERTYPE_SLOWPROTOCOLS = 0x8809 ETHERTYPE_SNA = 0x80d5 ETHERTYPE_SNMP = 0x814c ETHERTYPE_SONIX = 0xfaf5 ETHERTYPE_SPIDER = 0x809f ETHERTYPE_SPRITE = 0x500 ETHERTYPE_STP = 0x8181 ETHERTYPE_TALARIS = 0x812b ETHERTYPE_TALARISMC = 0x852b ETHERTYPE_TCPCOMP = 0x876b ETHERTYPE_TCPSM = 0x9002 ETHERTYPE_TEC = 0x814f ETHERTYPE_TIGAN = 0x802f ETHERTYPE_TRAIL = 0x1000 ETHERTYPE_TRANSETHER = 0x6558 ETHERTYPE_TYMSHARE = 0x802e ETHERTYPE_UBBST = 0x7005 ETHERTYPE_UBDEBUG = 0x900 ETHERTYPE_UBDIAGLOOP = 0x7002 ETHERTYPE_UBDL = 0x7000 ETHERTYPE_UBNIU = 0x7001 ETHERTYPE_UBNMC = 0x7003 ETHERTYPE_VALID = 0x1600 ETHERTYPE_VARIAN = 0x80dd ETHERTYPE_VAXELN = 0x803b ETHERTYPE_VEECO = 0x8067 ETHERTYPE_VEXP = 0x805b ETHERTYPE_VGLAB = 0x8131 ETHERTYPE_VINES = 0xbad ETHERTYPE_VINESECHO = 0xbaf ETHERTYPE_VINESLOOP = 0xbae ETHERTYPE_VITAL = 0xff00 ETHERTYPE_VLAN = 0x8100 ETHERTYPE_VLTLMAN = 0x8080 ETHERTYPE_VPROD = 0x805c ETHERTYPE_VURESERVED = 0x8147 ETHERTYPE_WATERLOO = 0x8130 ETHERTYPE_WELLFLEET = 0x8103 ETHERTYPE_X25 = 0x805 ETHERTYPE_X75 = 0x801 ETHERTYPE_XNSSM = 0x9001 ETHERTYPE_XTP = 0x817d ETHER_ADDR_LEN = 0x6 ETHER_CRC_LEN = 0x4 ETHER_CRC_POLY_BE = 0x4c11db6 ETHER_CRC_POLY_LE = 0xedb88320 ETHER_HDR_LEN = 0xe ETHER_MAX_LEN = 0x5ee ETHER_MAX_LEN_JUMBO = 0x233a ETHER_MIN_LEN = 0x40 ETHER_PPPOE_ENCAP_LEN = 0x8 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = 0x2 EVFILT_PROC = 0x4 EVFILT_READ = 0x0 EVFILT_SIGNAL = 0x5 EVFILT_SYSCOUNT = 0x7 EVFILT_TIMER = 0x6 EVFILT_VNODE = 0x3 EVFILT_WRITE = 0x1 EV_ADD = 0x1 EV_CLEAR = 0x20 EV_DELETE = 0x2 EV_DISABLE = 0x8 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_SYSFLAGS = 0xf000 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x100 FLUSHO = 0x800000 F_CLOSEM = 0xa F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0xc F_FSCTL = -0x80000000 F_FSDIRMASK = 0x70000000 F_FSIN = 0x10000000 F_FSINOUT = 0x30000000 F_FSOUT = 0x20000000 F_FSPRIV = 0x8000 F_FSVOID = 0x40000000 F_GETFD = 0x1 F_GETFL = 0x3 F_GETLK = 0x7 F_GETNOSIGPIPE = 0xd F_GETOWN = 0x5 F_MAXFD = 0xb F_OK = 0x0 F_PARAM_MASK = 0xfff F_PARAM_MAX = 0xfff F_RDLCK = 0x1 F_SETFD = 0x2 F_SETFL = 0x4 F_SETLK = 0x8 F_SETLKW = 0x9 F_SETNOSIGPIPE = 0xe F_SETOWN = 0x6 F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 IFA_ROUTE = 0x1 IFF_ALLMULTI = 0x200 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x8f52 IFF_DEBUG = 0x4 IFF_LINK0 = 0x1000 IFF_LINK1 = 0x2000 IFF_LINK2 = 0x4000 IFF_LOOPBACK = 0x8 IFF_MULTICAST = 0x8000 IFF_NOARP = 0x80 IFF_NOTRAILERS = 0x20 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_1822 = 0x2 IFT_A12MPPSWITCH = 0x82 IFT_AAL2 = 0xbb IFT_AAL5 = 0x31 IFT_ADSL = 0x5e IFT_AFLANE8023 = 0x3b IFT_AFLANE8025 = 0x3c IFT_ARAP = 0x58 IFT_ARCNET = 0x23 IFT_ARCNETPLUS = 0x24 IFT_ASYNC = 0x54 IFT_ATM = 0x25 IFT_ATMDXI = 0x69 IFT_ATMFUNI = 0x6a IFT_ATMIMA = 0x6b IFT_ATMLOGICAL = 0x50 IFT_ATMRADIO = 0xbd IFT_ATMSUBINTERFACE = 0x86 IFT_ATMVCIENDPT = 0xc2 IFT_ATMVIRTUAL = 0x95 IFT_BGPPOLICYACCOUNTING = 0xa2 IFT_BRIDGE = 0xd1 IFT_BSC = 0x53 IFT_CARP = 0xf8 IFT_CCTEMUL = 0x3d IFT_CEPT = 0x13 IFT_CES = 0x85 IFT_CHANNEL = 0x46 IFT_CNR = 0x55 IFT_COFFEE = 0x84 IFT_COMPOSITELINK = 0x9b IFT_DCN = 0x8d IFT_DIGITALPOWERLINE = 0x8a IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba IFT_DLSW = 0x4a IFT_DOCSCABLEDOWNSTREAM = 0x80 IFT_DOCSCABLEMACLAYER = 0x7f IFT_DOCSCABLEUPSTREAM = 0x81 IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd IFT_DS0 = 0x51 IFT_DS0BUNDLE = 0x52 IFT_DS1FDL = 0xaa IFT_DS3 = 0x1e IFT_DTM = 0x8c IFT_DVBASILN = 0xac IFT_DVBASIOUT = 0xad IFT_DVBRCCDOWNSTREAM = 0x93 IFT_DVBRCCMACLAYER = 0x92 IFT_DVBRCCUPSTREAM = 0x94 IFT_ECONET = 0xce IFT_EON = 0x19 IFT_EPLRS = 0x57 IFT_ESCON = 0x49 IFT_ETHER = 0x6 IFT_FAITH = 0xf2 IFT_FAST = 0x7d IFT_FASTETHER = 0x3e IFT_FASTETHERFX = 0x45 IFT_FDDI = 0xf IFT_FIBRECHANNEL = 0x38 IFT_FRAMERELAYINTERCONNECT = 0x3a IFT_FRAMERELAYMPI = 0x5c IFT_FRDLCIENDPT = 0xc1 IFT_FRELAY = 0x20 IFT_FRELAYDCE = 0x2c IFT_FRF16MFRBUNDLE = 0xa3 IFT_FRFORWARD = 0x9e IFT_G703AT2MB = 0x43 IFT_G703AT64K = 0x42 IFT_GIF = 0xf0 IFT_GIGABITETHERNET = 0x75 IFT_GR303IDT = 0xb2 IFT_GR303RDT = 0xb1 IFT_H323GATEKEEPER = 0xa4 IFT_H323PROXY = 0xa5 IFT_HDH1822 = 0x3 IFT_HDLC = 0x76 IFT_HDSL2 = 0xa8 IFT_HIPERLAN2 = 0xb7 IFT_HIPPI = 0x2f IFT_HIPPIINTERFACE = 0x39 IFT_HOSTPAD = 0x5a IFT_HSSI = 0x2e IFT_HY = 0xe IFT_IBM370PARCHAN = 0x48 IFT_IDSL = 0x9a IFT_IEEE1394 = 0x90 IFT_IEEE80211 = 0x47 IFT_IEEE80212 = 0x37 IFT_IEEE8023ADLAG = 0xa1 IFT_IFGSN = 0x91 IFT_IMT = 0xbe IFT_INFINIBAND = 0xc7 IFT_INTERLEAVE = 0x7c IFT_IP = 0x7e IFT_IPFORWARD = 0x8e IFT_IPOVERATM = 0x72 IFT_IPOVERCDLC = 0x6d IFT_IPOVERCLAW = 0x6e IFT_IPSWITCH = 0x4e IFT_ISDN = 0x3f IFT_ISDNBASIC = 0x14 IFT_ISDNPRIMARY = 0x15 IFT_ISDNS = 0x4b IFT_ISDNU = 0x4c IFT_ISO88022LLC = 0x29 IFT_ISO88023 = 0x7 IFT_ISO88024 = 0x8 IFT_ISO88025 = 0x9 IFT_ISO88025CRFPINT = 0x62 IFT_ISO88025DTR = 0x56 IFT_ISO88025FIBER = 0x73 IFT_ISO88026 = 0xa IFT_ISUP = 0xb3 IFT_L2VLAN = 0x87 IFT_L3IPVLAN = 0x88 IFT_L3IPXVLAN = 0x89 IFT_LAPB = 0x10 IFT_LAPD = 0x4d IFT_LAPF = 0x77 IFT_LINEGROUP = 0xd2 IFT_LOCALTALK = 0x2a IFT_LOOP = 0x18 IFT_MEDIAMAILOVERIP = 0x8b IFT_MFSIGLINK = 0xa7 IFT_MIOX25 = 0x26 IFT_MODEM = 0x30 IFT_MPC = 0x71 IFT_MPLS = 0xa6 IFT_MPLSTUNNEL = 0x96 IFT_MSDSL = 0x8f IFT_MVL = 0xbf IFT_MYRINET = 0x63 IFT_NFAS = 0xaf IFT_NSIP = 0x1b IFT_OPTICALCHANNEL = 0xc3 IFT_OPTICALTRANSPORT = 0xc4 IFT_OTHER = 0x1 IFT_P10 = 0xc IFT_P80 = 0xd IFT_PARA = 0x22 IFT_PFLOG = 0xf5 IFT_PFSYNC = 0xf6 IFT_PLC = 0xae IFT_PON155 = 0xcf IFT_PON622 = 0xd0 IFT_POS = 0xab IFT_PPP = 0x17 IFT_PPPMULTILINKBUNDLE = 0x6c IFT_PROPATM = 0xc5 IFT_PROPBWAP2MP = 0xb8 IFT_PROPCNLS = 0x59 IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 IFT_PROPMUX = 0x36 IFT_PROPVIRTUAL = 0x35 IFT_PROPWIRELESSP2P = 0x9d IFT_PTPSERIAL = 0x16 IFT_PVC = 0xf1 IFT_Q2931 = 0xc9 IFT_QLLC = 0x44 IFT_RADIOMAC = 0xbc IFT_RADSL = 0x5f IFT_REACHDSL = 0xc0 IFT_RFC1483 = 0x9f IFT_RS232 = 0x21 IFT_RSRB = 0x4f IFT_SDLC = 0x11 IFT_SDSL = 0x60 IFT_SHDSL = 0xa9 IFT_SIP = 0x1f IFT_SIPSIG = 0xcc IFT_SIPTG = 0xcb IFT_SLIP = 0x1c IFT_SMDSDXI = 0x2b IFT_SMDSICIP = 0x34 IFT_SONET = 0x27 IFT_SONETOVERHEADCHANNEL = 0xb9 IFT_SONETPATH = 0x32 IFT_SONETVT = 0x33 IFT_SRP = 0x97 IFT_SS7SIGLINK = 0x9c IFT_STACKTOSTACK = 0x6f IFT_STARLAN = 0xb IFT_STF = 0xd7 IFT_T1 = 0x12 IFT_TDLC = 0x74 IFT_TELINK = 0xc8 IFT_TERMPAD = 0x5b IFT_TR008 = 0xb0 IFT_TRANSPHDLC = 0x7b IFT_TUNNEL = 0x83 IFT_ULTRA = 0x1d IFT_USB = 0xa0 IFT_V11 = 0x40 IFT_V35 = 0x2d IFT_V36 = 0x41 IFT_V37 = 0x78 IFT_VDSL = 0x61 IFT_VIRTUALIPADDRESS = 0x70 IFT_VIRTUALTG = 0xca IFT_VOICEDID = 0xd5 IFT_VOICEEM = 0x64 IFT_VOICEEMFGD = 0xd3 IFT_VOICEENCAP = 0x67 IFT_VOICEFGDEANA = 0xd4 IFT_VOICEFXO = 0x65 IFT_VOICEFXS = 0x66 IFT_VOICEOVERATM = 0x98 IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 IFT_X25HUNTGROUP = 0x7a IFT_X25MLP = 0x79 IFT_X25PLE = 0x28 IFT_XETHER = 0x1a IGNBRK = 0x1 IGNCR = 0x80 IGNPAR = 0x4 IMAXBEL = 0x2000 INLCR = 0x40 INPCK = 0x10 IN_CLASSA_HOST = 0xffffff IN_CLASSA_MAX = 0x80 IN_CLASSA_NET = 0xff000000 IN_CLASSA_NSHIFT = 0x18 IN_CLASSB_HOST = 0xffff IN_CLASSB_MAX = 0x10000 IN_CLASSB_NET = 0xffff0000 IN_CLASSB_NSHIFT = 0x10 IN_CLASSC_HOST = 0xff IN_CLASSC_NET = 0xffffff00 IN_CLASSC_NSHIFT = 0x8 IN_CLASSD_HOST = 0xfffffff IN_CLASSD_NET = 0xf0000000 IN_CLASSD_NSHIFT = 0x1c IN_LOOPBACKNET = 0x7f IPPROTO_AH = 0x33 IPPROTO_CARP = 0x70 IPPROTO_DONE = 0x101 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 IPPROTO_ENCAP = 0x62 IPPROTO_EON = 0x50 IPPROTO_ESP = 0x32 IPPROTO_ETHERIP = 0x61 IPPROTO_FRAGMENT = 0x2c IPPROTO_GGP = 0x3 IPPROTO_GRE = 0x2f IPPROTO_HOPOPTS = 0x0 IPPROTO_ICMP = 0x1 IPPROTO_ICMPV6 = 0x3a IPPROTO_IDP = 0x16 IPPROTO_IGMP = 0x2 IPPROTO_IP = 0x0 IPPROTO_IPCOMP = 0x6c IPPROTO_IPIP = 0x4 IPPROTO_IPV4 = 0x4 IPPROTO_IPV6 = 0x29 IPPROTO_IPV6_ICMP = 0x3a IPPROTO_MAX = 0x100 IPPROTO_MAXID = 0x34 IPPROTO_MOBILE = 0x37 IPPROTO_NONE = 0x3b IPPROTO_PFSYNC = 0xf0 IPPROTO_PIM = 0x67 IPPROTO_PUP = 0xc IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPPROTO_VRRP = 0x70 IPV6_CHECKSUM = 0x1a IPV6_DEFAULT_MULTICAST_HOPS = 0x1 IPV6_DEFAULT_MULTICAST_LOOP = 0x1 IPV6_DEFHLIM = 0x40 IPV6_DONTFRAG = 0x3e IPV6_DSTOPTS = 0x32 IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FRAGTTL = 0x78 IPV6_HLIMDEC = 0x1 IPV6_HOPLIMIT = 0x2f IPV6_HOPOPTS = 0x31 IPV6_IPSEC_POLICY = 0x1c IPV6_JOIN_GROUP = 0xc IPV6_LEAVE_GROUP = 0xd IPV6_MAXHLIM = 0xff IPV6_MAXPACKET = 0xffff IPV6_MMTU = 0x500 IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_PATHMTU = 0x2c IPV6_PKTINFO = 0x2e IPV6_PORTRANGE = 0xe IPV6_PORTRANGE_DEFAULT = 0x0 IPV6_PORTRANGE_HIGH = 0x1 IPV6_PORTRANGE_LOW = 0x2 IPV6_RECVDSTOPTS = 0x28 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVPATHMTU = 0x2b IPV6_RECVPKTINFO = 0x24 IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x39 IPV6_RTHDR = 0x33 IPV6_RTHDRDSTOPTS = 0x23 IPV6_RTHDR_LOOSE = 0x0 IPV6_RTHDR_STRICT = 0x1 IPV6_RTHDR_TYPE_0 = 0x0 IPV6_SOCKOPT_RESERVED1 = 0x3 IPV6_TCLASS = 0x3d IPV6_UNICAST_HOPS = 0x4 IPV6_USE_MIN_MTU = 0x2a IPV6_V6ONLY = 0x1b IPV6_VERSION = 0x60 IPV6_VERSION_MASK = 0xf0 IP_ADD_MEMBERSHIP = 0xc IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 IP_DROP_MEMBERSHIP = 0xd IP_EF = 0x8000 IP_ERRORMTU = 0x15 IP_HDRINCL = 0x2 IP_IPSEC_POLICY = 0x16 IP_MAXPACKET = 0xffff IP_MAX_MEMBERSHIPS = 0x14 IP_MF = 0x2000 IP_MINFRAGSIZE = 0x45 IP_MINTTL = 0x18 IP_MSS = 0x240 IP_MULTICAST_IF = 0x9 IP_MULTICAST_LOOP = 0xb IP_MULTICAST_TTL = 0xa IP_OFFMASK = 0x1fff IP_OPTIONS = 0x1 IP_PORTRANGE = 0x13 IP_PORTRANGE_DEFAULT = 0x0 IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_LOW = 0x2 IP_RECVDSTADDR = 0x7 IP_RECVIF = 0x14 IP_RECVOPTS = 0x5 IP_RECVRETOPTS = 0x6 IP_RECVTTL = 0x17 IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 MADV_DONTNEED = 0x4 MADV_FREE = 0x6 MADV_NORMAL = 0x0 MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_SPACEAVAIL = 0x5 MADV_WILLNEED = 0x3 MAP_ALIGNMENT_16MB = 0x18000000 MAP_ALIGNMENT_1TB = 0x28000000 MAP_ALIGNMENT_256TB = 0x30000000 MAP_ALIGNMENT_4GB = 0x20000000 MAP_ALIGNMENT_64KB = 0x10000000 MAP_ALIGNMENT_64PB = 0x38000000 MAP_ALIGNMENT_MASK = -0x1000000 MAP_ALIGNMENT_SHIFT = 0x18 MAP_ANON = 0x1000 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_HASSEMAPHORE = 0x200 MAP_INHERIT = 0x80 MAP_INHERIT_COPY = 0x1 MAP_INHERIT_DEFAULT = 0x1 MAP_INHERIT_DONATE_COPY = 0x3 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 MAP_NORESERVE = 0x40 MAP_PRIVATE = 0x2 MAP_RENAME = 0x20 MAP_SHARED = 0x1 MAP_STACK = 0x2000 MAP_TRYFIXED = 0x400 MAP_WIRED = 0x800 MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CONTROLMBUF = 0x2000000 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 MSG_EOR = 0x8 MSG_IOVUSRSPACE = 0x4000000 MSG_LENUSRSPACE = 0x8000000 MSG_MCAST = 0x200 MSG_NAMEMBUF = 0x1000000 MSG_NBIO = 0x1000 MSG_NOSIGNAL = 0x400 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_USERFLAGS = 0xffffff MSG_WAITALL = 0x40 NAME_MAX = 0x1ff NET_RT_DUMP = 0x1 NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x5 NET_RT_MAXID = 0x6 NET_RT_OIFLIST = 0x4 NET_RT_OOIFLIST = 0x3 NOFLSH = 0x80000000 NOTE_ATTRIB = 0x8 NOTE_CHILD = 0x4 NOTE_DELETE = 0x1 NOTE_EXEC = 0x20000000 NOTE_EXIT = 0x80000000 NOTE_EXTEND = 0x4 NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 NOTE_REVOKE = 0x40 NOTE_TRACK = 0x1 NOTE_TRACKERR = 0x2 NOTE_WRITE = 0x2 OCRNL = 0x10 OFIOGETBMAP = 0xc004667a ONLCR = 0x2 ONLRET = 0x40 ONOCR = 0x20 ONOEOT = 0x8 OPOST = 0x1 O_ACCMODE = 0x3 O_ALT_IO = 0x40000 O_APPEND = 0x8 O_ASYNC = 0x40 O_CLOEXEC = 0x400000 O_CREAT = 0x200 O_DIRECT = 0x80000 O_DIRECTORY = 0x200000 O_DSYNC = 0x10000 O_EXCL = 0x800 O_EXLOCK = 0x20 O_FSYNC = 0x80 O_NDELAY = 0x4 O_NOCTTY = 0x8000 O_NOFOLLOW = 0x100 O_NONBLOCK = 0x4 O_NOSIGPIPE = 0x1000000 O_RDONLY = 0x0 O_RDWR = 0x2 O_RSYNC = 0x20000 O_SHLOCK = 0x10 O_SYNC = 0x80 O_TRUNC = 0x400 O_WRONLY = 0x1 PARENB = 0x1000 PARMRK = 0x8 PARODD = 0x2000 PENDIN = 0x20000000 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 PRI_IOFLUSH = 0x7c PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 RLIMIT_AS = 0xa RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_NOFILE = 0x8 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BRD = 0x7 RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_MAX = 0x9 RTAX_NETMASK = 0x2 RTAX_TAG = 0x8 RTA_AUTHOR = 0x40 RTA_BRD = 0x80 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_NETMASK = 0x4 RTA_TAG = 0x100 RTF_ANNOUNCE = 0x20000 RTF_BLACKHOLE = 0x1000 RTF_CLONED = 0x2000 RTF_CLONING = 0x100 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_MASK = 0x80 RTF_MODIFIED = 0x20 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_REJECT = 0x8 RTF_SRC = 0x10000 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_XRESOLVE = 0x200 RTM_ADD = 0x1 RTM_CHANGE = 0x3 RTM_CHGADDR = 0x15 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_GET = 0x4 RTM_IEEE80211 = 0x11 RTM_IFANNOUNCE = 0x10 RTM_IFINFO = 0x14 RTM_LLINFO_UPD = 0x13 RTM_LOCK = 0x8 RTM_LOSING = 0x5 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_OIFINFO = 0xf RTM_OLDADD = 0x9 RTM_OLDDEL = 0xa RTM_OOIFINFO = 0xe RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_RTTUNIT = 0xf4240 RTM_SETGATE = 0x12 RTM_VERSION = 0x4 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 RTV_MTU = 0x1 RTV_RPIPE = 0x8 RTV_RTT = 0x40 RTV_RTTVAR = 0x80 RTV_SPIPE = 0x10 RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 SCM_CREDS = 0x4 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x8 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80906931 SIOCADDRT = 0x8030720a SIOCAIFADDR = 0x8040691a SIOCALIFADDR = 0x8118691c SIOCATMARK = 0x40047307 SIOCDELMULTI = 0x80906932 SIOCDELRT = 0x8030720b SIOCDIFADDR = 0x80906919 SIOCDIFPHYADDR = 0x80906949 SIOCDLIFADDR = 0x8118691e SIOCGDRVSPEC = 0xc01c697b SIOCGETPFSYNC = 0xc09069f8 SIOCGETSGCNT = 0xc0147534 SIOCGETVIFCNT = 0xc0147533 SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0906921 SIOCGIFADDRPREF = 0xc0946920 SIOCGIFALIAS = 0xc040691b SIOCGIFBRDADDR = 0xc0906923 SIOCGIFCAP = 0xc0206976 SIOCGIFCONF = 0xc0086926 SIOCGIFDATA = 0xc0946985 SIOCGIFDLT = 0xc0906977 SIOCGIFDSTADDR = 0xc0906922 SIOCGIFFLAGS = 0xc0906911 SIOCGIFGENERIC = 0xc090693a SIOCGIFMEDIA = 0xc0286936 SIOCGIFMETRIC = 0xc0906917 SIOCGIFMTU = 0xc090697e SIOCGIFNETMASK = 0xc0906925 SIOCGIFPDSTADDR = 0xc0906948 SIOCGIFPSRCADDR = 0xc0906947 SIOCGLIFADDR = 0xc118691d SIOCGLIFPHYADDR = 0xc118694b SIOCGLINKSTR = 0xc01c6987 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCGVH = 0xc0906983 SIOCIFCREATE = 0x8090697a SIOCIFDESTROY = 0x80906979 SIOCIFGCLONERS = 0xc00c6978 SIOCINITIFADDR = 0xc0446984 SIOCSDRVSPEC = 0x801c697b SIOCSETPFSYNC = 0x809069f7 SIOCSHIWAT = 0x80047300 SIOCSIFADDR = 0x8090690c SIOCSIFADDRPREF = 0x8094691f SIOCSIFBRDADDR = 0x80906913 SIOCSIFCAP = 0x80206975 SIOCSIFDSTADDR = 0x8090690e SIOCSIFFLAGS = 0x80906910 SIOCSIFGENERIC = 0x80906939 SIOCSIFMEDIA = 0xc0906935 SIOCSIFMETRIC = 0x80906918 SIOCSIFMTU = 0x8090697f SIOCSIFNETMASK = 0x80906916 SIOCSIFPHYADDR = 0x80406946 SIOCSLIFPHYADDR = 0x8118694a SIOCSLINKSTR = 0x801c6988 SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 SIOCSVH = 0xc0906982 SIOCZIFDATA = 0xc0946986 SOCK_CLOEXEC = 0x10000000 SOCK_DGRAM = 0x2 SOCK_FLAGS_MASK = 0xf0000000 SOCK_NONBLOCK = 0x20000000 SOCK_NOSIGPIPE = 0x40000000 SOCK_RAW = 0x3 SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 SO_ACCEPTFILTER = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NOHEADER = 0x100a SO_NOSIGPIPE = 0x800 SO_OOBINLINE = 0x100 SO_OVERFLOWED = 0x1009 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x100c SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x100b SO_TIMESTAMP = 0x2000 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SYSCTL_VERSION = 0x1000000 SYSCTL_VERS_0 = 0x0 SYSCTL_VERS_1 = 0x1000000 SYSCTL_VERS_MASK = 0xff000000 S_ARCH1 = 0x10000 S_ARCH2 = 0x20000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 S_IFCHR = 0x2000 S_IFDIR = 0x4000 S_IFIFO = 0x1000 S_IFLNK = 0xa000 S_IFMT = 0xf000 S_IFREG = 0x8000 S_IFSOCK = 0xc000 S_IFWHT = 0xe000 S_IREAD = 0x100 S_IRGRP = 0x20 S_IROTH = 0x4 S_IRUSR = 0x100 S_IRWXG = 0x38 S_IRWXO = 0x7 S_IRWXU = 0x1c0 S_ISGID = 0x400 S_ISTXT = 0x200 S_ISUID = 0x800 S_ISVTX = 0x200 S_IWGRP = 0x10 S_IWOTH = 0x2 S_IWRITE = 0x80 S_IWUSR = 0x80 S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 TCIFLUSH = 0x1 TCIOFLUSH = 0x3 TCOFLUSH = 0x2 TCP_CONGCTL = 0x20 TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x3 TCP_KEEPINIT = 0x7 TCP_KEEPINTVL = 0x5 TCP_MAXBURST = 0x4 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_WINSHIFT = 0xe TCP_MD5SIG = 0x10 TCP_MINMSS = 0xd8 TCP_MSS = 0x218 TCP_NODELAY = 0x1 TCSAFLUSH = 0x2 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCONS = 0x80047462 TIOCDCDTIMESTAMP = 0x400c7458 TIOCDRAIN = 0x2000745e TIOCEXCL = 0x2000740d TIOCEXT = 0x80047460 TIOCFLAG_CDTRCTS = 0x10 TIOCFLAG_CLOCAL = 0x2 TIOCFLAG_CRTSCTS = 0x4 TIOCFLAG_MDMBUF = 0x8 TIOCFLAG_SOFTCAR = 0x1 TIOCFLUSH = 0x80047410 TIOCGETA = 0x402c7413 TIOCGETD = 0x4004741a TIOCGFLAGS = 0x4004745d TIOCGLINED = 0x40207442 TIOCGPGRP = 0x40047477 TIOCGQSIZE = 0x40047481 TIOCGRANTPT = 0x20007447 TIOCGSID = 0x40047463 TIOCGSIZE = 0x40087468 TIOCGWINSZ = 0x40087468 TIOCMBIC = 0x8004746b TIOCMBIS = 0x8004746c TIOCMGET = 0x4004746a TIOCMSET = 0x8004746d TIOCM_CAR = 0x40 TIOCM_CD = 0x40 TIOCM_CTS = 0x20 TIOCM_DSR = 0x100 TIOCM_DTR = 0x2 TIOCM_LE = 0x1 TIOCM_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_RTS = 0x4 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x20007471 TIOCNXCL = 0x2000740e TIOCOUTQ = 0x40047473 TIOCPKT = 0x80047470 TIOCPKT_DATA = 0x0 TIOCPKT_DOSTOP = 0x20 TIOCPKT_FLUSHREAD = 0x1 TIOCPKT_FLUSHWRITE = 0x2 TIOCPKT_IOCTL = 0x40 TIOCPKT_NOSTOP = 0x10 TIOCPKT_START = 0x8 TIOCPKT_STOP = 0x4 TIOCPTMGET = 0x48087446 TIOCPTSNAME = 0x48087448 TIOCRCVFRAME = 0x80047445 TIOCREMOTE = 0x80047469 TIOCSBRK = 0x2000747b TIOCSCTTY = 0x20007461 TIOCSDTR = 0x20007479 TIOCSETA = 0x802c7414 TIOCSETAF = 0x802c7416 TIOCSETAW = 0x802c7415 TIOCSETD = 0x8004741b TIOCSFLAGS = 0x8004745c TIOCSIG = 0x2000745f TIOCSLINED = 0x80207443 TIOCSPGRP = 0x80047476 TIOCSQSIZE = 0x80047480 TIOCSSIZE = 0x80087467 TIOCSTART = 0x2000746e TIOCSTAT = 0x80047465 TIOCSTI = 0x80017472 TIOCSTOP = 0x2000746f TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TIOCXMTFRAME = 0x80047444 TOSTOP = 0x400000 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WALL = 0x8 WALLSIG = 0x8 WALTSIG = 0x4 WCLONE = 0x4 WCOREFLAG = 0x80 WNOHANG = 0x1 WNOWAIT = 0x10000 WNOZOMBIE = 0x20000 WOPTSCHECKED = 0x40000 WSTOPPED = 0x7f WUNTRACED = 0x2 ) // Errors const ( E2BIG = syscall.Errno(0x7) EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x30) EADDRNOTAVAIL = syscall.Errno(0x31) EAFNOSUPPORT = syscall.Errno(0x2f) EAGAIN = syscall.Errno(0x23) EALREADY = syscall.Errno(0x25) EAUTH = syscall.Errno(0x50) EBADF = syscall.Errno(0x9) EBADMSG = syscall.Errno(0x58) EBADRPC = syscall.Errno(0x48) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x57) ECHILD = syscall.Errno(0xa) ECONNABORTED = syscall.Errno(0x35) ECONNREFUSED = syscall.Errno(0x3d) ECONNRESET = syscall.Errno(0x36) EDEADLK = syscall.Errno(0xb) EDESTADDRREQ = syscall.Errno(0x27) EDOM = syscall.Errno(0x21) EDQUOT = syscall.Errno(0x45) EEXIST = syscall.Errno(0x11) EFAULT = syscall.Errno(0xe) EFBIG = syscall.Errno(0x1b) EFTYPE = syscall.Errno(0x4f) EHOSTDOWN = syscall.Errno(0x40) EHOSTUNREACH = syscall.Errno(0x41) EIDRM = syscall.Errno(0x52) EILSEQ = syscall.Errno(0x55) EINPROGRESS = syscall.Errno(0x24) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) ELAST = syscall.Errno(0x60) ELOOP = syscall.Errno(0x3e) EMFILE = syscall.Errno(0x18) EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x28) EMULTIHOP = syscall.Errno(0x5e) ENAMETOOLONG = syscall.Errno(0x3f) ENEEDAUTH = syscall.Errno(0x51) ENETDOWN = syscall.Errno(0x32) ENETRESET = syscall.Errno(0x34) ENETUNREACH = syscall.Errno(0x33) ENFILE = syscall.Errno(0x17) ENOATTR = syscall.Errno(0x5d) ENOBUFS = syscall.Errno(0x37) ENODATA = syscall.Errno(0x59) ENODEV = syscall.Errno(0x13) ENOENT = syscall.Errno(0x2) ENOEXEC = syscall.Errno(0x8) ENOLCK = syscall.Errno(0x4d) ENOLINK = syscall.Errno(0x5f) ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x53) ENOPROTOOPT = syscall.Errno(0x2a) ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x5a) ENOSTR = syscall.Errno(0x5b) ENOSYS = syscall.Errno(0x4e) ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x39) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x42) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x56) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x54) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x2e) EPIPE = syscall.Errno(0x20) EPROCLIM = syscall.Errno(0x43) EPROCUNAVAIL = syscall.Errno(0x4c) EPROGMISMATCH = syscall.Errno(0x4b) EPROGUNAVAIL = syscall.Errno(0x4a) EPROTO = syscall.Errno(0x60) EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTOTYPE = syscall.Errno(0x29) ERANGE = syscall.Errno(0x22) EREMOTE = syscall.Errno(0x47) EROFS = syscall.Errno(0x1e) ERPCMISMATCH = syscall.Errno(0x49) ESHUTDOWN = syscall.Errno(0x3a) ESOCKTNOSUPPORT = syscall.Errno(0x2c) ESPIPE = syscall.Errno(0x1d) ESRCH = syscall.Errno(0x3) ESTALE = syscall.Errno(0x46) ETIME = syscall.Errno(0x5c) ETIMEDOUT = syscall.Errno(0x3c) ETOOMANYREFS = syscall.Errno(0x3b) ETXTBSY = syscall.Errno(0x1a) EUSERS = syscall.Errno(0x44) EWOULDBLOCK = syscall.Errno(0x23) EXDEV = syscall.Errno(0x12) ) // Signals const ( SIGABRT = syscall.Signal(0x6) SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x14) SIGCONT = syscall.Signal(0x13) SIGEMT = syscall.Signal(0x7) SIGFPE = syscall.Signal(0x8) SIGHUP = syscall.Signal(0x1) SIGILL = syscall.Signal(0x4) SIGINFO = syscall.Signal(0x1d) SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x17) SIGIOT = syscall.Signal(0x6) SIGKILL = syscall.Signal(0x9) SIGPIPE = syscall.Signal(0xd) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x20) SIGQUIT = syscall.Signal(0x3) SIGSEGV = syscall.Signal(0xb) SIGSTOP = syscall.Signal(0x11) SIGSYS = syscall.Signal(0xc) SIGTERM = syscall.Signal(0xf) SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x12) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) SIGURG = syscall.Signal(0x10) SIGUSR1 = syscall.Signal(0x1e) SIGUSR2 = syscall.Signal(0x1f) SIGVTALRM = syscall.Signal(0x1a) SIGWINCH = syscall.Signal(0x1c) SIGXCPU = syscall.Signal(0x18) SIGXFSZ = syscall.Signal(0x19) ) // Error table var errors = [...]string{ 1: "operation not permitted", 2: "no such file or directory", 3: "no such process", 4: "interrupted system call", 5: "input/output error", 6: "device not configured", 7: "argument list too long", 8: "exec format error", 9: "bad file descriptor", 10: "no child processes", 11: "resource deadlock avoided", 12: "cannot allocate memory", 13: "permission denied", 14: "bad address", 15: "block device required", 16: "device busy", 17: "file exists", 18: "cross-device link", 19: "operation not supported by device", 20: "not a directory", 21: "is a directory", 22: "invalid argument", 23: "too many open files in system", 24: "too many open files", 25: "inappropriate ioctl for device", 26: "text file busy", 27: "file too large", 28: "no space left on device", 29: "illegal seek", 30: "read-only file system", 31: "too many links", 32: "broken pipe", 33: "numerical argument out of domain", 34: "result too large or too small", 35: "resource temporarily unavailable", 36: "operation now in progress", 37: "operation already in progress", 38: "socket operation on non-socket", 39: "destination address required", 40: "message too long", 41: "protocol wrong type for socket", 42: "protocol option not available", 43: "protocol not supported", 44: "socket type not supported", 45: "operation not supported", 46: "protocol family not supported", 47: "address family not supported by protocol family", 48: "address already in use", 49: "can't assign requested address", 50: "network is down", 51: "network is unreachable", 52: "network dropped connection on reset", 53: "software caused connection abort", 54: "connection reset by peer", 55: "no buffer space available", 56: "socket is already connected", 57: "socket is not connected", 58: "can't send after socket shutdown", 59: "too many references: can't splice", 60: "connection timed out", 61: "connection refused", 62: "too many levels of symbolic links", 63: "file name too long", 64: "host is down", 65: "no route to host", 66: "directory not empty", 67: "too many processes", 68: "too many users", 69: "disc quota exceeded", 70: "stale NFS file handle", 71: "too many levels of remote in path", 72: "RPC struct is bad", 73: "RPC version wrong", 74: "RPC prog. not avail", 75: "program version wrong", 76: "bad procedure for program", 77: "no locks available", 78: "function not implemented", 79: "inappropriate file type or format", 80: "authentication error", 81: "need authenticator", 82: "identifier removed", 83: "no message of desired type", 84: "value too large to be stored in data type", 85: "illegal byte sequence", 86: "not supported", 87: "operation Canceled", 88: "bad or Corrupt message", 89: "no message available", 90: "no STREAM resources", 91: "not a STREAM", 92: "STREAM ioctl timeout", 93: "attribute not found", 94: "multihop attempted", 95: "link has been severed", 96: "protocol error", } // Signal table var signals = [...]string{ 1: "hangup", 2: "interrupt", 3: "quit", 4: "illegal instruction", 5: "trace/BPT trap", 6: "abort trap", 7: "EMT trap", 8: "floating point exception", 9: "killed", 10: "bus error", 11: "segmentation fault", 12: "bad system call", 13: "broken pipe", 14: "alarm clock", 15: "terminated", 16: "urgent I/O condition", 17: "stopped (signal)", 18: "stopped", 19: "continued", 20: "child exited", 21: "stopped (tty input)", 22: "stopped (tty output)", 23: "I/O possible", 24: "cputime limit exceeded", 25: "filesize limit exceeded", 26: "virtual timer expired", 27: "profiling timer expired", 28: "window size changes", 29: "information request", 30: "user defined signal 1", 31: "user defined signal 2", 32: "power fail/restart", }
{ "pile_set_name": "Github" }
// mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,solaris // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go package unix import "syscall" const ( AF_802 = 0x12 AF_APPLETALK = 0x10 AF_CCITT = 0xa AF_CHAOS = 0x5 AF_DATAKIT = 0x9 AF_DECnet = 0xc AF_DLI = 0xd AF_ECMA = 0x8 AF_FILE = 0x1 AF_GOSIP = 0x16 AF_HYLINK = 0xf AF_IMPLINK = 0x3 AF_INET = 0x2 AF_INET6 = 0x1a AF_INET_OFFLOAD = 0x1e AF_IPX = 0x17 AF_KEY = 0x1b AF_LAT = 0xe AF_LINK = 0x19 AF_LOCAL = 0x1 AF_MAX = 0x20 AF_NBS = 0x7 AF_NCA = 0x1c AF_NIT = 0x11 AF_NS = 0x6 AF_OSI = 0x13 AF_OSINET = 0x15 AF_PACKET = 0x20 AF_POLICY = 0x1d AF_PUP = 0x4 AF_ROUTE = 0x18 AF_SNA = 0xb AF_TRILL = 0x1f AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_X25 = 0x14 ARPHRD_ARCNET = 0x7 ARPHRD_ATM = 0x10 ARPHRD_AX25 = 0x3 ARPHRD_CHAOS = 0x5 ARPHRD_EETHER = 0x2 ARPHRD_ETHER = 0x1 ARPHRD_FC = 0x12 ARPHRD_FRAME = 0xf ARPHRD_HDLC = 0x11 ARPHRD_IB = 0x20 ARPHRD_IEEE802 = 0x6 ARPHRD_IPATM = 0x13 ARPHRD_METRICOM = 0x17 ARPHRD_TUNNEL = 0x1f B0 = 0x0 B110 = 0x3 B115200 = 0x12 B1200 = 0x9 B134 = 0x4 B150 = 0x5 B153600 = 0x13 B1800 = 0xa B19200 = 0xe B200 = 0x6 B230400 = 0x14 B2400 = 0xb B300 = 0x7 B307200 = 0x15 B38400 = 0xf B460800 = 0x16 B4800 = 0xc B50 = 0x1 B57600 = 0x10 B600 = 0x8 B75 = 0x2 B76800 = 0x11 B921600 = 0x17 B9600 = 0xd BIOCFLUSH = 0x20004268 BIOCGBLEN = 0x40044266 BIOCGDLT = 0x4004426a BIOCGDLTLIST = -0x3fefbd89 BIOCGDLTLIST32 = -0x3ff7bd89 BIOCGETIF = 0x4020426b BIOCGETLIF = 0x4078426b BIOCGHDRCMPLT = 0x40044274 BIOCGRTIMEOUT = 0x4010427b BIOCGRTIMEOUT32 = 0x4008427b BIOCGSEESENT = 0x40044278 BIOCGSTATS = 0x4080426f BIOCGSTATSOLD = 0x4008426f BIOCIMMEDIATE = -0x7ffbbd90 BIOCPROMISC = 0x20004269 BIOCSBLEN = -0x3ffbbd9a BIOCSDLT = -0x7ffbbd8a BIOCSETF = -0x7fefbd99 BIOCSETF32 = -0x7ff7bd99 BIOCSETIF = -0x7fdfbd94 BIOCSETLIF = -0x7f87bd94 BIOCSHDRCMPLT = -0x7ffbbd8b BIOCSRTIMEOUT = -0x7fefbd86 BIOCSRTIMEOUT32 = -0x7ff7bd86 BIOCSSEESENT = -0x7ffbbd87 BIOCSTCPF = -0x7fefbd8e BIOCSUDPF = -0x7fefbd8d BIOCVERSION = 0x40044271 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 BPF_ALIGNMENT = 0x4 BPF_ALU = 0x4 BPF_AND = 0x50 BPF_B = 0x10 BPF_DFLTBUFSIZE = 0x100000 BPF_DIV = 0x30 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 BPF_JA = 0x0 BPF_JEQ = 0x10 BPF_JGE = 0x30 BPF_JGT = 0x20 BPF_JMP = 0x5 BPF_JSET = 0x40 BPF_K = 0x0 BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXBUFSIZE = 0x1000000 BPF_MAXINSNS = 0x200 BPF_MEM = 0x60 BPF_MEMWORDS = 0x10 BPF_MINBUFSIZE = 0x20 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 BPF_SUB = 0x10 BPF_TAX = 0x0 BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 BS0 = 0x0 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0xf CFLUSH = 0xf CIBAUD = 0xf0000 CLOCAL = 0x800 CLOCK_HIGHRES = 0x4 CLOCK_LEVEL = 0xa CLOCK_MONOTONIC = 0x4 CLOCK_PROCESS_CPUTIME_ID = 0x5 CLOCK_PROF = 0x2 CLOCK_REALTIME = 0x3 CLOCK_THREAD_CPUTIME_ID = 0x2 CLOCK_VIRTUAL = 0x1 CR0 = 0x0 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x40 CSUSP = 0x1a CSWTCH = 0x1a DLT_AIRONET_HEADER = 0x78 DLT_APPLE_IP_OVER_IEEE1394 = 0x8a DLT_ARCNET = 0x7 DLT_ARCNET_LINUX = 0x81 DLT_ATM_CLIP = 0x13 DLT_ATM_RFC1483 = 0xb DLT_AURORA = 0x7e DLT_AX25 = 0x3 DLT_BACNET_MS_TP = 0xa5 DLT_CHAOS = 0x5 DLT_CISCO_IOS = 0x76 DLT_C_HDLC = 0x68 DLT_DOCSIS = 0x8f DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 DLT_ENC = 0x6d DLT_ERF_ETH = 0xaf DLT_ERF_POS = 0xb0 DLT_FDDI = 0xa DLT_FRELAY = 0x6b DLT_GCOM_SERIAL = 0xad DLT_GCOM_T1E1 = 0xac DLT_GPF_F = 0xab DLT_GPF_T = 0xaa DLT_GPRS_LLC = 0xa9 DLT_HDLC = 0x10 DLT_HHDLC = 0x79 DLT_HIPPI = 0xf DLT_IBM_SN = 0x92 DLT_IBM_SP = 0x91 DLT_IEEE802 = 0x6 DLT_IEEE802_11 = 0x69 DLT_IEEE802_11_RADIO = 0x7f DLT_IEEE802_11_RADIO_AVS = 0xa3 DLT_IPNET = 0xe2 DLT_IPOIB = 0xa2 DLT_IP_OVER_FC = 0x7a DLT_JUNIPER_ATM1 = 0x89 DLT_JUNIPER_ATM2 = 0x87 DLT_JUNIPER_CHDLC = 0xb5 DLT_JUNIPER_ES = 0x84 DLT_JUNIPER_ETHER = 0xb2 DLT_JUNIPER_FRELAY = 0xb4 DLT_JUNIPER_GGSN = 0x85 DLT_JUNIPER_MFR = 0x86 DLT_JUNIPER_MLFR = 0x83 DLT_JUNIPER_MLPPP = 0x82 DLT_JUNIPER_MONITOR = 0xa4 DLT_JUNIPER_PIC_PEER = 0xae DLT_JUNIPER_PPP = 0xb3 DLT_JUNIPER_PPPOE = 0xa7 DLT_JUNIPER_PPPOE_ATM = 0xa8 DLT_JUNIPER_SERVICES = 0x88 DLT_LINUX_IRDA = 0x90 DLT_LINUX_LAPD = 0xb1 DLT_LINUX_SLL = 0x71 DLT_LOOP = 0x6c DLT_LTALK = 0x72 DLT_MTP2 = 0x8c DLT_MTP2_WITH_PHDR = 0x8b DLT_MTP3 = 0x8d DLT_NULL = 0x0 DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 DLT_PPP = 0x9 DLT_PPP_BSDOS = 0xe DLT_PPP_PPPD = 0xa6 DLT_PRISM_HEADER = 0x77 DLT_PRONET = 0x4 DLT_RAW = 0xc DLT_RAWAF_MASK = 0x2240000 DLT_RIO = 0x7c DLT_SCCP = 0x8e DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xd DLT_SUNATM = 0x7b DLT_SYMANTEC_FIREWALL = 0x63 DLT_TZSP = 0x80 ECHO = 0x8 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EMPTY_SET = 0x0 EMT_CPCOVF = 0x1 EQUALITY_CHECK = 0x0 EXTA = 0xe EXTB = 0xf FD_CLOEXEC = 0x1 FD_NFDBITS = 0x40 FD_SETSIZE = 0x10000 FF0 = 0x0 FF1 = 0x8000 FFDLY = 0x8000 FLUSHALL = 0x1 FLUSHDATA = 0x0 FLUSHO = 0x2000 F_ALLOCSP = 0xa F_ALLOCSP64 = 0xa F_BADFD = 0x2e F_BLKSIZE = 0x13 F_BLOCKS = 0x12 F_CHKFL = 0x8 F_COMPAT = 0x8 F_DUP2FD = 0x9 F_DUP2FD_CLOEXEC = 0x24 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x25 F_FLOCK = 0x35 F_FLOCK64 = 0x35 F_FLOCKW = 0x36 F_FLOCKW64 = 0x36 F_FREESP = 0xb F_FREESP64 = 0xb F_GETFD = 0x1 F_GETFL = 0x3 F_GETLK = 0xe F_GETLK64 = 0xe F_GETOWN = 0x17 F_GETXFL = 0x2d F_HASREMOTELOCKS = 0x1a F_ISSTREAM = 0xd F_MANDDNY = 0x10 F_MDACC = 0x20 F_NODNY = 0x0 F_NPRIV = 0x10 F_OFD_GETLK = 0x2f F_OFD_GETLK64 = 0x2f F_OFD_SETLK = 0x30 F_OFD_SETLK64 = 0x30 F_OFD_SETLKW = 0x31 F_OFD_SETLKW64 = 0x31 F_PRIV = 0xf F_QUOTACTL = 0x11 F_RDACC = 0x1 F_RDDNY = 0x1 F_RDLCK = 0x1 F_REVOKE = 0x19 F_RMACC = 0x4 F_RMDNY = 0x4 F_RWACC = 0x3 F_RWDNY = 0x3 F_SETFD = 0x2 F_SETFL = 0x4 F_SETLK = 0x6 F_SETLK64 = 0x6 F_SETLK64_NBMAND = 0x2a F_SETLKW = 0x7 F_SETLKW64 = 0x7 F_SETLK_NBMAND = 0x2a F_SETOWN = 0x18 F_SHARE = 0x28 F_SHARE_NBMAND = 0x2b F_UNLCK = 0x3 F_UNLKSYS = 0x4 F_UNSHARE = 0x29 F_WRACC = 0x2 F_WRDNY = 0x2 F_WRLCK = 0x2 HUPCL = 0x400 IBSHIFT = 0x10 ICANON = 0x2 ICRNL = 0x100 IEXTEN = 0x8000 IFF_ADDRCONF = 0x80000 IFF_ALLMULTI = 0x200 IFF_ANYCAST = 0x400000 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x7f203003b5a IFF_COS_ENABLED = 0x200000000 IFF_DEBUG = 0x4 IFF_DEPRECATED = 0x40000 IFF_DHCPRUNNING = 0x4000 IFF_DUPLICATE = 0x4000000000 IFF_FAILED = 0x10000000 IFF_FIXEDMTU = 0x1000000000 IFF_INACTIVE = 0x40000000 IFF_INTELLIGENT = 0x400 IFF_IPMP = 0x8000000000 IFF_IPMP_CANTCHANGE = 0x10000000 IFF_IPMP_INVALID = 0x1ec200080 IFF_IPV4 = 0x1000000 IFF_IPV6 = 0x2000000 IFF_L3PROTECT = 0x40000000000 IFF_LOOPBACK = 0x8 IFF_MULTICAST = 0x800 IFF_MULTI_BCAST = 0x1000 IFF_NOACCEPT = 0x4000000 IFF_NOARP = 0x80 IFF_NOFAILOVER = 0x8000000 IFF_NOLINKLOCAL = 0x20000000000 IFF_NOLOCAL = 0x20000 IFF_NONUD = 0x200000 IFF_NORTEXCH = 0x800000 IFF_NOTRAILERS = 0x20 IFF_NOXMIT = 0x10000 IFF_OFFLINE = 0x80000000 IFF_POINTOPOINT = 0x10 IFF_PREFERRED = 0x400000000 IFF_PRIVATE = 0x8000 IFF_PROMISC = 0x100 IFF_ROUTER = 0x100000 IFF_RUNNING = 0x40 IFF_STANDBY = 0x20000000 IFF_TEMPORARY = 0x800000000 IFF_UNNUMBERED = 0x2000 IFF_UP = 0x1 IFF_VIRTUAL = 0x2000000000 IFF_VRRP = 0x10000000000 IFF_XRESOLV = 0x100000000 IFNAMSIZ = 0x10 IFT_1822 = 0x2 IFT_6TO4 = 0xca IFT_AAL5 = 0x31 IFT_ARCNET = 0x23 IFT_ARCNETPLUS = 0x24 IFT_ATM = 0x25 IFT_CEPT = 0x13 IFT_DS3 = 0x1e IFT_EON = 0x19 IFT_ETHER = 0x6 IFT_FDDI = 0xf IFT_FRELAY = 0x20 IFT_FRELAYDCE = 0x2c IFT_HDH1822 = 0x3 IFT_HIPPI = 0x2f IFT_HSSI = 0x2e IFT_HY = 0xe IFT_IB = 0xc7 IFT_IPV4 = 0xc8 IFT_IPV6 = 0xc9 IFT_ISDNBASIC = 0x14 IFT_ISDNPRIMARY = 0x15 IFT_ISO88022LLC = 0x29 IFT_ISO88023 = 0x7 IFT_ISO88024 = 0x8 IFT_ISO88025 = 0x9 IFT_ISO88026 = 0xa IFT_LAPB = 0x10 IFT_LOCALTALK = 0x2a IFT_LOOP = 0x18 IFT_MIOX25 = 0x26 IFT_MODEM = 0x30 IFT_NSIP = 0x1b IFT_OTHER = 0x1 IFT_P10 = 0xc IFT_P80 = 0xd IFT_PARA = 0x22 IFT_PPP = 0x17 IFT_PROPMUX = 0x36 IFT_PROPVIRTUAL = 0x35 IFT_PTPSERIAL = 0x16 IFT_RS232 = 0x21 IFT_SDLC = 0x11 IFT_SIP = 0x1f IFT_SLIP = 0x1c IFT_SMDSDXI = 0x2b IFT_SMDSICIP = 0x34 IFT_SONET = 0x27 IFT_SONETPATH = 0x32 IFT_SONETVT = 0x33 IFT_STARLAN = 0xb IFT_T1 = 0x12 IFT_ULTRA = 0x1d IFT_V35 = 0x2d IFT_X25 = 0x5 IFT_X25DDN = 0x4 IFT_X25PLE = 0x28 IFT_XETHER = 0x1a IGNBRK = 0x1 IGNCR = 0x80 IGNPAR = 0x4 IMAXBEL = 0x2000 INLCR = 0x40 INPCK = 0x10 IN_AUTOCONF_MASK = 0xffff0000 IN_AUTOCONF_NET = 0xa9fe0000 IN_CLASSA_HOST = 0xffffff IN_CLASSA_MAX = 0x80 IN_CLASSA_NET = 0xff000000 IN_CLASSA_NSHIFT = 0x18 IN_CLASSB_HOST = 0xffff IN_CLASSB_MAX = 0x10000 IN_CLASSB_NET = 0xffff0000 IN_CLASSB_NSHIFT = 0x10 IN_CLASSC_HOST = 0xff IN_CLASSC_NET = 0xffffff00 IN_CLASSC_NSHIFT = 0x8 IN_CLASSD_HOST = 0xfffffff IN_CLASSD_NET = 0xf0000000 IN_CLASSD_NSHIFT = 0x1c IN_CLASSE_NET = 0xffffffff IN_LOOPBACKNET = 0x7f IN_PRIVATE12_MASK = 0xfff00000 IN_PRIVATE12_NET = 0xac100000 IN_PRIVATE16_MASK = 0xffff0000 IN_PRIVATE16_NET = 0xc0a80000 IN_PRIVATE8_MASK = 0xff000000 IN_PRIVATE8_NET = 0xa000000 IPPROTO_AH = 0x33 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 IPPROTO_ENCAP = 0x4 IPPROTO_EON = 0x50 IPPROTO_ESP = 0x32 IPPROTO_FRAGMENT = 0x2c IPPROTO_GGP = 0x3 IPPROTO_HELLO = 0x3f IPPROTO_HOPOPTS = 0x0 IPPROTO_ICMP = 0x1 IPPROTO_ICMPV6 = 0x3a IPPROTO_IDP = 0x16 IPPROTO_IGMP = 0x2 IPPROTO_IP = 0x0 IPPROTO_IPV6 = 0x29 IPPROTO_MAX = 0x100 IPPROTO_ND = 0x4d IPPROTO_NONE = 0x3b IPPROTO_OSPF = 0x59 IPPROTO_PIM = 0x67 IPPROTO_PUP = 0xc IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_UDP = 0x11 IPV6_ADD_MEMBERSHIP = 0x9 IPV6_BOUND_IF = 0x41 IPV6_CHECKSUM = 0x18 IPV6_DONTFRAG = 0x21 IPV6_DROP_MEMBERSHIP = 0xa IPV6_DSTOPTS = 0xf IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 IPV6_FLOWINFO_TCLASS = 0xf00f IPV6_HOPLIMIT = 0xc IPV6_HOPOPTS = 0xe IPV6_JOIN_GROUP = 0x9 IPV6_LEAVE_GROUP = 0xa IPV6_MULTICAST_HOPS = 0x7 IPV6_MULTICAST_IF = 0x6 IPV6_MULTICAST_LOOP = 0x8 IPV6_NEXTHOP = 0xd IPV6_PAD1_OPT = 0x0 IPV6_PATHMTU = 0x25 IPV6_PKTINFO = 0xb IPV6_PREFER_SRC_CGA = 0x20 IPV6_PREFER_SRC_CGADEFAULT = 0x10 IPV6_PREFER_SRC_CGAMASK = 0x30 IPV6_PREFER_SRC_COA = 0x2 IPV6_PREFER_SRC_DEFAULT = 0x15 IPV6_PREFER_SRC_HOME = 0x1 IPV6_PREFER_SRC_MASK = 0x3f IPV6_PREFER_SRC_MIPDEFAULT = 0x1 IPV6_PREFER_SRC_MIPMASK = 0x3 IPV6_PREFER_SRC_NONCGA = 0x10 IPV6_PREFER_SRC_PUBLIC = 0x4 IPV6_PREFER_SRC_TMP = 0x8 IPV6_PREFER_SRC_TMPDEFAULT = 0x4 IPV6_PREFER_SRC_TMPMASK = 0xc IPV6_RECVDSTOPTS = 0x28 IPV6_RECVHOPLIMIT = 0x13 IPV6_RECVHOPOPTS = 0x14 IPV6_RECVPATHMTU = 0x24 IPV6_RECVPKTINFO = 0x12 IPV6_RECVRTHDR = 0x16 IPV6_RECVRTHDRDSTOPTS = 0x17 IPV6_RECVTCLASS = 0x19 IPV6_RTHDR = 0x10 IPV6_RTHDRDSTOPTS = 0x11 IPV6_RTHDR_TYPE_0 = 0x0 IPV6_SEC_OPT = 0x22 IPV6_SRC_PREFERENCES = 0x23 IPV6_TCLASS = 0x26 IPV6_UNICAST_HOPS = 0x5 IPV6_UNSPEC_SRC = 0x42 IPV6_USE_MIN_MTU = 0x20 IPV6_V6ONLY = 0x27 IP_ADD_MEMBERSHIP = 0x13 IP_ADD_SOURCE_MEMBERSHIP = 0x17 IP_BLOCK_SOURCE = 0x15 IP_BOUND_IF = 0x41 IP_BROADCAST = 0x106 IP_BROADCAST_TTL = 0x43 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 IP_DHCPINIT_IF = 0x45 IP_DONTFRAG = 0x1b IP_DONTROUTE = 0x105 IP_DROP_MEMBERSHIP = 0x14 IP_DROP_SOURCE_MEMBERSHIP = 0x18 IP_HDRINCL = 0x2 IP_MAXPACKET = 0xffff IP_MF = 0x2000 IP_MSS = 0x240 IP_MULTICAST_IF = 0x10 IP_MULTICAST_LOOP = 0x12 IP_MULTICAST_TTL = 0x11 IP_NEXTHOP = 0x19 IP_OPTIONS = 0x1 IP_PKTINFO = 0x1a IP_RECVDSTADDR = 0x7 IP_RECVIF = 0x9 IP_RECVOPTS = 0x5 IP_RECVPKTINFO = 0x1a IP_RECVRETOPTS = 0x6 IP_RECVSLLA = 0xa IP_RECVTTL = 0xb IP_RETOPTS = 0x8 IP_REUSEADDR = 0x104 IP_SEC_OPT = 0x22 IP_TOS = 0x3 IP_TTL = 0x4 IP_UNBLOCK_SOURCE = 0x16 IP_UNSPEC_SRC = 0x42 ISIG = 0x1 ISTRIP = 0x20 IUCLC = 0x200 IXANY = 0x800 IXOFF = 0x1000 IXON = 0x400 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 MADV_ACCESS_DEFAULT = 0x6 MADV_ACCESS_LWP = 0x7 MADV_ACCESS_MANY = 0x8 MADV_DONTNEED = 0x4 MADV_FREE = 0x5 MADV_NORMAL = 0x0 MADV_PURGE = 0x9 MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MAP_32BIT = 0x80 MAP_ALIGN = 0x200 MAP_ANON = 0x100 MAP_ANONYMOUS = 0x100 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_INITDATA = 0x800 MAP_NORESERVE = 0x40 MAP_PRIVATE = 0x2 MAP_RENAME = 0x20 MAP_SHARED = 0x1 MAP_TEXT = 0x400 MAP_TYPE = 0xf MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MSG_CTRUNC = 0x10 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 MSG_DUPCTRL = 0x800 MSG_EOR = 0x8 MSG_MAXIOVLEN = 0x10 MSG_NOTIFICATION = 0x100 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_TRUNC = 0x20 MSG_WAITALL = 0x40 MSG_XPG4_2 = 0x8000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x2 MS_OLDSYNC = 0x0 MS_SYNC = 0x4 M_FLUSH = 0x86 NAME_MAX = 0xff NEWDEV = 0x1 NFDBITS = 0x40 NL0 = 0x0 NL1 = 0x100 NLDLY = 0x100 NOFLSH = 0x80 OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 OLCUC = 0x2 OLDDEV = 0x0 ONBITSMAJOR = 0x7 ONBITSMINOR = 0x8 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 OPENFAIL = -0x1 OPOST = 0x1 O_ACCMODE = 0x600003 O_APPEND = 0x8 O_CLOEXEC = 0x800000 O_CREAT = 0x100 O_DSYNC = 0x40 O_EXCL = 0x400 O_EXEC = 0x400000 O_LARGEFILE = 0x2000 O_NDELAY = 0x4 O_NOCTTY = 0x800 O_NOFOLLOW = 0x20000 O_NOLINKS = 0x40000 O_NONBLOCK = 0x80 O_RDONLY = 0x0 O_RDWR = 0x2 O_RSYNC = 0x8000 O_SEARCH = 0x200000 O_SIOCGIFCONF = -0x3ff796ec O_SIOCGLIFCONF = -0x3fef9688 O_SYNC = 0x10 O_TRUNC = 0x200 O_WRONLY = 0x1 O_XATTR = 0x4000 PARENB = 0x100 PAREXT = 0x100000 PARMRK = 0x8 PARODD = 0x200 PENDIN = 0x4000 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 RLIMIT_AS = 0x6 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_NOFILE = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = -0x3 RTAX_AUTHOR = 0x6 RTAX_BRD = 0x7 RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_MAX = 0x9 RTAX_NETMASK = 0x2 RTAX_SRC = 0x8 RTA_AUTHOR = 0x40 RTA_BRD = 0x80 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_NETMASK = 0x4 RTA_NUMBITS = 0x9 RTA_SRC = 0x100 RTF_BLACKHOLE = 0x1000 RTF_CLONING = 0x100 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_INDIRECT = 0x40000 RTF_KERNEL = 0x80000 RTF_LLINFO = 0x400 RTF_MASK = 0x80 RTF_MODIFIED = 0x20 RTF_MULTIRT = 0x10000 RTF_PRIVATE = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_REJECT = 0x8 RTF_SETSRC = 0x20000 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_XRESOLVE = 0x200 RTF_ZONE = 0x100000 RTM_ADD = 0x1 RTM_CHANGE = 0x3 RTM_CHGADDR = 0xf RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_FREEADDR = 0x10 RTM_GET = 0x4 RTM_IFINFO = 0xe RTM_LOCK = 0x8 RTM_LOSING = 0x5 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_OLDADD = 0x9 RTM_OLDDEL = 0xa RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_VERSION = 0x3 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 RTV_MTU = 0x1 RTV_RPIPE = 0x8 RTV_RTT = 0x40 RTV_RTTVAR = 0x80 RTV_SPIPE = 0x10 RTV_SSTHRESH = 0x20 RT_AWARE = 0x1 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 SCM_RIGHTS = 0x1010 SCM_TIMESTAMP = 0x1013 SCM_UCRED = 0x1012 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIG2STR_MAX = 0x20 SIOCADDMULTI = -0x7fdf96cf SIOCADDRT = -0x7fcf8df6 SIOCATMARK = 0x40047307 SIOCDARP = -0x7fdb96e0 SIOCDELMULTI = -0x7fdf96ce SIOCDELRT = -0x7fcf8df5 SIOCDXARP = -0x7fff9658 SIOCGARP = -0x3fdb96e1 SIOCGDSTINFO = -0x3fff965c SIOCGENADDR = -0x3fdf96ab SIOCGENPSTATS = -0x3fdf96c7 SIOCGETLSGCNT = -0x3fef8deb SIOCGETNAME = 0x40107334 SIOCGETPEER = 0x40107335 SIOCGETPROP = -0x3fff8f44 SIOCGETSGCNT = -0x3feb8deb SIOCGETSYNC = -0x3fdf96d3 SIOCGETVIFCNT = -0x3feb8dec SIOCGHIWAT = 0x40047301 SIOCGIFADDR = -0x3fdf96f3 SIOCGIFBRDADDR = -0x3fdf96e9 SIOCGIFCONF = -0x3ff796a4 SIOCGIFDSTADDR = -0x3fdf96f1 SIOCGIFFLAGS = -0x3fdf96ef SIOCGIFHWADDR = -0x3fdf9647 SIOCGIFINDEX = -0x3fdf96a6 SIOCGIFMEM = -0x3fdf96ed SIOCGIFMETRIC = -0x3fdf96e5 SIOCGIFMTU = -0x3fdf96ea SIOCGIFMUXID = -0x3fdf96a8 SIOCGIFNETMASK = -0x3fdf96e7 SIOCGIFNUM = 0x40046957 SIOCGIP6ADDRPOLICY = -0x3fff965e SIOCGIPMSFILTER = -0x3ffb964c SIOCGLIFADDR = -0x3f87968f SIOCGLIFBINDING = -0x3f879666 SIOCGLIFBRDADDR = -0x3f879685 SIOCGLIFCONF = -0x3fef965b SIOCGLIFDADSTATE = -0x3f879642 SIOCGLIFDSTADDR = -0x3f87968d SIOCGLIFFLAGS = -0x3f87968b SIOCGLIFGROUPINFO = -0x3f4b9663 SIOCGLIFGROUPNAME = -0x3f879664 SIOCGLIFHWADDR = -0x3f879640 SIOCGLIFINDEX = -0x3f87967b SIOCGLIFLNKINFO = -0x3f879674 SIOCGLIFMETRIC = -0x3f879681 SIOCGLIFMTU = -0x3f879686 SIOCGLIFMUXID = -0x3f87967d SIOCGLIFNETMASK = -0x3f879683 SIOCGLIFNUM = -0x3ff3967e SIOCGLIFSRCOF = -0x3fef964f SIOCGLIFSUBNET = -0x3f879676 SIOCGLIFTOKEN = -0x3f879678 SIOCGLIFUSESRC = -0x3f879651 SIOCGLIFZONE = -0x3f879656 SIOCGLOWAT = 0x40047303 SIOCGMSFILTER = -0x3ffb964e SIOCGPGRP = 0x40047309 SIOCGSTAMP = -0x3fef9646 SIOCGXARP = -0x3fff9659 SIOCIFDETACH = -0x7fdf96c8 SIOCILB = -0x3ffb9645 SIOCLIFADDIF = -0x3f879691 SIOCLIFDELND = -0x7f879673 SIOCLIFGETND = -0x3f879672 SIOCLIFREMOVEIF = -0x7f879692 SIOCLIFSETND = -0x7f879671 SIOCLOWER = -0x7fdf96d7 SIOCSARP = -0x7fdb96e2 SIOCSCTPGOPT = -0x3fef9653 SIOCSCTPPEELOFF = -0x3ffb9652 SIOCSCTPSOPT = -0x7fef9654 SIOCSENABLESDP = -0x3ffb9649 SIOCSETPROP = -0x7ffb8f43 SIOCSETSYNC = -0x7fdf96d4 SIOCSHIWAT = -0x7ffb8d00 SIOCSIFADDR = -0x7fdf96f4 SIOCSIFBRDADDR = -0x7fdf96e8 SIOCSIFDSTADDR = -0x7fdf96f2 SIOCSIFFLAGS = -0x7fdf96f0 SIOCSIFINDEX = -0x7fdf96a5 SIOCSIFMEM = -0x7fdf96ee SIOCSIFMETRIC = -0x7fdf96e4 SIOCSIFMTU = -0x7fdf96eb SIOCSIFMUXID = -0x7fdf96a7 SIOCSIFNAME = -0x7fdf96b7 SIOCSIFNETMASK = -0x7fdf96e6 SIOCSIP6ADDRPOLICY = -0x7fff965d SIOCSIPMSFILTER = -0x7ffb964b SIOCSLGETREQ = -0x3fdf96b9 SIOCSLIFADDR = -0x7f879690 SIOCSLIFBRDADDR = -0x7f879684 SIOCSLIFDSTADDR = -0x7f87968e SIOCSLIFFLAGS = -0x7f87968c SIOCSLIFGROUPNAME = -0x7f879665 SIOCSLIFINDEX = -0x7f87967a SIOCSLIFLNKINFO = -0x7f879675 SIOCSLIFMETRIC = -0x7f879680 SIOCSLIFMTU = -0x7f879687 SIOCSLIFMUXID = -0x7f87967c SIOCSLIFNAME = -0x3f87967f SIOCSLIFNETMASK = -0x7f879682 SIOCSLIFPREFIX = -0x3f879641 SIOCSLIFSUBNET = -0x7f879677 SIOCSLIFTOKEN = -0x7f879679 SIOCSLIFUSESRC = -0x7f879650 SIOCSLIFZONE = -0x7f879655 SIOCSLOWAT = -0x7ffb8cfe SIOCSLSTAT = -0x7fdf96b8 SIOCSMSFILTER = -0x7ffb964d SIOCSPGRP = -0x7ffb8cf8 SIOCSPROMISC = -0x7ffb96d0 SIOCSQPTR = -0x3ffb9648 SIOCSSDSTATS = -0x3fdf96d2 SIOCSSESTATS = -0x3fdf96d1 SIOCSXARP = -0x7fff965a SIOCTMYADDR = -0x3ff79670 SIOCTMYSITE = -0x3ff7966e SIOCTONLINK = -0x3ff7966f SIOCUPPER = -0x7fdf96d8 SIOCX25RCV = -0x3fdf96c4 SIOCX25TBL = -0x3fdf96c3 SIOCX25XMT = -0x3fdf96c5 SIOCXPROTO = 0x20007337 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x1 SOCK_NDELAY = 0x200000 SOCK_NONBLOCK = 0x100000 SOCK_RAW = 0x4 SOCK_RDM = 0x5 SOCK_SEQPACKET = 0x6 SOCK_STREAM = 0x2 SOCK_TYPE_MASK = 0xffff SOL_FILTER = 0xfffc SOL_PACKET = 0xfffd SOL_ROUTE = 0xfffe SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 SO_ALL = 0x3f SO_ALLZONES = 0x1014 SO_ANON_MLP = 0x100a SO_ATTACH_FILTER = 0x40000001 SO_BAND = 0x4000 SO_BROADCAST = 0x20 SO_COPYOPT = 0x80000 SO_DEBUG = 0x1 SO_DELIM = 0x8000 SO_DETACH_FILTER = 0x40000002 SO_DGRAM_ERRIND = 0x200 SO_DOMAIN = 0x100c SO_DONTLINGER = -0x81 SO_DONTROUTE = 0x10 SO_ERROPT = 0x40000 SO_ERROR = 0x1007 SO_EXCLBIND = 0x1015 SO_HIWAT = 0x10 SO_ISNTTY = 0x800 SO_ISTTY = 0x400 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOWAT = 0x20 SO_MAC_EXEMPT = 0x100b SO_MAC_IMPLICIT = 0x1016 SO_MAXBLK = 0x100000 SO_MAXPSZ = 0x8 SO_MINPSZ = 0x4 SO_MREADOFF = 0x80 SO_MREADON = 0x40 SO_NDELOFF = 0x200 SO_NDELON = 0x100 SO_NODELIM = 0x10000 SO_OOBINLINE = 0x100 SO_PROTOTYPE = 0x1009 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVPSH = 0x100d SO_RCVTIMEO = 0x1006 SO_READOPT = 0x1 SO_RECVUCRED = 0x400 SO_REUSEADDR = 0x4 SO_SECATTR = 0x1011 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_STRHOLD = 0x20000 SO_TAIL = 0x200000 SO_TIMESTAMP = 0x1013 SO_TONSTOP = 0x2000 SO_TOSTOP = 0x1000 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SO_VRRP = 0x1017 SO_WROFF = 0x2 S_ENFMT = 0x400 S_IAMB = 0x1ff S_IEXEC = 0x40 S_IFBLK = 0x6000 S_IFCHR = 0x2000 S_IFDIR = 0x4000 S_IFDOOR = 0xd000 S_IFIFO = 0x1000 S_IFLNK = 0xa000 S_IFMT = 0xf000 S_IFNAM = 0x5000 S_IFPORT = 0xe000 S_IFREG = 0x8000 S_IFSOCK = 0xc000 S_INSEM = 0x1 S_INSHD = 0x2 S_IREAD = 0x100 S_IRGRP = 0x20 S_IROTH = 0x4 S_IRUSR = 0x100 S_IRWXG = 0x38 S_IRWXO = 0x7 S_IRWXU = 0x1c0 S_ISGID = 0x400 S_ISUID = 0x800 S_ISVTX = 0x200 S_IWGRP = 0x10 S_IWOTH = 0x2 S_IWRITE = 0x80 S_IWUSR = 0x80 S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 TAB0 = 0x0 TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 TCION = 0x3 TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 TCP_ABORT_THRESHOLD = 0x11 TCP_ANONPRIVBIND = 0x20 TCP_CONN_ABORT_THRESHOLD = 0x13 TCP_CONN_NOTIFY_THRESHOLD = 0x12 TCP_CORK = 0x18 TCP_EXCLBIND = 0x21 TCP_INIT_CWND = 0x15 TCP_KEEPALIVE = 0x8 TCP_KEEPALIVE_ABORT_THRESHOLD = 0x17 TCP_KEEPALIVE_THRESHOLD = 0x16 TCP_KEEPCNT = 0x23 TCP_KEEPIDLE = 0x22 TCP_KEEPINTVL = 0x24 TCP_LINGER2 = 0x1c TCP_MAXSEG = 0x2 TCP_MSS = 0x218 TCP_NODELAY = 0x1 TCP_NOTIFY_THRESHOLD = 0x10 TCP_RECVDSTADDR = 0x14 TCP_RTO_INITIAL = 0x19 TCP_RTO_MAX = 0x1b TCP_RTO_MIN = 0x1a TCSAFLUSH = 0x5410 TCSBRK = 0x5405 TCSETA = 0x5402 TCSETAF = 0x5404 TCSETAW = 0x5403 TCSETS = 0x540e TCSETSF = 0x5410 TCSETSW = 0x540f TCXONC = 0x5406 TIOC = 0x5400 TIOCCBRK = 0x747a TIOCCDTR = 0x7478 TIOCCILOOP = 0x746c TIOCEXCL = 0x740d TIOCFLUSH = 0x7410 TIOCGETC = 0x7412 TIOCGETD = 0x7400 TIOCGETP = 0x7408 TIOCGLTC = 0x7474 TIOCGPGRP = 0x7414 TIOCGPPS = 0x547d TIOCGPPSEV = 0x547f TIOCGSID = 0x7416 TIOCGSOFTCAR = 0x5469 TIOCGWINSZ = 0x5468 TIOCHPCL = 0x7402 TIOCKBOF = 0x5409 TIOCKBON = 0x5408 TIOCLBIC = 0x747e TIOCLBIS = 0x747f TIOCLGET = 0x747c TIOCLSET = 0x747d TIOCMBIC = 0x741c TIOCMBIS = 0x741b TIOCMGET = 0x741d TIOCMSET = 0x741a TIOCM_CAR = 0x40 TIOCM_CD = 0x40 TIOCM_CTS = 0x20 TIOCM_DSR = 0x100 TIOCM_DTR = 0x2 TIOCM_LE = 0x1 TIOCM_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_RTS = 0x4 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x7471 TIOCNXCL = 0x740e TIOCOUTQ = 0x7473 TIOCREMOTE = 0x741e TIOCSBRK = 0x747b TIOCSCTTY = 0x7484 TIOCSDTR = 0x7479 TIOCSETC = 0x7411 TIOCSETD = 0x7401 TIOCSETN = 0x740a TIOCSETP = 0x7409 TIOCSIGNAL = 0x741f TIOCSILOOP = 0x746d TIOCSLTC = 0x7475 TIOCSPGRP = 0x7415 TIOCSPPS = 0x547e TIOCSSOFTCAR = 0x546a TIOCSTART = 0x746e TIOCSTI = 0x7417 TIOCSTOP = 0x746f TIOCSWINSZ = 0x5467 TOSTOP = 0x100 UTIME_NOW = -0x1 UTIME_OMIT = -0x2 VCEOF = 0x8 VCEOL = 0x9 VDISCARD = 0xd VDSUSP = 0xb VEOF = 0x4 VEOL = 0x5 VEOL2 = 0x6 VERASE = 0x2 VERASE2 = 0x11 VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf VMIN = 0x4 VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 VSTATUS = 0x10 VSTOP = 0x9 VSUSP = 0xa VSWTCH = 0x7 VT0 = 0x0 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WCONTFLG = 0xffff WCONTINUED = 0x8 WCOREFLG = 0x80 WEXITED = 0x1 WNOHANG = 0x40 WNOWAIT = 0x80 WOPTMASK = 0xcf WRAP = 0x20000 WSIGMASK = 0x7f WSTOPFLG = 0x7f WSTOPPED = 0x4 WTRAPPED = 0x2 WUNTRACED = 0x4 XCASE = 0x4 XTABS = 0x1800 ) // Errors const ( E2BIG = syscall.Errno(0x7) EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x39) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x2f) ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x25) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x82) ECONNREFUSED = syscall.Errno(0x92) ECONNRESET = syscall.Errno(0x83) EDEADLK = syscall.Errno(0x2d) EDEADLOCK = syscall.Errno(0x38) EDESTADDRREQ = syscall.Errno(0x60) EDOM = syscall.Errno(0x21) EDQUOT = syscall.Errno(0x31) EEXIST = syscall.Errno(0x11) EFAULT = syscall.Errno(0xe) EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EIDRM = syscall.Errno(0x24) EILSEQ = syscall.Errno(0x58) EINPROGRESS = syscall.Errno(0x96) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x85) EISDIR = syscall.Errno(0x15) EL2HLT = syscall.Errno(0x2c) EL2NSYNC = syscall.Errno(0x26) EL3HLT = syscall.Errno(0x27) EL3RST = syscall.Errno(0x28) ELIBACC = syscall.Errno(0x53) ELIBBAD = syscall.Errno(0x54) ELIBEXEC = syscall.Errno(0x57) ELIBMAX = syscall.Errno(0x56) ELIBSCN = syscall.Errno(0x55) ELNRNG = syscall.Errno(0x29) ELOCKUNMAPPED = syscall.Errno(0x48) ELOOP = syscall.Errno(0x5a) EMFILE = syscall.Errno(0x18) EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) ENODEV = syscall.Errno(0x13) ENOENT = syscall.Errno(0x2) ENOEXEC = syscall.Errno(0x8) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) ENOTACTIVE = syscall.Errno(0x49) ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x86) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x5d) ENOTRECOVERABLE = syscall.Errno(0x3b) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x30) ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x50) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0x3a) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x7b) EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x52) EREMOTE = syscall.Errno(0x42) ERESTART = syscall.Errno(0x5b) EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) ESPIPE = syscall.Errno(0x1d) ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) ETXTBSY = syscall.Errno(0x1a) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) EWOULDBLOCK = syscall.Errno(0xb) EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x34) ) // Signals const ( SIGABRT = syscall.Signal(0x6) SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0xa) SIGCANCEL = syscall.Signal(0x24) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) SIGFPE = syscall.Signal(0x8) SIGFREEZE = syscall.Signal(0x22) SIGHUP = syscall.Signal(0x1) SIGILL = syscall.Signal(0x4) SIGINFO = syscall.Signal(0x29) SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x16) SIGIOT = syscall.Signal(0x6) SIGJVM1 = syscall.Signal(0x27) SIGJVM2 = syscall.Signal(0x28) SIGKILL = syscall.Signal(0x9) SIGLOST = syscall.Signal(0x25) SIGLWP = syscall.Signal(0x21) SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) SIGQUIT = syscall.Signal(0x3) SIGSEGV = syscall.Signal(0xb) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) SIGTERM = syscall.Signal(0xf) SIGTHAW = syscall.Signal(0x23) SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x18) SIGTTIN = syscall.Signal(0x1a) SIGTTOU = syscall.Signal(0x1b) SIGURG = syscall.Signal(0x15) SIGUSR1 = syscall.Signal(0x10) SIGUSR2 = syscall.Signal(0x11) SIGVTALRM = syscall.Signal(0x1c) SIGWAITING = syscall.Signal(0x20) SIGWINCH = syscall.Signal(0x14) SIGXCPU = syscall.Signal(0x1e) SIGXFSZ = syscall.Signal(0x1f) SIGXRES = syscall.Signal(0x26) ) // Error table var errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "not owner"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "I/O error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "arg list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file number"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "not enough space"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "file table overflow"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "ENOMSG", "no message of desired type"}, {36, "EIDRM", "identifier removed"}, {37, "ECHRNG", "channel number out of range"}, {38, "EL2NSYNC", "level 2 not synchronized"}, {39, "EL3HLT", "level 3 halted"}, {40, "EL3RST", "level 3 reset"}, {41, "ELNRNG", "link number out of range"}, {42, "EUNATCH", "protocol driver not attached"}, {43, "ENOCSI", "no CSI structure available"}, {44, "EL2HLT", "level 2 halted"}, {45, "EDEADLK", "deadlock situation detected/avoided"}, {46, "ENOLCK", "no record locks available"}, {47, "ECANCELED", "operation canceled"}, {48, "ENOTSUP", "operation not supported"}, {49, "EDQUOT", "disc quota exceeded"}, {50, "EBADE", "bad exchange descriptor"}, {51, "EBADR", "bad request descriptor"}, {52, "EXFULL", "message tables full"}, {53, "ENOANO", "anode table overflow"}, {54, "EBADRQC", "bad request code"}, {55, "EBADSLT", "invalid slot"}, {56, "EDEADLOCK", "file locking deadlock"}, {57, "EBFONT", "bad font file format"}, {58, "EOWNERDEAD", "owner of the lock died"}, {59, "ENOTRECOVERABLE", "lock is not recoverable"}, {60, "ENOSTR", "not a stream device"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of stream resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "ELOCKUNMAPPED", "locked lock was unmapped "}, {73, "ENOTACTIVE", "facility is not active"}, {74, "EMULTIHOP", "multihop attempted"}, {77, "EBADMSG", "not a data message"}, {78, "ENAMETOOLONG", "file name too long"}, {79, "EOVERFLOW", "value too large for defined data type"}, {80, "ENOTUNIQ", "name not unique on network"}, {81, "EBADFD", "file descriptor in bad state"}, {82, "EREMCHG", "remote address changed"}, {83, "ELIBACC", "can not access a needed shared library"}, {84, "ELIBBAD", "accessing a corrupted shared library"}, {85, "ELIBSCN", ".lib section in a.out corrupted"}, {86, "ELIBMAX", "attempting to link in more shared libraries than system limit"}, {87, "ELIBEXEC", "can not exec a shared library directly"}, {88, "EILSEQ", "illegal byte sequence"}, {89, "ENOSYS", "operation not applicable"}, {90, "ELOOP", "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS"}, {91, "ERESTART", "error 91"}, {92, "ESTRPIPE", "error 92"}, {93, "ENOTEMPTY", "directory not empty"}, {94, "EUSERS", "too many users"}, {95, "ENOTSOCK", "socket operation on non-socket"}, {96, "EDESTADDRREQ", "destination address required"}, {97, "EMSGSIZE", "message too long"}, {98, "EPROTOTYPE", "protocol wrong type for socket"}, {99, "ENOPROTOOPT", "option not supported by protocol"}, {120, "EPROTONOSUPPORT", "protocol not supported"}, {121, "ESOCKTNOSUPPORT", "socket type not supported"}, {122, "EOPNOTSUPP", "operation not supported on transport endpoint"}, {123, "EPFNOSUPPORT", "protocol family not supported"}, {124, "EAFNOSUPPORT", "address family not supported by protocol family"}, {125, "EADDRINUSE", "address already in use"}, {126, "EADDRNOTAVAIL", "cannot assign requested address"}, {127, "ENETDOWN", "network is down"}, {128, "ENETUNREACH", "network is unreachable"}, {129, "ENETRESET", "network dropped connection because of reset"}, {130, "ECONNABORTED", "software caused connection abort"}, {131, "ECONNRESET", "connection reset by peer"}, {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, {143, "ESHUTDOWN", "cannot send after socket shutdown"}, {144, "ETOOMANYREFS", "too many references: cannot splice"}, {145, "ETIMEDOUT", "connection timed out"}, {146, "ECONNREFUSED", "connection refused"}, {147, "EHOSTDOWN", "host is down"}, {148, "EHOSTUNREACH", "no route to host"}, {149, "EALREADY", "operation already in progress"}, {150, "EINPROGRESS", "operation now in progress"}, {151, "ESTALE", "stale NFS file handle"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal Instruction"}, {5, "SIGTRAP", "trace/Breakpoint Trap"}, {6, "SIGABRT", "abort"}, {7, "SIGEMT", "emulation Trap"}, {8, "SIGFPE", "arithmetic Exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus Error"}, {11, "SIGSEGV", "segmentation Fault"}, {12, "SIGSYS", "bad System Call"}, {13, "SIGPIPE", "broken Pipe"}, {14, "SIGALRM", "alarm Clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGUSR1", "user Signal 1"}, {17, "SIGUSR2", "user Signal 2"}, {18, "SIGCHLD", "child Status Changed"}, {19, "SIGPWR", "power-Fail/Restart"}, {20, "SIGWINCH", "window Size Change"}, {21, "SIGURG", "urgent Socket Condition"}, {22, "SIGIO", "pollable Event"}, {23, "SIGSTOP", "stopped (signal)"}, {24, "SIGTSTP", "stopped (user)"}, {25, "SIGCONT", "continued"}, {26, "SIGTTIN", "stopped (tty input)"}, {27, "SIGTTOU", "stopped (tty output)"}, {28, "SIGVTALRM", "virtual Timer Expired"}, {29, "SIGPROF", "profiling Timer Expired"}, {30, "SIGXCPU", "cpu Limit Exceeded"}, {31, "SIGXFSZ", "file Size Limit Exceeded"}, {32, "SIGWAITING", "no runnable lwp"}, {33, "SIGLWP", "inter-lwp signal"}, {34, "SIGFREEZE", "checkpoint Freeze"}, {35, "SIGTHAW", "checkpoint Thaw"}, {36, "SIGCANCEL", "thread Cancellation"}, {37, "SIGLOST", "resource Lost"}, {38, "SIGXRES", "resource Control Exceeded"}, {39, "SIGJVM1", "reserved for JVM 1"}, {40, "SIGJVM2", "reserved for JVM 2"}, {41, "SIGINFO", "information Request"}, }
{ "pile_set_name": "Github" }
/* No comment provided by engineer. */ "%d days ago" = "روز پیش %d"; /* No comment provided by engineer. */ "%d hours ago" = "ساعت پیش %d"; /* No comment provided by engineer. */ "%d minutes ago" = "دقیقه پیش %d"; /* No comment provided by engineer. */ "%d months ago" = "ماه پیش %d"; /* No comment provided by engineer. */ "%d seconds ago" = "ثانیه پیش %d"; /* No comment provided by engineer. */ "%d weeks ago" = "هفته پیش %d"; /* No comment provided by engineer. */ "%d years ago" = "سال پیش %d"; /* No comment provided by engineer. */ "A minute ago" = "یک دقیقه پیش"; /* No comment provided by engineer. */ "An hour ago" = "یک ساعت پیش"; /* No comment provided by engineer. */ "Just now" = "هم اکنون"; /* No comment provided by engineer. */ "Last month" = "ماه پیش"; /* No comment provided by engineer. */ "Last week" = "هفته پیش"; /* No comment provided by engineer. */ "Last year" = "سال پیش"; /* No comment provided by engineer. */ "Yesterday" = "دیروز"; /* No comment provided by engineer. */ "1 year ago" = "یک سال پیش"; /* No comment provided by engineer. */ "1 month ago" = "یک ماه پیش"; /* No comment provided by engineer. */ "1 week ago" = "یک هفته پیش"; /* No comment provided by engineer. */ "1 day ago" = "یک روز پیش"; /* No comment provided by engineer. */ "This morning" = "صبح امروز"; /* No comment provided by engineer. */ "This afternoon" = "عصر امروز"; /* No comment provided by engineer. */ "Today" = "امروز"; /* No comment provided by engineer. */ "This week" = "این هفته"; /* No comment provided by engineer. */ "This month" = "این ماه"; /* No comment provided by engineer. */ "This year" = "امسال";
{ "pile_set_name": "Github" }
$(document).ready(function() { //feed to parse var feed = "https://cors-anywhere.herokuapp.com/https://jobs.writethedocs.org/feeds/rss.xml"; $.get(feed) .always( function(data) { console.log('Got data') var list = $("#jobs-listing").find('ul'); console.log('Got list') // Create HTML $(data).find("item").each(function () { var el = $(this); var title = el.find("title").text(); var link = el.find("link").text(); var description = el.find("description").text(); var data = description.split('\n', 3) var location = data[1].trim() var company = data[2].trim().replace('<br/>', '') var fulltitle = company + ' - ' + title var li = $('<li/>') .appendTo(list); var aaa = $('<a/>') .text(fulltitle) .attr('href',link) .appendTo(li); console.log('Got link') }); console.log(list) } ) });
{ "pile_set_name": "Github" }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`break.ts format 1`] = ` ====================================options===================================== parsers: ["typescript", "babel", "flow"] printWidth: 80 | printWidth =====================================input====================================== class MyContractSelectionWidget extends React.Component<void, MyContractSelectionWidgetPropsType, void> implements SomethingLarge { method() {} } class DisplayObject1 extends utils.EventEmitter implements interaction_InteractiveTarget { } class DisplayObject2 extends utils.EventEmitter implements interaction_InteractiveTarget { } class DisplayObject3 extends utils.EventEmitter implements interaction_InteractiveTarget, somethingElse_SomeOtherThing, somethingElseAgain_RunningOutOfNames { } class DisplayObject4 extends utils.EventEmitter implements interaction_InteractiveTarget {} class Readable extends events.EventEmitter implements NodeJS_ReadableStream {} class InMemoryAppender extends log4javascript.Appender implements ICachedLogMessageProvider {} class Foo extends Immutable.Record({ ipaddress: '', }) { ipaddress: string; } export class VisTimelineComponent implements AfterViewInit, OnChanges, OnDestroy { } export class VisTimelineComponent2 implements AfterViewInit, OnChanges, OnDestroy, AndSomethingReallyReallyLong { } =====================================output===================================== class MyContractSelectionWidget extends React.Component<void, MyContractSelectionWidgetPropsType, void> implements SomethingLarge { method() {} } class DisplayObject1 extends utils.EventEmitter implements interaction_InteractiveTarget {} class DisplayObject2 extends utils.EventEmitter implements interaction_InteractiveTarget {} class DisplayObject3 extends utils.EventEmitter implements interaction_InteractiveTarget, somethingElse_SomeOtherThing, somethingElseAgain_RunningOutOfNames {} class DisplayObject4 extends utils.EventEmitter implements interaction_InteractiveTarget {} class Readable extends events.EventEmitter implements NodeJS_ReadableStream {} class InMemoryAppender extends log4javascript.Appender implements ICachedLogMessageProvider {} class Foo extends Immutable.Record({ ipaddress: "", }) { ipaddress: string; } export class VisTimelineComponent implements AfterViewInit, OnChanges, OnDestroy {} export class VisTimelineComponent2 implements AfterViewInit, OnChanges, OnDestroy, AndSomethingReallyReallyLong {} ================================================================================ `;
{ "pile_set_name": "Github" }
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://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 com.example.android.wearable.quiz; import static com.example.android.wearable.quiz.Constants.ANSWERS; import static com.example.android.wearable.quiz.Constants.CONNECT_TIMEOUT_MS; import static com.example.android.wearable.quiz.Constants.CORRECT_ANSWER_INDEX; import static com.example.android.wearable.quiz.Constants.NUM_CORRECT; import static com.example.android.wearable.quiz.Constants.NUM_INCORRECT; import static com.example.android.wearable.quiz.Constants.NUM_SKIPPED; import static com.example.android.wearable.quiz.Constants.QUESTION; import static com.example.android.wearable.quiz.Constants.QUESTION_INDEX; import static com.example.android.wearable.quiz.Constants.QUESTION_WAS_ANSWERED; import static com.example.android.wearable.quiz.Constants.QUESTION_WAS_DELETED; import static com.example.android.wearable.quiz.Constants.QUIZ_ENDED_PATH; import static com.example.android.wearable.quiz.Constants.QUIZ_EXITED_PATH; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Intent; import android.net.Uri; import android.text.SpannableStringBuilder; import android.text.style.ForegroundColorSpan; import android.util.Log; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.wearable.DataEvent; import com.google.android.gms.wearable.DataEventBuffer; import com.google.android.gms.wearable.DataItem; import com.google.android.gms.wearable.DataMap; import com.google.android.gms.wearable.DataMapItem; import com.google.android.gms.wearable.MessageEvent; import com.google.android.gms.wearable.Wearable; import com.google.android.gms.wearable.WearableListenerService; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; /** * Listens to changes in DataItems, which represent quiz questions. * If a new question is created, this builds a new notification for it. * Otherwise, if a question is deleted, this cancels the corresponding notification. * * When the quiz ends, this listener receives a message telling it to create an end-of-quiz report. */ public class QuizListenerService extends WearableListenerService { private static final String TAG = "QuizSample"; private static final int QUIZ_REPORT_NOTIF_ID = -1; // Never used by question notifications. private static final Map<Integer, Integer> questionNumToDrawableId; static { Map<Integer, Integer> temp = new HashMap<Integer, Integer>(4); temp.put(0, R.drawable.ic_choice_a); temp.put(1, R.drawable.ic_choice_b); temp.put(2, R.drawable.ic_choice_c); temp.put(3, R.drawable.ic_choice_d); questionNumToDrawableId = Collections.unmodifiableMap(temp); } @Override public void onDataChanged(DataEventBuffer dataEvents) { GoogleApiClient googleApiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .build(); ConnectionResult connectionResult = googleApiClient.blockingConnect(CONNECT_TIMEOUT_MS, TimeUnit.MILLISECONDS); if (!connectionResult.isSuccess()) { Log.e(TAG, "QuizListenerService failed to connect to GoogleApiClient."); return; } for (DataEvent event : dataEvents) { if (event.getType() == DataEvent.TYPE_CHANGED) { DataItem dataItem = event.getDataItem(); DataMap dataMap = DataMapItem.fromDataItem(dataItem).getDataMap(); if (dataMap.getBoolean(QUESTION_WAS_ANSWERED) || dataMap.getBoolean(QUESTION_WAS_DELETED)) { // Ignore the change in data; it is used in MainActivity to update // the question's status (i.e. was the answer right or wrong or left blank). continue; } String question = dataMap.getString(QUESTION); int questionIndex = dataMap.getInt(QUESTION_INDEX); int questionNum = questionIndex + 1; String[] answers = dataMap.getStringArray(ANSWERS); int correctAnswerIndex = dataMap.getInt(CORRECT_ANSWER_INDEX); Intent deleteOperation = new Intent(this, DeleteQuestionService.class); deleteOperation.setData(dataItem.getUri()); PendingIntent deleteIntent = PendingIntent.getService(this, 0, deleteOperation, PendingIntent.FLAG_UPDATE_CURRENT); // First page of notification contains question as Big Text. Notification.BigTextStyle bigTextStyle = new Notification.BigTextStyle() .setBigContentTitle(getString(R.string.question, questionNum)) .bigText(question); Notification.Builder builder = new Notification.Builder(this) .setStyle(bigTextStyle) .setSmallIcon(R.drawable.ic_launcher) .setLocalOnly(true) .setDeleteIntent(deleteIntent); // Add answers as actions. Notification.WearableExtender wearableOptions = new Notification.WearableExtender(); for (int i = 0; i < answers.length; i++) { Notification answerPage = new Notification.Builder(this) .setContentTitle(question) .setContentText(answers[i]) .extend(new Notification.WearableExtender() .setContentAction(i)) .build(); boolean correct = (i == correctAnswerIndex); Intent updateOperation = new Intent(this, UpdateQuestionService.class); // Give each intent a unique action. updateOperation.setAction("question_" + questionIndex + "_answer_" + i); updateOperation.setData(dataItem.getUri()); updateOperation.putExtra(UpdateQuestionService.EXTRA_QUESTION_INDEX, questionIndex); updateOperation.putExtra(UpdateQuestionService.EXTRA_QUESTION_CORRECT, correct); PendingIntent updateIntent = PendingIntent.getService(this, 0, updateOperation, PendingIntent.FLAG_UPDATE_CURRENT); Notification.Action action = new Notification.Action.Builder( questionNumToDrawableId.get(i), null, updateIntent) .build(); wearableOptions.addAction(action).addPage(answerPage); } builder.extend(wearableOptions); Notification notification = builder.build(); ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)) .notify(questionIndex, notification); } else if (event.getType() == DataEvent.TYPE_DELETED) { Uri uri = event.getDataItem().getUri(); // URI's are of the form "/question/0", "/question/1" etc. // We use the question index as the notification id. int notificationId = Integer.parseInt(uri.getLastPathSegment()); ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)) .cancel(notificationId); } // Delete the quiz report, if it exists. ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)) .cancel(QUIZ_REPORT_NOTIF_ID); } googleApiClient.disconnect(); } @Override public void onMessageReceived(MessageEvent messageEvent) { String path = messageEvent.getPath(); if (path.equals(QUIZ_EXITED_PATH)) { // Remove any lingering question notifications. ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)).cancelAll(); } if (path.equals(QUIZ_ENDED_PATH) || path.equals(QUIZ_EXITED_PATH)) { // Quiz ended - display overall results. DataMap dataMap = DataMap.fromByteArray(messageEvent.getData()); int numCorrect = dataMap.getInt(NUM_CORRECT); int numIncorrect = dataMap.getInt(NUM_INCORRECT); int numSkipped = dataMap.getInt(NUM_SKIPPED); Notification.Builder builder = new Notification.Builder(this) .setContentTitle(getString(R.string.quiz_report)) .setSmallIcon(R.drawable.ic_launcher) .setLocalOnly(true); SpannableStringBuilder quizReportText = new SpannableStringBuilder(); appendColored(quizReportText, String.valueOf(numCorrect), R.color.dark_green); quizReportText.append(" " + getString(R.string.correct) + "\n"); appendColored(quizReportText, String.valueOf(numIncorrect), R.color.dark_red); quizReportText.append(" " + getString(R.string.incorrect) + "\n"); appendColored(quizReportText, String.valueOf(numSkipped), R.color.dark_yellow); quizReportText.append(" " + getString(R.string.skipped) + "\n"); builder.setContentText(quizReportText); if (!path.equals(QUIZ_EXITED_PATH)) { // Don't add reset option if user exited quiz (there might not be a quiz to reset!). builder.addAction(R.drawable.ic_launcher, getString(R.string.reset_quiz), getResetQuizPendingIntent()); } ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)) .notify(QUIZ_REPORT_NOTIF_ID, builder.build()); } } private void appendColored(SpannableStringBuilder builder, String text, int colorResId) { builder.append(text).setSpan(new ForegroundColorSpan(getResources().getColor(colorResId)), builder.length() - text.length(), builder.length(), 0); } /** * Returns a PendingIntent that will send a message to the phone to reset the quiz when fired. */ private PendingIntent getResetQuizPendingIntent() { Intent intent = new Intent(QuizReportActionService.ACTION_RESET_QUIZ) .setClass(this, QuizReportActionService.class); return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); } }
{ "pile_set_name": "Github" }
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="html/html; charset=utf-8" /> <title>GoogleDirectionsDefinition Class Reference</title> <meta id="xcode-display" name="xcode-display" content="render"/> <link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" /> <link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" /> <meta name="generator" content="appledoc 2.2 (build 963)" /> </head> <body> <header id="top_header"> <div id="library" class="hideInXcode"> <h1><a id="libraryTitle" href="../index.html">OpenInGoogleMaps </a></h1> <a id="developerHome" href="../index.html">Google</a> </div> <div id="title" role="banner"> <h1 class="hideInXcode">GoogleDirectionsDefinition Class Reference</h1> </div> <ul id="headerButtons" role="toolbar"> <li id="toc_button"> <button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button> </li> <li id="jumpto_button" role="navigation"> <select id="jumpTo"> <option value="top">Jump To&#133;</option> <option value="overview">Overview</option> <option value="tasks">Tasks</option> <option value="properties">Properties</option> <option value="//api/name/destinationPoint">&nbsp;&nbsp;&nbsp;&nbsp;destinationPoint</option> <option value="//api/name/startingPoint">&nbsp;&nbsp;&nbsp;&nbsp;startingPoint</option> <option value="//api/name/travelMode">&nbsp;&nbsp;&nbsp;&nbsp;travelMode</option> </select> </li> </ul> </header> <nav id="tocContainer" class="isShowingTOC"> <ul id="toc" role="tree"> <li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li> <li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul> </ul></li> <li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/destinationPoint">destinationPoint</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/startingPoint">startingPoint</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/travelMode">travelMode</a></span></li> </ul></li> </ul> </nav> <article> <div id="contents" class="isShowingTOC" role="main"> <a title="GoogleDirectionsDefinition Class Reference" name="top"></a> <div class="main-navigation navigation-top"> <ul> <li><a href="../index.html">Index</a></li> <li><a href="../hierarchy.html">Hierarchy</a></li> </ul> </div> <div id="header"> <div class="section-header"> <h1 class="title title-header">GoogleDirectionsDefinition Class Reference</h1> </div> </div> <div id="container"> <div class="section section-specification"><table cellspacing="0"><tbody> <tr> <td class="specification-title">Inherits from</td> <td class="specification-value">NSObject</td> </tr><tr> <td class="specification-title">Declared in</td> <td class="specification-value">OpenInGoogleMapsController.h</td> </tr> </tbody></table></div> <div class="section section-overview"> <a title="Overview" name="overview"></a> <h2 class="subtitle subtitle-overview">Overview</h2> <p>Helper class used to define two waypoints from which to create a set of directions in Google Maps. Either the starting point or the destination must be non-nil in order to produce a valid request.</p> </div> <div class="section section-tasks"> <a title="Tasks" name="tasks"></a> <h2 class="subtitle subtitle-tasks">Tasks</h2> <ul class="task-list"> <li> <span class="tooltip"> <code><a href="#//api/name/startingPoint">&nbsp;&nbsp;startingPoint</a></code> </span> <span class="task-item-suffix">property</span> </li><li> <span class="tooltip"> <code><a href="#//api/name/destinationPoint">&nbsp;&nbsp;destinationPoint</a></code> </span> <span class="task-item-suffix">property</span> </li><li> <span class="tooltip"> <code><a href="#//api/name/travelMode">&nbsp;&nbsp;travelMode</a></code> </span> <span class="task-item-suffix">property</span> </li> </ul> </div> <div class="section section-methods"> <a title="Properties" name="properties"></a> <h2 class="subtitle subtitle-methods">Properties</h2> <div class="section-method"> <a name="//api/name/destinationPoint" title="destinationPoint"></a> <h3 class="subsubtitle method-title">destinationPoint</h3> <div class="method-subsection brief-description"> <p>Destination. If this is set to <code>nil</code>, we will end at the user&rsquo;s current location.</p> </div> <div class="method-subsection method-declaration"><code>@property (nonatomic, strong) GoogleDirectionsWaypoint *destinationPoint</code></div> <div class="method-subsection see-also-section"> <h4 class="method-subtitle">See Also</h4> <ul> <li><code><p><a href="../Classes/GoogleDirectionsWaypoint.html">GoogleDirectionsWaypoint</a></p></code></li> </ul> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">OpenInGoogleMapsController.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/startingPoint" title="startingPoint"></a> <h3 class="subsubtitle method-title">startingPoint</h3> <div class="method-subsection brief-description"> <p>Starting point. If this is set to <code>nil</code>, we will start at the user&rsquo;s current location.</p> </div> <div class="method-subsection method-declaration"><code>@property (nonatomic, strong) GoogleDirectionsWaypoint *startingPoint</code></div> <div class="method-subsection see-also-section"> <h4 class="method-subtitle">See Also</h4> <ul> <li><code><p><a href="../Classes/GoogleDirectionsWaypoint.html">GoogleDirectionsWaypoint</a></p></code></li> </ul> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">OpenInGoogleMapsController.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/travelMode" title="travelMode"></a> <h3 class="subsubtitle method-title">travelMode</h3> <div class="method-subsection brief-description"> <p>Method of transportation for which to provide directions. If the application opened does not support this travel type, it will fall back to providing driving directions.</p> </div> <div class="method-subsection method-declaration"><code>@property (nonatomic, assign) GoogleMapsTravelMode travelMode</code></div> <div class="method-subsection see-also-section"> <h4 class="method-subtitle">See Also</h4> <ul> <li><code><p><a href="../Constants/GoogleMapsTravelMode.html">GoogleMapsTravelMode</a></p></code></li> </ul> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">OpenInGoogleMapsController.h</code><br /> </div> </div> </div> </div> <div class="main-navigation navigation-bottom"> <ul> <li><a href="../index.html">Index</a></li> <li><a href="../hierarchy.html">Hierarchy</a></li> </ul> </div> <div id="footer"> <hr /> <div class="footer-copyright"> <p><span class="copyright">&copy; 2014 Google. All rights reserved. (Last updated: 2014-12-22)</span><br /> <span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 963)</a>.</span></p> </div> </div> </div> </article> <script type="text/javascript"> function jumpToChange() { window.location.hash = this.options[this.selectedIndex].value; } function toggleTOC() { var contents = document.getElementById('contents'); var tocContainer = document.getElementById('tocContainer'); if (this.getAttribute('class') == 'open') { this.setAttribute('class', ''); contents.setAttribute('class', ''); tocContainer.setAttribute('class', ''); window.name = "hideTOC"; } else { this.setAttribute('class', 'open'); contents.setAttribute('class', 'isShowingTOC'); tocContainer.setAttribute('class', 'isShowingTOC'); window.name = ""; } return false; } function toggleTOCEntryChildren(e) { e.stopPropagation(); var currentClass = this.getAttribute('class'); if (currentClass == 'children') { this.setAttribute('class', 'children open'); } else if (currentClass == 'children open') { this.setAttribute('class', 'children'); } return false; } function tocEntryClick(e) { e.stopPropagation(); return true; } function init() { var selectElement = document.getElementById('jumpTo'); selectElement.addEventListener('change', jumpToChange, false); var tocButton = document.getElementById('table_of_contents'); tocButton.addEventListener('click', toggleTOC, false); var taskTreeItem = document.getElementById('task_treeitem'); if (taskTreeItem.getElementsByTagName('li').length > 0) { taskTreeItem.setAttribute('class', 'children'); taskTreeItem.firstChild.setAttribute('class', 'disclosure'); } var tocList = document.getElementById('toc'); var tocEntries = tocList.getElementsByTagName('li'); for (var i = 0; i < tocEntries.length; i++) { tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false); } var tocLinks = tocList.getElementsByTagName('a'); for (var i = 0; i < tocLinks.length; i++) { tocLinks[i].addEventListener('click', tocEntryClick, false); } if (window.name == "hideTOC") { toggleTOC.call(tocButton); } } window.onload = init; // If showing in Xcode, hide the TOC and Header if (navigator.userAgent.match(/xcode/i)) { document.getElementById("contents").className = "hideInXcode" document.getElementById("tocContainer").className = "hideInXcode" document.getElementById("top_header").className = "hideInXcode" } </script> </body> </html>
{ "pile_set_name": "Github" }
{ "html": "MassEffect_5e.html", "css": "MassEffect_5e.css", "authors": "John G.", "roll20userid": "1033031", "preview": "MassEffect_5e.png", "compendium": "", "instructions": "Modeled using 5th Edition OGL by Roll20. Compatible for use with Mass Effect 5E.", "useroptions": [ { "attribute": "npc", "displayname": "NPC", "displaytranslationkey": "npc-u", "type": "checkbox", "value": "1", "description": "The NPC option sets new characters to default to the NPC card style sheet. Useful if the player characters have already been created and all new character sheets added to the game will likely represent none player characters.", "descriptiontranslationkey": "npc-info" }, { "attribute": "l1mancer_status", "displayname": "USE LEVEL 1 CHARACTERMANCER FOR NEW CHARACTERS:", "displaytranslationkey": "use-charactermancer-for-new:-u", "type": "select", "options": [ "Yes| ", "No|completed" ], "optiontranslationkeys": ["yes","no"], "description": "With this option enabled all new characters will open with the Level 1 Roll20 Charactermancer. Disabling this option will start new characters directly on the character sheet disabling the Level 1 Charactermancer, which can still be manually run from the Settings tab of the character sheet.", "descriptiontranslationkey": "use-charactermancer-for-new-info" }, { "attribute": "rtype", "displayname": "Roll Queries", "displaytranslationkey": "roll-queries:-u", "type": "select", "options": [ "Always Roll Advantage|{{always=1}} {{r2=[[1d20", "Advantage Toggle|@{advantagetoggle}", "Query Advantage|{{query=1}} ?{Advantage?|Normal Roll,&#123&#123normal=1&#125&#125 &#123&#123r2=[[0d20|Advantage,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[1d20|Disadvantage,&#123&#123disadvantage=1&#125&#125 &#123&#123r2=[[1d20}", "Never Roll Advantage|{{normal=1}} {{r2=[[0d20" ], "optiontranslationkeys": ["always-roll-adv","toggle-roll-adv","query-roll-adv","never-roll-adv"], "default": "{{always=1}} {{r2=[[1d20", "description": "D20 Rolls output according to this option. Always Roll Advantage is the default setting and will roll two D20 on every roll in case of advantage. The expectation is that if there is no advantage or disadvantage you use the left most result. The Advantage Toggle option adds three new buttons to the top of the sheet so that you can toggle advantage on a case by case basis. Query Advantage gives you a prompt every roll asking if the roll has advantage. Never Roll Advantage always rolls a single D20 on any given roll, expecting the player to roll a second time in case of advantage or disadvantage.", "descriptiontranslationkey": "roll-queries-info" }, { "attribute": "wtype", "displayname": "Whisper Rolls to GM", "displaytranslationkey": "whisp-rolls-gm:-u", "type": "select", "options": [ "Never Whisper Rolls|", "Whisper Toggle|@{whispertoggle}", "Query Whisper|?{Whisper?|Public Roll,|Whisper Roll,/w gm }", "Always Whisper Rolls|/w gm " ], "optiontranslationkeys": ["never-whisper-roll","toggle-roll-whisper","query-whisper-roll","always-whisper-roll"], "default": "", "description": "All sheet rolls are sent to all players in chat by default. Whisper Toggle gives a set of buttons to quick select your preference on the fly. Query Whisper option gives you a prompt with each roll of whether or not the roll should be sent privately only to yourself and the GM. Always Whisper Rolls will send all rolls only to yourself and the GM.", "descriptiontranslationkey": "whisp-rolls-gm-info" }, { "attribute": "dtype", "displayname": "Auto Damage Roll", "displaytranslationkey": "auto-dmg-roll:-u", "type": "select", "options": [ "Don't Auto Roll Damage|pick", "Auto Roll Damage & Crit|full" ], "optiontranslationkeys": ["never-roll-dmg","always-roll-dmg"], "default": "pick", "description": "By default, attack damage rolls are not rolled until the hit is confirmed. Damage is rolled from the chat roll template by clicking on the name of the attack in the right hand bar, which then displays the damage. The default method is compatible with 3D dice. Optionally, you can choose to have the Auto Roll Damage & Crit option which will roll damage and critical hit dice at the same time of the attack, presenting all possible outcomes at the time of the attack.", "descriptiontranslationkey": "auto-dmg-roll-info" }, { "attribute": "core_die", "displayname": "CORE DIE ROLL:", "displaytranslationkey": "core-die-roll:-u", "type": "text", "default": "1d20", "description": "Changing the core die will replace the normal 1d20 made with almost all rolls with a randomizer of your choice, such as 2d10 or 3d6.", "descriptiontranslationkey": "core-die-roll-info" }, { "attribute": "pb_type", "displayname": "PROFICIENCY BONUS:", "displaytranslationkey": "prof-bonus:-u", "type": "select", "options": [ "By Level (Default)|level", "Proficency Die (DMG)|die", "Custom|custom" ], "optiontranslationkeys": ["by-level","prof-die","custom"], "default": "level", "description": "By default, the character's Proficiency Bonus will be automatically calculated based off of their total level as is the standard method in the PHB. The Proficency Die option supports the alternate method outlined in the DMG where, instead of a flat bonus, a die is rolled instead. The Custom option allows you to replace the PB with anything of your choosing.", "descriptiontranslationkey": "pb-type-info" }, { "attribute": "pb_custom", "displayname": "CUSTOM PROFICIENCY BONUS:", "displaytranslationkey": "custom-pb:-u", "type": "text", "default": "", "description": "When the Proficiency Bonus type is set to Custom, the character sheet will use this value for the character's Proficiency Bonus.", "descriptiontranslationkey": "pb-custom-info" }, { "attribute": "init_tiebreaker", "displayname": "ADD DEX TIEBREAKER TO INITIATIVE", "displaytranslationkey": "add-dex-tiebreaker-u", "type": "checkbox", "value": "@{dexterity}/100", "description": "Adds the character's dexterity score as a decimal to the end of the initiative bonus for purposes of breaking ties.", "descriptiontranslationkey": "init-tiebreaker-info" }, { "attribute": "global_save_mod_flag", "displayname": "SHOW GLOBAL SAVE MODIFIER FIELD", "displaytranslationkey": "show-global-save-field-u", "type": "checkbox", "value": "1", "description": "Creates a custom global save modifier field, underneath the SAVING THROWS section of the character sheet. Anything put there will be applied to any save roll. Perfect for regular but not permanent bonuses like the Bless spell.", "descriptiontranslationkey": "global-save-info" }, { "attribute": "global_skill_mod_flag", "displayname": "SHOW GLOBAL SKILL MODIFIER FIELD", "displaytranslationkey": "show-global-skill-field-u", "type": "checkbox", "value": "1", "description": "Creates a custom global skill modifier field, underneath the SKILLS section of the character sheet. Anything put there will be applied to any save roll. Perfect for regular but not permanent bonuses like the Guidance spell.", "descriptiontranslationkey": "global-skill-info" }, { "attribute": "global_attack_mod_flag", "displayname": "SHOW GLOBAL ATTACK MODIFIER FIELD", "displaytranslationkey": "show-global-attack-field-u", "type": "checkbox", "value": "1", "description": "Creates a custom global attack modifier field, underneath the ATTACKS AND SPELL CASTING section of the character sheet. Anything put there will be applied to any attack to-hit roll. Perfect for regular but not permanent bonuses to attack like the Bless spell.", "descriptiontranslationkey": "global-attack-info" }, { "attribute": "global_damage_mod_flag", "displayname": "SHOW GLOBAL DAMAGE MODIFIER FIELD", "displaytranslationkey": "show-global-damage-field-u", "type": "checkbox", "value": "1", "description": "Creates a custom global damage modifier field, underneath the ATTACKS AND SPELL CASTING section of the character sheet. Anything put there will be applied to any attack damage roll. Perfect for regular but not permanent bonuses to damage like the Sneak Attack ability.", "descriptiontranslationkey": "global-damage-info" }, { "attribute": "charname_output", "displayname": "Add Character Name To Templates", "displaytranslationkey": "add-char-to-templates:-u", "type": "select", "options": [ "On|{{charname=@{character_name}}}", "Off|charname=@{character_name}" ], "optiontranslationkeys": ["on","off"], "default": "charname=@{character_name}", "description": "Character names are not added to the roll template by default, and are only displayed as normal in the chat tab as the player/character selected as 'Speaking As'. Turning this option on adds the character making the roll's name to the template, useful for players representing multiple characters.", "descriptiontranslationkey": "add-char-to-templates-info" }, { "attribute": "level_calculations", "displayname": "AUTO LEVEL CALCULATIONS:", "displaytranslationkey": "level-calculations:-u", "type": "select", "options": [ "On|on", "Off|off" ], "optiontranslationkeys": ["on","off"], "default": "on", "description": "By default changing character levels will automatically set spell slots and hit dice. Changing this setting to off prevents this behavior.", "descriptiontranslationkey": "auto-level-calc-info" }, { "attribute": "encumberance_setting", "displayname": "Encumbrance", "displaytranslationkey": "encumbrance:-u", "type": "select", "options": [ "Simple|off", "Variant (PHB p176)|on", "Off|disabled" ], "optiontranslationkeys": ["simple","variant-phb","off"], "default": "on", "description": "The sheet uses the variant encumbrance rules on page 176 of the PHB. The Off option disables the variant rules and only uses a basic over-limit inventory weight check.", "descriptiontranslationkey": "encumbrance-info" }, { "attribute": "simpleinventory", "displayname": "Inventory", "displaytranslationkey": "inventory:-u", "type": "select", "options": [ "Compendium Compatible|complex", "Simple|simple" ], "optiontranslationkeys": ["compendium-compatible","simple"], "default": "complex", "description": "Character Inventories default to the complex style that is compatible with the Roll20 5E Compendium. This includes granular item amounts/weights, weight and encumbrance tracking, sorting, AC calculations, automatic attack generation, and more. The Simple option provides a text field for item lists for players who want more manual control over the sheet.", "descriptiontranslationkey": "inventory-info" }, { "attribute": "simpletraits", "displayname": "FEATURES & TRAITS", "displaytranslationkey": "feats-traits-u", "type": "select", "options": [ "Compendium Compatible|complex", "Simple|simple" ], "optiontranslationkeys": ["compendium-compatible","simple"], "default": "complex", "description": "Character FEATURES AND TRAITS section defaults to the complex style that is compatible with the Roll20 5E Compendium. The Simple option provides a text field for players who want more manual control over the sheet.", "descriptiontranslationkey": "simple-traits-info" }, { "attribute": "simpleproficencies", "displayname": "PROFICIENCIES & LANGUAGES", "displaytranslationkey": "prof-langs-u", "type": "select", "options": [ "Compendium Compatible|complex", "Simple|simple" ], "optiontranslationkeys": ["compendium-compatible","simple"], "default": "complex", "description": "Character OTHER PROFICIENCIES & LANGUAGES section defaults to the complex style that is compatible with the Roll20 5E Compendium. The Simple option provides a text field for players who want more manual control over the sheet.", "descriptiontranslationkey": "simple-proficiencies-info" }, { "attribute": "npc_name_flag", "displayname": "NPC NAME IN ROLLS:", "displaytranslationkey": "npc-name-in-rolls:-u", "type": "select", "options": [ "Show|{{name=@{npc_name}}}", "Hide|0" ], "optiontranslationkeys": ["show","hide"], "default": "{{name=@{npc_name}}}", "description": "In NPC roll results, show or hide the name of the NPC in the roll result card.", "descriptiontranslationkey": "npc-name-in-rolls-desc:-u" }, { "attribute": "ammotracking", "displayname": "Ammo Tracking (API Required)", "displaytranslationkey": "ammo-tracking:-u", "type": "select", "options": [ "On|on", "Off|off" ], "optiontranslationkeys": ["on","off"], "default": "off", "description": "Provides automatic ammo tracking with the <a href='https://wiki.roll20.net/5th_Edition_OGL_by_Roll20#Utilizing_the_5th_Edition_OGL_Companion_API_Script'>5th Edition OGL by Roll20 Companion API Script</a>.", "descriptiontranslationkey": "ammo-tracking-info" }, { "attribute": "cd_bar1_v", "displayname": "BAR 1 VALUE:", "displaytranslationkey": "cd-bar1-value:-u", "type": "text", "default": "hp_max", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 1's value to this attribute.", "descriptiontranslationkey": "cd-bar1-value-desc:-u" }, { "attribute": "cd_bar1_m", "displayname": "BAR 1 MAX:", "displaytranslationkey": "cd-bar1-max:-u", "type": "text", "default": "hp_max", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 1's max to this attribute.", "descriptiontranslationkey": "cd-bar1-max-desc:-u" }, { "attribute": "cd_bar1_l", "displayname": "BAR 1 LINK:", "displaytranslationkey": "cd-bar1-link:-u", "type": "text", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, link the Bar 1's value to this attribute. If set this will override all other bar settings.", "descriptiontranslationkey": "cd-bar1-link-desc:-u" }, { "attribute": "cd_bar2_v", "displayname": "BAR 2 VALUE:", "displaytranslationkey": "cd-bar2-value:-u", "type": "text", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 2's value to this attribute.", "descriptiontranslationkey": "cd-bar2-value-desc:-u" }, { "attribute": "cd_bar2_m", "displayname": "BAR 2 MAX:", "displaytranslationkey": "cd-bar2-max:-u", "type": "text", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 2's max to this attribute.", "descriptiontranslationkey": "cd-bar2-max-desc:-u" }, { "attribute": "cd_bar2_l", "displayname": "BAR 2 LINK:", "displaytranslationkey": "cd-bar2-link:-u", "type": "text", "default": "npc_ac", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, link the Bar 2's value to this attribute. If set this will override all other bar settings.", "descriptiontranslationkey": "cd-bar2-link-desc:-u" }, { "attribute": "cd_bar3_v", "displayname": "BAR 3 VALUE:", "displaytranslationkey": "cd-bar3-value:-u", "type": "text", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 3's value to this attribute.", "descriptiontranslationkey": "cd-bar3-value-desc:-u" }, { "attribute": "cd_bar3_m", "displayname": "BAR 3 MAX:", "displaytranslationkey": "cd-bar3-max:-u", "type": "text", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 3's max to this attribute.", "descriptiontranslationkey": "cd-bar3-max-desc:-u" }, { "attribute": "cd_bar3_l", "displayname": "BAR 3 LINK:", "displaytranslationkey": "cd-bar3-link:-u", "type": "text", "description": "On Default Tokens created by doing a Compendium drop onto the virtual table top, link the Bar 3's value to this attribute. If set this will override all other bar settings.", "descriptiontranslationkey": "cd-bar3-link-desc:-u" } ] }
{ "pile_set_name": "Github" }
/* Copyright The Helm 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. */ /*Package environment describes the operating environment for Tiller. Tiller's environment encapsulates all of the service dependencies Tiller has. These dependencies are expressed as interfaces so that alternate implementations (mocks, etc.) can be easily generated. */ package environment import ( "io" "time" v1 "k8s.io/api/core/v1" "k8s.io/cli-runtime/pkg/resource" "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/engine" "k8s.io/helm/pkg/kube" "k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/storage" "k8s.io/helm/pkg/storage/driver" ) const ( // DefaultTillerNamespace is the default namespace for Tiller. DefaultTillerNamespace = "kube-system" // DefaultTillerPort defines the default port tiller listen on for client traffic DefaultTillerPort = 44134 // DefaultTillerProbePort defines the default port to listen on for probes DefaultTillerProbePort = 44135 // GoTplEngine is the name of the Go template engine, as registered in the EngineYard. GoTplEngine = "gotpl" ) // DefaultEngine points to the engine that the EngineYard should treat as the // default. A chart that does not specify an engine may be run through the // default engine. var DefaultEngine = GoTplEngine // EngineYard maps engine names to engine implementations. type EngineYard map[string]Engine // Get retrieves a template engine by name. // // If no matching template engine is found, the second return value will // be false. func (y EngineYard) Get(k string) (Engine, bool) { e, ok := y[k] return e, ok } // Default returns the default template engine. // // The default is specified by DefaultEngine. // // If the default template engine cannot be found, this panics. func (y EngineYard) Default() Engine { d, ok := y[DefaultEngine] if !ok { // This is a developer error! panic("Default template engine does not exist") } return d } // Engine represents a template engine that can render templates. // // For some engines, "rendering" includes both compiling and executing. (Other // engines do not distinguish between phases.) // // The engine returns a map where the key is the named output entity (usually // a file name) and the value is the rendered content of the template. // // An Engine must be capable of executing multiple concurrent requests, but // without tainting one request's environment with data from another request. type Engine interface { // Render renders a chart. // // It receives a chart, a config, and a map of overrides to the config. // Overrides are assumed to be passed from the system, not the user. Render(*chart.Chart, chartutil.Values) (map[string]string, error) } // KubeClient represents a client capable of communicating with the Kubernetes API. // // A KubeClient must be concurrency safe. type KubeClient interface { // Create creates one or more resources. // // reader must contain a YAML stream (one or more YAML documents separated // by "\n---\n"). Create(namespace string, reader io.Reader, timeout int64, shouldWait bool) error // Get gets one or more resources. Returned string hsa the format like kubectl // provides with the column headers separating the resource types. // // namespace must contain a valid existing namespace. // // reader must contain a YAML stream (one or more YAML documents separated // by "\n---\n"). Get(namespace string, reader io.Reader) (string, error) // Delete destroys one or more resources. // // namespace must contain a valid existing namespace. // // reader must contain a YAML stream (one or more YAML documents separated // by "\n---\n"). Delete(namespace string, reader io.Reader) error // DeleteWithTimeout destroys one or more resources. If shouldWait is true, the function // will not return until all the resources have been fully deleted or the provided // timeout has expired. // // namespace must contain a valid existing namespace. // // reader must contain a YAML stream (one or more YAML documents separated // by "\n---\n"). DeleteWithTimeout(namespace string, reader io.Reader, timeout int64, shouldWait bool) error // WatchUntilReady watch the resource in reader until it is "ready". // // For Jobs, "ready" means the job ran to completion (excited without error). // For all other kinds, it means the kind was created or modified without // error. WatchUntilReady(namespace string, reader io.Reader, timeout int64, shouldWait bool) error // Deprecated; use UpdateWithOptions instead Update(namespace string, originalReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error // UpdateWithOptions updates one or more resources or creates the resource // if it doesn't exist. // // namespace must contain a valid existing namespace. // // reader must contain a YAML stream (one or more YAML documents separated // by "\n---\n"). UpdateWithOptions(namespace string, originalReader, modifiedReader io.Reader, opts kube.UpdateOptions) error Build(namespace string, reader io.Reader) (kube.Result, error) // BuildUnstructured reads a stream of manifests from a reader and turns them into // info objects. Manifests are not validated against the schema, but it will fail if // any resources types are not known by the apiserver. // // reader must contain a YAML stream (one or more YAML documents separated by "\n---\n"). BuildUnstructured(namespace string, reader io.Reader) (kube.Result, error) // Validate reads a stream of manifests from a reader and validates them against // the schema from the apiserver. It returns an error if any of the manifests does not validate. // // reader must contain a YAML stream (one or more YAML documents separated by "\n---\n"). Validate(namespace string, reader io.Reader) error // WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase // and returns said phase (PodSucceeded or PodFailed qualify). WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) GetPodLogs(name, namespace string) (io.ReadCloser, error) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error } // PrintingKubeClient implements KubeClient, but simply prints the reader to // the given output. type PrintingKubeClient struct { Out io.Writer } // Create prints the values of what would be created with a real KubeClient. func (p *PrintingKubeClient) Create(ns string, r io.Reader, timeout int64, shouldWait bool) error { _, err := io.Copy(p.Out, r) return err } // Get prints the values of what would be created with a real KubeClient. func (p *PrintingKubeClient) Get(ns string, r io.Reader) (string, error) { _, err := io.Copy(p.Out, r) return "", err } // Delete implements KubeClient delete. // // It only prints out the content to be deleted. func (p *PrintingKubeClient) Delete(ns string, r io.Reader) error { _, err := io.Copy(p.Out, r) return err } // DeleteWithTimeout implements KubeClient DeleteWithTimeout. // // It only prints out the content to be deleted. func (p *PrintingKubeClient) DeleteWithTimeout(ns string, r io.Reader, timeout int64, shouldWait bool) error { _, err := io.Copy(p.Out, r) return err } // WatchUntilReady implements KubeClient WatchUntilReady. func (p *PrintingKubeClient) WatchUntilReady(ns string, r io.Reader, timeout int64, shouldWait bool) error { _, err := io.Copy(p.Out, r) return err } // Update implements KubeClient Update. func (p *PrintingKubeClient) Update(ns string, currentReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { return p.UpdateWithOptions(ns, currentReader, modifiedReader, kube.UpdateOptions{ Force: force, Recreate: recreate, Timeout: timeout, ShouldWait: shouldWait, }) } // UpdateWithOptions implements KubeClient UpdateWithOptions. func (p *PrintingKubeClient) UpdateWithOptions(ns string, currentReader, modifiedReader io.Reader, opts kube.UpdateOptions) error { _, err := io.Copy(p.Out, modifiedReader) return err } // Build implements KubeClient Build. func (p *PrintingKubeClient) Build(ns string, reader io.Reader) (kube.Result, error) { return []*resource.Info{}, nil } // BuildUnstructured implements KubeClient BuildUnstructured. func (p *PrintingKubeClient) BuildUnstructured(ns string, reader io.Reader) (kube.Result, error) { return []*resource.Info{}, nil } // Validate implements KubeClient Validate func (p *PrintingKubeClient) Validate(ns string, reader io.Reader) error { return nil } // WaitAndGetCompletedPodPhase implements KubeClient WaitAndGetCompletedPodPhase. func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) { _, err := io.Copy(p.Out, reader) return v1.PodUnknown, err } // GetPodLogs implements KubeClient GetPodLogs. func (p *PrintingKubeClient) GetPodLogs(name, ns string) (io.ReadCloser, error) { return nil, nil } // WaitUntilCRDEstablished implements KubeClient WaitUntilCRDEstablished. func (p *PrintingKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { _, err := io.Copy(p.Out, reader) return err } // Environment provides the context for executing a client request. // // All services in a context are concurrency safe. type Environment struct { // EngineYard provides access to the known template engines. EngineYard EngineYard // Releases stores records of releases. Releases *storage.Storage // KubeClient is a Kubernetes API client. KubeClient KubeClient } // New returns an environment initialized with the defaults. func New() *Environment { e := engine.New() var ey EngineYard = map[string]Engine{ // Currently, the only template engine we support is the GoTpl one. But // we can easily add some here. GoTplEngine: e, } return &Environment{ EngineYard: ey, Releases: storage.Init(driver.NewMemory()), } }
{ "pile_set_name": "Github" }
#!/usr/bin/env python3 # # QAPI parser test harness # # Copyright (c) 2013 Red Hat Inc. # # Authors: # Markus Armbruster <armbru@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2 or later. # See the COPYING file in the top-level directory. # import argparse import difflib import os import sys from io import StringIO from qapi.error import QAPIError from qapi.schema import QAPISchema, QAPISchemaVisitor class QAPISchemaTestVisitor(QAPISchemaVisitor): def visit_module(self, name): print('module %s' % name) def visit_include(self, name, info): print('include %s' % name) def visit_enum_type(self, name, info, ifcond, features, members, prefix): print('enum %s' % name) if prefix: print(' prefix %s' % prefix) for m in members: print(' member %s' % m.name) self._print_if(m.ifcond, indent=8) self._print_if(ifcond) self._print_features(features) def visit_array_type(self, name, info, ifcond, element_type): if not info: return # suppress built-in arrays print('array %s %s' % (name, element_type.name)) self._print_if(ifcond) def visit_object_type(self, name, info, ifcond, features, base, members, variants): print('object %s' % name) if base: print(' base %s' % base.name) for m in members: print(' member %s: %s optional=%s' % (m.name, m.type.name, m.optional)) self._print_if(m.ifcond, 8) self._print_features(m.features, indent=8) self._print_variants(variants) self._print_if(ifcond) self._print_features(features) def visit_alternate_type(self, name, info, ifcond, features, variants): print('alternate %s' % name) self._print_variants(variants) self._print_if(ifcond) self._print_features(features) def visit_command(self, name, info, ifcond, features, arg_type, ret_type, gen, success_response, boxed, allow_oob, allow_preconfig): print('command %s %s -> %s' % (name, arg_type and arg_type.name, ret_type and ret_type.name)) print(' gen=%s success_response=%s boxed=%s oob=%s preconfig=%s' % (gen, success_response, boxed, allow_oob, allow_preconfig)) self._print_if(ifcond) self._print_features(features) def visit_event(self, name, info, ifcond, features, arg_type, boxed): print('event %s %s' % (name, arg_type and arg_type.name)) print(' boxed=%s' % boxed) self._print_if(ifcond) self._print_features(features) @staticmethod def _print_variants(variants): if variants: print(' tag %s' % variants.tag_member.name) for v in variants.variants: print(' case %s: %s' % (v.name, v.type.name)) QAPISchemaTestVisitor._print_if(v.ifcond, indent=8) @staticmethod def _print_if(ifcond, indent=4): if ifcond: print('%sif %s' % (' ' * indent, ifcond)) @classmethod def _print_features(cls, features, indent=4): if features: for f in features: print('%sfeature %s' % (' ' * indent, f.name)) cls._print_if(f.ifcond, indent + 4) def test_frontend(fname): schema = QAPISchema(fname) schema.visit(QAPISchemaTestVisitor()) for doc in schema.docs: if doc.symbol: print('doc symbol=%s' % doc.symbol) else: print('doc freeform') print(' body=\n%s' % doc.body.text) for arg, section in doc.args.items(): print(' arg=%s\n%s' % (arg, section.text)) for feat, section in doc.features.items(): print(' feature=%s\n%s' % (feat, section.text)) for section in doc.sections: print(' section=%s\n%s' % (section.name, section.text)) def test_and_diff(test_name, dir_name, update): sys.stdout = StringIO() try: test_frontend(os.path.join(dir_name, test_name + '.json')) except QAPIError as err: if err.info.fname is None: print("%s" % err, file=sys.stderr) return 2 errstr = str(err) + '\n' if dir_name: errstr = errstr.replace(dir_name + '/', '') actual_err = errstr.splitlines(True) else: actual_err = [] finally: actual_out = sys.stdout.getvalue().splitlines(True) sys.stdout.close() sys.stdout = sys.__stdout__ mode = 'r+' if update else 'r' try: outfp = open(os.path.join(dir_name, test_name + '.out'), mode) errfp = open(os.path.join(dir_name, test_name + '.err'), mode) expected_out = outfp.readlines() expected_err = errfp.readlines() except IOError as err: print("%s: can't open '%s': %s" % (sys.argv[0], err.filename, err.strerror), file=sys.stderr) return 2 if actual_out == expected_out and actual_err == expected_err: return 0 print("%s %s" % (test_name, 'UPDATE' if update else 'FAIL'), file=sys.stderr) out_diff = difflib.unified_diff(expected_out, actual_out, outfp.name) err_diff = difflib.unified_diff(expected_err, actual_err, errfp.name) sys.stdout.writelines(out_diff) sys.stdout.writelines(err_diff) if not update: return 1 try: outfp.truncate(0) outfp.seek(0) outfp.writelines(actual_out) errfp.truncate(0) errfp.seek(0) errfp.writelines(actual_err) except IOError as err: print("%s: can't write '%s': %s" % (sys.argv[0], err.filename, err.strerror), file=sys.stderr) return 2 return 0 def main(argv): parser = argparse.ArgumentParser( description='QAPI schema tester') parser.add_argument('-d', '--dir', action='store', default='', help="directory containing tests") parser.add_argument('-u', '--update', action='store_true', help="update expected test results") parser.add_argument('tests', nargs='*', metavar='TEST', action='store') args = parser.parse_args() status = 0 for t in args.tests: (dir_name, base_name) = os.path.split(t) dir_name = dir_name or args.dir test_name = os.path.splitext(base_name)[0] status |= test_and_diff(test_name, dir_name, args.update) exit(status) if __name__ == '__main__': main(sys.argv) exit(0)
{ "pile_set_name": "Github" }
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing class b: a { deinit { struct S<T: S<Int>
{ "pile_set_name": "Github" }
; RUN: llvm-as < %s | llvm-dis | grep byval %struct = type { } declare void @foo(...) define void @bar() { call void (...)* @foo(%struct* byval null ) ret void }
{ "pile_set_name": "Github" }
/* * This file is part of the UCB release of Plan 9. It is subject to the license * terms in the LICENSE file found in the top-level directory of this * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No * part of the UCB release of Plan 9, including this file, may be copied, * modified, propagated, or distributed except according to the terms contained * in the LICENSE file. */ #include <u.h> #include <lib9.h> #include <bio.h> #include "pci.h" #include "vga.h" /* * S3 Vision964 GUI Accelerator. */ static void snarf(Vga* vga, Ctlr* ctlr) { s3generic.snarf(vga, ctlr); vga->crt[0x22] = vgaxi(Crtx, 0x22); vga->crt[0x24] = vgaxi(Crtx, 0x24); vga->crt[0x26] = vgaxi(Crtx, 0x26); } static void options(Vga* vga, Ctlr* ctlr) { ctlr->flag |= Hlinear|Henhanced|Foptions; } static void init(Vga* vga, Ctlr* ctlr) { Mode *mode; uint32_t x; int sid, dbl, bpp, divide; char *val; if(vga->mode->z > 8) error("depth %d not supported\n", vga->mode->z); mode = vga->mode; if(vga->ramdac && (vga->ramdac->flag & Uclk2)){ resyncinit(vga, ctlr, Uenhanced, 0); vga->crt[0x00] = ((mode->ht/2)>>3)-5; vga->crt[0x01] = ((mode->x/2)>>3)-1; vga->crt[0x02] = ((mode->shb/2)>>3)-1; x = (mode->ehb/2)>>3; vga->crt[0x03] = 0x80|(x & 0x1F); vga->crt[0x04] = (mode->shs/2)>>3; vga->crt[0x05] = ((mode->ehs/2)>>3) & 0x1F; if(x & 0x20) vga->crt[0x05] |= 0x80; vga->crt[0x13] = mode->x/8; } else if(mode->z == 8) resyncinit(vga, ctlr, Uenhanced, 0); s3generic.init(vga, ctlr); /* if((ctlr->flag & Uenhanced) == 0) vga->crt[0x33] &= ~0x20; */ vga->crt[0x3B] = (vga->crt[0]+vga->crt[4]+1)/2; if(vga->crt[0x3B] & 0x100) vga->crt[0x5D] |= 0x40; vga->crt[0x55] = 0x00; vga->crt[0x40] &= ~0x10; vga->crt[0x53] &= ~0x20; vga->crt[0x58] &= ~0x48; if(dbattr(vga->attr, "sam512") == 0) vga->crt[0x58] |= 0x40; /* set 256 word SAM, always works */ vga->crt[0x65] = 0x00; vga->crt[0x66] &= ~0x07; vga->crt[0x6D] = 0x00; if(ctlr->flag & Uenhanced){ if(vga->ramdac && (vga->ramdac->flag & Hsid32)) sid = 32; else sid = 64; if(vga->ramdac && (vga->ramdac->flag & Uclk2)) dbl = 2; else dbl = 1; if(mode->z < 4) bpp = 4; else bpp = mode->z; divide = sid/(dbl*bpp); switch(divide){ case 2: vga->crt[0x66] |= 0x01; break; case 4: vga->crt[0x66] |= 0x02; break; case 8: vga->crt[0x66] |= 0x03; break; case 16: vga->crt[0x66] |= 0x04; break; case 32: vga->crt[0x66] |= 0x05; break; } vga->crt[0x40] |= 0x10; vga->crt[0x65] |= 0x02; if(vga->ramdac && (vga->ramdac->flag & Hsid32)) vga->crt[0x66] |= 0x10; /* * Some heuristics (what part of aux/vga isn't?) * to prevent some of the right border appearing * on the left edge of the screen. */ if(dbattr(vga->attr, "vclkphs")) vga->crt[0x67] |= 0x01; if(val = dbattr(vga->attr, "delaybl")) vga->crt[0x6D] |= strtoul(val, 0, 0) & 0x07; else if(mode->x > 1024) vga->crt[0x6D] |= 0x01; else vga->crt[0x6D] |= 0x03; if(val = dbattr(vga->attr, "delaysc")) vga->crt[0x6D] |= (strtoul(val, 0, 0) & 0x07)<<4; } } static void load(Vga* vga, Ctlr* ctlr) { uint16_t advfunc; s3generic.load(vga, ctlr); vgaxo(Crtx, 0x65, vga->crt[0x65]); vgaxo(Crtx, 0x66, vga->crt[0x66]); vgaxo(Crtx, 0x6D, vga->crt[0x6D]); advfunc = 0x0000; if(ctlr->flag & Uenhanced) advfunc = 0x0001; outportw(0x4AE8, advfunc); } static void dump(Vga* vga, Ctlr* ctlr) { s3generic.dump(vga, ctlr); printitem(ctlr->name, "Crt22"); printreg(vga->crt[0x22]); printitem(ctlr->name, "Crt24"); printreg(vga->crt[0x24]); printitem(ctlr->name, "Crt26"); printreg(vga->crt[0x26]); } Ctlr vision964 = { "vision964", /* name */ snarf, /* snarf */ options, /* options */ init, /* init */ load, /* load */ dump, /* dump */ };
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0+ */ /* * Driver for USB Mass Storage compliant devices * Unusual Devices File * * Current development and maintenance by: * (c) 2000-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net) * * Initial work by: * (c) 2000 Adam J. Richter (adam@yggdrasil.com), Yggdrasil Computing, Inc. */ /* * IMPORTANT NOTE: This file must be included in another file which does * the following thing for it to work: * The UNUSUAL_DEV, COMPLIANT_DEV, and USUAL_DEV macros must be defined * before this file is included. */ /* * If you edit this file, please try to keep it sorted first by VendorID, * then by ProductID. * * If you want to add an entry for this file, be sure to include the * following information: * - a patch that adds the entry for your device, including your * email address right above the entry (plus maybe a brief * explanation of the reason for the entry), * - a copy of /sys/kernel/debug/usb/devices with your device plugged in * running with this patch. * Send your submission to the USB development list <linux-usb@vger.kernel.org> */ /* * Note: If you add an entry only in order to set the CAPACITY_OK flag, * use the COMPLIANT_DEV macro instead of UNUSUAL_DEV. This is * because such entries mark devices which actually work correctly, * as opposed to devices that do something strangely or wrongly. */ /* * In-kernel mode switching is deprecated. Do not add new devices to * this list for the sole purpose of switching them to a different * mode. Existing userspace solutions are superior. * * New mode switching devices should instead be added to the database * maintained at https://www.draisberghof.de/usb_modeswitch/ */ #if !defined(CONFIG_USB_STORAGE_SDDR09) && \ !defined(CONFIG_USB_STORAGE_SDDR09_MODULE) #define NO_SDDR09 #endif /* patch submitted by Vivian Bregier <Vivian.Bregier@imag.fr> */ UNUSUAL_DEV( 0x03eb, 0x2002, 0x0100, 0x0100, "ATMEL", "SND1 Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE), /* Reported by Rodolfo Quesada <rquesada@roqz.net> */ UNUSUAL_DEV( 0x03ee, 0x6906, 0x0003, 0x0003, "VIA Technologies Inc.", "Mitsumi multi cardreader", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), UNUSUAL_DEV( 0x03f0, 0x0107, 0x0200, 0x0200, "HP", "CD-Writer+", USB_SC_8070, USB_PR_CB, NULL, 0), /* Reported by Ben Efros <ben@pc-doctor.com> */ UNUSUAL_DEV( 0x03f0, 0x070c, 0x0000, 0x0000, "HP", "Personal Media Drive", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE ), /* * Reported by Grant Grundler <grundler@parisc-linux.org> * HP r707 camera in "Disk" mode with 2.00.23 or 2.00.24 firmware. */ UNUSUAL_DEV( 0x03f0, 0x4002, 0x0001, 0x0001, "HP", "PhotoSmart R707", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), UNUSUAL_DEV( 0x03f3, 0x0001, 0x0000, 0x9999, "Adaptec", "USBConnect 2000", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), /* * Reported by Sebastian Kapfer <sebastian_kapfer@gmx.net> * and Olaf Hering <olh@suse.de> (different bcd's, same vendor/product) * for USB floppies that need the SINGLE_LUN enforcement. */ UNUSUAL_DEV( 0x0409, 0x0040, 0x0000, 0x9999, "NEC", "NEC USB UF000x", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Patch submitted by Mihnea-Costin Grigore <mihnea@zulu.ro> */ UNUSUAL_DEV( 0x040d, 0x6205, 0x0003, 0x0003, "VIA Technologies Inc.", "USB 2.0 Card Reader", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Deduced by Jonathan Woithe <jwoithe@just42.net> * Entry needed for flags: US_FL_FIX_INQUIRY because initial inquiry message * always fails and confuses drive. */ UNUSUAL_DEV( 0x0411, 0x001c, 0x0113, 0x0113, "Buffalo", "DUB-P40G HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Submitted by Ernestas Vaiciukevicius <ernisv@gmail.com> */ UNUSUAL_DEV( 0x0419, 0x0100, 0x0100, 0x0100, "Samsung Info. Systems America, Inc.", "MP3 Player", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Orgad Shaneh <orgads@gmail.com> */ UNUSUAL_DEV( 0x0419, 0xaace, 0x0100, 0x0100, "Samsung", "MP3 Player", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Christian Leber <christian@leber.de> */ UNUSUAL_DEV( 0x0419, 0xaaf5, 0x0100, 0x0100, "TrekStor", "i.Beat 115 2.0", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_NOT_LOCKABLE ), /* Reported by Stefan Werner <dustbln@gmx.de> */ UNUSUAL_DEV( 0x0419, 0xaaf6, 0x0100, 0x0100, "TrekStor", "i.Beat Joy 2.0", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Pete Zaitcev <zaitcev@redhat.com>, bz#176584 */ UNUSUAL_DEV( 0x0420, 0x0001, 0x0100, 0x0100, "GENERIC", "MP3 PLAYER", /* MyMusix PD-205 on the outside. */ USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Reported by Andrew Nayenko <relan@bk.ru> * Updated for new firmware by Phillip Potter <phil@philpotter.co.uk> */ UNUSUAL_DEV( 0x0421, 0x0019, 0x0592, 0x0610, "Nokia", "Nokia 6288", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Mario Rettig <mariorettig@web.de> */ UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100, "Nokia", "Nokia 3250", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by <honkkis@gmail.com> */ UNUSUAL_DEV( 0x0421, 0x0433, 0x0100, 0x0100, "Nokia", "E70", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Jon Hart <Jon.Hart@web.de> */ UNUSUAL_DEV( 0x0421, 0x0434, 0x0100, 0x0100, "Nokia", "E60", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), /* * Reported by Sumedha Swamy <sumedhaswamy@gmail.com> and * Einar Th. Einarsson <einarthered@gmail.com> */ UNUSUAL_DEV( 0x0421, 0x0444, 0x0100, 0x0100, "Nokia", "N91", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* * Reported by Jiri Slaby <jirislaby@gmail.com> and * Rene C. Castberg <Rene@Castberg.org> */ UNUSUAL_DEV( 0x0421, 0x0446, 0x0100, 0x0100, "Nokia", "N80", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Matthew Bloch <matthew@bytemark.co.uk> */ UNUSUAL_DEV( 0x0421, 0x044e, 0x0100, 0x0100, "Nokia", "E61", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Bardur Arantsson <bardur@scientician.net> */ UNUSUAL_DEV( 0x0421, 0x047c, 0x0370, 0x0610, "Nokia", "6131", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Manuel Osdoba <manuel.osdoba@tu-ilmenau.de> */ UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x9999, "Nokia", "Nokia 6233", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Alex Corcoles <alex@corcoles.net> */ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x0370, "Nokia", "6234", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Daniele Forsi <dforsi@gmail.com> */ UNUSUAL_DEV( 0x0421, 0x04b9, 0x0350, 0x0350, "Nokia", "5300", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Patch submitted by Victor A. Santos <victoraur.santos@gmail.com> */ UNUSUAL_DEV( 0x0421, 0x05af, 0x0742, 0x0742, "Nokia", "305", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64), /* Patch submitted by Mikhail Zolotaryov <lebon@lebon.org.ua> */ UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110, "Nokia", "502", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), #ifdef NO_SDDR09 UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100, "Microtech", "CameraMate", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), #endif /* * Patch submitted by Daniel Drake <dsd@gentoo.org> * Device reports nonsense bInterfaceProtocol 6 when connected over USB2 */ UNUSUAL_DEV( 0x0451, 0x5416, 0x0100, 0x0100, "Neuros Audio", "USB 2.0 HD 2.5", USB_SC_DEVICE, USB_PR_BULK, NULL, US_FL_NEED_OVERRIDE ), /* * Pete Zaitcev <zaitcev@yahoo.com>, from Patrick C. F. Ernzer, bz#162559. * The key does not actually break, but it returns zero sense which * makes our SCSI stack to print confusing messages. */ UNUSUAL_DEV( 0x0457, 0x0150, 0x0100, 0x0100, "USBest Technology", /* sold by Transcend */ "USB Mass Storage Device", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* * Bohdan Linda <bohdan.linda@gmail.com> * 1GB USB sticks MyFlash High Speed. I have restricted * the revision to my model only */ UNUSUAL_DEV( 0x0457, 0x0151, 0x0100, 0x0100, "USB 2.0", "Flash Disk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* * Reported by Tamas Kerecsen <kerecsen@bigfoot.com> * Obviously the PROM has not been customized by the VAR; * the Vendor and Product string descriptors are: * Generic Mass Storage (PROTOTYPE--Remember to change idVendor) * Generic Manufacturer (PROTOTYPE--Remember to change idVendor) */ UNUSUAL_DEV( 0x045e, 0xffff, 0x0000, 0x0000, "Mitac", "GPS", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.) * Reported by Pete Zaitcev <zaitcev@redhat.com> * This device chokes on both version of MODE SENSE which we have, so * use_10_for_ms is not effective, and we use US_FL_NO_WP_DETECT. */ UNUSUAL_DEV( 0x046b, 0xff40, 0x0100, 0x0100, "AMI", "Virtual Floppy", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT), /* Reported by Egbert Eich <eich@suse.com> */ UNUSUAL_DEV( 0x0480, 0xd010, 0x0100, 0x9999, "Toshiba", "External USB 3.0", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_ALWAYS_SYNC), /* Patch submitted by Philipp Friedrich <philipp@void.at> */ UNUSUAL_DEV( 0x0482, 0x0100, 0x0100, 0x0100, "Kyocera", "Finecam S3x", USB_SC_8070, USB_PR_CB, NULL, US_FL_FIX_INQUIRY), /* Patch submitted by Philipp Friedrich <philipp@void.at> */ UNUSUAL_DEV( 0x0482, 0x0101, 0x0100, 0x0100, "Kyocera", "Finecam S4", USB_SC_8070, USB_PR_CB, NULL, US_FL_FIX_INQUIRY), /* Patch submitted by Stephane Galles <stephane.galles@free.fr> */ UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x0100, "Kyocera", "Finecam S5", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), /* Patch submitted by Jens Taprogge <jens.taprogge@taprogge.org> */ UNUSUAL_DEV( 0x0482, 0x0107, 0x0100, 0x0100, "Kyocera", "CONTAX SL300R T*", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE), /* * Reported by Paul Stewart <stewart@wetlogic.net> * This entry is needed because the device reports Sub=ff */ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, "Hitachi", "DVD-CAM DZ-MV100A Camcorder", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), /* * BENQ DC5330 * Reported by Manuel Fombuena <mfombuena@ya.com> and * Frank Copeland <fjc@thingy.apana.org.au> */ UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Patch for Nikon coolpix 2000 * Submitted by Fabien Cosse <fabien.cosse@wanadoo.fr> */ UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010, "NIKON", "NIKON DSC E2000", USB_SC_DEVICE, USB_PR_DEVICE,NULL, US_FL_NOT_LOCKABLE ), /* Reported by Doug Maxey (dwm@austin.ibm.com) */ UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, "IBM", "IBM RSA2", USB_SC_DEVICE, USB_PR_CB, NULL, US_FL_MAX_SECTORS_MIN), /* * Reported by Simon Levitt <simon@whattf.com> * This entry needs Sub and Proto fields */ UNUSUAL_DEV( 0x04b8, 0x0601, 0x0100, 0x0100, "Epson", "875DC Storage", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_FIX_INQUIRY), /* * Reported by Khalid Aziz <khalid@gonehiking.org> * This entry is needed because the device reports Sub=ff */ UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110, "Epson", "785EPX Storage", USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN), /* * Not sure who reported this originally but * Pavel Machek <pavel@ucw.cz> reported that the extra US_FL_SINGLE_LUN * flag be added */ UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210, "Fujifilm", "FinePix 1400Zoom", USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), /* * Reported by Ondrej Zary <linux@rainbow-software.org> * The device reports one sector more and breaks when that sector is accessed */ UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, "ScanLogic", "SL11R-IDE", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* * Reported by Kriston Fincher <kriston@airmail.net> * Patch submitted by Sean Millichamp <sean@bruenor.org> * This is to support the Panasonic PalmCam PV-SD4090 * This entry is needed because the device reports Sub=ff */ UNUSUAL_DEV( 0x04da, 0x0901, 0x0100, 0x0200, "Panasonic", "LS-120 Camera", USB_SC_UFI, USB_PR_DEVICE, NULL, 0), /* * From Yukihiro Nakai, via zaitcev@yahoo.com. * This is needed for CB instead of CBI */ UNUSUAL_DEV( 0x04da, 0x0d05, 0x0000, 0x0000, "Sharp CE-CW05", "CD-R/RW Drive", USB_SC_8070, USB_PR_CB, NULL, 0), /* Reported by Adriaan Penning <a.penning@luon.net> */ UNUSUAL_DEV( 0x04da, 0x2372, 0x0000, 0x9999, "Panasonic", "DMC-LCx Camera", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ), /* Reported by Simeon Simeonov <simeonov_2000@yahoo.com> */ UNUSUAL_DEV( 0x04da, 0x2373, 0x0000, 0x9999, "LEICA", "D-LUX Camera", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ), /* * Most of the following entries were developed with the help of * Shuttle/SCM directly. */ UNUSUAL_DEV( 0x04e6, 0x0001, 0x0200, 0x0200, "Matshita", "LS-120", USB_SC_8020, USB_PR_CB, NULL, 0), UNUSUAL_DEV( 0x04e6, 0x0002, 0x0100, 0x0100, "Shuttle", "eUSCSI Bridge", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), #ifdef NO_SDDR09 UNUSUAL_DEV( 0x04e6, 0x0005, 0x0100, 0x0208, "SCM Microsystems", "eUSB CompactFlash Adapter", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), #endif /* Reported by Markus Demleitner <msdemlei@cl.uni-heidelberg.de> */ UNUSUAL_DEV( 0x04e6, 0x0006, 0x0100, 0x0100, "SCM Microsystems Inc.", "eUSB MMC Adapter", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), /* Reported by Daniel Nouri <dpunktnpunkt@web.de> */ UNUSUAL_DEV( 0x04e6, 0x0006, 0x0205, 0x0205, "Shuttle", "eUSB MMC Adapter", USB_SC_SCSI, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN), UNUSUAL_DEV( 0x04e6, 0x0007, 0x0100, 0x0200, "Sony", "Hifd", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), UNUSUAL_DEV( 0x04e6, 0x0009, 0x0200, 0x0200, "Shuttle", "eUSB ATA/ATAPI Adapter", USB_SC_8020, USB_PR_CB, NULL, 0), UNUSUAL_DEV( 0x04e6, 0x000a, 0x0200, 0x0200, "Shuttle", "eUSB CompactFlash Adapter", USB_SC_8020, USB_PR_CB, NULL, 0), UNUSUAL_DEV( 0x04e6, 0x000b, 0x0100, 0x0100, "Shuttle", "eUSCSI Bridge", USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x04e6, 0x000c, 0x0100, 0x0100, "Shuttle", "eUSCSI Bridge", USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x04e6, 0x000f, 0x0000, 0x9999, "SCM Microsystems", "eUSB SCSI Adapter (Bus Powered)", USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x04e6, 0x0101, 0x0200, 0x0200, "Shuttle", "CD-RW Device", USB_SC_8020, USB_PR_CB, NULL, 0), /* Reported by Dmitry Khlystov <adminimus@gmail.com> */ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x0220, "Samsung", "YP-U3", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64), /* Reported by Vitaly Kuznetsov <vitty@altlinux.ru> */ UNUSUAL_DEV( 0x04e8, 0x5122, 0x0000, 0x9999, "Samsung", "YP-CP3", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 | US_FL_BULK_IGNORE_TAG), /* Added by Dmitry Artamonow <mad_soft@inbox.ru> */ UNUSUAL_DEV( 0x04e8, 0x5136, 0x0000, 0x9999, "Samsung", "YP-Z3", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64), /* * Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. * Device uses standards-violating 32-byte Bulk Command Block Wrappers and * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011. */ UNUSUAL_DEV( 0x04fc, 0x80c2, 0x0100, 0x0100, "Kobian Mercury", "Binocam DCB-132", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BULK32), /* Reported by Bob Sass <rls@vectordb.com> -- only rev 1.33 tested */ UNUSUAL_DEV( 0x050d, 0x0115, 0x0133, 0x0133, "Belkin", "USB SCSI Adaptor", USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), /* * Iomega Clik! Drive * Reported by David Chatenay <dchatenay@hotmail.com> * The reason this is needed is not fully known. */ UNUSUAL_DEV( 0x0525, 0xa140, 0x0100, 0x0100, "Iomega", "USB Clik! 40", USB_SC_8070, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Added by Alan Stern <stern@rowland.harvard.edu> */ COMPLIANT_DEV(0x0525, 0xa4a5, 0x0000, 0x9999, "Linux", "File-backed Storage Gadget", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_CAPACITY_OK ), /* * Yakumo Mega Image 37 * Submitted by Stephan Fuhrmann <atomenergie@t-online.de> */ UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Another Yakumo camera. * Reported by Michele Alzetta <michele.alzetta@aliceposta.it> */ UNUSUAL_DEV( 0x052b, 0x1804, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Iacopo Spalletti <avvisi@spalletti.it> */ UNUSUAL_DEV( 0x052b, 0x1807, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Yakumo Mega Image 47 * Reported by Bjoern Paetzel <kolrabi@kolrabi.de> */ UNUSUAL_DEV( 0x052b, 0x1905, 0x0100, 0x0100, "Tekom Technologies, Inc", "400_CAMERA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Reported by Paul Ortyl <ortylp@3miasto.net> * Note that it's similar to the device above, only different prodID */ UNUSUAL_DEV( 0x052b, 0x1911, 0x0100, 0x0100, "Tekom Technologies, Inc", "400_CAMERA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450, "Sony", "DSC-S30/S70/S75/505V/F505/F707/F717/P8", USB_SC_SCSI, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ), /* * Submitted by Lars Jacob <jacob.lars@googlemail.com> * This entry is needed because the device reports Sub=ff */ UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0610, "Sony", "DSC-T1/T5/H5", USB_SC_8070, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Reported by wim@geeks.nl */ UNUSUAL_DEV( 0x054c, 0x0025, 0x0100, 0x0100, "Sony", "Memorystick NW-MS7", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Olaf Hering, <olh@suse.de> SuSE Bugzilla #49049 */ UNUSUAL_DEV( 0x054c, 0x002c, 0x0501, 0x2000, "Sony", "USB Floppy Drive", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), UNUSUAL_DEV( 0x054c, 0x002d, 0x0100, 0x0100, "Sony", "Memorystick MSAC-US1", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Klaus Mueller <k.mueller@intershop.de> */ UNUSUAL_DEV( 0x054c, 0x002e, 0x0106, 0x0310, "Sony", "Handycam", USB_SC_SCSI, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Rajesh Kumble Nayak <nayak@obs-nice.fr> */ UNUSUAL_DEV( 0x054c, 0x002e, 0x0500, 0x0500, "Sony", "Handycam HC-85", USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), UNUSUAL_DEV( 0x054c, 0x0032, 0x0000, 0x9999, "Sony", "Memorystick MSC-U01N", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Michal Mlotek <mlotek@foobar.pl> */ UNUSUAL_DEV( 0x054c, 0x0058, 0x0000, 0x9999, "Sony", "PEG N760c Memorystick", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), UNUSUAL_DEV( 0x054c, 0x0069, 0x0000, 0x9999, "Sony", "Memorystick MSC-U03", USB_SC_UFI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), /* Submitted by Nathan Babb <nathan@lexi.com> */ UNUSUAL_DEV( 0x054c, 0x006d, 0x0000, 0x9999, "Sony", "PEG Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Submitted by Frank Engel <frankie@cse.unsw.edu.au> */ UNUSUAL_DEV( 0x054c, 0x0099, 0x0000, 0x9999, "Sony", "PEG Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Submitted by Mike Alborn <malborn@deandra.homeip.net> */ UNUSUAL_DEV( 0x054c, 0x016a, 0x0000, 0x9999, "Sony", "PEG Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Submitted by Ren Bigcren <bigcren.ren@sonymobile.com> */ UNUSUAL_DEV( 0x054c, 0x02a5, 0x0100, 0x0100, "Sony Corp.", "MicroVault Flash Drive", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_READ_CAPACITY_16 ), /* floppy reports multiple luns */ UNUSUAL_DEV( 0x055d, 0x2020, 0x0000, 0x0210, "SAMSUNG", "SFD-321U [FW 0C]", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* We keep this entry to force the transport; firmware 3.00 and later is ok. */ UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299, "Y-E Data", "Flashbuster-U", USB_SC_DEVICE, USB_PR_CB, NULL, US_FL_SINGLE_LUN), /* * Reported by Johann Cardon <johann.cardon@free.fr> * This entry is needed only because the device reports * bInterfaceClass = 0xff (vendor-specific) */ UNUSUAL_DEV( 0x057b, 0x0022, 0x0000, 0x9999, "Y-E Data", "Silicon Media R/W", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0), /* Reported by RTE <raszilki@yandex.ru> */ UNUSUAL_DEV( 0x058f, 0x6387, 0x0141, 0x0141, "JetFlash", "TS1GJF2A/120", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Fabrizio Fellini <fello@libero.it> */ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, "Fujifilm", "Digital Camera EX-20 DSC", USB_SC_8070, USB_PR_DEVICE, NULL, 0 ), /* * Reported by Andre Welter <a.r.welter@gmx.de> * This antique device predates the release of the Bulk-only Transport * spec, and if it gets a Get-Max-LUN then it requires the host to do a * Clear-Halt on the bulk endpoints. The SINGLE_LUN flag will prevent * us from sending the request. */ UNUSUAL_DEV( 0x059b, 0x0001, 0x0100, 0x0100, "Iomega", "ZIP 100", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), UNUSUAL_DEV( 0x059b, 0x0040, 0x0100, 0x0100, "Iomega", "Jaz USB Adapter", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Reported by <Hendryk.Pfeiffer@gmx.de> */ UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000, "LaCie", "DVD+-RW", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW ), /* Reported by Christian Schaller <cschalle@redhat.com> */ UNUSUAL_DEV( 0x059f, 0x0651, 0x0000, 0x0000, "LaCie", "External HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT ), /* * Submitted by Joel Bourquard <numlock@freesurf.ch> * Some versions of this device need the SubClass and Protocol overrides * while others don't. */ UNUSUAL_DEV( 0x05ab, 0x0060, 0x1104, 0x1110, "In-System", "PyroGate External CD-ROM Enclosure (FCD-523)", USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_NEED_OVERRIDE ), /* * Submitted by Sven Anderson <sven-linux@anderson.de> * There are at least four ProductIDs used for iPods, so I added 0x1202 and * 0x1204. They just need the US_FL_FIX_CAPACITY. As the bcdDevice appears * to change with firmware updates, I changed the range to maximum for all * iPod entries. */ UNUSUAL_DEV( 0x05ac, 0x1202, 0x0000, 0x9999, "Apple", "iPod", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* Reported by Avi Kivity <avi@argo.co.il> */ UNUSUAL_DEV( 0x05ac, 0x1203, 0x0000, 0x9999, "Apple", "iPod", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), UNUSUAL_DEV( 0x05ac, 0x1204, 0x0000, 0x9999, "Apple", "iPod", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ), UNUSUAL_DEV( 0x05ac, 0x1205, 0x0000, 0x9999, "Apple", "iPod", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* * Reported by Tyson Vinson <lornoss@gmail.com> * This particular productId is the iPod Nano */ UNUSUAL_DEV( 0x05ac, 0x120a, 0x0000, 0x9999, "Apple", "iPod", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* * Reported by Dan Williams <dcbw@redhat.com> * Option N.V. mobile broadband modems * Ignore driver CD mode and force into modem mode by default. */ /* Globetrotter HSDPA; mass storage shows up as Qualcomm for vendor */ UNUSUAL_DEV( 0x05c6, 0x1000, 0x0000, 0x9999, "Option N.V.", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, 0), /* Reported by Blake Matheny <bmatheny@purdue.edu> */ UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113, "Lexar", "USB CF Reader", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* * The following two entries are for a Genesys USB to IDE * converter chip, but it changes its ProductId depending * on whether or not a disk or an optical device is enclosed * They were originally reported by Alexander Oltu * <alexander@all-2.com> and Peter Marks <peter.marks@turner.com> * respectively. * * US_FL_GO_SLOW and US_FL_MAX_SECTORS_64 added by Phil Dibowitz * <phil@ipom.com> as these flags were made and hard-coded * special-cases were pulled from scsiglue.c. */ UNUSUAL_DEV( 0x05e3, 0x0701, 0x0000, 0xffff, "Genesys Logic", "USB to IDE Optical", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 | US_FL_IGNORE_RESIDUE ), UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0xffff, "Genesys Logic", "USB to IDE Disk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 | US_FL_IGNORE_RESIDUE ), /* Reported by Ben Efros <ben@pc-doctor.com> */ UNUSUAL_DEV( 0x05e3, 0x0723, 0x9451, 0x9451, "Genesys Logic", "USB to SATA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE ), /* * Reported by Hanno Boeck <hanno@gmx.de> * Taken from the Lycoris Kernel */ UNUSUAL_DEV( 0x0636, 0x0003, 0x0000, 0x9999, "Vivitar", "Vivicam 35Xx", USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_FIX_INQUIRY ), UNUSUAL_DEV( 0x0644, 0x0000, 0x0100, 0x0100, "TEAC", "Floppy Drive", USB_SC_UFI, USB_PR_CB, NULL, 0 ), /* Reported by Darsen Lu <darsen@micro.ee.nthu.edu.tw> */ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, "SigmaTel", "USBMSC Audio Player", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* Reported by Daniel Kukula <daniel.kuku@gmail.com> */ UNUSUAL_DEV( 0x067b, 0x1063, 0x0100, 0x0100, "Prolific Technology, Inc.", "Prolific Storage Gadget", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BAD_SENSE ), /* Reported by Rogerio Brito <rbrito@ime.usp.br> */ UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001, "Prolific Technology, Inc.", "Mass Storage Device", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ /* * Change to bcdDeviceMin (0x0100 to 0x0001) reported by * Thomas Bartosik <tbartdev@gmx-topmail.de> */ UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100, "Prolific Technology Inc.", "Mass Storage Device", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_GO_SLOW ), /* Reported by Alex Butcher <alex.butcher@assursys.co.uk> */ UNUSUAL_DEV( 0x067b, 0x3507, 0x0001, 0x0101, "Prolific Technology Inc.", "ATAPI-6 Bridge Controller", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_GO_SLOW ), /* Submitted by Benny Sjostrand <benny@hostmobility.com> */ UNUSUAL_DEV( 0x0686, 0x4011, 0x0001, 0x0001, "Minolta", "Dimage F300", USB_SC_SCSI, USB_PR_BULK, NULL, 0 ), /* Reported by Miguel A. Fosas <amn3s1a@ono.com> */ UNUSUAL_DEV( 0x0686, 0x4017, 0x0001, 0x0001, "Minolta", "DIMAGE E223", USB_SC_SCSI, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0693, 0x0005, 0x0100, 0x0100, "Hagiwara", "Flashgate", USB_SC_SCSI, USB_PR_BULK, NULL, 0 ), /* Reported by David Hamilton <niftimusmaximus@lycos.com> */ UNUSUAL_DEV( 0x069b, 0x3004, 0x0001, 0x0001, "Thomson Multimedia Inc.", "RCA RD1080 MP3 Player", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), UNUSUAL_DEV( 0x06ca, 0x2003, 0x0100, 0x0100, "Newer Technology", "uSCSI", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), /* Reported by Adrian Pilchowiec <adi1981@epf.pl> */ UNUSUAL_DEV( 0x071b, 0x3203, 0x0000, 0x0000, "RockChip", "MP3", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64 | US_FL_NO_READ_CAPACITY_16), /* * Reported by Jean-Baptiste Onofre <jb@nanthrax.net> * Support the following product : * "Dane-Elec MediaTouch" */ UNUSUAL_DEV( 0x071b, 0x32bb, 0x0000, 0x0000, "RockChip", "MTP", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64), /* * Reported by Massimiliano Ghilardi <massimiliano.ghilardi@gmail.com> * This USB MP3/AVI player device fails and disconnects if more than 128 * sectors (64kB) are read/written in a single command, and may be present * at least in the following products: * "Magnex Digital Video Panel DVP 1800" * "MP4 AIGO 4GB SLOT SD" * "Teclast TL-C260 MP3" * "i.Meizu PMP MP3/MP4" * "Speed MV8 MP4 Audio Player" */ UNUSUAL_DEV( 0x071b, 0x3203, 0x0100, 0x0100, "RockChip", "ROCK MP3", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64), /* Reported by Olivier Blondeau <zeitoun@gmail.com> */ UNUSUAL_DEV( 0x0727, 0x0306, 0x0100, 0x0100, "ATMEL", "SND1 Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE), /* Submitted by Roman Hodek <roman@hodek.net> */ UNUSUAL_DEV( 0x0781, 0x0001, 0x0200, 0x0200, "Sandisk", "ImageMate SDDR-05a", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), UNUSUAL_DEV( 0x0781, 0x0002, 0x0009, 0x0009, "SanDisk Corporation", "ImageMate CompactFlash USB", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), UNUSUAL_DEV( 0x0781, 0x0100, 0x0100, 0x0100, "Sandisk", "ImageMate SDDR-12", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), /* Reported by Eero Volotinen <eero@ping-viini.org> */ UNUSUAL_DEV( 0x07ab, 0xfccd, 0x0000, 0x9999, "Freecom Technologies", "FHD-Classic", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), UNUSUAL_DEV( 0x07af, 0x0004, 0x0100, 0x0133, "Microtech", "USB-SCSI-DB25", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x0100, "Microtech", "USB-SCSI-HD50", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), #ifdef NO_SDDR09 UNUSUAL_DEV( 0x07af, 0x0006, 0x0100, 0x0100, "Microtech", "CameraMate", USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), #endif /* * Datafab KECF-USB / Sagatek DCS-CF / Simpletech Flashlink UCF-100 * Only revision 1.13 tested (same for all of the above devices, * based on the Datafab DF-UG-07 chip). Needed for US_FL_FIX_INQUIRY. * Submitted by Marek Michalkiewicz <marekm@amelek.gda.pl>. * See also http://martin.wilck.bei.t-online.de/#kecf . */ UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff, "Datafab", "KECF-USB", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY ), /* * Reported by Rauch Wolke <rauchwolke@gmx.net> * and augmented by binbin <binbinsh@gmail.com> (Bugzilla #12882) */ UNUSUAL_DEV( 0x07c4, 0xa4a5, 0x0000, 0xffff, "Simple Tech/Datafab", "CF+SM Reader", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_MAX_SECTORS_64 ), /* * Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant * to the USB storage specification in two ways: * - They tell us they are using transport protocol CBI. In reality they * are using transport protocol CB. * - They don't like the INQUIRY command. So we must handle this command * of the SCSI layer ourselves. * - Some cameras with idProduct=0x1001 and bcdDevice=0x1000 have * bInterfaceProtocol=0x00 (USB_PR_CBI) while others have 0x01 (USB_PR_CB). * So don't remove the USB_PR_CB override! * - Cameras with bcdDevice=0x9009 require the USB_SC_8070 override. */ UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9999, "Casio", "QV DigitalCamera", USB_SC_8070, USB_PR_CB, NULL, US_FL_NEED_OVERRIDE | US_FL_FIX_INQUIRY ), /* Submitted by Oleksandr Chumachenko <ledest@gmail.com> */ UNUSUAL_DEV( 0x07cf, 0x1167, 0x0100, 0x0100, "Casio", "EX-N1 DigitalCamera", USB_SC_8070, USB_PR_DEVICE, NULL, 0), /* Submitted by Hartmut Wahl <hwahl@hwahl.de>*/ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001, "Samsung", "Digimax 410", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), /* Reported by Luciano Rocha <luciano@eurotux.com> */ UNUSUAL_DEV( 0x0840, 0x0082, 0x0001, 0x0001, "Argosy", "Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Reported and patched by Nguyen Anh Quynh <aquynh@gmail.com> */ UNUSUAL_DEV( 0x0840, 0x0084, 0x0001, 0x0001, "Argosy", "Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Reported by Martijn Hijdra <martijn.hijdra@gmail.com> */ UNUSUAL_DEV( 0x0840, 0x0085, 0x0001, 0x0001, "Argosy", "Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Supplied with some Castlewood ORB removable drives */ UNUSUAL_DEV( 0x084b, 0xa001, 0x0000, 0x9999, "Castlewood Systems", "USB to SCSI cable", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), /* * Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. * Flag will support Bulk devices which use a standards-violating 32-byte * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with * Grandtech GT892x chip, which request "Proprietary SCSI Bulk" support. */ UNUSUAL_DEV( 0x084d, 0x0011, 0x0110, 0x0110, "Grandtech", "DC2MEGA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BULK32), /* * Reported by <ttkspam@free.fr> * The device reports a vendor-specific device class, requiring an * explicit vendor/product match. */ UNUSUAL_DEV( 0x0851, 0x1542, 0x0002, 0x0002, "MagicPixel", "FW_Omega2", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0), /* * Andrew Lunn <andrew@lunn.ch> * PanDigital Digital Picture Frame. Does not like ALLOW_MEDIUM_REMOVAL * on LUN 4. * Note: Vend:Prod clash with "Ltd Maxell WS30 Slim Digital Camera" */ UNUSUAL_DEV( 0x0851, 0x1543, 0x0200, 0x0200, "PanDigital", "Photo Frame", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE), UNUSUAL_DEV( 0x085a, 0x0026, 0x0100, 0x0133, "Xircom", "PortGear USB-SCSI (Mac USB Dock)", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x085a, 0x0028, 0x0100, 0x0133, "Xircom", "PortGear USB to SCSI Converter", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), /* Submitted by Jan De Luyck <lkml@kcore.org> */ UNUSUAL_DEV( 0x08bd, 0x1100, 0x0000, 0x0000, "CITIZEN", "X1DE-USB", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN), /* * Submitted by Dylan Taft <d13f00l@gmail.com> * US_FL_IGNORE_RESIDUE Needed */ UNUSUAL_DEV( 0x08ca, 0x3103, 0x0100, 0x0100, "AIPTEK", "Aiptek USB Keychain MP3 Player", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE), /* * Entry needed for flags. Moreover, all devices with this ID use * bulk-only transport, but _some_ falsely report Control/Bulk instead. * One example is "Trumpion Digital Research MYMP3". * Submitted by Bjoern Brill <brill(at)fs.math.uni-frankfurt.de> */ UNUSUAL_DEV( 0x090a, 0x1001, 0x0100, 0x0100, "Trumpion", "t33520 USB Flash Card Controller", USB_SC_DEVICE, USB_PR_BULK, NULL, US_FL_NEED_OVERRIDE ), /* * Reported by Filippo Bardelli <filibard@libero.it> * The device reports a subclass of RBC, which is wrong. */ UNUSUAL_DEV( 0x090a, 0x1050, 0x0100, 0x0100, "Trumpion Microelectronics, Inc.", "33520 USB Digital Voice Recorder", USB_SC_UFI, USB_PR_DEVICE, NULL, 0), /* Trumpion Microelectronics MP3 player (felipe_alfaro@linuxmail.org) */ UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9999, "Trumpion", "MP3 player", USB_SC_RBC, USB_PR_BULK, NULL, 0 ), UNUSUAL_DEV(0x090c, 0x1000, 0x1100, 0x1100, "Samsung", "Flash Drive FIT", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64), /* aeb */ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, "Feiya", "5-in-1 Card Reader", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* * Reported by Icenowy Zheng <icenowy@aosc.io> * The SMI SM3350 USB-UFS bridge controller will enter a wrong state * that do not process read/write command if a long sense is requested, * so force to use 18-byte sense. */ UNUSUAL_DEV( 0x090c, 0x3350, 0x0000, 0xffff, "SMI", "SM3350 UFS-to-USB-Mass-Storage bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BAD_SENSE ), /* * Reported by Paul Hartman <paul.hartman+linux@gmail.com> * This card reader returns "Illegal Request, Logical Block Address * Out of Range" for the first READ(10) after a new card is inserted. */ UNUSUAL_DEV( 0x090c, 0x6000, 0x0100, 0x0100, "Feiya", "SD/SDHC Card Reader", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_INITIAL_READ10 ), /* * This Pentax still camera is not conformant * to the USB storage specification: - * - It does not like the INQUIRY command. So we must handle this command * of the SCSI layer ourselves. * Tested on Rev. 10.00 (0x1000) * Submitted by James Courtier-Dutton <James@superbug.demon.co.uk> */ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000, "Pentax", "Optio 2/3/400", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* * These are virtual windows driver CDs, which the zd1211rw driver * automatically converts into WLAN devices. */ UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101, "ZyXEL", "G-220F USB-WLAN Install", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_DEVICE ), UNUSUAL_DEV( 0x0ace, 0x20ff, 0x0101, 0x0101, "SiteCom", "WL-117 USB-WLAN Install", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_DEVICE ), /* * Reported by Dan Williams <dcbw@redhat.com> * Option N.V. mobile broadband modems * Ignore driver CD mode and force into modem mode by default. */ /* iCON 225 */ UNUSUAL_DEV( 0x0af0, 0x6971, 0x0000, 0x9999, "Option N.V.", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, 0), /* * Reported by F. Aben <f.aben@option.com> * This device (wrongly) has a vendor-specific device descriptor. * The entry is needed so usb-storage can bind to it's mass-storage * interface as an interface driver */ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0000, "Option", "GI 0401 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), /* * Reported by Jan Dumon <j.dumon@option.com> * These devices (wrongly) have a vendor-specific device descriptor. * These entries are needed so usb-storage can bind to their mass-storage * interface as an interface driver */ UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000, "Option", "GI 0431 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7701, 0x0000, 0x0000, "Option", "GI 0451 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7706, 0x0000, 0x0000, "Option", "GI 0451 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7901, 0x0000, 0x0000, "Option", "GI 0452 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7A01, 0x0000, 0x0000, "Option", "GI 0461 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7A05, 0x0000, 0x0000, "Option", "GI 0461 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x8300, 0x0000, 0x0000, "Option", "GI 033x SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x8302, 0x0000, 0x0000, "Option", "GI 033x SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x8304, 0x0000, 0x0000, "Option", "GI 033x SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xc100, 0x0000, 0x0000, "Option", "GI 070x SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd057, 0x0000, 0x0000, "Option", "GI 1505 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd058, 0x0000, 0x0000, "Option", "GI 1509 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd157, 0x0000, 0x0000, "Option", "GI 1515 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd257, 0x0000, 0x0000, "Option", "GI 1215 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd357, 0x0000, 0x0000, "Option", "GI 1505 SD-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), /* Reported by Namjae Jeon <namjae.jeon@samsung.com> */ UNUSUAL_DEV(0x0bc2, 0x2300, 0x0000, 0x9999, "Seagate", "Portable HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE), /* Reported by Ben Efros <ben@pc-doctor.com> */ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000, "Seagate", "FreeAgent Pro", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE ), /* Reported by Kris Lindgren <kris.lindgren@gmail.com> */ UNUSUAL_DEV( 0x0bc2, 0x3332, 0x0000, 0x9999, "Seagate", "External", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT ), UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999, "Maxtor", "USB to SATA", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE), /* * Pete Zaitcev <zaitcev@yahoo.com>, bz#164688. * The device blatantly ignores LUN and returns 1 in GetMaxLUN. */ UNUSUAL_DEV( 0x0c45, 0x1060, 0x0100, 0x0100, "Unknown", "Unknown", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Joris Struyve <joris@struyve.be> */ UNUSUAL_DEV( 0x0d96, 0x410a, 0x0001, 0xffff, "Medion", "MD 7425", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), /* * Entry for Jenoptik JD 5200z3 * * email: car.busse@gmx.de */ UNUSUAL_DEV( 0x0d96, 0x5200, 0x0001, 0x0200, "Jenoptik", "JD 5200 z3", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), /* Reported by Jason Johnston <killean@shaw.ca> */ UNUSUAL_DEV( 0x0dc4, 0x0073, 0x0000, 0x0000, "Macpower Technology Co.LTD.", "USB 2.0 3.5\" DEVICE", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* * Reported by Lubomir Blaha <tritol@trilogic.cz> * I _REALLY_ don't know what 3rd, 4th number and all defines mean, but this * works for me. Can anybody correct these values? (I able to test corrected * version.) */ UNUSUAL_DEV( 0x0dd8, 0x1060, 0x0000, 0xffff, "Netac", "USB-CF-Card", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* * Reported by Edward Chapman (taken from linux-usb mailing list) * Netac OnlyDisk Mini U2CV2 512MB USB 2.0 Flash Drive */ UNUSUAL_DEV( 0x0dd8, 0xd202, 0x0000, 0x9999, "Netac", "USB Flash Disk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Patch by Stephan Walter <stephan.walter@epfl.ch> * I don't know why, but it works... */ UNUSUAL_DEV( 0x0dda, 0x0001, 0x0012, 0x0012, "WINWARD", "Music Disk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Ian McConnell <ian at emit.demon.co.uk> */ UNUSUAL_DEV( 0x0dda, 0x0301, 0x0012, 0x0012, "PNP_MP3", "PNP_MP3 PLAYER", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Jim McCloskey <mcclosk@ucsc.edu> */ UNUSUAL_DEV( 0x0e21, 0x0520, 0x0100, 0x0100, "Cowon Systems", "iAUDIO M5", USB_SC_DEVICE, USB_PR_BULK, NULL, US_FL_NEED_OVERRIDE ), /* Submitted by Antoine Mairesse <antoine.mairesse@free.fr> */ UNUSUAL_DEV( 0x0ed1, 0x6660, 0x0100, 0x0300, "USB", "Solid state disk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* * Submitted by Daniel Drake <dsd@gentoo.org> * Reported by dayul on the Gentoo Forums */ UNUSUAL_DEV( 0x0ea0, 0x2168, 0x0110, 0x0110, "Ours Technology", "Flash Disk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Rastislav Stanik <rs_kernel@yahoo.com> */ UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110, "USB", "Flash Disk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Reported by Benjamin Schiller <sbenni@gmx.de> * It is also sold by Easylite as DJ 20 */ UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, "Typhoon", "My DJ 1820", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), /* * Patch by Leonid Petrov mail at lpetrov.net * Reported by Robert Spitzenpfeil <robert@spitzenpfeil.org> * http://www.qbik.ch/usb/devices/showdev.php?id=1705 * Updated to 103 device by MJ Ray mjr at phonecoop.coop */ UNUSUAL_DEV( 0x0f19, 0x0103, 0x0100, 0x0100, "Oracom Co., Ltd", "ORC-200M", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * David Kuehling <dvdkhlng@gmx.de>: * for MP3-Player AVOX WSX-300ER (bought in Japan). Reports lots of SCSI * errors when trying to write. */ UNUSUAL_DEV( 0x0f19, 0x0105, 0x0100, 0x0100, "C-MEX", "A-VOX", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Submitted by Nick Holloway */ UNUSUAL_DEV( 0x0f88, 0x042e, 0x0100, 0x0100, "VTech", "Kidizoom", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* Reported by Moritz Moeller-Herrmann <moritz-kernel@moeller-herrmann.de> */ UNUSUAL_DEV( 0x0fca, 0x8004, 0x0201, 0x0201, "Research In Motion", "BlackBerry Bold 9000", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Michael Stattmann <michael@stattmann.com> */ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, "Sony Ericsson", "V800-Vodafone 802", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT ), /* Reported by The Solutor <thesolutor@gmail.com> */ UNUSUAL_DEV( 0x0fce, 0xd0e1, 0x0000, 0x0000, "Sony Ericsson", "MD400", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_DEVICE), /* * Reported by Jan Mate <mate@fiit.stuba.sk> * and by Soeren Sonnenburg <kernel@nn7.de> */ UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x0000, "Sony Ericsson", "P990i", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), /* Reported by Emmanuel Vasilakis <evas@forthnet.gr> */ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000, "Sony Ericsson", "M600i", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Ricardo Barberis <ricardo@dattatec.com> */ UNUSUAL_DEV( 0x0fce, 0xe092, 0x0000, 0x0000, "Sony Ericsson", "P1i", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> * Tested on hardware version 1.10. * Entry is needed only for the initializer function override. * Devices with bcd > 110 seem to not need it while those * with bcd < 110 appear to need it. */ UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x0110, "Desknote", "UCR-61S2B", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_ucr61s2b_init, 0 ), UNUSUAL_DEV( 0x1058, 0x0704, 0x0000, 0x9999, "Western Digital", "External HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE), /* Reported by Namjae Jeon <namjae.jeon@samsung.com> */ UNUSUAL_DEV(0x1058, 0x070a, 0x0000, 0x9999, "Western Digital", "My Passport HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE), /* * Reported by Fabio Venturi <f.venturi@tdnet.it> * The device reports a vendor-specific bDeviceClass. */ UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100, "Actions Semiconductor", "Mtp device", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0), /* * Reported by Pascal Terjan <pterjan@mandriva.com> * Ignore driver CD mode and force into modem mode by default. */ UNUSUAL_DEV( 0x1186, 0x3e04, 0x0000, 0x0000, "D-Link", "USB Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, US_FL_IGNORE_DEVICE), /* * Reported by Kevin Lloyd <linux@sierrawireless.com> * Entry is needed for the initializer function override, * which instructs the device to load as a modem * device. */ UNUSUAL_DEV( 0x1199, 0x0fff, 0x0000, 0x9999, "Sierra Wireless", "USB MMC Storage", USB_SC_DEVICE, USB_PR_DEVICE, sierra_ms_init, 0), /* * Reported by Jaco Kroon <jaco@kroon.co.za> * The usb-storage module found on the Digitech GNX4 (and supposedly other * devices) misbehaves and causes a bunch of invalid I/O errors. */ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100, "Digitech HMG", "DigiTech Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Reported by fangxiaozhi <huananhu@huawei.com> * This brings the HUAWEI data card devices into multi-port mode */ UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141A, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141B, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141C, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141D, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141E, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141F, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1420, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1421, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1422, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1423, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1424, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1425, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1426, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1427, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1428, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1429, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142A, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142B, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142C, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142D, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142E, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142F, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1430, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1431, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1432, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1433, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1434, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1435, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1436, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1437, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1438, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1439, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143A, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143B, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143C, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143D, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143E, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143F, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */ UNUSUAL_DEV( 0x132b, 0x000b, 0x0001, 0x0001, "Minolta", "Dimage Z10", USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), /* Reported by Kotrla Vitezslav <kotrla@ceb.cz> */ UNUSUAL_DEV( 0x1370, 0x6828, 0x0110, 0x0110, "SWISSBIT", "Black Silver", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* * Reported by Tobias Jakobi <tjakobi@math.uni-bielefeld.de> * The INIC-3619 bridge is used in the StarTech SLSODDU33B * SATA-USB enclosure for slimline optical drives. * * The quirk enables MakeMKV to properly exchange keys with * an installed BD drive. */ UNUSUAL_DEV( 0x13fd, 0x3609, 0x0209, 0x0209, "Initio Corporation", "INIC-3619", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Qinglin Ye <yestyle@gmail.com> */ UNUSUAL_DEV( 0x13fe, 0x3600, 0x0100, 0x0100, "Kingston", "DT 101 G2", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BULK_IGNORE_TAG ), /* Reported by Francesco Foresti <frafore@tiscali.it> */ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x0201, "Super Top", "IDE DEVICE", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Michael Büsch <m@bues.ch> */ UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0117, "JMicron", "USB to ATA/ATAPI Bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA ), /* Reported by David Kozub <zub@linux.fjfi.cvut.cz> */ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x9999, "JMicron", "JMS567", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA), /* * Reported by Alexandre Oliva <oliva@lsd.ic.unicamp.br> * JMicron responds to USN and several other SCSI ioctls with a * residue that causes subsequent I/O requests to fail. */ UNUSUAL_DEV( 0x152d, 0x2329, 0x0100, 0x0100, "JMicron", "USB to ATA/ATAPI Bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_SANE_SENSE ), /* Reported by Dmitry Nezhevenko <dion@dion.org.ua> */ UNUSUAL_DEV( 0x152d, 0x2566, 0x0114, 0x0114, "JMicron", "USB to ATA/ATAPI Bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA ), /* Reported by Teijo Kinnunen <teijo.kinnunen@code-q.fi> */ UNUSUAL_DEV( 0x152d, 0x2567, 0x0117, 0x0117, "JMicron", "USB to ATA/ATAPI Bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA ), /* Reported-by George Cherian <george.cherian@cavium.com> */ UNUSUAL_DEV(0x152d, 0x9561, 0x0000, 0x9999, "JMicron", "JMS56x", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_OPCODES), /* * Entrega Technologies U1-SC25 (later Xircom PortGear PGSCSI) * and Mac USB Dock USB-SCSI */ UNUSUAL_DEV( 0x1645, 0x0007, 0x0100, 0x0133, "Entrega Technologies", "USB to SCSI Converter", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), /* * Reported by Robert Schedel <r.schedel@yahoo.de> * Note: this is a 'super top' device like the above 14cd/6600 device */ UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, "Teac", "HD-35PUK-B", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Oliver Neukum <oneukum@suse.com> */ UNUSUAL_DEV( 0x174c, 0x55aa, 0x0100, 0x0100, "ASMedia", "AS2105", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NEEDS_CAP16), /* Reported by Jesse Feddema <jdfeddema@gmail.com> */ UNUSUAL_DEV( 0x177f, 0x0400, 0x0000, 0x0000, "Yarvik", "PMP400", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BULK_IGNORE_TAG | US_FL_MAX_SECTORS_64 ), UNUSUAL_DEV( 0x1822, 0x0001, 0x0000, 0x9999, "Ariston Technologies", "iConnect USB to SCSI adapter", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), /* * Reported by Hans de Goede <hdegoede@redhat.com> * These Appotech controllers are found in Picture Frames, they provide a * (buggy) emulation of a cdrom drive which contains the windows software * Uploading of pictures happens over the corresponding /dev/sg device. */ UNUSUAL_DEV( 0x1908, 0x1315, 0x0000, 0x0000, "BUILDWIN", "Photo Frame", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BAD_SENSE ), UNUSUAL_DEV( 0x1908, 0x1320, 0x0000, 0x0000, "BUILDWIN", "Photo Frame", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BAD_SENSE ), UNUSUAL_DEV( 0x1908, 0x3335, 0x0200, 0x0200, "BUILDWIN", "Photo Frame", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_READ_DISC_INFO ), /* * Reported by Oliver Neukum <oneukum@suse.com> * This device morphes spontaneously into another device if the access * pattern of Windows isn't followed. Thus writable media would be dirty * if the initial instance is used. So the device is limited to its * virtual CD. * And yes, the concept that BCD goes up to 9 is not heeded */ UNUSUAL_DEV( 0x19d2, 0x1225, 0x0000, 0xffff, "ZTE,Incorporated", "ZTE WCDMA Technologies MSM", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* * Reported by Sven Geggus <sven-usbst@geggus.net> * This encrypted pen drive returns bogus data for the initial READ(10). */ UNUSUAL_DEV( 0x1b1c, 0x1ab5, 0x0200, 0x0200, "Corsair", "Padlock v2", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_INITIAL_READ10 ), /* * Reported by Hans de Goede <hdegoede@redhat.com> * These are mini projectors using USB for both power and video data transport * The usb-storage interface is a virtual windows driver CD, which the gm12u320 * driver automatically converts into framebuffer & kms dri device nodes. */ UNUSUAL_DEV( 0x1de1, 0xc102, 0x0000, 0xffff, "Grain-media Technology Corp.", "USB3.0 Device GM12U320", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_DEVICE ), /* * Patch by Richard Schütz <r.schtz@t-online.de> * This external hard drive enclosure uses a JMicron chip which * needs the US_FL_IGNORE_RESIDUE flag to work properly. */ UNUSUAL_DEV( 0x1e68, 0x001b, 0x0000, 0x0000, "TrekStor GmbH & Co. KG", "DataStation maxi g.u", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_SANE_SENSE ), /* Reported by Jasper Mackenzie <scarletpimpernal@hotmail.com> */ UNUSUAL_DEV( 0x1e74, 0x4621, 0x0000, 0x0000, "Coby Electronics", "MP3 Player", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BULK_IGNORE_TAG | US_FL_MAX_SECTORS_64 ), /* Supplied with some Castlewood ORB removable drives */ UNUSUAL_DEV( 0x2027, 0xa001, 0x0000, 0x9999, "Double-H Technology", "USB to SCSI Intelligent Cable", USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001, "ST", "2A", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* * patch submitted by Davide Perini <perini.davide@dpsoftware.org> * and Renato Perini <rperini@email.it> */ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, "Motorola", "RAZR V3x", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), /* * Patch by Constantin Baranov <const@tltsu.ru> * Report by Andreas Koenecke. * Motorola ROKR Z6. */ UNUSUAL_DEV( 0x22b8, 0x6426, 0x0101, 0x0101, "Motorola", "MSnc.", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY | US_FL_BULK_IGNORE_TAG), /* Reported by Radovan Garabik <garabik@kassiopeia.juls.savba.sk> */ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, "MPIO", "HS200", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW ), /* Reported-by: Tim Anderson <tsa@biglakesoftware.com> */ UNUSUAL_DEV( 0x2ca3, 0x0031, 0x0000, 0x9999, "DJI", "CineSSD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* * Reported by Frederic Marchal <frederic.marchal@wowcompany.com> * Mio Moov 330 */ UNUSUAL_DEV( 0x3340, 0xffff, 0x0000, 0x0000, "Mitac", "Mio DigiWalker USB Sync", USB_SC_DEVICE,USB_PR_DEVICE,NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Cyril Roelandt <tipecaml@gmail.com> */ UNUSUAL_DEV( 0x357d, 0x7788, 0x0114, 0x0114, "JMicron", "USB to ATA/ATAPI Bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA | US_FL_IGNORE_UAS ), /* Reported by Andrey Rahmatullin <wrar@altlinux.org> */ UNUSUAL_DEV( 0x4102, 0x1020, 0x0100, 0x0100, "iRiver", "MP3 T10", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Sergey Pinaev <dfo@antex.ru> */ UNUSUAL_DEV( 0x4102, 0x1059, 0x0000, 0x0000, "iRiver", "P7K", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* * David Härdeman <david@2gen.com> * The key makes the SCSI stack print confusing (but harmless) messages */ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100, "Iomega", "Micro Mini 1GB", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* "G-DRIVE" external HDD hangs on write without these. * Patch submitted by Alexander Kappner <agk@godking.net> */ UNUSUAL_DEV(0x4971, 0x8024, 0x0000, 0x9999, "SimpleTech", "External HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_ALWAYS_SYNC), /* * Nick Bowler <nbowler@elliptictech.com> * SCSI stack spams (otherwise harmless) error messages. */ UNUSUAL_DEV( 0xc251, 0x4003, 0x0100, 0x0100, "Keil Software, Inc.", "V2M MotherBoard", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE), /* Reported by Andrew Simmons <andrew.simmons@gmail.com> */ UNUSUAL_DEV( 0xed06, 0x4500, 0x0001, 0x0001, "DataStor", "USB4500 FW1.04", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_CAPACITY_HEURISTICS), /* Reported by Alessio Treglia <quadrispro@ubuntu.com> */ UNUSUAL_DEV( 0xed10, 0x7636, 0x0001, 0x0001, "TGE", "Digital MP3 Audio Player", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* Unusual uas devices */ #if IS_ENABLED(CONFIG_USB_UAS) #include "unusual_uas.h" #endif /* Control/Bulk transport for all SubClass values */ USUAL_DEV(USB_SC_RBC, USB_PR_CB), USUAL_DEV(USB_SC_8020, USB_PR_CB), USUAL_DEV(USB_SC_QIC, USB_PR_CB), USUAL_DEV(USB_SC_UFI, USB_PR_CB), USUAL_DEV(USB_SC_8070, USB_PR_CB), USUAL_DEV(USB_SC_SCSI, USB_PR_CB), /* Control/Bulk/Interrupt transport for all SubClass values */ USUAL_DEV(USB_SC_RBC, USB_PR_CBI), USUAL_DEV(USB_SC_8020, USB_PR_CBI), USUAL_DEV(USB_SC_QIC, USB_PR_CBI), USUAL_DEV(USB_SC_UFI, USB_PR_CBI), USUAL_DEV(USB_SC_8070, USB_PR_CBI), USUAL_DEV(USB_SC_SCSI, USB_PR_CBI), /* Bulk-only transport for all SubClass values */ USUAL_DEV(USB_SC_RBC, USB_PR_BULK), USUAL_DEV(USB_SC_8020, USB_PR_BULK), USUAL_DEV(USB_SC_QIC, USB_PR_BULK), USUAL_DEV(USB_SC_UFI, USB_PR_BULK), USUAL_DEV(USB_SC_8070, USB_PR_BULK), USUAL_DEV(USB_SC_SCSI, USB_PR_BULK),
{ "pile_set_name": "Github" }
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import tensorflow as tf" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 1. 定义神经网络结构相关的参数。" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "INPUT_NODE = 784\n", "OUTPUT_NODE = 10\n", "LAYER1_NODE = 500" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 2. 通过tf.get_variable函数来获取变量。" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def get_weight_variable(shape, regularizer):\n", " weights = tf.get_variable(\"weights\", shape, initializer=tf.truncated_normal_initializer(stddev=0.1))\n", " if regularizer != None: tf.add_to_collection('losses', regularizer(weights))\n", " return weights" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 3. 定义神经网络的前向传播过程。" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def inference(input_tensor, regularizer):\n", " with tf.variable_scope('layer1'):\n", "\n", " weights = get_weight_variable([INPUT_NODE, LAYER1_NODE], regularizer)\n", " biases = tf.get_variable(\"biases\", [LAYER1_NODE], initializer=tf.constant_initializer(0.0))\n", " layer1 = tf.nn.relu(tf.matmul(input_tensor, weights) + biases)\n", "\n", "\n", " with tf.variable_scope('layer2'):\n", " weights = get_weight_variable([LAYER1_NODE, OUTPUT_NODE], regularizer)\n", " biases = tf.get_variable(\"biases\", [OUTPUT_NODE], initializer=tf.constant_initializer(0.0))\n", " layer2 = tf.matmul(layer1, weights) + biases\n", "\n", " return layer2" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.10" } }, "nbformat": 4, "nbformat_minor": 1 }
{ "pile_set_name": "Github" }
Custom Javascript ----------------- You can use any custom javascript file or library in your Squarespace Template. Squarespace provides a script loader that minifies and combines your custom scripts, which you can use if you like. Alternatively you can package your scripts using the preprocessor of your choice. ### Using the Script Loader Squarespace's script loader minifies your code and allows you to combine all of your JavaScript files into one, cutting down on HTTP requests. Loading JavaScript in Squarespace is very similar to the standard script tag syntax in HTML. The syntax is outlined in the code sample below. <squarespace:script src="plugin.js" combo="true" /> <squarespace:script src="site.js" combo="true" /> > NOTE: The script's src path is relative to the template /scripts folder. ### Using your own Javascript Preprocessor You can use any javascript workflow tool, like NPM, gulp, browserify or webpack. You can include the compiled code in your /scripts folder, and link to those files using regular script tags, or the Squarespace Script Tag. ### Further Reading For further reading, check out the [Squarespace developer docs on Javascript](https://developers.squarespace.com/custom-javascript/).
{ "pile_set_name": "Github" }
#include "ServoConverter.hpp" ServoConverter::ServoConverter(BotParam *param) { rad_to_servo_.elevL_slope = bot_param_get_double_or_fail(param, "servo_commands.radians_to_servo.elevL_slope"); rad_to_servo_.elevL_y_intercept = bot_param_get_double_or_fail(param, "servo_commands.radians_to_servo.elevL_y_intercept"); rad_to_servo_.elevR_slope = bot_param_get_double_or_fail(param, "servo_commands.radians_to_servo.elevR_slope"); rad_to_servo_.elevR_y_intercept = bot_param_get_double_or_fail(param, "servo_commands.radians_to_servo.elevR_y_intercept"); rad_to_servo_.throttle_slope = bot_param_get_double_or_fail(param, "servo_commands.radians_to_servo.throttle_slope"); rad_to_servo_.throttle_y_intercept = bot_param_get_double_or_fail(param, "servo_commands.radians_to_servo.throttle_y_intercept"); servo_to_rad_.elevL_slope = bot_param_get_double_or_fail(param, "servo_commands.servo_to_radians.elevL_slope"); servo_to_rad_.elevL_y_intercept = bot_param_get_double_or_fail(param, "servo_commands.servo_to_radians.elevL_y_intercept"); servo_to_rad_.elevR_slope = bot_param_get_double_or_fail(param, "servo_commands.servo_to_radians.elevR_slope"); servo_to_rad_.elevR_y_intercept = bot_param_get_double_or_fail(param, "servo_commands.servo_to_radians.elevR_y_intercept"); servo_to_rad_.throttle_slope = bot_param_get_double_or_fail(param, "servo_commands.servo_to_radians.throttle_slope"); servo_to_rad_.throttle_y_intercept = bot_param_get_double_or_fail(param, "servo_commands.servo_to_radians.throttle_y_intercept"); elevL_min_ = bot_param_get_int_or_fail(param, "servo_commands.elevL_min"); elevL_max_ = bot_param_get_int_or_fail(param, "servo_commands.elevL_max"); elevR_min_ = bot_param_get_int_or_fail(param, "servo_commands.elevR_min"); elevR_max_ = bot_param_get_int_or_fail(param, "servo_commands.elevR_max"); throttle_min_ = bot_param_get_int_or_fail(param, "servo_commands.throttle_min"); throttle_max_ = bot_param_get_int_or_fail(param, "servo_commands.throttle_max"); elevL_trim_ = bot_param_get_int_or_fail(param, "servo_commands.elevL_flight_trim"); elevR_trim_ = bot_param_get_int_or_fail(param, "servo_commands.elevR_flight_trim"); throttle_trim_ = bot_param_get_int_or_fail(param, "servo_commands.throttle_flight_trim"); } Eigen::Vector3i ServoConverter::RadiansToServoCommands(Eigen::Vector3d commands) const { Eigen::Vector3i output; output(0) = round(commands(0) * rad_to_servo_.elevL_slope + rad_to_servo_.elevL_y_intercept); output(1) = round(commands(1) * rad_to_servo_.elevR_slope + rad_to_servo_.elevR_y_intercept); if (commands(2) <= 0) { // throttle = 0 output(2) = throttle_min_; } else { output(2) = round(commands(2) * rad_to_servo_.throttle_slope + rad_to_servo_.throttle_y_intercept); } return MinMaxCommands(output); } Eigen::Vector3d ServoConverter::ServoCommandsToRadians(Eigen::Vector3i commands) const { Eigen::Vector3d output; commands = MinMaxCommands(commands); output(0) = commands(0) * servo_to_rad_.elevL_slope + servo_to_rad_.elevL_y_intercept; output(1) = commands(1) * servo_to_rad_.elevR_slope + servo_to_rad_.elevR_y_intercept; output(2) = commands(2) * servo_to_rad_.throttle_slope + servo_to_rad_.throttle_y_intercept; return output; } Eigen::Vector3i ServoConverter::MinMaxCommands(Eigen::Vector3i commands) const { Eigen::Vector3i output; output(0) = std::max(commands(0), elevL_min_); output(0) = std::min(output(0), elevL_max_); output(1) = std::max(commands(1), elevR_min_); output(1) = std::min(output(1), elevR_max_); output(2) = std::max(commands(2), throttle_min_); output(2) = std::min(output(2), throttle_max_); return output; } Eigen::Vector3i ServoConverter::GetTrimCommands() const { Eigen::Vector3i output; output(0) = elevL_trim_; output(1) = elevR_trim_; output(2) = throttle_trim_; return output; }
{ "pile_set_name": "Github" }
// Copyright (c) 2014, 2020, Oracle and/or its affiliates. Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/ @import "../../utilities/oj.utilities"; // ----- start dependencies --------- // import dependencies @import "../../common/helpers/oj.common.helpers"; // ----- end dependencies --------- // alta implementation currently in common @import "../../common/widgets/oj.common.module"; @if $includeModuleClasses != false { @include module-include-once("alta.module") { } }
{ "pile_set_name": "Github" }
#import <Foundation/Foundation.h> @interface PodsDummy_AFNetworking : NSObject @end @implementation PodsDummy_AFNetworking @end
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- __author__ = "Mike Belov" __copyright__ = "Copyright (C) Nginx, Inc. All rights reserved." __license__ = "" __maintainer__ = "Mike Belov" __email__ = "dedm@nginx.com"
{ "pile_set_name": "Github" }
package com.android.frameworkperf; public class LocalTestService extends TestService { void terminate() { } }
{ "pile_set_name": "Github" }
// license:BSD-3-Clause // copyright-holders:Curt Coder /********************************************************************** XL 80 cartridge emulation **********************************************************************/ #ifndef MAME_BUS_C64_XL80_H #define MAME_BUS_C64_XL80_H #pragma once #include "exp.h" #include "video/mc6845.h" #include "emupal.h" //************************************************************************** // TYPE DEFINITIONS //************************************************************************** // ======================> c64_xl80_device class c64_xl80_device : public device_t, public device_c64_expansion_card_interface { public: // construction/destruction c64_xl80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_add_mconfig(machine_config &config) override; // device_c64_expansion_card_interface overrides virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override { return 1; } virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override { return 0; } private: MC6845_UPDATE_ROW( crtc_update_row ); required_device<hd6845s_device> m_crtc; required_device<palette_device> m_palette; required_memory_region m_char_rom; optional_shared_ptr<uint8_t> m_ram; }; // device type definition DECLARE_DEVICE_TYPE(C64_XL80, c64_xl80_device) #endif // MAME_BUS_C64_XL80_H
{ "pile_set_name": "Github" }
#N struct 1113-symarray float x array symbols 1113-sym; #N struct 1113-sym symbol name float on; #N canvas 34 60 877 510 10; #X declare -path .; #X declare -path .; #N canvas 91 50 1081 586 detailed_help 0; #X obj 719 26 declare -path .; #X obj 22 306 soundoutput; #X msg 186 132 save; #X obj 575 9 r \$0-GUI; #X obj 21 132 m_majorscale 50; #X obj 21 78 metro 500; #X obj 21 54 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 ; #X obj 21 211 pack; #N canvas 0 58 1013 367 midi-control 0; #X obj 37 214 m_symbolarray; #X obj 21 110 ctlin; #X obj 21 186 / 127; #X obj 125 65 loadbang; #X obj 21 297 s \$0-GUI; #X text 124 31 add your midi controller mappings here. Format: <ctl-num> <method name>; #X floatatom 47 144 5 0 0 0 - - -; #X floatatom 88 145 5 0 0 0 - - -; #X obj 21 260 list prepend; #X text 119 259 swap; #X msg 558 66 env1a \, env1d \, env1r \, env1s \, env2a \, env2d \, env2r \, env2s \, env3a \, env3d \, env3r \, env3s \, mod1a \, mod1b \, mod1c \, mod1d \, mod2a \, mod2b \, mod2c \, mod2d \, mod3a \, mod3b \, mod3c \, mod3d \, osc1a \, osc1b \, osc1c \, osc1d \, osc2a \, osc2b \, osc2c \, osc2d \, osc3a \, osc3b \, osc3c \, osc3d \,; #X msg 201 222 dump; #X symbolatom 37 241 10 0 0 0 - - -; #X obj 201 276 print; #X obj 201 244 u_dumpfile controls.txt cr; #X text 552 32 Control Template - These are the methods \, that s_czz_synth accepts. They all expect values in a range of 0-1.; #X text 241 220 You can also keep your settings in a file.; #X obj 201 336 declare -path .; #X text 317 339 let me find "controls.txt" here.; #X msg 125 91 74 osc1a \, 71 osc1b \, 81 osc1c; #X connect 0 0 8 1; #X connect 0 0 12 0; #X connect 1 0 6 0; #X connect 1 0 2 0; #X connect 1 1 7 0; #X connect 1 1 0 0; #X connect 2 0 8 0; #X connect 3 0 19 0; #X connect 8 0 4 0; #X connect 11 0 14 0; #X connect 14 0 0 1; #X connect 14 0 13 0; #X connect 19 0 0 1; #X restore 356 103 pd midi-control; #X obj 27 174 notein; #X text 346 84 Set controllers here:; #X obj 144 272 u_cocollect; #X obj 186 193 t a b; #X obj 186 59 bng 64 250 50 0 empty empty empty 17 7 0 10 -4034 -1 -1; #X obj 144 465 s \$0-GUI; #X obj 125 240 r \$0-control; #X obj 575 528 s \$0-control; #X symbolatom 350 271 20 0 0 0 - - -; #X obj 452 251 s \$0-GUI; #X obj 350 200 nbx 3 20 0 256 0 0 empty empty empty 0 -8 0 16 -260097 -262144 -1 3 256; #X obj 350 177 pgmin 1; #X obj 21 154 makenote 127 300; #X floatatom 112 62 5 0 0 0 - - -; #X obj 307 157 hradio 15 1 0 4 empty empty empty 0 -8 0 10 -262144 -1 -1 3; #X msg 144 318 name tremstring \, mod3b 0.133858 \, mod3a 0.0629921 \, mod2d 0.503937 \, mod2c 0.448819 \, mod2b 0.259843 \, mod2a 0.866142 \, mod1c 0.0472441 \, mod1b 0.015748 \, mod1a 0.425197 \, osc3c 0.708661 \, osc3b 0.346457 \, osc3a 0.76378 \, osc2d 0.811024 \, osc2c 0.00787402 \, osc2b 0.708661 \, osc2a 0.472441 \, osc1d 0.748031 \, osc1c 0.346457 \, osc1b 0.0472441 \, osc1a 0.614173 \, env3r 0.00787402 \, env3s 0.0551181 \, env3d 0.015748 \, env3a 0.0866142 \, env2r 0.023622 \, env2s 0.708661 \, env2d 0.133858 \, env2a 0.299213 \, env1r 0.00858268 \, env1s 0.503937 \, env1d 0.0393701 \, env1a 0.19685 \,; #X obj 575 69 g_synthcontrol; #N canvas 0 0 1163 675 hstr_presets 0; #X obj 91 26 inlet; #X obj 134 647 outlet name; #X obj 118 611 symbol; #X obj 217 646 outlet parms; #X obj 151 566 route name; #X obj 681 209 loadbang; #X text 676 155 set up the interface to be human readable and show which controls are actually used; #X text 678 185 Requires modified [g-hsl]; #X obj 90 52 sel 0 1 2 3 4 5 6 7 8 9 10 11 12; #X msg 676 239 env1a color 128 \, env1a label AMP-ATTACK \, env1d color 128 \, env1d label AMP-DECAY \, env1r color 128 \, env1r label AMP-REL \, env1s color 128 \, env1s label AMP-SUS \, env2a color 128 \, env2a label MOD-ATTACK \, env2d color 128 \, env2d label MOD-DECAY \, env2r color 128 \, env2r label MOD-REL \, env2s color 128 \, env2s label MOD-SUS \, env3a color 128 \, env3a label NOISE-ATTACK \, env3d color 128 \, env3d label NOISE-DECAY \, env3r color 128 \, env3r label NOISE-REL \, env3s color 128 \, env3s label NOISE-SUS \, mod1a color 128 \, mod1a label LFO-FREQ \, mod1b color 128 \, mod1b label VIB-AMT \, mod1c color 128 \, mod1c label VIB-ONSET \, mod1d color 2 \, mod1d label _ \, mod2a color 128 \, mod2a label FORMANTRES \, mod2b color 128 \, mod2b label FORM1 \, mod2c color 128 \, mod2c label FORM2 \, mod2d color 128 \, mod2d label FORM3 \, mod3a color 128 \, mod3a label HIGHPASS \, mod3b color 128 \, mod3b label VOLUME \, mod3c color 2 \, mod3c label _ \, mod3d color 2 \, mod3d label _ \, osc1a color 128 \, osc1a label DETUNE-FREQ \, osc1b color 128 \, osc1b label DET-AMT \, osc1c color 128 \, osc1c label XMIX-FREQ \, osc1d color 128 \, osc1d label XMIX-AMNT \, osc2a color 128 \, osc2a label OSC-COARSE \, osc2b color 128 \, osc2b label NOISE-F osc2c color 128 \, osc2c label NOISE-AMT \, osc2d color 128 \, osc2d label FMMIX \, osc3a color 128 \, osc3a label MODENV \, osc3b color 128 \, osc3b label WAVE1 \, osc3c color 128 \, osc3c label WAVE2 \, osc3d color 2 \, osc3d label _; #X msg 92 299 name string1 \, mod3b 0.291339 \, mod3a 0.0472441 \, mod2d 0.700787 \, mod2c 0.409449 \, mod2b 0.181102 \, mod2a 0.472441 \, mod1c 0.519685 \, mod1b 0.0472441 \, mod1a 0.574803 \, osc3c 0.755906 \, osc3b 0.661417 \, osc3a 0.606299 \, osc2d 0.464567 \, osc2c 0.023622 \, osc2b 0.708661 \, osc2a 0.968504 \, osc1d 0.212598 \, osc1c 0.346457 \, osc1b 0.291339 \, osc1a 0.795276 \, env3r 0.00787402 \, env3s 0.133858 \, env3d 0.023622 \, env3a 0.015748 \, env2r 0.023622 \, env2s 0.889764 \, env2d 0.102362 \, env2a 0.850394 \, env1r 0.0322047 \, env1s 0.503937 \, env1d 0.0866142 \, env1a 0.0866142 \,; #X msg 109 302 name string2 \, mod3b 0.291339 \, mod3a 0.0944882 \, mod2d 0.811024 \, mod2c 0.574803 \, mod2b 0.456693 \, mod2a 0.598425 \, mod1c 0.0472441 \, mod1b 0.291339 \, mod1a 0.574803 \, osc3c 0.755906 \, osc3b 0.661417 \, osc3a 0.606299 \, osc2d 0.826772 \, osc2c 0.015748 \, osc2b 0.708661 \, osc2a 0.811024 \, osc1d 0.212598 \, osc1c 0.346457 \, osc1b 0.291339 \, osc1a 0.795276 \, env3r 0.00787402 \, env3s 0.133858 \, env3d 0.023622 \, env3a 0.015748 \, env2r 0.023622 \, env2s 0.889764 \, env2d 0.133858 \, env2a 0.598425 \, env1r 0.00858268 \, env1s 0.503937 \, env1d 0.0393701 \, env1a 0.0866142 \,; #X msg 128 300 name lowstring \, mod3b 0.181102 \, mod3a 0.0393701 \, mod2d 0.15748 \, mod2c 0.267717 \, mod2b 0.582677 \, mod2a 0.259843 \, mod1c 0.0472441 \, mod1b 0.015748 \, mod1a 0.425197 \, osc3c 0.968504 \, osc3b 0.92126 \, osc3a 0.393701 \, osc2d 0.811024 \, osc2c 0.00787402 \, osc2b 0.708661 \, osc2a 0 \, osc1d 0.141732 \, osc1c 0.204724 \, osc1b 0.0314961 \, osc1a 0.511811 \, env3r 0.00787402 \, env3s 0.0551181 \, env3d 0.015748 \, env3a 0.0866142 \, env2r 0.023622 \, env2s 0.889764 \, env2d 0.133858 \, env2a 0.598425 \, env1r 0.00858268 \, env1s 0.503937 \, env1d 0.0393701 \, env1a 0.19685 \,; #X msg 144 297 name tremstring \, mod3b 0.133858 \, mod3a 0.0629921 \, mod2d 0.503937 \, mod2c 0.448819 \, mod2b 0.259843 \, mod2a 0.866142 \, mod1c 0.0472441 \, mod1b 0.015748 \, mod1a 0.425197 \, osc3c 0.708661 \, osc3b 0.346457 \, osc3a 0.76378 \, osc2d 0.811024 \, osc2c 0.00787402 \, osc2b 0.708661 \, osc2a 0.472441 \, osc1d 0.748031 \, osc1c 0.346457 \, osc1b 0.0472441 \, osc1a 0.614173 \, env3r 0.00787402 \, env3s 0.0551181 \, env3d 0.015748 \, env3a 0.0866142 \, env2r 0.023622 \, env2s 0.708661 \, env2d 0.133858 \, env2a 0.299213 \, env1r 0.00858268 \, env1s 0.503937 \, env1d 0.0393701 \, env1a 0.19685 \,; #X connect 0 0 8 0; #X connect 2 0 1 0; #X connect 4 0 2 0; #X connect 4 1 3 0; #X connect 5 0 9 0; #X connect 8 0 10 0; #X connect 8 1 11 0; #X connect 8 2 12 0; #X connect 8 3 13 0; #X connect 9 0 3 0; #X connect 10 0 4 0; #X connect 11 0 4 0; #X connect 12 0 4 0; #X connect 13 0 4 0; #X restore 350 230 pd hstr_presets; #X obj 21 105 random 10; #X obj 21 242 s_hstr \$0-TAG; #X connect 2 0 12 0; #X connect 3 0 25 0; #X connect 4 0 21 0; #X connect 5 0 27 0; #X connect 6 0 5 0; #X connect 7 0 28 0; #X connect 9 0 7 0; #X connect 9 1 7 1; #X connect 11 0 24 0; #X connect 12 0 28 1; #X connect 12 1 11 1; #X connect 13 0 2 0; #X connect 15 0 28 1; #X connect 19 0 26 0; #X connect 20 0 19 0; #X connect 21 0 7 0; #X connect 21 1 7 1; #X connect 22 0 27 1; #X connect 23 0 19 0; #X connect 24 0 14 0; #X connect 25 0 16 0; #X connect 26 0 17 0; #X connect 26 1 18 0; #X connect 27 0 4 0; #X connect 28 0 1 0; #X connect 28 0 1 1; #X connect 28 1 11 0; #X restore 565 253 pd detailed_help; #N canvas 175 0 827 680 REFERENCE 0; #X text 114 174 Argument 0: name for state saving (required); #X text 114 214 Inlet 0: pitch/velocity pairs.; #X text 114 357 Outlet 0: synth audio signal.; #X text 114 374 Outlet 1: will report internal settings when receiving "save" message to second inlet.; #X text 114 234 Inlet 1: control inlet to set parameters. See example help for details. Possible message are (in alphabetical order): env1a \, env1d \, env1r \, env1s \, env2a \, env2d \, env2r \, env2s \, env3a \, env3d \, env3r \, env3s \, mod1a \, mod1b \, mod1c \, mod1d \, mod2a \, mod2b \, mod2c \, mod2d \, mod3a \, mod3b \, mod3c \, mod3d \, osc1a \, osc1b \, osc1c \, osc1d \, osc2a \, osc2b \, osc2c \, osc2d \, osc3a \, osc3b \, osc3c \, osc3d. They all accept a float in the range 0-1 ; #X text 113 140 Summary: string synthesiser; #X text 121 529 Tags: synthesizer \, string \, formant \, scrape \, high; #X text 113 411 Description: A twin saw and formant based synth optimised for synthesising string sounds. ajf2010; #X text 114 121 Name: s_hstr; #X coords 0 -1 1 1 450 450 1 100 100; #X restore 4 48 pd REFERENCE; #X text 498 230 Please see inside for help and an example.; #X text 658 97 control inlet; #X text 657 143 preset outlet; #X text 7 14 s_hstr high string and viloin synthesier; #X obj 571 181 soundoutput; #X obj 570 86 pack; #X obj 570 49 notein; #X obj 570 117 s_hstr \$0-TAG; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 8 1 7 1; #X connect 9 0 6 0; #X connect 9 0 6 1;
{ "pile_set_name": "Github" }
{ "url": "https://stedman.dev/", "name": "Steve Stedman", "description": "I lead teams that design and develop great web experiences.", "twitter": "stedman", "source_url": "https://github.com/stedman/stedman.dev" }
{ "pile_set_name": "Github" }
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "flutter/testing/elf_loader.h" #include "flutter/fml/file.h" #include "flutter/fml/paths.h" #include "flutter/runtime/dart_vm.h" #include "flutter/testing/testing.h" namespace flutter { namespace testing { ELFAOTSymbols LoadELFSymbolFromFixturesIfNeccessary() { if (!DartVM::IsRunningPrecompiledCode()) { return {}; } const auto elf_path = fml::paths::JoinPaths({GetFixturesPath(), kAOTAppELFFileName}); if (!fml::IsFile(elf_path)) { FML_LOG(ERROR) << "App AOT file does not exist for this fixture. Attempts " "to launch the Dart VM with these AOT symbols will fail."; return {}; } ELFAOTSymbols symbols; // Must not be freed. const char* error = nullptr; #if OS_FUCHSIA // TODO(gw280): https://github.com/flutter/flutter/issues/50285 // Dart doesn't implement Dart_LoadELF on Fuchsia auto loaded_elf = nullptr; #else auto loaded_elf = Dart_LoadELF(elf_path.c_str(), // file path 0, // file offset &error, // error (out) &symbols.vm_snapshot_data, // vm snapshot data (out) &symbols.vm_snapshot_instrs, // vm snapshot instrs (out) &symbols.vm_isolate_data, // vm isolate data (out) &symbols.vm_isolate_instrs // vm isolate instr (out) ); #endif if (loaded_elf == nullptr) { FML_LOG(ERROR) << "Could not fetch AOT symbols from loaded ELF. Attempts " "to launch the Dart VM with these AOT symbols will fail. Error: " << error; return {}; } symbols.loaded_elf.reset(loaded_elf); return symbols; } bool PrepareSettingsForAOTWithSymbols(Settings& settings, const ELFAOTSymbols& symbols) { if (!DartVM::IsRunningPrecompiledCode()) { return false; } settings.vm_snapshot_data = [&]() { return std::make_unique<fml::NonOwnedMapping>(symbols.vm_snapshot_data, 0u); }; settings.isolate_snapshot_data = [&]() { return std::make_unique<fml::NonOwnedMapping>(symbols.vm_isolate_data, 0u); }; settings.vm_snapshot_instr = [&]() { return std::make_unique<fml::NonOwnedMapping>(symbols.vm_snapshot_instrs, 0u); }; settings.isolate_snapshot_instr = [&]() { return std::make_unique<fml::NonOwnedMapping>(symbols.vm_isolate_instrs, 0u); }; return true; } } // namespace testing } // namespace flutter
{ "pile_set_name": "Github" }
#include <Python.h> // NOLINT(build/include_alpha) // Produce deprecation warnings (needs to come before arrayobject.h inclusion). #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include <boost/make_shared.hpp> #include <boost/python.hpp> #include <boost/python/raw_function.hpp> #include <boost/python/suite/indexing/vector_indexing_suite.hpp> #include <numpy/arrayobject.h> // these need to be included after boost on OS X #include <string> // NOLINT(build/include_order) #include <vector> // NOLINT(build/include_order) #include <fstream> // NOLINT #include "caffe/caffe.hpp" #include "caffe/layers/memory_data_layer.hpp" #include "caffe/layers/python_layer.hpp" #include "caffe/sgd_solvers.hpp" // Temporary solution for numpy < 1.7 versions: old macro, no promises. // You're strongly advised to upgrade to >= 1.7. #ifndef NPY_ARRAY_C_CONTIGUOUS #define NPY_ARRAY_C_CONTIGUOUS NPY_C_CONTIGUOUS #define PyArray_SetBaseObject(arr, x) (PyArray_BASE(arr) = (x)) #endif /* Fix to avoid registration warnings in pycaffe (#3960) */ #define BP_REGISTER_SHARED_PTR_TO_PYTHON(PTR) do { \ const boost::python::type_info info = \ boost::python::type_id<shared_ptr<PTR > >(); \ const boost::python::converter::registration* reg = \ boost::python::converter::registry::query(info); \ if (reg == NULL) { \ bp::register_ptr_to_python<shared_ptr<PTR > >(); \ } else if ((*reg).m_to_python == NULL) { \ bp::register_ptr_to_python<shared_ptr<PTR > >(); \ } \ } while (0) namespace bp = boost::python; namespace caffe { // For Python, for now, we'll just always use float as the type. typedef float Dtype; const int NPY_DTYPE = NPY_FLOAT32; // Selecting mode. void set_mode_cpu() { Caffe::set_mode(Caffe::CPU); } void set_mode_gpu() { Caffe::set_mode(Caffe::GPU); } void set_random_seed(unsigned int seed) { Caffe::set_random_seed(seed); } // For convenience, check that input files can be opened, and raise an // exception that boost will send to Python if not (caffe could still crash // later if the input files are disturbed before they are actually used, but // this saves frustration in most cases). static void CheckFile(const string& filename) { std::ifstream f(filename.c_str()); if (!f.good()) { f.close(); throw std::runtime_error("Could not open file " + filename); } f.close(); } void CheckContiguousArray(PyArrayObject* arr, string name, int channels, int height, int width) { if (!(PyArray_FLAGS(arr) & NPY_ARRAY_C_CONTIGUOUS)) { throw std::runtime_error(name + " must be C contiguous"); } if (PyArray_NDIM(arr) != 4) { throw std::runtime_error(name + " must be 4-d"); } if (PyArray_TYPE(arr) != NPY_FLOAT32) { throw std::runtime_error(name + " must be float32"); } if (PyArray_DIMS(arr)[1] != channels) { throw std::runtime_error(name + " has wrong number of channels"); } if (PyArray_DIMS(arr)[2] != height) { throw std::runtime_error(name + " has wrong height"); } if (PyArray_DIMS(arr)[3] != width) { throw std::runtime_error(name + " has wrong width"); } } // Net constructor shared_ptr<Net<Dtype> > Net_Init(string network_file, int phase, const int level, const bp::object& stages, const bp::object& weights) { CheckFile(network_file); // Convert stages from list to vector vector<string> stages_vector; if (!stages.is_none()) { for (int i = 0; i < len(stages); i++) { stages_vector.push_back(bp::extract<string>(stages[i])); } } // Initialize net shared_ptr<Net<Dtype> > net(new Net<Dtype>(network_file, static_cast<Phase>(phase), level, &stages_vector)); // Load weights if (!weights.is_none()) { std::string weights_file_str = bp::extract<std::string>(weights); CheckFile(weights_file_str); net->CopyTrainedLayersFrom(weights_file_str); } return net; } // Legacy Net construct-and-load convenience constructor shared_ptr<Net<Dtype> > Net_Init_Load( string param_file, string pretrained_param_file, int phase) { LOG(WARNING) << "DEPRECATION WARNING - deprecated use of Python interface"; LOG(WARNING) << "Use this instead (with the named \"weights\"" << " parameter):"; LOG(WARNING) << "Net('" << param_file << "', " << phase << ", weights='" << pretrained_param_file << "')"; CheckFile(param_file); CheckFile(pretrained_param_file); shared_ptr<Net<Dtype> > net(new Net<Dtype>(param_file, static_cast<Phase>(phase))); net->CopyTrainedLayersFrom(pretrained_param_file); return net; } void Net_Save(const Net<Dtype>& net, string filename) { NetParameter net_param; net.ToProto(&net_param, false); WriteProtoToBinaryFile(net_param, filename.c_str()); } void Net_SaveHDF5(const Net<Dtype>& net, string filename) { net.ToHDF5(filename); } void Net_LoadHDF5(Net<Dtype>* net, string filename) { net->CopyTrainedLayersFromHDF5(filename.c_str()); } void Net_SetInputArrays(Net<Dtype>* net, bp::object data_obj, bp::object labels_obj) { // check that this network has an input MemoryDataLayer shared_ptr<MemoryDataLayer<Dtype> > md_layer = boost::dynamic_pointer_cast<MemoryDataLayer<Dtype> >(net->layers()[0]); if (!md_layer) { throw std::runtime_error("set_input_arrays may only be called if the" " first layer is a MemoryDataLayer"); } // check that we were passed appropriately-sized contiguous memory PyArrayObject* data_arr = reinterpret_cast<PyArrayObject*>(data_obj.ptr()); PyArrayObject* labels_arr = reinterpret_cast<PyArrayObject*>(labels_obj.ptr()); CheckContiguousArray(data_arr, "data array", md_layer->channels(), md_layer->height(), md_layer->width()); CheckContiguousArray(labels_arr, "labels array", 1, 1, 1); if (PyArray_DIMS(data_arr)[0] != PyArray_DIMS(labels_arr)[0]) { throw std::runtime_error("data and labels must have the same first" " dimension"); } if (PyArray_DIMS(data_arr)[0] % md_layer->batch_size() != 0) { throw std::runtime_error("first dimensions of input arrays must be a" " multiple of batch size"); } md_layer->Reset(static_cast<Dtype*>(PyArray_DATA(data_arr)), static_cast<Dtype*>(PyArray_DATA(labels_arr)), PyArray_DIMS(data_arr)[0]); } Solver<Dtype>* GetSolverFromFile(const string& filename) { SolverParameter param; ReadSolverParamsFromTextFileOrDie(filename, &param); return SolverRegistry<Dtype>::CreateSolver(param); } struct NdarrayConverterGenerator { template <typename T> struct apply; }; template <> struct NdarrayConverterGenerator::apply<Dtype*> { struct type { PyObject* operator() (Dtype* data) const { // Just store the data pointer, and add the shape information in postcall. return PyArray_SimpleNewFromData(0, NULL, NPY_DTYPE, data); } const PyTypeObject* get_pytype() { return &PyArray_Type; } }; }; struct NdarrayCallPolicies : public bp::default_call_policies { typedef NdarrayConverterGenerator result_converter; PyObject* postcall(PyObject* pyargs, PyObject* result) { bp::object pyblob = bp::extract<bp::tuple>(pyargs)()[0]; shared_ptr<Blob<Dtype> > blob = bp::extract<shared_ptr<Blob<Dtype> > >(pyblob); // Free the temporary pointer-holding array, and construct a new one with // the shape information from the blob. void* data = PyArray_DATA(reinterpret_cast<PyArrayObject*>(result)); Py_DECREF(result); const int num_axes = blob->num_axes(); vector<npy_intp> dims(blob->shape().begin(), blob->shape().end()); PyObject *arr_obj = PyArray_SimpleNewFromData(num_axes, dims.data(), NPY_FLOAT32, data); // SetBaseObject steals a ref, so we need to INCREF. Py_INCREF(pyblob.ptr()); PyArray_SetBaseObject(reinterpret_cast<PyArrayObject*>(arr_obj), pyblob.ptr()); return arr_obj; } }; bp::object Blob_Reshape(bp::tuple args, bp::dict kwargs) { if (bp::len(kwargs) > 0) { throw std::runtime_error("Blob.reshape takes no kwargs"); } Blob<Dtype>* self = bp::extract<Blob<Dtype>*>(args[0]); vector<int> shape(bp::len(args) - 1); for (int i = 1; i < bp::len(args); ++i) { shape[i - 1] = bp::extract<int>(args[i]); } self->Reshape(shape); // We need to explicitly return None to use bp::raw_function. return bp::object(); } bp::object BlobVec_add_blob(bp::tuple args, bp::dict kwargs) { if (bp::len(kwargs) > 0) { throw std::runtime_error("BlobVec.add_blob takes no kwargs"); } typedef vector<shared_ptr<Blob<Dtype> > > BlobVec; BlobVec* self = bp::extract<BlobVec*>(args[0]); vector<int> shape(bp::len(args) - 1); for (int i = 1; i < bp::len(args); ++i) { shape[i - 1] = bp::extract<int>(args[i]); } self->push_back(shared_ptr<Blob<Dtype> >(new Blob<Dtype>(shape))); // We need to explicitly return None to use bp::raw_function. return bp::object(); } template<typename Dtype> class PythonCallback: public Solver<Dtype>::Callback { protected: bp::object on_start_, on_gradients_ready_; public: PythonCallback(bp::object on_start, bp::object on_gradients_ready) : on_start_(on_start), on_gradients_ready_(on_gradients_ready) { } virtual void on_gradients_ready() { on_gradients_ready_(); } virtual void on_start() { on_start_(); } }; template<typename Dtype> void Solver_add_callback(Solver<Dtype> * solver, bp::object on_start, bp::object on_gradients_ready) { solver->add_callback(new PythonCallback<Dtype>(on_start, on_gradients_ready)); } BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(SolveOverloads, Solve, 0, 1); BOOST_PYTHON_MODULE(_caffe) { // below, we prepend an underscore to methods that will be replaced // in Python bp::scope().attr("__version__") = AS_STRING(CAFFE_VERSION); // Caffe utility functions bp::def("set_mode_cpu", &set_mode_cpu); bp::def("set_mode_gpu", &set_mode_gpu); bp::def("set_random_seed", &set_random_seed); bp::def("set_device", &Caffe::SetDevice); bp::def("layer_type_list", &LayerRegistry<Dtype>::LayerTypeList); bp::class_<Net<Dtype>, shared_ptr<Net<Dtype> >, boost::noncopyable >("Net", bp::no_init) // Constructor .def("__init__", bp::make_constructor(&Net_Init, bp::default_call_policies(), (bp::arg("network_file"), "phase", bp::arg("level")=0, bp::arg("stages")=bp::object(), bp::arg("weights")=bp::object()))) // Legacy constructor .def("__init__", bp::make_constructor(&Net_Init_Load)) .def("_forward", &Net<Dtype>::ForwardFromTo) .def("_backward", &Net<Dtype>::BackwardFromTo) .def("reshape", &Net<Dtype>::Reshape) .def("clear_param_diffs", &Net<Dtype>::ClearParamDiffs) // The cast is to select a particular overload. .def("copy_from", static_cast<void (Net<Dtype>::*)(const string)>( &Net<Dtype>::CopyTrainedLayersFrom)) .def("share_with", &Net<Dtype>::ShareTrainedLayersWith) .add_property("_blob_loss_weights", bp::make_function( &Net<Dtype>::blob_loss_weights, bp::return_internal_reference<>())) .def("_bottom_ids", bp::make_function(&Net<Dtype>::bottom_ids, bp::return_value_policy<bp::copy_const_reference>())) .def("_top_ids", bp::make_function(&Net<Dtype>::top_ids, bp::return_value_policy<bp::copy_const_reference>())) .add_property("_blobs", bp::make_function(&Net<Dtype>::blobs, bp::return_internal_reference<>())) .add_property("layers", bp::make_function(&Net<Dtype>::layers, bp::return_internal_reference<>())) .add_property("_blob_names", bp::make_function(&Net<Dtype>::blob_names, bp::return_value_policy<bp::copy_const_reference>())) .add_property("_layer_names", bp::make_function(&Net<Dtype>::layer_names, bp::return_value_policy<bp::copy_const_reference>())) .add_property("_inputs", bp::make_function(&Net<Dtype>::input_blob_indices, bp::return_value_policy<bp::copy_const_reference>())) .add_property("_outputs", bp::make_function(&Net<Dtype>::output_blob_indices, bp::return_value_policy<bp::copy_const_reference>())) .def("_set_input_arrays", &Net_SetInputArrays, bp::with_custodian_and_ward<1, 2, bp::with_custodian_and_ward<1, 3> >()) .def("save", &Net_Save) .def("save_hdf5", &Net_SaveHDF5) .def("load_hdf5", &Net_LoadHDF5); BP_REGISTER_SHARED_PTR_TO_PYTHON(Net<Dtype>); bp::class_<Blob<Dtype>, shared_ptr<Blob<Dtype> >, boost::noncopyable>( "Blob", bp::no_init) .add_property("shape", bp::make_function( static_cast<const vector<int>& (Blob<Dtype>::*)() const>( &Blob<Dtype>::shape), bp::return_value_policy<bp::copy_const_reference>())) .add_property("num", &Blob<Dtype>::num) .add_property("channels", &Blob<Dtype>::channels) .add_property("height", &Blob<Dtype>::height) .add_property("width", &Blob<Dtype>::width) .add_property("count", static_cast<int (Blob<Dtype>::*)() const>( &Blob<Dtype>::count)) .def("reshape", bp::raw_function(&Blob_Reshape)) .add_property("data", bp::make_function(&Blob<Dtype>::mutable_cpu_data, NdarrayCallPolicies())) .add_property("diff", bp::make_function(&Blob<Dtype>::mutable_cpu_diff, NdarrayCallPolicies())); BP_REGISTER_SHARED_PTR_TO_PYTHON(Blob<Dtype>); bp::class_<Layer<Dtype>, shared_ptr<PythonLayer<Dtype> >, boost::noncopyable>("Layer", bp::init<const LayerParameter&>()) .add_property("blobs", bp::make_function(&Layer<Dtype>::blobs, bp::return_internal_reference<>())) .def("setup", &Layer<Dtype>::LayerSetUp) .def("reshape", &Layer<Dtype>::Reshape) .add_property("type", bp::make_function(&Layer<Dtype>::type)); BP_REGISTER_SHARED_PTR_TO_PYTHON(Layer<Dtype>); bp::class_<LayerParameter>("LayerParameter", bp::no_init); bp::class_<Solver<Dtype>, shared_ptr<Solver<Dtype> >, boost::noncopyable>( "Solver", bp::no_init) .add_property("net", &Solver<Dtype>::net) .add_property("test_nets", bp::make_function(&Solver<Dtype>::test_nets, bp::return_internal_reference<>())) .add_property("iter", &Solver<Dtype>::iter) .def("add_callback", &Solver_add_callback<Dtype>) .def("solve", static_cast<void (Solver<Dtype>::*)(const char*)>( &Solver<Dtype>::Solve), SolveOverloads()) .def("step", &Solver<Dtype>::Step) .def("restore", &Solver<Dtype>::Restore) .def("snapshot", &Solver<Dtype>::Snapshot); BP_REGISTER_SHARED_PTR_TO_PYTHON(Solver<Dtype>); bp::class_<SGDSolver<Dtype>, bp::bases<Solver<Dtype> >, shared_ptr<SGDSolver<Dtype> >, boost::noncopyable>( "SGDSolver", bp::init<string>()); bp::class_<NesterovSolver<Dtype>, bp::bases<Solver<Dtype> >, shared_ptr<NesterovSolver<Dtype> >, boost::noncopyable>( "NesterovSolver", bp::init<string>()); bp::class_<AdaGradSolver<Dtype>, bp::bases<Solver<Dtype> >, shared_ptr<AdaGradSolver<Dtype> >, boost::noncopyable>( "AdaGradSolver", bp::init<string>()); bp::class_<RMSPropSolver<Dtype>, bp::bases<Solver<Dtype> >, shared_ptr<RMSPropSolver<Dtype> >, boost::noncopyable>( "RMSPropSolver", bp::init<string>()); bp::class_<AdaDeltaSolver<Dtype>, bp::bases<Solver<Dtype> >, shared_ptr<AdaDeltaSolver<Dtype> >, boost::noncopyable>( "AdaDeltaSolver", bp::init<string>()); bp::class_<AdamSolver<Dtype>, bp::bases<Solver<Dtype> >, shared_ptr<AdamSolver<Dtype> >, boost::noncopyable>( "AdamSolver", bp::init<string>()); bp::def("get_solver", &GetSolverFromFile, bp::return_value_policy<bp::manage_new_object>()); // vector wrappers for all the vector types we use bp::class_<vector<shared_ptr<Blob<Dtype> > > >("BlobVec") .def(bp::vector_indexing_suite<vector<shared_ptr<Blob<Dtype> > >, true>()) .def("add_blob", bp::raw_function(&BlobVec_add_blob)); bp::class_<vector<Blob<Dtype>*> >("RawBlobVec") .def(bp::vector_indexing_suite<vector<Blob<Dtype>*>, true>()); bp::class_<vector<shared_ptr<Layer<Dtype> > > >("LayerVec") .def(bp::vector_indexing_suite<vector<shared_ptr<Layer<Dtype> > >, true>()); bp::class_<vector<string> >("StringVec") .def(bp::vector_indexing_suite<vector<string> >()); bp::class_<vector<int> >("IntVec") .def(bp::vector_indexing_suite<vector<int> >()); bp::class_<vector<Dtype> >("DtypeVec") .def(bp::vector_indexing_suite<vector<Dtype> >()); bp::class_<vector<shared_ptr<Net<Dtype> > > >("NetVec") .def(bp::vector_indexing_suite<vector<shared_ptr<Net<Dtype> > >, true>()); bp::class_<vector<bool> >("BoolVec") .def(bp::vector_indexing_suite<vector<bool> >()); // boost python expects a void (missing) return value, while import_array // returns NULL for python3. import_array1() forces a void return value. import_array1(); } } // namespace caffe
{ "pile_set_name": "Github" }
require(__dirname).test( { xml: "<root length='12345'></root>" , expect: [ ["attribute", { name: "length" , value: "12345" , prefix: "" , local: "length" , uri: "" }] , ["opentag", { name: "root" , prefix: "" , local: "root" , uri: "" , attributes: { length: { name: "length" , value: "12345" , prefix: "" , local: "length" , uri: "" } } , ns: {} , isSelfClosing: false }] , ["closetag", "root"] ] , strict: true , opt: { xmlns: true } } )
{ "pile_set_name": "Github" }
# $Id: modules-number.de.po,v 1.2.2.10 2008/11/05 12:24:01 hass Exp $ # German translation of CCK # Copyright 2006 Lukas Gangoly <lukas.gangoly@univie.ac.at> # Copyright 2006 Jakob Petsovits <jpetso@gmx.at> # Generated from files: # field.php,v 1.3 2006/04/16 13:47:13 luke # text.module,v 1.34 2006/06/12 19:59:53 luke # number.module,v 1.28 2006/05/02 13:52:16 luke # content_admin.inc,v 1.16 2006/06/12 19:36:54 luke # content.module,v 1.64 2006/06/12 19:36:54 luke # nodereference.module,v 1.28 2006/06/12 19:36:54 luke # optionwidgets.module,v 1.8 2006/05/01 15:45:29 luke # userreference.module,v 1.24 2006/05/05 14:10:44 luke # weburl.module,v 1.8 2006/06/12 19:36:54 luke # msgid "" msgstr "" "Project-Id-Version: German translation of CCK\n" "POT-Creation-Date: 2008-11-05 12:54+0100\n" "PO-Revision-Date: 2008-11-05 13:18+0100\n" "Last-Translator: Alexander Haß\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n" "X-Poedit-Language: German\n" "X-Poedit-Country: GERMANY\n" "X-Poedit-SourceCharset: utf-8\n" #: modules/number/number.module:34 msgid "Integer" msgstr "Ganzzahl" #: modules/number/number.module:35 msgid "Store a number in the database as an integer." msgstr "Speichert die Zahl in der Datenbank als Ganzzahl." #: modules/number/number.module:38 msgid "Decimal" msgstr "Dezimalzahl" #: modules/number/number.module:39 msgid "Store a number in the database in a fixed decimal format." msgstr "Speichert die Zahl in der Datenbank in einem festen Dezimalformat." #: modules/number/number.module:42 msgid "Float" msgstr "Fließkommazahl" #: modules/number/number.module:43 msgid "Store a number in the database in a floating point format." msgstr "Speichert die Zahl in der Datenbank in einem Fließkommaformat." #: modules/number/number.module:57 msgid "Minimum" msgstr "Minimum" #: modules/number/number.module:63 msgid "Maximum" msgstr "Maximum" #: modules/number/number.module:71 msgid "Precision" msgstr "Präzision" #: modules/number/number.module:72 msgid "The total number of digits to store in the database, including those to the right of the decimal." msgstr "Die gesamte Anzahl der in der Datenbank zu speichernden Stellen, inclusive der rechts vom Dezimaltrennzeichen angegebenen." #: modules/number/number.module:78 msgid "Scale" msgstr "Skalierung" #: modules/number/number.module:79 msgid "The number of digits to the right of the decimal." msgstr "Die Anzahl der rechts vom Dezimaltrennzeichen angegebenen Stellen." #: modules/number/number.module:85 msgid "Decimal marker" msgstr "Dezimalzeichen" #: modules/number/number.module:86 msgid "The character users will input to mark the decimal point in forms." msgstr "Das von Benutzern in Formularen als Dezimalzeichen zu verwendende Symbol." #: modules/number/number.module:92 msgid "Prefix" msgstr "Präfix" #: modules/number/number.module:95 msgid "Define a string that should be prefixed to the value, like $ or €. Leave blank for none. Separate singular and plural values with a pipe (pound|pounds)." msgstr "Eine Zeichenkette angeben, welche dem Wert vorrangestellt werden soll, z.b. $ oder €. Ansonsten freilassen. Werte für Einzahl und Mehrzahl mit einer Pipe trennen (Pfund|Pfunde)." #: modules/number/number.module:99 msgid "Suffix" msgstr "Suffix" #: modules/number/number.module:102 msgid "Define a string that should suffixed to the value, like m², m/s², kb/s. Leave blank for none. Separate singular and plural values with a pipe (pound|pounds)." msgstr "Eine Zeichenkette angeben, welche dem Wert angehängt werden soll, z.b. m², m/s², kb/s. Ansonsten freilassen. Werte für Einzahl und Mehrzahl mit einer Pipe trennen (Pfund|Pfunde)." #: modules/number/number.module:195 msgid "\"Minimum\" must be a number." msgstr "„Minimum“ muss eine Zahl sein." #: modules/number/number.module:202 msgid "\"Maximum\" must be a number." msgstr "„Maximum“ muss eine Zahl sein." #: modules/number/number.module:219 msgid "%name: the value may be no smaller than %min." msgstr "%name: Der Wert darf nicht kleiner als %min sein." #: modules/number/number.module:222 msgid "%name: the value may be no larger than %max." msgstr "%name: Der Wert darf nicht grösser als %max sein." #: modules/number/number.module:270 msgid "unformatted" msgstr "unformatiert" # Float validation: English needs work #: modules/number/number.module:509 #, fuzzy msgid "Only numbers and decimals are allowed in %field." msgstr "Im Feld %field sind nur Ganzzahlen und Fließkommazahlen zulässig." # Integer validation: English needs work #: modules/number/number.module:532 #, fuzzy msgid "Only numbers are allowed in %field." msgstr "Im Feld %field sind nur Ganzzahlen zulässig." # Decimal validation with decimal character: English needs work #: modules/number/number.module:556 #, fuzzy msgid "Only numbers and the decimal character (%decimal) are allowed in %field." msgstr "Im Feld %field sind nur Dezimalzahlen und das Dezimaltrennzeichen (%decimal) zulässig." #: modules/number/number.module:0 msgid "number" msgstr "Zahl" #: modules/number/number.info:0 msgid "Number" msgstr "Zahl" #: modules/number/number.info:0 msgid "Defines numeric field types." msgstr "Definiert einen numerischen Feldtyp."
{ "pile_set_name": "Github" }
# This migration comes from fae (originally 20140822224029) class CreateFaeRoles < ActiveRecord::Migration[4.2] def change create_table :fae_roles do |t| t.string :name t.integer :position t.timestamps end end end
{ "pile_set_name": "Github" }
Change: Make core/signature.json and core/skeleton/ inaccessible https://github.com/owncloud/core/issues/37734
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: networking/v1alpha3/gateway.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='networking/v1alpha3/gateway.proto', package='istio.networking.v1alpha3', syntax='proto3', serialized_options=_b('Z istio.io/api/networking/v1alpha3'), serialized_pb=_b('\n!networking/v1alpha3/gateway.proto\x12\x19istio.networking.v1alpha3\x1a\x1fgoogle/api/field_behavior.proto\"\xbc\x01\n\x07Gateway\x12\x37\n\x07servers\x18\x01 \x03(\x0b\x32!.istio.networking.v1alpha3.ServerB\x03\xe0\x41\x02\x12G\n\x08selector\x18\x02 \x03(\x0b\x32\x30.istio.networking.v1alpha3.Gateway.SelectorEntryB\x03\xe0\x41\x02\x1a/\n\rSelectorEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc1\x01\n\x06Server\x12\x32\n\x04port\x18\x01 \x01(\x0b\x32\x1f.istio.networking.v1alpha3.PortB\x03\xe0\x41\x02\x12\x0c\n\x04\x62ind\x18\x04 \x01(\t\x12\x12\n\x05hosts\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x39\n\x03tls\x18\x03 \x01(\x0b\x32,.istio.networking.v1alpha3.ServerTLSSettings\x12\x18\n\x10\x64\x65\x66\x61ult_endpoint\x18\x05 \x01(\t\x12\x0c\n\x04name\x18\x06 \x01(\t\"Z\n\x04Port\x12\x13\n\x06number\x18\x01 \x01(\rB\x03\xe0\x41\x02\x12\x15\n\x08protocol\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0btarget_port\x18\x04 \x01(\r\"\xa3\x05\n\x11ServerTLSSettings\x12\x16\n\x0ehttps_redirect\x18\x01 \x01(\x08\x12\x42\n\x04mode\x18\x02 \x01(\x0e\x32\x34.istio.networking.v1alpha3.ServerTLSSettings.TLSmode\x12\x1a\n\x12server_certificate\x18\x03 \x01(\t\x12\x13\n\x0bprivate_key\x18\x04 \x01(\t\x12\x17\n\x0f\x63\x61_certificates\x18\x05 \x01(\t\x12\x17\n\x0f\x63redential_name\x18\n \x01(\t\x12\x19\n\x11subject_alt_names\x18\x06 \x03(\t\x12\x1f\n\x17verify_certificate_spki\x18\x0b \x03(\t\x12\x1f\n\x17verify_certificate_hash\x18\x0c \x03(\t\x12V\n\x14min_protocol_version\x18\x07 \x01(\x0e\x32\x38.istio.networking.v1alpha3.ServerTLSSettings.TLSProtocol\x12V\n\x14max_protocol_version\x18\x08 \x01(\x0e\x32\x38.istio.networking.v1alpha3.ServerTLSSettings.TLSProtocol\x12\x15\n\rcipher_suites\x18\t \x03(\t\"Z\n\x07TLSmode\x12\x0f\n\x0bPASSTHROUGH\x10\x00\x12\n\n\x06SIMPLE\x10\x01\x12\n\n\x06MUTUAL\x10\x02\x12\x14\n\x10\x41UTO_PASSTHROUGH\x10\x03\x12\x10\n\x0cISTIO_MUTUAL\x10\x04\"O\n\x0bTLSProtocol\x12\x0c\n\x08TLS_AUTO\x10\x00\x12\x0b\n\x07TLSV1_0\x10\x01\x12\x0b\n\x07TLSV1_1\x10\x02\x12\x0b\n\x07TLSV1_2\x10\x03\x12\x0b\n\x07TLSV1_3\x10\x04\x42\"Z istio.io/api/networking/v1alpha3b\x06proto3') , dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,]) _SERVERTLSSETTINGS_TLSMODE = _descriptor.EnumDescriptor( name='TLSmode', full_name='istio.networking.v1alpha3.ServerTLSSettings.TLSmode', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='PASSTHROUGH', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='SIMPLE', index=1, number=1, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='MUTUAL', index=2, number=2, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='AUTO_PASSTHROUGH', index=3, number=3, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ISTIO_MUTUAL', index=4, number=4, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=1081, serialized_end=1171, ) _sym_db.RegisterEnumDescriptor(_SERVERTLSSETTINGS_TLSMODE) _SERVERTLSSETTINGS_TLSPROTOCOL = _descriptor.EnumDescriptor( name='TLSProtocol', full_name='istio.networking.v1alpha3.ServerTLSSettings.TLSProtocol', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='TLS_AUTO', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='TLSV1_0', index=1, number=1, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='TLSV1_1', index=2, number=2, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='TLSV1_2', index=3, number=3, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='TLSV1_3', index=4, number=4, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=1173, serialized_end=1252, ) _sym_db.RegisterEnumDescriptor(_SERVERTLSSETTINGS_TLSPROTOCOL) _GATEWAY_SELECTORENTRY = _descriptor.Descriptor( name='SelectorEntry', full_name='istio.networking.v1alpha3.Gateway.SelectorEntry', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='key', full_name='istio.networking.v1alpha3.Gateway.SelectorEntry.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='istio.networking.v1alpha3.Gateway.SelectorEntry.value', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=_b('8\001'), is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=239, serialized_end=286, ) _GATEWAY = _descriptor.Descriptor( name='Gateway', full_name='istio.networking.v1alpha3.Gateway', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='servers', full_name='istio.networking.v1alpha3.Gateway.servers', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=_b('\340A\002'), file=DESCRIPTOR), _descriptor.FieldDescriptor( name='selector', full_name='istio.networking.v1alpha3.Gateway.selector', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=_b('\340A\002'), file=DESCRIPTOR), ], extensions=[ ], nested_types=[_GATEWAY_SELECTORENTRY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=98, serialized_end=286, ) _SERVER = _descriptor.Descriptor( name='Server', full_name='istio.networking.v1alpha3.Server', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='port', full_name='istio.networking.v1alpha3.Server.port', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=_b('\340A\002'), file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bind', full_name='istio.networking.v1alpha3.Server.bind', index=1, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='hosts', full_name='istio.networking.v1alpha3.Server.hosts', index=2, number=2, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=_b('\340A\002'), file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tls', full_name='istio.networking.v1alpha3.Server.tls', index=3, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='default_endpoint', full_name='istio.networking.v1alpha3.Server.default_endpoint', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='name', full_name='istio.networking.v1alpha3.Server.name', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=289, serialized_end=482, ) _PORT = _descriptor.Descriptor( name='Port', full_name='istio.networking.v1alpha3.Port', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='number', full_name='istio.networking.v1alpha3.Port.number', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=_b('\340A\002'), file=DESCRIPTOR), _descriptor.FieldDescriptor( name='protocol', full_name='istio.networking.v1alpha3.Port.protocol', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=_b('\340A\002'), file=DESCRIPTOR), _descriptor.FieldDescriptor( name='name', full_name='istio.networking.v1alpha3.Port.name', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=_b('\340A\002'), file=DESCRIPTOR), _descriptor.FieldDescriptor( name='target_port', full_name='istio.networking.v1alpha3.Port.target_port', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=484, serialized_end=574, ) _SERVERTLSSETTINGS = _descriptor.Descriptor( name='ServerTLSSettings', full_name='istio.networking.v1alpha3.ServerTLSSettings', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='https_redirect', full_name='istio.networking.v1alpha3.ServerTLSSettings.https_redirect', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='mode', full_name='istio.networking.v1alpha3.ServerTLSSettings.mode', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='server_certificate', full_name='istio.networking.v1alpha3.ServerTLSSettings.server_certificate', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='private_key', full_name='istio.networking.v1alpha3.ServerTLSSettings.private_key', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ca_certificates', full_name='istio.networking.v1alpha3.ServerTLSSettings.ca_certificates', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='credential_name', full_name='istio.networking.v1alpha3.ServerTLSSettings.credential_name', index=5, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='subject_alt_names', full_name='istio.networking.v1alpha3.ServerTLSSettings.subject_alt_names', index=6, number=6, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='verify_certificate_spki', full_name='istio.networking.v1alpha3.ServerTLSSettings.verify_certificate_spki', index=7, number=11, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='verify_certificate_hash', full_name='istio.networking.v1alpha3.ServerTLSSettings.verify_certificate_hash', index=8, number=12, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='min_protocol_version', full_name='istio.networking.v1alpha3.ServerTLSSettings.min_protocol_version', index=9, number=7, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_protocol_version', full_name='istio.networking.v1alpha3.ServerTLSSettings.max_protocol_version', index=10, number=8, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='cipher_suites', full_name='istio.networking.v1alpha3.ServerTLSSettings.cipher_suites', index=11, number=9, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ _SERVERTLSSETTINGS_TLSMODE, _SERVERTLSSETTINGS_TLSPROTOCOL, ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=577, serialized_end=1252, ) _GATEWAY_SELECTORENTRY.containing_type = _GATEWAY _GATEWAY.fields_by_name['servers'].message_type = _SERVER _GATEWAY.fields_by_name['selector'].message_type = _GATEWAY_SELECTORENTRY _SERVER.fields_by_name['port'].message_type = _PORT _SERVER.fields_by_name['tls'].message_type = _SERVERTLSSETTINGS _SERVERTLSSETTINGS.fields_by_name['mode'].enum_type = _SERVERTLSSETTINGS_TLSMODE _SERVERTLSSETTINGS.fields_by_name['min_protocol_version'].enum_type = _SERVERTLSSETTINGS_TLSPROTOCOL _SERVERTLSSETTINGS.fields_by_name['max_protocol_version'].enum_type = _SERVERTLSSETTINGS_TLSPROTOCOL _SERVERTLSSETTINGS_TLSMODE.containing_type = _SERVERTLSSETTINGS _SERVERTLSSETTINGS_TLSPROTOCOL.containing_type = _SERVERTLSSETTINGS DESCRIPTOR.message_types_by_name['Gateway'] = _GATEWAY DESCRIPTOR.message_types_by_name['Server'] = _SERVER DESCRIPTOR.message_types_by_name['Port'] = _PORT DESCRIPTOR.message_types_by_name['ServerTLSSettings'] = _SERVERTLSSETTINGS _sym_db.RegisterFileDescriptor(DESCRIPTOR) Gateway = _reflection.GeneratedProtocolMessageType('Gateway', (_message.Message,), { 'SelectorEntry' : _reflection.GeneratedProtocolMessageType('SelectorEntry', (_message.Message,), { 'DESCRIPTOR' : _GATEWAY_SELECTORENTRY, '__module__' : 'networking.v1alpha3.gateway_pb2' # @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.Gateway.SelectorEntry) }) , 'DESCRIPTOR' : _GATEWAY, '__module__' : 'networking.v1alpha3.gateway_pb2' # @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.Gateway) }) _sym_db.RegisterMessage(Gateway) _sym_db.RegisterMessage(Gateway.SelectorEntry) Server = _reflection.GeneratedProtocolMessageType('Server', (_message.Message,), { 'DESCRIPTOR' : _SERVER, '__module__' : 'networking.v1alpha3.gateway_pb2' # @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.Server) }) _sym_db.RegisterMessage(Server) Port = _reflection.GeneratedProtocolMessageType('Port', (_message.Message,), { 'DESCRIPTOR' : _PORT, '__module__' : 'networking.v1alpha3.gateway_pb2' # @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.Port) }) _sym_db.RegisterMessage(Port) ServerTLSSettings = _reflection.GeneratedProtocolMessageType('ServerTLSSettings', (_message.Message,), { 'DESCRIPTOR' : _SERVERTLSSETTINGS, '__module__' : 'networking.v1alpha3.gateway_pb2' # @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.ServerTLSSettings) }) _sym_db.RegisterMessage(ServerTLSSettings) DESCRIPTOR._options = None _GATEWAY_SELECTORENTRY._options = None _GATEWAY.fields_by_name['servers']._options = None _GATEWAY.fields_by_name['selector']._options = None _SERVER.fields_by_name['port']._options = None _SERVER.fields_by_name['hosts']._options = None _PORT.fields_by_name['number']._options = None _PORT.fields_by_name['protocol']._options = None _PORT.fields_by_name['name']._options = None # @@protoc_insertion_point(module_scope)
{ "pile_set_name": "Github" }
/*************************************************** This is a library for the Adafruit 1.8" SPI display. This library works with the Adafruit 1.8" TFT Breakout w/SD card ----> http://www.adafruit.com/products/358 as well as Adafruit raw 1.8" TFT display ----> http://www.adafruit.com/products/618 Check out the links above for our tutorials and wiring diagrams These displays use SPI to communicate, 4 or 5 pins are required to interface (RST is optional) Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried/Ladyada for Adafruit Industries. MIT license, all text above must be included in any redistribution ****************************************************/ #ifndef _ADAFRUIT_ST7735H_ #define _ADAFRUIT_ST7735H_ #if ARDUINO >= 100 #include "Arduino.h" #include "Print.h" #else #include "WProgram.h" #endif #include "Adafruit_GFX.h" #include <SPI.h> #include <avr/pgmspace.h> // some flags for initR() :( #define INITR_GREENTAB 0x0 #define INITR_REDTAB 0x1 #define INITR_BLACKTAB 0x2 #define ST7735_TFTWIDTH 128 #define ST7735_TFTHEIGHT 160 #define ST7735_NOP 0x00 #define ST7735_SWRESET 0x01 #define ST7735_RDDID 0x04 #define ST7735_RDDST 0x09 #define ST7735_SLPIN 0x10 #define ST7735_SLPOUT 0x11 #define ST7735_PTLON 0x12 #define ST7735_NORON 0x13 #define ST7735_INVOFF 0x20 #define ST7735_INVON 0x21 #define ST7735_DISPOFF 0x28 #define ST7735_DISPON 0x29 #define ST7735_CASET 0x2A #define ST7735_RASET 0x2B #define ST7735_RAMWR 0x2C #define ST7735_RAMRD 0x2E #define ST7735_PTLAR 0x30 #define ST7735_COLMOD 0x3A #define ST7735_MADCTL 0x36 #define ST7735_FRMCTR1 0xB1 #define ST7735_FRMCTR2 0xB2 #define ST7735_FRMCTR3 0xB3 #define ST7735_INVCTR 0xB4 #define ST7735_DISSET5 0xB6 #define ST7735_PWCTR1 0xC0 #define ST7735_PWCTR2 0xC1 #define ST7735_PWCTR3 0xC2 #define ST7735_PWCTR4 0xC3 #define ST7735_PWCTR5 0xC4 #define ST7735_VMCTR1 0xC5 #define ST7735_RDID1 0xDA #define ST7735_RDID2 0xDB #define ST7735_RDID3 0xDC #define ST7735_RDID4 0xDD #define ST7735_PWCTR6 0xFC #define ST7735_GMCTRP1 0xE0 #define ST7735_GMCTRN1 0xE1 // Color definitions #define ST7735_BLACK 0x0000 #define ST7735_BLUE 0x001F #define ST7735_RED 0xF800 #define ST7735_GREEN 0x07E0 #define ST7735_CYAN 0x07FF #define ST7735_MAGENTA 0xF81F #define ST7735_YELLOW 0xFFE0 #define ST7735_WHITE 0xFFFF class Adafruit_ST7735 : public Adafruit_GFX { public: Adafruit_ST7735(uint8_t CS, uint8_t RS, uint8_t SID, uint8_t SCLK, uint8_t RST); Adafruit_ST7735(uint8_t CS, uint8_t RS, uint8_t RST); void initB(void), // for ST7735B displays initG(void), // for ILI9163C displays initR(uint8_t options = INITR_GREENTAB), // for ST7735R setAddrWindow(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1), pushColor(uint16_t color), fillScreen(uint16_t color), drawPixel(int16_t x, int16_t y, uint16_t color), drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color), drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color), fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color), setRotation(uint8_t r), invertDisplay(boolean i); uint16_t Color565(uint8_t r, uint8_t g, uint8_t b) { return newColor(r, g, b);} /* These are not for current use, 8-bit protocol only! uint8_t readdata(void), readcommand8(uint8_t); uint16_t readcommand16(uint8_t); uint32_t readcommand32(uint8_t); void dummyclock(void); */ private: uint8_t tabcolor; void spiwrite(uint8_t), writecommand(uint8_t c), writedata(uint8_t d), commandList(const uint8_t *addr), commonInit(const uint8_t *cmdList); //uint8_t spiread(void); boolean hwSPI; #ifdef SPI_HAS_TRANSACTION SPISettings spisettings; #endif #if defined(ARDUINO_ARCH_SAM) || defined(__ARDUINO_ARC__) volatile uint32_t *dataport, *clkport, *csport, *rsport; uint32_t _cs, _rs, _rst, _sid, _sclk, datapinmask, clkpinmask, cspinmask, rspinmask, colstart, rowstart; // some displays need this changed #else volatile uint8_t *dataport, *clkport, *csport, *rsport; uint8_t _cs, _rs, _rst, _sid, _sclk, datapinmask, clkpinmask, cspinmask, rspinmask, colstart, rowstart; // some displays need this changed #endif }; #endif
{ "pile_set_name": "Github" }
import UIKit import MixinServices class RemoveEmergencyContactValidationViewController: PinValidationViewController { convenience init() { self.init(nib: R.nib.pinValidationView) transitioningDelegate = presentationManager modalPresentationStyle = .custom } override func viewDidLoad() { super.viewDidLoad() descriptionLabel.text = R.string.localizable.emergency_pin_protection_hint() } override func validate(pin: String) { EmergencyAPI.delete(pin: pin) { [weak self] (result) in guard let weakSelf = self else { return } weakSelf.loadingIndicator.stopAnimating() switch result { case .success(let account): LoginManager.shared.setAccount(account) weakSelf.dismiss(animated: true, completion: nil) case .failure(let error): weakSelf.handle(error: error) } } } }
{ "pile_set_name": "Github" }
var v8 = {}; try { v8 = require("v8"); } catch (e) { } module.exports = v8;
{ "pile_set_name": "Github" }
;;; authors.el --- utility for maintaining Emacs's AUTHORS file ;; Copyright (C) 2000-2018 Free Software Foundation, Inc. ;; Author: Gerd Moellmann <gerd@gnu.org> ;; Maintainer: emacs-devel@gnu.org ;; Keywords: maint ;; Package: emacs ;; This file is part of GNU Emacs. ;; GNU Emacs 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. ;; GNU Emacs 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 GNU Emacs. If not, see <https://www.gnu.org/licenses/>. ;;; Commentary: ;; Use M-x authors RET to create an *Authors* buffer that can used as ;; or merged with Emacs's AUTHORS file. ;;; Code: (defvar authors-coding-system 'utf-8 "Coding system used in the AUTHORS file.") (defconst authors-many-files 20 "Maximum number of files for which to print individual information. If an author has modified more files, only the names of the most frequently modified files are printed and a count of the additional files.") (defconst authors-aliases '( (nil "A\\. N\\. Other") ; unknown author 2014-12-03, later removed ("Aaron S. Hawley" "Aaron Hawley") ("Alan Third" "Alan J Third") ("Alexandru Harsanyi" "Alex Harsanyi") ("Álvar Jesús Ibeas Martín" "Álvar Ibeas") ("Andrew Csillag" "Drew Csillag") ("Anna M. Bigatti" "Anna Bigatti") ("Aurélien Aptel" "Aurelien Aptel") ("Barry A. Warsaw" "Barry A. Warsaw, Century Computing, Inc." "Barry A. Warsaw, ITB" "Barry Warsaw") ("Bastien Guerry" "Bastien .*bzg") ("Bill Carpenter" "WJ Carpenter") ("Bill Mann" "William F. Mann") ("Bill Rozas" "Guillermo J. Rozas") (nil "binjo.cn@gmail.com") ("Björn Torkelsson" "Bjorn Torkelsson") ("Brian Fox" "Brian J. Fox") ("Brian P Templeton" "BT Templeton") ("Brian Sniffen" "Brian T. Sniffen") (nil "castor@my-dejanews") (nil "chengang31@gmail.com") ("David Abrahams" "Dave Abrahams") ("David J. Biesack" "David Biesack") ("David De La Harpe Golden" "David Golden") ("David Gillespie" "Dave Gillespie") ("David S. Goldberg" "Dave Goldberg") ("David Kågedal" "David K..edal") ("David M. Koppelman" "David Koppelman") ("David M. Smith" "David Smith" "David M Smith") ("David O'Toole" "David T. O'Toole") (nil "deech@deech") ("Deepak Goel" "D. Goel") ("Ed L. Cashin" "Ed L Cashin") ("Edward M. Reingold" "Ed\\(ward\\( M\\)?\\)? Reingold" "Reingold Edward M") ("Emilio C. Lopes" "Emilio Lopes") ("Eric M. Ludlam" "Eric Ludlam") ("Eric S. Raymond" "Eric Raymond") ("Fabián Ezequiel Gallina" "Fabian Ezequiel Gallina" "Fabi.n E\\. Gallina") (nil "felix.*EmacsWiki") (nil "foudfou") ("Francis Litterio" "Fran Litterio") ("Francis J. Wright" "Dr Francis J. Wright" "Francis Wright") ("François Pinard" "Francois Pinard") ("Francesco Potortì" "Francesco Potorti" "Francesco Potorti`") ("Frederic Pierresteguy" "Fred Pierresteguy") (nil "^FSF") ("Gerd Möllmann" "Gerd Moellmann") ("Hallvard B. Furuseth" "Hallvard B Furuseth" "Hallvard Furuseth") ("Hrvoje Nikšić" "Hrvoje Niksic") ;; lisp/org/ChangeLog.1 2010-11-11. (nil "immerrr") (nil "aaa bbb") (nil "Code Extracted") ; lisp/newcomment.el's "Author:" header ("Jaeyoun Chung" "Jae-youn Chung" "Jae-you Chung" "Chung Jae-youn") ("Jan Djärv" "Jan D." "Jan Djarv") ("Jay K. Adams" "Jay Adams") ("Jérôme Marant" "Jérôme Marant" "Jerome Marant") ("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen") ("Jeremy Bertram Maitin-Shepard" "Jeremy Maitin-Shepard") ("Johan Bockgård" "Johan Bockgard") ("John F. Carr" "John F Carr") ("John J Foerch" "John Foerch") ("John W. Eaton" "John Eaton") ("Jonathan I. Kamens" "Jonathan Kamens") ("Jorgen Schäfer" "Jorgen Schaefer") ("Joseph Arceneaux" "Joe Arceneaux") ("Joseph M. Kelsey" "Joe Kelsey") ; FIXME ? ("Juan León Lahoz García" "Juan-Leon Lahoz Garcia") ("Jürgen Hötzel" "Juergen Hoetzel") ("K. Shane Hartman" "Shane Hartman") ("Kai Großjohann" "Kai Grossjohann") ("Karl Berry" "K. Berry") ("Károly Lőrentey" "Károly Lőrentey" "Lőrentey Károly") ("Kazushi Marukawa" "Kazushi (Jam) Marukawa") ("Ken Manheimer" "Kenneth Manheimer") ("Kenichi Handa" "Ken'ichi Handa" "Kenichi HANDA" "K\\. Handa") ("Kevin Greiner" "Kevin J. Greiner") ("Kim F. Storm" "Kim Storm") ("Kyle Jones" "Kyle E. Jones") ("Lars Magne Ingebrigtsen" "Lars Ingebrigtsen") (nil "LynX@bk.ru") (nil "lu4nx") ("Marcus G. Daniels" "Marcus Daniels") ("Mark D. Baushke" "Mark D Baushke") ("Mark E. Shoulson" "Mark Shoulson") ("Marko Kohtala" "Kohtala Marko") ("Agustín Martín" "Agustin Martin" "Agustín Martín Domingo") ("Martin Lorentzon" "Martin Lorentzson") ("Matt Swift" "Matthew Swift") (nil "mu@magi.net.ru") ("Maxime Edouard Robert Froumentin" "Max Froumentin") ("Michael R. Mauger" "Michael Mauger") ("Michael D. Ernst" "Michael Ernst") ("Michaël Cadilhac" "Michael Cadilhac") ("Michael I. Bushnell" "Michael I Bushnell" "Michael I. Bushnell, p/BSG") ("Michael R. Cook" "Michael Cook") ("Michael Sperber" "Mike Sperber" "Michael Sperber \\[Mr. Preprocessor\\]") ("Mikio Nakajima" "Nakajima Mikio") ("Nelson Jose dos Santos Ferreira" "Nelson Ferreira") ("Noorul Islam" "Noorul Islam K M") ;;; ("Tetsurou Okazaki" "OKAZAKI Tetsurou") ; FIXME? ("Óscar Fuentes" "Oscar Fuentes") (nil "psyberbits@gmail.com") ("Paul Eggert" "Paul R\\. Eggert") ("Pavel Janík" "Pavel Janík Ml." "Pavel Janik Ml." "Pavel Janik") ("Pavel Kobiakov" "Pavel Kobyakov") ("Per Abrahamsen" "Per Abhiddenware") ("Per Starbäck" "Per Starback") ("Peter J. Weisberg" "PJ Weisberg") ("Peter S. Galbraith" "Peter S Galbraith" "Peter Galbraith") ("Peter Runestig" "Peter 'luna' Runestig") ("Philipp Stephani" "Philipp .*phst@google") ("Piotr Zieliński" "Piotr Zielinski") ("Przemysław Wojnowski" "Przemyslaw Wojnowski") ("R. Bernstein" "rb@dustyfeet.com") ("Rainer Schöpf" "Rainer Schoepf") ("Raja R. Harinath" "Raja R Harinath") ("Rasmus Pank Roulund" "Rasmus .*rasmus@gmx") ("Richard G. Bielawski" "Richard G Bielawski" "Richard Bielawski") ("Richard King" "Dick King") ("Richard M. Stallman" "Richard Stallman" "rms@gnu.org") ("Robert J. Chassell" "Bob Chassell") ("Roberto Huelga Díaz" "Roberto Huelga") ("Rodney J. Whitby" "Rod Whitby") ("Roland B. Roberts" "Roland B Roberts" "Roland Roberts") ("Ron Schnell" "Ronnie Schnell") ("Rui-Tao Dong" "Rui-Tao Dong ~{6-HpLN~}") ("Ryan Thompson" "Ryan .*rct@thompsonclan") (nil "rzl24ozi") ("Sacha Chua" "Sandra Jean Chua") ("Sam Steingold" "Sam Shteingold") ("Satyaki Das" "Indexed search by Satyaki Das") ("Sébastien Vauban" "Sebastien Vauban") ("Sergey Litvinov" "Litvinov Sergey") ("Simen Heggestøyl" "simenheg@gmail.com") (nil "prime.wizard") ("Shun-ichi Goto" "Shun-ichi GOTO") ;; There are other Stefans. ;;; ("Stefan Monnier" "Stefan") ("Steven L. Baur" "SL Baur" "Steven L Baur") ("Stewart M. Clamen" "Stewart Clamen") ("Stuart D. Herring" "Stuart Herring" "Davis Herring") ("T.V. Raman" "T\\. V\\. Raman") ("Taichi Kawabata" "KAWABATA,? Taichi") ("Takaaki Ota" "Tak Ota") ("Takahashi Naoto" "Naoto Takahashi") ("Teodor Zlatanov" "Ted Zlatanov") (nil "The PCL-CVS Trust") ("Thomas Dye" "Tom Dye") ("Thomas Horsley" "Tom Horsley") ; FIXME ? ("Thomas Wurgler" "Tom Wurgler") ("Toby Cubitt" "Toby S\\. Cubitt") ("Tomohiko Morioka" "MORIOKA Tomohiko") ("Torbjörn Axelsson" "Torbjvrn Axelsson") ("Torbjörn Einarsson" "Torbj.*rn Einarsson") ("Toru Tomabechi" "Toru TOMABECHI") ("Tsugutomo Enami" "enami tsugutomo") ("Ulrich Müller" "Ulrich Mueller") (nil "vividsnow") ("Vincent Del Vecchio" "Vince Del Vecchio") ("William M. Perry" "Bill Perry") ("Wlodzimierz Bzyl" "W.*dek Bzyl") (nil "xyblor") ("Yoni Rabkin" "Yoni Rabkin Katzenell") ("Yoshinori Koseki" "KOSEKI Yoshinori" "小関 吉則") ("Yutaka NIIBE" "NIIBE Yutaka") ) "Alist of author aliases. Each entry is of the form (REALNAME REGEXP...). If an author's name matches one of the REGEXPs, use REALNAME instead. If REALNAME is nil, ignore that author.") ;; FIXME seems it would be less fragile to check for O', Mc, etc. (defconst authors-fixed-case '("Barry O'Reilly" "Brian McKenna" "Brian van den Broek" "Bryan O'Sullivan" "Christian von Roques" "Christophe de Dinechin" "Craig McDaniel" "Daniel LaLiberte" "Daniel McClanahan" "David J. MacKenzie" "David McCabe" "David O'Toole" "Devon Sean McCullough" "Dominique de Waleffe" "Theresa O'Connor" "Exal de Jesus Garcia Carrillo" "George McNinch" "Greg McGary" "Hans de Graaff" "Ivan Vilata i Balaguer" "Jae-hyeon Park" "James TD Smith" "Jay McCarthy" "Joel N. Weber II" "Matt McClure" "Mike McLean" "Michael McNamara" "Mike McEwan" "Nelson Jose dos Santos Ferreira" "Peter von der Ahé" "Peter O'Gorman" "Piet van Oostrum" "Roland McGrath" "Santiago Payà i Miralta" "Sean O'Halpin" "Sean O'Rourke" "Shun-ichi Goto" "Thomas DeWeese" "Tijs van Bakel" "Titus von der Malsburg" "Yu-ji Hosokawa") "List of authors whose names cannot be simply capitalized.") (defvar authors-public-domain-files '("emerge\\.el" "vi\\.el" "feedmail\\.el" "mailpost\\.el" "hanoi\\.el" "meese\\.el" "studly\\.el" "modula2\\.el" "nnmaildir\\.el" "nnil\\.el" "b2m\\.c" "unexhp9k800\\.c" "emacsclient\\.1" "check-doc-strings") "List of regexps matching files for which the FSF doesn't need papers.") (defvar authors-obsolete-files-regexps '(".*loaddefs.el$" ; not obsolete, but auto-generated "\\.\\(bzr\\|cvs\\|git\\)ignore$" ; obsolete or uninteresting "\\.arch-inventory$" "ChangeLog\\(\\.[0-9]+\\)?\\'" "\\(automated\\|test\\)/data/" ; not interesting "cedet/tests/" "test/etags/" "\\`\\(indent\\|automated\\)\\'" "indent/" "mod-test/" "-resources/" "unidata/.*\\.txt\\'" "BidiCharacterTest.txt" ;; TODO lib/? Matches other things? "build-aux/" "m4/" "Emacs.xcodeproj" "mapfiles" "\\.map\\'" "preferences\\.\\(nib\\|gorm\\)" ;; Generated files that have since been removed. "\\(refcard\\(-de\\|-pl\\)?\\|calccard\\|dired-ref\\|orgcard\\|\ gnus-booklet\\|fr-drdref\\)\\.p\\(df\\|s\\)\\'") "List of regexps matching obsolete files. Changes to files matching one of the regexps in this list are not listed.") (defconst authors-no-scan-regexps '("etc/nxml/" "test/data/" "test/.*-resources/") "Lists of regexps matching files not to scan for authorship.") (defconst authors-ignored-files '("external-lisp" "lock" "share-lib" "local-lisp" "noleim-Makefile.in" "NEWS" "ORDERS" "PROBLEMS" "FAQ" "AUTHORS" "release-process" "TODO" "todo" "MACHINES" "SERVICE" "README.unicode" "README.multi-tty" "TUTORIAL.translators" "NEWS.unicode" "COPYING.DJ" "Makefile.old" "Makefile.am" "NEWS.1" "OOOOONEWS...OONEWS" "OOOONEWS" "etc/NEWS" "NEWS.1-17" "NEWS.18" "NEWS.19" "NEWS.20" "NEWS.21" "NEWS.22" "MAINTAINERS" "MH-E-NEWS" "install.sh" "install-sh" "missing" "mkinstalldirs" "termcap.dat" "termcap.src" "termcap.ucb" "termcap" "ChangeLog.nextstep" "Emacs.clr" "spec.txt" "gfdl.1" "texi/Makefile.in" "autodeps.mk" "src/autodeps.mk" "Imakefile" "icons/sink.ico" "aixcc.lex" "nxml/char-name/unicode" "spec.txt" "js2-mode.el" ; only installed very briefly, replaced by js.el ;; In the old imported lisp/url ChangeLog, but never in Emacs. "mule-sysdp.el" ;; Only briefly present. "tests/gnustest-nntp.el" "tests/gnustest-registry.el" "cedet/tests/testtemplates.cpp" "cedet/tests/testusing.cpp" "cedet/tests/scopetest.cpp" "cedet/tests/scopetest.java" "cedet/tests/test.cpp" "cedet/tests/test.py" "cedet/tests/teststruct.cpp" "subdirs.el" "*.el" ;; Autogen: "cus-load.el" "finder-inf.el" "ldefs-boot.el" "loaddefs-boot.el" "lisp/ldefs-boot-manual.el" "lisp/ldefs-boot-auto.el" "compile" "config.guess" "config.sub" "depcomp" "autogen/compile" "autogen/config.guess" "autogen/config.in" "autogen/config.sub" "autogen/depcomp" "autogen/install-sh" "autogen/missing" "autogen" "autogen/copy_autogen" ; not generated, but trivial and now removed "dir_top" ;; Only existed briefly, then renamed: "images/icons/allout-widgets-dark-bg" "images/icons/allout-widgets-light-bg" ;; Never had any meaningful changes logged, now deleted: "lib/stdarg.in.h" "lib/stdbool.in.h" "unidata/bidimirror.awk" "unidata/biditype.awk" "split-man" "Xkeymap.txt" "ms-7bkermit" "ulimit.hack" "gnu-hp300" "refcard.bit" "ledit.l" "forms.README" "forms-d2.dat" "CXTERM-DIC/PY.tit" "CXTERM-DIC/ZIRANMA.tit" "CXTERM-DIC/CTLau.tit" "CXTERM-DIC/CTLauB.tit" "copying.paper" "celibacy.1" "condom.1" "echo.msg" "sex.6" "COOKIES" "INTERVIEW" "MAILINGLISTS" "MOTIVATION" "NICKLES.WORTH" "INTERVAL.IDEAS" "RCP" "3B-MAXMEM" "AIX.DUMP" "SUN-SUPPORT" "XENIX" "CODINGS" "CHARSETS" "calc/INSTALL" "calc/Makefile" "calc/README.prev" "vms-pp.trans" "_emacs" "batcomp.com" "notes/cpp" ; admin/ "notes/BRANCH" "notes/exit-value" "emacsver.texi.in" "vpath.sed" "Cocoa/Emacs.base/Contents/Info.plist" "Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" "GNUstep/Emacs.base/Resources/Info-gnustep.plist" "GNUstep/Emacs.base/Resources/Emacs.desktop" "Cocoa/Emacs.base/Contents/Resources/English.lproj" ;; Only existed briefly, then deleted: "coccinelle/overlay.cocci" "coccinelle/symbol.cocci" ;; MH-E stuff not in Emacs: "import-emacs" "release-utils" ;; Erc stuff not in Emacs: "ChangeLog.2001" "ChangeLog.2002" "ChangeLog.2003" "ChangeLog.2004" "ChangeLog.2005" "README.extras" "dir-template" "mkChangeLog" "MkChangeLog" "erc-auto.in" "CREDITS" "HACKING" "debian/changelog" "debian/control" "debian/copyright" "debian/maint/conffiles" "debian/maint/conffiles.in" "debian/maint/postinst" "debian/maint/postinst.in" "debian/maint/prerm" "debian/maint/prerm.in" "debian/README.Debian" "debian/README.erc-speak" "debian/rules" "debian/scripts/install" "debian/scripts/install.in" "debian/scripts/remove" "debian/scripts/remove.in" "debian/scripts/startup" "debian/scripts/startup.erc" "debian/scripts/startup.erc-speak" ;; Used to be in admin, not very interesting. "emacs-pretesters" "make-announcement" "make-changelog-diff" "admin/FOR-RELEASE" "etc/FOR-RELEASE" "nextstep/FOR-RELEASE" "FOR-RELEASE" ;; Textual comments that are not files. "All" "Version" "Everywhere" "Many" "Various" "files" ;; Directories. "vms" "mac" "url" "tree-widget" "info/dir" ;; Not in gnulib anymore "lib/qset-acl.c" "lib/qcopy-acl.c" "lib/file-has-acl.c" "lib/secure_getenv.c" ;; files from old MS Windows build procedures "nt/gnulib-modules-to-delete.cfg" "makefile.w32-in" "admin/unidata/makefile.w32-in" "unidata/makefile.w32-in" "lib/makefile.w32-in" "lib-src/makefile.w32-in" "leim/makefile.w32-in" "lisp/makefile.w32-in" "src/makefile.w32-in" "nt/emacs-src.tags" "doc/emacs/makefile.w32-in" "doc/lispintro/makefile.w32-in" "doc/lispref/makefile.w32-in" "doc/misc/makefile.w32-in" "nt/paths.h" "paths.h" "src/paths.h" "envadd.bat" "multi-install-info.bat" "INSTALL.OLD" "nt/INSTALL.OLD" "nt/src/paths.h" "nmake.defs" "gmake.defs" "zipdist.bat" "nt/makefile.w32-in" "nt/subdirs.el" "config.nt" "nextstep/WISHLIST" ) "List of files and directories to ignore. Changes to files in this list are not listed.") ;; List via: find . -name '*.el' | sed 's/.*\///g' | sort | uniq -d ;; FIXME It would be better to discover these dynamically. (defconst authors-ambiguous-files '("Makefile.in" "makefile.w32-in" "chart.el" "cl-lib.el" "compile.el" "complete.el" "cpp.el" "ctxt.el" "custom.el" "cyrillic.el" "czech.el" "debug.el" "dired.el" "el.el" "eshell.el" "ethiopic.el" "f90.el" "files.el" "find.el" "format.el" "generic.el" "georgian.el" "grammar.el" "greek.el" "grep.el" "hebrew.el" "imenu.el" "indian.el" "info-xref.el" "japanese.el" "java.el" "lao.el" "linux.el" "locate.el" "make.el" "mode.el" "mule-util.el" "python.el" "rmailmm.el" "semantic.el" "shell.el" "simple.el" "slovak.el" "sort.el" "speedbar.el" "srecode.el" "table.el" "texi.el" "thai.el" "thingatpt.el" "tibetan.el" "util.el" "vc-bzr.el" "wisent.el") "List of basenames occurring more than once in the source.") ;; FIXME :cowrote entries here can be overwritten by :wrote entries ;; derived from a file's Author: header (eg mh-e). This really means ;; the Author: header is erroneous. (defconst authors-fixed-entries '(("Richard M. Stallman" :wrote "[The original GNU Emacs and numerous files]") ("Joseph Arceneaux" :wrote "xrdb.c") ;; This refers to the obsolete Willisson (qv) version. ;;; ("Blitz Product Development Corporation" :wrote "ispell.el") ("Frank Bresz" :wrote "diff.el") ("David M. Brown" :wrote "array.el") ;; No longer distributed. ;;; ("Gary Byers" :changed "xenix.h") ;; No longer distributed: freebsd.h ;; Only trivial pieces remain, merged into configure.ac. ("Shawn M. Carey" :wrote "[some early FreeBSD support]") ;; hp800.h renamed from hp9000s800.h, hpux.h merged into hpux10-20.h. ;; FIXME overwritten by Author:. ("Satyaki Das" :cowrote "mh-search.el") ;; No longer distributed: hp800.h, hpux10-20.h. ;; Only trivial pieces remain, merged into configure.ac. ("Eric Decker" :changed "sysdep.c (and other files for HP-UX support)") ("Lawrence R. Dodd" :cowrote "dired-x.el") ;; No longer distributed. ;;; ("Viktor Dukhovni" :wrote "unexsunos4.c") ("Paul Eggert" :wrote "rcs2log") ; "vcdiff" ("Fred Fish" :changed "unexcoff.c") ;; No longer distributed. ;;; ("Tim Fleehart" :wrote "makefile.nt") ("Keith Gabryelski" :wrote "hexl.c") ("Kevin Gallagher" :wrote "flow-ctrl.el") ;; Also wrote an earlier version of disp-table.el, since replaced ;; by Erik Naggum's version; also iso-syntax.el, later renamed to ;; latin-1.el, since deleted. ("Howard Gayle" :wrote "casetab.c") ;; :wrote mh-pick.el, since merged into mh-search.el. ;; Originally wrote mh-funcs.el, but it has been rewritten since. ("Stephen Gildea" :wrote "refcard.tex" :cowrote "mh-funcs.el" "mh-search.el") ;; cl.texinfo renamed to cl.texi. ("David Gillespie" :wrote "cl.texi") ;; No longer distributed: emacsserver.c. ("Hewlett-Packard" :changed "emacsclient.c" "server.el" "keyboard.c") ;; No longer distributed. ;;; ("Thomas Horsley" :wrote "cxux.h" "cxux7.h") ("Indiana University Foundation" :changed "buffer.c" "buffer.h" "indent.c" "search.c" "xdisp.c" "region-cache.c" "region-cache.h") ;; ibmrt.h, ibmrt-aix.h no longer distributed. ("International Business Machines" :changed "emacs.c" "fileio.c" "process.c" "sysdep.c" "unexcoff.c") ;; No longer distributed. ;;; ("Ishikawa Chiaki" :changed "aviion.h" "dgux.h") ;; No longer distributed: ymakefile, intel386.h, mem-limits.h, template.h, ;; linux.h (was renamed to lignux.h, then to gnu-linux.h, then removed) ("Michael K. Johnson" :changed "configure.ac" "emacs.c" "process.c" "sysdep.c" "syssignal.h" "systty.h" "unexcoff.c") ;; No longer distributed. ;;; ("Kyle Jones" :wrote "mldrag.el") ("Henry Kautz" :wrote "bib-mode.el") ;; No longer distributed: vms-pwd.h, vmsfns.c, uaf.h, ;; dir.h (was renamed to vmsdir.h, then removed) ("Joseph M. Kelsey" :changed "fileio.c") ("Sam Kendall" :changed "etags.c" "etags.el") ;; ack.texi: "We're not using his backquote.el any more." ("Richard King" :wrote "userlock.el" "filelock.c") ("Sebastian Kremer" :changed "add-log.el") ("Mark Lambert" :changed "process.c" "process.h") ("Aaron Larson" :changed "bibtex.el") ;; It was :wrote, but it has been rewritten since. ("James R. Larus" :cowrote "mh-e.el") ("Lars Lindberg" :changed "dabbrev.el" :cowrote "imenu.el") ;; No longer distributed: lselect.el. ("Lucid, Inc." :changed "bytecode.c" "byte-opt.el" "byte-run.el" "bytecomp.el" "delsel.el" "disass.el" "faces.el" "font-lock.el" "lmenu.el" "mailabbrev.el" "select.el" "xfaces.c" "xselect.c") ;; MCC. No longer distributed: emacsserver.c. ("Microelectronics and Computer Technology Corporation" :changed "etags.c" "emacsclient.c" "movemail.c" "rmail.el" "rmailedit.el" "rmailkwd.el" "rmailmsc.el" "rmailout.el" "rmailsum.el" "scribe.el" ;; It was :wrote for xmenu.c, but it has been rewritten since. "server.el" "lisp.h" "sysdep.c" "unexcoff.c" "xmenu.c") ("Niall Mansfield" :changed "etags.c") ("Brian Marick" :cowrote "hideif.el") ("Marko Kohtala" :changed "info.el") ("Sidney Markowitz" :changed "doctor.el") ;; No longer distributed: env.c. ("Richard Mlynarik" :wrote "ehelp.el") ("Mosur Mohan" :changed "etags.c") ("Jeff Morgenthaler" :changed "flow-ctrl.el" "vt200.el" "vt201.el" "vt220.el" "vt240.el") ("Motorola" :changed "buff-menu.el") ("Hiroshi Nakano" :changed "ralloc.c") ;; File removed in Emacs 24.1. ;;; ("Sundar Narasimhan" :changed "rnewspost.el") ;; No longer distributed. ;;; ("NeXT, Inc." :wrote "unexnext.c") ("Mark Neale" :changed "fortran.el") ;; Renamed from sc.el. ("Martin Neitzel" :changed "supercite.el") ("Andrew Oram" :changed "calendar.texi (and other doc files)") ("Frederic Pierresteguy" :wrote "widget.c") ("Michael D. Prange" :changed "tex-mode.el") ;; No longer distributed (dgux5-4r3.h was renamed to dgux5-4-3.h). ;;; ("Paul Reilly" :wrote "gux5-4r2.h" "dgux5-4-3.h") ("Rob Riepel" :wrote "tpu-edt.doc") ("Roland B. Roberts" :changed "files.el" "sort.el" "buffer.h" "callproc.c" "dired.c" "process.c" "sysdep.c" "systty.h") ;; No longer distributed. ;;; "vmspaths.h" "build.com" "compile.com" "kepteditor.com" "precomp.com" ;;; "vmsproc.el" :wrote "logout.com" "mailemacs.com") ;;; ("Guillermo J. Rozas" :wrote "fakemail.c") ("Wolfgang Rupprecht" :changed "lisp-mode.el" "loadup.el" "sort.el" "alloc.c" "callint.c" ;; config.in renamed from config.h.in, now a generated file. ;; ecrt0.c renamed from crt0.c, then removed. "data.c" "fns.c" "lisp.h" "lread.c" ; "sun3.h" "ymakefile" - no longer distributed "print.c" :wrote "float-sup.el" "floatfns.c") ("Schlumberger Technology Corporation" :changed "gud.el") ;; Replaced by tcl.el. ;;; ("Gregor Schmid" :wrote "tcl-mode.el") ;; No longer distributed since 24.1. ;;; ("Rainer Schöpf" :wrote "alpha.h" "unexalpha.c") ;; No longer distributed: emacsserver.c. ("William Sommerfeld" :wrote "emacsclient.c" "scribe.el") ;; No longer distributed: emacsserver.c. ("Leigh Stoller" :changed "emacsclient.c" "server.el") ("Steve Strassmann" :wrote "spook.el") ("Shinichirou Sugou" :changed "etags.c") ;; No longer distributed: emacsserver.c. ("Sun Microsystems, Inc" :changed "emacsclient.c" "server.el" :wrote "emacs.icon" "sun.el") ;; No longer distributed. ;;; "emacstool.1" "emacstool.c" "sun-curs.el" ;;; "sun-fns.el" "sun-mouse.el" "sunfns.c") ;; Renamed from sc.el. ("Kayvan Sylvan" :changed "supercite.el") ;; No longer distributed: emacsserver.c, tcp.c. ("Spencer Thomas" :changed "emacsclient.c" "server.el" "dabbrev.el" "unexcoff.c" "gnus.texi") ("Jonathan Vail" :changed "vc.el") ;; No longer distributed: usg5-4.h ("James Van Artsdalen" :changed "unexcoff.c") ;; No longer distributed: src/makefile.nt, lisp/makefile.nt ;; winnt.el renamed to w32-fns.el; nt.[ch] to w32.[ch]; ;; ntheap.[ch] to w32heap.[ch]; ntinevt.c to w32inevt.c; ;; ntproc.c to w32proc.c; ntterm.c to w32term.c; ;; windowsnt.h to ms-w32.h. ("Geoff Voelker" :wrote "w32-fns.el" "w32.c" "w32.h" "w32heap.c" "w32heap.h" "w32inevt.c" "w32proc.c" "w32term.c" "ms-w32.h") ("Bob Weiner" :changed "dframe.el" "etags.c" "info.el" "quail.el" "rmail.el" "rmailsum.el" "speedbar.el") ("Morten Welinder" :wrote "dosfns.c" "[many MS-DOS files]" "msdos.h") ("Eli Zaretskii" :wrote "bidi.c" "[bidirectional display in xdisp.c]" "[tty menus in term.c]") ;; Not using this version any more. ;;; ("Pace Willisson" :wrote "ispell.el") ;; FIXME overwritten by Author:. ("Bill Wohler" :cowrote "mh-e.el") ("Garrett Wollman" :changed "sendmail.el") ("Dale R. Worley" :changed "mail-extr.el") ("Jamie Zawinski" :changed "bytecode.c" :wrote "tar-mode.el" :cowrote "disass.el")) "Actions taken from the original, manually (un)maintained AUTHORS file.") (defconst authors-valid-file-names '("aclocal.m4" "build-ins.in" "Makefile" "Makefile.noleim" "makedist.bat" "makefile.def" "makefile.nt" "ns.mk" "README" ;; There were a few of these, not just the generated top-level one. "configure" "config.h" "is_exec.c" "sigaction.c" ;; nt/ "config.nt" "gmake.defs" "gnulib.mk" "nmake.defs" "ebuild.bat" "envadd.bat" "fast-install.bat" "install.bat" "multi-install-info.bat" "zipdist.bat" "debug.bat.in" "emacs.bat.in" "addsection.c" "inc/sys/dir.h" "inc/gettext.h" "nt/inc/socket.h" "time.h" ".gdbinit-union" "alloca.s" "make-delta" "config.w95" "msysconfig.sh" "emacstool.1" "align.umax" "cxux-crt0.s" "gould-sigvec.s" "getdate.y" "ymakefile" "permute-index" "index.perm" "ibmrs6000.inp" "b2m.c" "b2m.1" "b2m.pl" "rcs-checkin.1" "emacs.bash" "emacs.csh" "ms-kermit" "emacs.ico" "emacs21.ico" "emacs.py" "emacs2.py" "emacs3.py" "BABYL" "LPF" "LEDIT" "OTHER.EMACSES" "emacs16_mac.png" "emacs24_mac.png" "emacs256_mac.png" "emacs32_mac.png" "emacs48_mac.png" "emacs512_mac.png" "ps-prin2.ps" "ps-prin3.ps" "emacs.xbm" "gnu.xpm" "gnus-pointer.xbm" "gnus-pointer.xpm" ;; Moved from etc/ to etc/images, and/or removed. "gnus.pbm" "gnus.xbm" "gnus.xpm" "letter.pbm" "letter.xbm" "letter.xpm" "splash.pbm" "splash.xbm" "splash.xpm" "splash8.xpm" "images/execute.pbm" "images/execute.xpm" "images/fld-open.pbm" "images/fld-open.xpm" "images/highlight.pbm" "images/highlight.xpm" "images/mail.pbm" "images/mail.xpm" "images/mail/alias.pbm" "images/mail/alias.xpm" "images/mail/refile.pbm" "images/mail/refile.xpm" "images/page-down.pbm" "images/page-down.xpm" "images/widen.pbm" "images/widen.xpm" "images/gnus/bar.xbm" "images/gnus/bar.xpm" "images/gnus/reverse-smile.xpm" "notes/commits" "notes/changelogs" "revdiff" ; admin/ "admin/ldefs-clean.el" "vcdiff" "rcs-checkin" "tindex.pl" "mac-fix-env.m" ;; Deleted vms stuff: "temacs.opt" "descrip.mms" "compile.com" "link.com" "compact.el" "fadr.el" "calc/calc-maint.el" "emacs-lisp/cl-specs.el" "emacs-lisp/eieio-comp.el" "emacs-lisp/eieio-generic.el" "erc-hecomplete.el" "eshell/esh-maint.el" "language/persian.el" "ledit.el" "meese.el" "iswitchb.el" "longlines.el" "mh-exec.el" "mh-init.el" "mh-customize.el" "net/zone-mode.el" "xesam.el" "term/mac-win.el" "sup-mouse.el" "term/apollo.el" "term/vt102.el" "term/vt125.el" "term/vt201.el" "term/vt220.el" "term/vt240.el" "term/vt300.el" "term/vt320.el" "term/vt400.el" "term/vt420.el" "url-https.el" "org-mac-message.el" "org-mew.el" "org-w3m.el" "org-vm.el" "org-wl.el" "org-mks.el" "org-remember.el" "org-xoxo.el" "org-docbook.el" "org-freemind.el" "ox-jsinfo.el" "org-exp-blocks.el" ; maybe this is ob-exp now? dunno "org-lparse.el" "org-special-blocks.el" "org-taskjuggler.el" "ob-sh.el" "ob-scala.el" "progmodes/cap-words.el" "w32-common-fns.el" ;; gnus "nnwfm.el" "nnlistserv.el" "nnkiboze.el" "nndb.el" "nnsoup.el" "netrc.el" "password.el" "sasl-cram.el" "sasl-digest.el" "sasl-ntlm.el" "sasl.el" "dig.el" "dns.el" "hex-util.el" "sha1.el" "md4.el" "hmac-def.el" "hmac-md5.el" "ntlm.el" "hashcash.el" "smime-ldap.el" "assistant.el" "gnus-utils.el" "tls.el" "pgg-def.el" "pgg-gpg.el" "gnus-compat.el" "pgg-parse.el" "pgg-pgp.el" "pgg-pgp5.el" "pgg.el" "dns-mode.el" "run-at-time.el" "gnus-encrypt.el" "sha1-el.el" "gnus-gl.el" "gnus.sum.el" "proto-stream.el" "color.el" "color-lab.el" "eww.el" "shr-color.el" "shr.el" "earcon.el" "gnus-audio.el" "encrypt.el" "format-spec.el" "gnus-move.el" "gnus-sync.el" "auth-source.el" "ecomplete.el" "gravatar.el" "mailcap.el" "plstore.el" "pop3.el" "qp.el" "registry.el" "rfc2231.el" "rtree.el" "sieve.el" "sieve-mode.el" "gnus-ems.el" ;; doc "getopt.c" "texindex.c" "news.texi" "vc.texi" "vc2-xtra.texi" "back.texi" "vol1.texi" "vol2.texi" "elisp-covers.texi" "two.el" "front-cover-1.texi" "locals.texi" "calendar.texi" "info-stnd.texi" "tasks.texi" "advice.texi" "picture.texi" "texinfo.tex" "dispatch.c" "dispatch.h" "xrdb-cpp.c" "xrdb.c" ;; lib/ "lib/stdio.c" "lib/gl_openssl.h" "lib/sigprocmask.c" "lib/pthread_sigprocmask.c" "lib/ldtoastr.c" "lib/dummy.c" "lib/ignore-value.h" "lib/Makefile.am" "lib/pathmax.h" "lib/stat.c" "lib/strtoul.c" "lib/strtoull.c" "lib/strtoumax.c" "lib/unsetenv.c" "lib/getopt_cdefs.in.h" "lib/getopt_core.h" "lib/getopt_ext.h" "lib/getopt_pfx_core.h" "lib/getopt_pfx_ext.h" ;; lib-src/ "cvtmail.c" "digest-doc.c" "emacsserver.c" "emacstool.c" "env.c" "etags-vmslib.c" "fakemail.c" "getdate.c" "getopt.h" "getopt1.c" "getopt_.h" "getopt_int.h" "gettext.h" "leditcfns.c" "loadst.c" "make-path.c" "qsort.c" "sorted-doc.c" "tcp.c" "timer.c" "wakeup.c" "yow.c" "grep-changelog" "grep-changelog.1" ;; semantic files now removed from the repository "semantic/bovine/c-by.el" "semantic/bovine/make-by.el" "semantic/bovine/scm-by.el" "semantic/wisent/javat-wy.el" "semantic/wisent/js-wy.el" "semantic/wisent/python-wy.el" "srecode/srt-wy.el" ;; etc/ "emacsclient.c" "etags.c" "hexl.c" "make-docfile.c" "movemail.c" "test-distrib.c" "testfile" "tpu-edt.doc" ; see below "iso-swed.el" "lisp/obsolete/vc-mcvs.el" "obsolete/vc-mcvs.el" "nnwarchive.el" "nnultimate.el" "nnslashdot.el" "keyswap.el" "mouse-sel.el" "nxml-glyph.el" "tramp-gw.el" "webmail.el" "biditest.el" "redisplay-testsuite.el" "cedet-utests.el" "ede-tests.el" "semantic-ia-utest.el" "semantic-tests.el" "semantic-utest-c.el" "semantic-utest.el" "srecode-tests.el" "make-test-deps.emacs-lisp" "nxml-uchnm.el" "decoder-tests.el" "obsolete/scribe.el" "cp51932.el" "eucjp-ms.el" "lisp.mk" "update-game-score.exe.manifest" "lisp/obsolete/awk-mode.el" "lisp/obsolete/iso-acc.el" "lisp/obsolete/iso-insert.el" "lisp/obsolete/resume.el" "lisp/obsolete/scribe.el" "lisp/obsolete/swedish.el" "lisp/obsolete/spell.el" "lisp/obsolete/swedish.el" "lisp/obsolete/sym-comp.el" "library-of-babel.org" "flymake-elisp.el" "flymake-ui.el" "pinentry.el") "File names which are valid, but no longer exist (or cannot be found) in the repository.") ;; Note that any directory part on the RHS is retained. ;; Cf authors-renamed-files-regexps. ;; NB So only add a directory if needed to disambiguate. ;; FIXME? ;; Although perhaps we could let authors-disambiguate-file-name do that? (defconst authors-renamed-files-alist '(("nt.c" . "w32.c") ("nt.h" . "w32.h") ("ntheap.c" . "w32heap.c") ("ntheap.h" . "w32heap.h") ("ntinevt.c" . "w32inevt.c") ("ntinevt.h" . "w32inevt.h") ("ntproc.c" . "w32proc.c") ("w32console.c" . "w32term.c") ("unexnt.c" . "unexw32.c") ("s/windowsnt.h" . "s/ms-w32.h") ("s/ms-w32.h" . "inc/ms-w32.h") ("src/config.h" . "config.h") ("winnt.el" . "w32-fns.el") ("linux.h" . "gnu-linux.h") ("emacs.manifest" . "emacs-x86.manifest") ("config.emacs" . "configure") ("configure.in" . "configure.ac") ("config.h.dist" . "config.in") ("config.h-dist" . "config.in") ("config.h.in" . "config.in") ("debug.bat" . "debug.bat.in") ("emacs.bat" . "emacs.bat.in") ;; paths.h.dist -> paths.h-dist -> paths.h.in -> paths.in -> epaths.in. ("paths.h.dist" . "epaths.in") ("paths.h-dist" . "epaths.in") ("paths.h.in" . "epaths.in") ("paths.in" . "epaths.in") ("emacs.rc" . "emacs.rc.in") ("emacsclient.rc" . "emacsclient.rc.in") ("patch1" . "sed1.inp") ("INSTALL.MSYS" . "INSTALL") ("server.c" . "emacsserver.c") ("lib-src/etags.c" . "etags.c") ("is-exec.c" . "is_exec.c") ("enriched.doc" . "enriched.txt") ("GETTING.GNU.SOFTWARE" . "FTP") ("etc/MACHINES" . "MACHINES") ("ONEWS" . "NEWS.19") ("ONEWS.1" . "NEWS.1-17") ("ONEWS.2" . "NEWS.1-17") ("ONEWS.3" . "NEWS.18") ("ONEWS.4" . "NEWS.18") ("ORDERS.USA" . "ORDERS") ("EUROPE" . "ORDERS") ("DIFF" . "OTHER.EMACSES") ("CCADIFF" . "OTHER.EMACSES") ("GOSDIFF" . "OTHER.EMACSES") ;; Nextstep ("nextstep/Cocoa/Emacs.base/Contents/Info.plist" . "nextstep/templates/Info.plist.in") ;; Moved from lisp/tpu-doc.el to etc/tpu-edt.doc in Emacs 19.29. ;; Removed in Emacs 19.30, replaced by new file etc/edt-user.doc ;; (no associated ChangeLog entry). ("tpu-doc.el" . "tpu-edt.doc") ("Makefile.in.in" . "Makefile.in") ("leim-Makefile" . "leim/Makefile") ("leim-Makefile.in" . "leim/Makefile.in") ("emacs-lisp/testcover-ses.el" . "tcover-ses.el") ("emacs-lisp/testcover-unsafep.el" . "tcover-unsafep.el") ("progmodes/dos.el" . "bat-mode.el") ;; index and pick merged into search. ("mh-index.el" . "mh-search.el") ("mh-pick.el" . "mh-search.el") ("font-setting.el" . "dynamic-setting.el") ("help-funs.el" . "help-fns.el") ("erc-notifications.el" . "erc-desktop-notifications.el") ("org-complete.el" . "org-pcomplete.el") ("org-export.el" . "ox.el") ; ? ;; Was definitely renamed to org-latex.el, then... ? ("org-export-latex.el" . "ox-latex.el") ; ? ("org-exp.el" . "ox.el") ; ? ("progmodes/cfengine3.el" . "cfengine.el") ("progmodes/delphi.el" . "opascal.el") ("octave-inf.el" . "octave.el") ("octave-mod.el" . "octave.el") ("progmodes/octave-inf.el" . "octave.el") ("progmodes/octave-mod.el" . "octave.el") ;; Obsolete. ("lisp/gs.el" . "gs.el") ("emacs-lisp/assoc.el" . "assoc.el") ("emacs-lisp/cust-print.el" . "cust-print.el") ("emacs-lisp/gulp.el" . "gulp.el") ("abbrevlist.el" . "abbrevlist.el") ("emulation/crisp.el" . "crisp.el") ("emulation/tpu-edt.el" . "tpu-edt.el") ("emulation/tpu-extras.el" . "tpu-extras.el") ("emulation/tpu-mapper.el" . "tpu-mapper.el") ("emulation/vi.el" . "vi.el") ("emulation/vip.el" . "vip.el") ("emulation/ws-mode.el" . "ws-mode.el") ("mail/mailpost.el" . "mailpost.el") ("net/eudcb-ph.el" . "eudcb-ph.el") ("play/bruce.el" . "bruce.el") ("play/landmark.el" . "landmark.el") ("lisp/play/landmark.el" . "landmark.el") ("play/yow.el" . "yow.el") ("patcomp.el" . "patcomp.el") ("emulation/ws-mode.el" . "ws-mode.el") ("vc/vc-arch.el" . "vc-arch.el") ("lisp/gnus/messcompat.el" . "messcompat.el") ("html2text.el" . "html2text.el") ("lisp/net/html2text.el" . "html2text.el") ;; From lisp to etc/forms. ("forms-d2.el" . "forms-d2.el") ("forms-pass.el" . "forms-pass.el") ;; From lisp/ to etc/nxml. ("nxml/test.invalid.xml" . "test-invalid.xml") ("nxml/test.valid.xml" . "test-valid.xml") ("automated/Makefile.in" . "test/Makefile.in") ("rmailmm.el" . "test/rmailmm.el") ;; The one in lisp is eshell/eshell.el. ("eshell.el" . "eshell-tests.el") ("automated/eshell.el" . "eshell-tests.el") ("eshell/esh-test.el" . "eshell-tests.el") ("automated/cl-lib.el" . "cl-lib-tests.el") ("automated/cl-lib-tests.el" . "cl-lib-tests.el") ("automated/package-x-test.el" . "package-tests.el") ("automated/package-test.el" . "package-tests.el") ("indent/js-indent-first-initialiser-t.js" . "indent/js-indent-init-t.js") ("indent/js-indent-first-initialiser-dynamic.js" . "indent/js-indent-init-dynamic.js") ;; INSTALL-CVS -> .CVS -> .BZR -> .REPO ("INSTALL-CVS" . "INSTALL.REPO") ("INSTALL.CVS" . "INSTALL.REPO") ("INSTALL.BZR" . "INSTALL.REPO") ("gnus-logo.eps" . "gnus-logo.eps") ; moved to refcards/ ("build-install" . "build-ins.in") ("build-install.in" . "build-ins.in") ("unidata/Makefile" . "unidata/Makefile.in") ("mac/uvs.el" . "unidata/uvs.el") ;; Moved from top to etc/ ("CONTRIBUTE" . "CONTRIBUTE") ("FTP" . "FTP") ;; Moved from top to build-aux/ ("move-if-change" . "move-if-change") ("update-subdirs" . "update-subdirs") ("emacs.tex" . "emacs.texi") ("faq.texi" . "efaq.texi") ("major.texi" . "modes.texi") ("msdog.texi" . "msdos.texi") ;; Moved from lisp/gnus/ to lisp/calendar/ ("time-date.el" . "calendar/time-date.el") ;; Moved from lisp/gnus/ to lisp/mail/ ("binhex.el" . "mail/binhex.el") ("uudecode.el" . "mail/uudecode.el") ("mail-parse.el" . "mail/mail-parse.el") ("yenc.el" . "mail/yenc.el") ("flow-fill.el" . "mail/flow-fill.el") ("ietf-drums.el" . "mail/ietf-drums.el") ("sieve-manage.el" . "mail/sieve-manage.el") ;; Moved from lisp/gnus/ to lisp/image/ ("compface.el" . "image/compface.el") ;; Moved from lisp/gnus/ to lisp/net/ ("imap.el" . "net/imap.el") ("rfc2104.el" . "net/rfc2104.el") ("starttls.el" . "net/starttls.el") ;; And from emacs/ to misc/ and back again. ("ns-emacs.texi" . "macos.texi") ("overrides.texi" . "gnus-overrides.texi") ("xresmini.texi" . "xresources.texi") ;; Not renamed, but we only have the latter in the Emacs repo. ("trampver.texi.in" . "trampver.texi") ;; Renamed with same directory. ("e/eterm" . "eterm-color") ("e/eterm.ti" . "eterm-color.ti") ("README.txt" . "README") ("emacs.names" . "JOKES") ("ED.WORSHIP" . "JOKES") ("GNU.JOKES" . "JOKES") ("CHARACTERS" . "TODO") ("lisp/character-fold.el" . "lisp/char-fold.el") ("test/automated/character-fold-tests.el" . "char-fold-tests.el") ("test/automated/char-fold-tests.el" . "char-fold-tests.el") ("test/lisp/character-fold-tests.el" . "char-fold-tests.el") ("test/manual/cycle-tests.el" . "fns-tests.el") ("test/manual/cyclic-tests.el" . "fns-tests.el") ("test/lisp/dns-mode-tests.el" . "dns-mode-tests.el") ("test/lisp/legacy/core-elisp-tests.el" . "lisp-tests.el") ("test/lisp/legacy/decoder-test.el" . "coding-tests.el") ("test/lisp/legacy/files-tests.el" . "files-tests.el") ("test/lisp/legacy/font-parse-tests.el" . "font-tests.el") ("test/lisp/legacy/lexbind-tests.el" . "bytecomp-test.el") ("test/lisp/legacy/occur-tests.el" . "replace-tests.el") ("test/lisp/legacy/syntax-tests.el" . "syntax-tests.el") ("test/file-organisation.org" . "file-organization.org") ("images/gnus/mail_send.xpm" . "mail-send.xpm") ; still in images/gnus ("schema/xhtml-basic-form.rnc" . "xhtml-bform.rnc" ) ("schema/xhtml-basic-table.rnc" . "xhtml-btable.rnc") ("schema/xhtml-list.rnc" . "xhtml-lst.rnc") ("schema/xhtml-target.rnc" . "xhtml-tgt.rnc") ("schema/xhtml-style.rnc" . "xhtml-xstyle.rnc") ("schema/docbook-dyntbl.rnc" . "docbk-dyntbl.rnc") ("schema/docbook-soextbl.rnc" . "docbk-soextbl.rn" ) ("edt-user.doc" . "edt.texi") ("DEV-NOTES" . "nextstep") ("org/COPYRIGHT-AND-LICENSE" . "org/README") ("lisp/net/idna.el" . "puny.el") ;; Moved to different directories. ("ctags.1" . "ctags.1") ("etags.1" . "etags.1") ("emacs.1" . "emacs.1") ("emacsclient.1" . "emacsclient.1") ("icons/emacs21.ico" . "emacs21.ico") ("ja-dic" . "leim/ja-dic") ("quail" . "leim/quail") ("admin/notes/triage" . "bug-triage") ;; Moved from autogen/ to admin/. ("autogen/update_autogen" . "update_autogen") ;; Moved from etc/ to admin/. ("grammars" . "grammars") ;; Moved from lisp/emacs-lisp/ to admin/. ("emacs-lisp/authors.el" . "authors.el") ("emacs-lisp/find-gc.el" . "admin/find-gc.el") ;; From etc to lisp/cedet/semantic/. ("grammars/bovine-grammar.el" . "bovine/grammar.el") ("grammars/wisent-grammar.el" . "wisent/grammar.el") ;; Moved from admin/nt/ to nt/. ("nt/README.W32" . "README.W32") ("notes/BRANCH" . "notes/repo") ("notes/bzr" . "notes/repo") ;; moved from lisp/ to lisp/net/ ("lisp/pinentry.el" . "lisp/net/pinentry.el") ;; module.* moved to emacs-module.* ("src/module.h" . "src/emacs-module.h") ("src/module.c" . "src/emacs-module.c") ;; gnulib ("lib/strftime.c" . "lib/nstrftime.c") ) "Alist of files which have been renamed during their lifetime. Elements are (OLDNAME . NEWNAME).") ;; Should still test that the renamed file exists. Does it? ;; But it might be relative to a different ChangeLog... ;; ;; Note that only the basename of the RHS is used. ;; Cf authors-renamed-files-alist. (defconst authors-renamed-files-regexps '(("\\`\\(arg-nonnull\\|c\\+\\+defs\\|warn-on-use\\)\\.h\\'" "lib/\\&") ("\\`\\(ebuild\\|emacs\\|install\\|fast-install\\)\\.cmd\\'" "\\1.bat") ("\\`\\(book-spine\\|cl\\|forms\\|functions\\|gnus\\|sc\\|texinfo\\|vip\\)\ \\.texinfo\\'" "\\1.texi") ("\\`\\(\\(calc\\|org\\|vip\\)card\\|viperCard\\|\ \\(\\(cs\\|fr\\|sk\\)-\\)?dired-ref\\|\ \\(\\(cs\\|de\\|fr\\|gnus\\|pl\\|pt-br\\|ru\\|sk\\)-\\)?refcard\\|\ \\(\\(cs\\|fr\\|sk\\)-\\)?survival\\)\\.tex\\'" "refcards/\\&") ("\\`refcard-\\(de\\|pl\\)\\.tex\\'" "refcards/\\1-refcard.tex") ("\\`\\(refcards/\\)?fr-drdref\\.tex\\'" "refcards/fr-dired-ref.tex") ("^\\(TUTORIAL[^/]*\\)" "tutorials/\\1") ("\\`themes/dev-\\(tsdh-\\(?:light\\|dark\\)-theme\\.el\\)\\'" "themes/\\1") ;; Moved from lisp/toolbar to etc/images. ("\\`toolbar/\\(back\\|fwd\\|left\\|right\\|up\\)_arrow\ \\(\\.\\(?:pb\\|xp\\)m\\)\\'" "images/\\1-arrow\\2") ("\\`toolbar/lc-\\(back\\|fwd\\|left\\|right\\|up\\)_arrow\ \\(\\.\\(?:pb\\|xp\\)m\\)\\'" "images/low-color/\\1-arrow\\2") ("\\`toolbar/mail_\\(compose\\|send\\)\\(\\.[xp]bm\\)\\'" "images/mail/\\1") ("\\`toolbar/jump_to\\(\\.\\(?:pb\\|xp\\)m\\)\\'" "images/jump-to\\1") ("\\`toolbar/lc-jump_to\\(\\.\\(?:pb\\|xp\\)m\\)\\'" "images/low-color/jump-to\\1") ("\\`toolbar/\\(attach\\|cancel\\|close\\|copy\\|cut\\|\ diropen\\|exit\\|help\\|home\\|index\\|info\\|mail\\|new\\|open\\|\ paste\\|preferences\\|print\\|save\\|saveas\\|search\\|search-replace\\|\ spell\\|undo\\)\\(\\.\\(?:pb\\|xp\\)m\\)\\'" "images/\\1\\2") ("\\`toolbar/gud-\\(break\\|cont\\|down\\|finish\\|print\\|pstar\\|\ remove\\|run\\|until\\|up\\|watch\\)\\(\\.\\(?:pb\\|xp\\)m\\)\\'" "images/gud/\\1\\2") ("\\`\\(toolbar/gud-\\|images/gud/\\)n\\(i\\)?\\(\\.\\(?:pb\\|xp\\)m\\)\\'" "images/gud/next\\2\\3") ("\\`\\(toolbar/gud-\\|images/gud/\\)s\\(i\\)?\\(\\.\\(?:pb\\|xp\\)m\\)\\'" "images/gud/step\\2\\3") ("\\`toolbar/lc-\\([-a-z]+\\.xpm\\)\\'" "images/low-color/\\1") ("^\\(tree-widget/\\(?:default\\|folder\\)/[-a-z]+\\.\\(png\\|xpm\\)\\)$" "images/\\1") ("^\\(images/icons/\\)mac\\(emacs\\)_\\([0-9]+\\)\\(\\.png\\)" "\\1\\2\\3_mac\\4") ("\\(images/icons/\\)emacs_\\([0-9][0-9]\\)\\.png" "\\1hicolor/\\2x\\2/apps/emacs.png") ;; Moved from leim/ to lisp/leim/. ("\\`quail/[-a-z0-9]+\\.el\\'" "leim/\\&") ("\\`ja-dic/ja-dic\\.el\\'" "leim/\\&") ("\\`vc-\\(rcs\\|cvs\\|sccs\\)-hooks\\.el\\'" "vc/vc-\\1.el") ("\\`vc-\\(annotate\\|arch\\|bzr\\|cvs\\|dav\\|dir\\|dispatcher\\|\ git\\|hg\\|hooks\\|mtn\\|rcs\\|sccs\\|svn\\)\\.el\\'" "vc/\\&") ("\\`ediff-\\(diff\\|help\\|hook\\|init\\|merg\\|mult\\|ptch\\|util\\|\ vers\\|wind\\)\\.el\\'" "vc/\\&") ("\\`pcvs-\\(defs\\|info\\|parse\\|util\\)\\.el\\'" "vc/\\&") ("\\`\\(add-log\\|compare-w\\|cvs-status\\|diff-mode\\|diff\\|\ ediff\\|emerge\\|log-edit\\|log-view\\|pcvs\\|smerge-mode\\|vc\\)\\.el\\'" "vc/\\&") ("\\`\\(emacs-lisp/\\)?helpers\\.el\\'" "emacs-lisp/subr-x.el") ;; I assume this is (essentially) what happened, org/ChangeLog is vague. ("\\`org-\\(ascii\\|beamer\\|html\\|icalendar\\|jsinfo\\|latex\ \\|odt\\|publish\\)\\.el\\'" "ox-\\1.el") ;; From test/ to test/automated/. ("comint-testsuite.el" "automated/\\&") ("\\`\\(bytecomp\\|font-parse\\|icalendar\\|occur\\|newsticker\\)\ -testsuite\\.el" "\\1-tests.el") ("automated/flymake/warnpred/\\(Makefile\\|test\\.\\(?:c\\|pl\\)\\)\\'" "automated/data/flymake/\\1") ;; More complicated than this, but we only use the basename of the RHS. ("automated/\\([^/]*-test[^/]*\\.el\\)\\'" "\\1") ;; Maybe not the exact new name, but disambiguates from lisp/. ("automated/\\([^/]*\\)\\.el\\'" "\\1-tests.el") ;; NB lax rules should come last. ("^m/m-\\(.*\\.h\\)$" "m/\\1" t) ("^m-\\(.*\\.h\\)$" "\\1" t) ("^s/s-\\(.*\\.h\\)$" "s/\\1" t) ("^s-\\(.*\\.h\\)$" "\\1" t) ("\\.\\(el\\|[ch]\\|x[pb]m\\|pbm\\)\\'" t t) ) "List of regexps and rewriting rules for renamed files. Elements are (REGEXP REPLACE [LAX]). If REPLACE is a string, the file name matching REGEXP is replaced by REPLACE using `replace-string'. Otherwise, the file name is accepted as is. Elements with LAX non-nil are only used in `authors-lax-changelogs'.") ;; It's really not worth trying to make these old logs fully valid. ;; All the obvious real errors are gone. ;; The main issue is _lots_ of moving around of files. ;; Eg the progmodes/ (etc) directories did not exist before 1997. ;; Also, lib-src/ did not exist, the files were in etc/. ;; And various other things. (defconst authors-lax-changelogs '("erc/ChangeLog\\.1\\'" "gnus/ChangeLog\\.[1-2]\\'" "lisp/ChangeLog\\.\\([1-9]\\|1[0-5]\\)\\'" "mh-e/ChangeLog\\.1\\'" "src/ChangeLog\\.\\([1-9]\\|1[0-2]\\)\\'") "List of regexps matching ChangeLogs that we do not print errors from. These are older ChangeLogs that have various issues. Additionally, for these logs we apply the `lax' elements of `authors-renamed-files-regexps'.") (defvar authors-checked-files-alist) (defvar authors-invalid-file-names) (defvar authors-ignored-names) ;; This has become rather yucky. :( (defun authors-disambiguate-file-name (fullname) "Convert FULLNAME to an unambiguous relative-name." (let ((relname (file-name-nondirectory fullname)) dir parent) (if (and (member relname authors-ambiguous-files) ;; Try to identify the top-level directory. ;; FIXME should really use ROOT from M-x authors. (not (and (file-directory-p (expand-file-name "lib-src" (setq dir (file-name-directory fullname)))) (file-directory-p (expand-file-name "etc" dir))))) ;; I think it looks weird to see eg "lisp/simple.el". ;; But for eg Makefile.in, we do want to say "lisp/Makefile.in". (if (and (string-equal "lisp" (setq parent (file-name-nondirectory (directory-file-name dir)))) ;; TODO better to simply have hard-coded list? ;; Only really Makefile.in where this applies. (not (file-exists-p (expand-file-name (concat "../" relname) dir)))) relname ;; In case of ambiguity, just prepend the parent directory. ;; FIXME obviously this is not a perfect solution. (format "%s/%s" (file-name-nondirectory (directory-file-name dir)) relname)) relname))) (defun authors-lax-changelog-p (file) "Return non-nil if FILE matches `authors-lax-changelogs'." (let ((list authors-lax-changelogs) found) (while list (setq list (if (setq found (string-match-p (car list) file)) nil (cdr list)))) found)) (defun authors-canonical-file-name (file log-file pos author) "Return canonical file name for FILE found in LOG-FILE. Checks whether FILE is a valid (existing) file name, has been renamed, or is on the list of removed files. Returns the non-directory part of the file name. Only uses the LOG-FILE position POS and associated AUTHOR to print a message if FILE is not found." ;; FILE should be re-checked in every different directory associated ;; with a LOG-FILE. Eg configure.ac from src/ChangeLog is not the ;; same as that from top-level/ChangeLog. (let* ((fullname (expand-file-name file (file-name-directory log-file))) (entry (assoc fullname authors-checked-files-alist)) laxlog relname valid) (if entry (cdr entry) (setq relname (file-name-nondirectory file)) (if (or (member file authors-valid-file-names) (member relname authors-valid-file-names) (file-exists-p file) (file-exists-p relname) ; FIXME? appropriate? ) (setq valid (authors-disambiguate-file-name fullname)) (if (setq valid (assoc file authors-renamed-files-alist)) (setq valid (cdr valid)) (setq laxlog (authors-lax-changelog-p log-file)) (let ((rules authors-renamed-files-regexps) rule) (while rules (setq rule (car rules)) (if (and (or laxlog (not (nth 2 rule))) (string-match (car rule) file)) (setq valid (if (stringp (nth 1 rule)) (file-name-nondirectory (replace-match (nth 1 rule) t nil file)) relname) rules nil) (setq rules (cdr rules))))))) (setq authors-checked-files-alist (cons (cons fullname valid) authors-checked-files-alist)) (unless (or valid (member file authors-ignored-files) (authors-obsolete-file-p file) (string-match "[*]" file) (string-match "^[0-9.]+$" file) laxlog) (setq authors-invalid-file-names (cons (format-message "%s:%d: unrecognized `%s' for %s" log-file (1+ (count-lines (point-min) pos)) file author) authors-invalid-file-names))) valid))) (defun authors-add-fixed-entries (table) "Add actions from `authors-fixed-entries' to TABLE." (dolist (entry authors-fixed-entries) (let ((author (car entry)) action) (dolist (item (cdr entry)) (if (symbolp item) (setq action item) (authors-add author item action table)))))) (defun authors-obsolete-file-p (file) "Return non-nil if FILE is obsolete. FILE is considered obsolete if it matches one of the regular expressions from `authors-obsolete-files-regexps'." (let (obsolete-p (regexps authors-obsolete-files-regexps)) (while (and regexps (not obsolete-p)) (setq obsolete-p (string-match (car regexps) file) regexps (cdr regexps))) obsolete-p)) (defun authors-no-scan-file-p (file) "Return non-nil if FILE should not be scanned. FILE is not scanned if it matches any of `authors-no-scan-regexps'." (let (no-scan-p (regexps authors-no-scan-regexps)) (while (and regexps (not no-scan-p)) (setq no-scan-p (string-match-p (car regexps) file) regexps (cdr regexps))) no-scan-p)) (defun authors-add (author file action table) "Record that AUTHOR worked on FILE. ACTION is a keyword symbol describing what he did. Record file, author and what he did in hash table TABLE. See the description of `authors-scan-change-log' for the structure of the hash table." (unless (or (member file authors-ignored-files) (authors-obsolete-file-p file) (equal author "")) (let* ((value (gethash author table)) (entry (assoc file value)) slot) (if (null entry) (puthash author (cons (list file (cons action 1)) value) table) (if (setq slot (assoc action (cdr entry))) (setcdr slot (1+ (cdr slot))) (nconc entry (list (cons action 1)))))))) (defun authors-canonical-author-name (author file pos) "Return a canonicalized form of AUTHOR, an author name. If AUTHOR has an entry in `authors-aliases', use that. Remove email addresses. Capitalize words in the author's name, unless it is found in `authors-fixed-case'." (let* ((aliases authors-aliases) regexps realname) (while aliases (setq realname (car (car aliases)) regexps (cdr (car aliases)) aliases (cdr aliases)) (while regexps (if (string-match (car regexps) author) (setq author realname regexps nil aliases nil) (setq regexps (cdr regexps)))))) (when author (setq author (replace-regexp-in-string "[ \t]*[(<].*$" "" author)) (setq author (replace-regexp-in-string "\\`[ \t]+" "" author)) (setq author (replace-regexp-in-string "[ \t]+$" "" author)) (setq author (replace-regexp-in-string "[ \t]+" " " author)) ;; NB this ignores the first name only case. (unless (string-match "[-, \t]" author) (or (authors-lax-changelog-p file) (push (format-message "%s:%d: ignored `%s'" file (1+ (count-lines (point-min) pos)) author) authors-ignored-names)) (setq author "")) (or (car (member author authors-fixed-case)) (capitalize author)))) (defun authors-scan-change-log (log-file table) "Scan change log LOG-FILE for author information. For each change mentioned in the log, add an entry to hash table TABLE under the author's canonical name. Keys of TABLE are author names. Values are alists of entries (FILE \(ACTION . COUNT) ...). FILE is one file the author worked on. The rest of the entry is a list of keyword symbols describing what he did with the file and the number of each action: :wrote means the author wrote the file :cowrote means he wrote the file in collaboration with others :changed means he changed the file COUNT times." (let* ((enable-local-variables :safe) ; for find-file, hence let* (enable-local-eval nil) (existing-buffer (get-file-buffer log-file)) (buffer (find-file-noselect log-file)) authors pos) (with-current-buffer buffer (save-restriction (widen) (goto-char (point-min)) (while (re-search-forward "^[0-9]\\|^[ \t]+\\* " nil t) (beginning-of-line) (setq pos (point)) (cond ((looking-at "^[0-9]+-[0-9]+-[0-9]+") ;; Handle joint authorship of changes. ;; This can be a bit fragile, and is not too common. (setq authors nil) (while (progn (skip-chars-forward " \t+:0-9-") (not (looking-at "\\($\\|\\*\\|\ Suggested\\|Trivial\\|Version\\|Originally\\|From:\\|Patch[ \t]+[Bb]y\\)"))) (push (authors-canonical-author-name (buffer-substring-no-properties (point) (line-end-position)) log-file pos) authors) (forward-line 1))) ((looking-at "^[ \t]+\\*") (let ((line (buffer-substring-no-properties (match-end 0) (line-end-position)))) (while (and (not (string-match ":" line)) (forward-line 1) (not (looking-at ":\\|^[ \t]*$"))) (setq line (concat line (buffer-substring-no-properties (line-beginning-position) (line-end-position))))) (when (string-match ":" line) (setq line (substring line 0 (match-beginning 0))) (setq line (replace-regexp-in-string "[[(<{].*$" "" line)) (setq line (replace-regexp-in-string "," "" line)) (dolist (file (split-string line)) (when (setq file (authors-canonical-file-name file log-file pos (car authors))) (dolist (author authors) ;;(message "%s changed %s" author file) (authors-add author file :changed table))))) (forward-line 1))))))) (unless existing-buffer (kill-buffer buffer)))) (defun authors-scan-el (file table) "Scan Lisp file FILE for author information. TABLE is a hash table to add author information to." (let* ((existing-buffer (get-file-buffer file)) (enable-local-variables :safe) ; for find-file, hence let* (enable-local-eval nil) (buffer (find-file-noselect file))) (setq file (expand-file-name file)) (with-current-buffer buffer (save-restriction (widen) (goto-char (point-min)) (while (and (re-search-forward "^;+[ \t]*\\(Authors?\\|Commentary\\|Code\\):[ \t]*" nil t) (not (member (match-string 1) '("Commentary" "Code")))) (let ((continue t) (action :wrote) authors) (while continue ;; Some entries contain a year range in front of the ;; author's name. (skip-chars-forward "-0-9 \t") (push (authors-canonical-author-name (buffer-substring-no-properties (point) (line-end-position)) file (line-beginning-position)) authors) ;; tips.texi says the continuation line should begin ;; with a tab, but often spaces are used. (setq continue (and (zerop (forward-line 1)) (looking-at ";;;?\\(\t+ *\\| +\\)[[:alnum:]]") (goto-char (1- (match-end 0))) (not (looking-at "[[:upper:]][-[:alpha:]]+:[ \t]"))))) (and (> (length authors) 1) (setq action :cowrote)) (mapc (lambda (author) (authors-add author (authors-disambiguate-file-name file) action table)) authors))))) (unless existing-buffer (kill-buffer buffer)))) (defun authors-public-domain-p (file) "Return t if FILE is a file that was put in public domain." (let ((public-domain-p nil) (list authors-public-domain-files)) (while (and list (not public-domain-p)) (when (string-match (car list) file) (setq public-domain-p t)) (setq list (cdr list))) public-domain-p)) (defvar authors-author-list) (defun authors-add-to-author-list (author changes) "Insert information about AUTHOR's work on Emacs into `authors-author-list'. CHANGES is an alist of entries (FILE (ACTION . COUNT) ...), as produced by `authors-scan-change-log'. The element added to `authors-author-list' is (AUTHOR WROTE CO-WROTE CHANGED), where WROTE, CO-WROTE, and CHANGED are lists of the files written, co-written and changed by AUTHOR." (when author (let ((nchanged 0) wrote-list cowrote-list changed-list) (dolist (change changes) (let* ((actions (cdr change)) (file (car change)) (filestat (if (authors-public-domain-p file) (concat file " (public domain)") file))) (cond ((assq :wrote actions) (setq wrote-list (cons filestat wrote-list))) ((assq :cowrote actions) (setq cowrote-list (cons filestat cowrote-list))) (t (setq changed-list (cons (cons file (cdr (assq :changed actions))) changed-list)))))) (if wrote-list (setq wrote-list (sort wrote-list 'string-lessp))) (if cowrote-list (setq cowrote-list (sort cowrote-list 'string-lessp))) (when changed-list (setq changed-list (sort changed-list (lambda (a b) (if (= (cdr a) (cdr b)) (string-lessp (car a) (car b)) (> (cdr a) (cdr b)))))) (setq nchanged (length changed-list)) (setq changed-list (mapcar 'car changed-list))) (if (> (- nchanged authors-many-files) 2) (setcdr (nthcdr authors-many-files changed-list) (list (format "and %d other files" (- nchanged authors-many-files))))) (setq authors-author-list (cons (list author wrote-list cowrote-list changed-list) authors-author-list))))) (defun authors (root &optional nologupdate) "Extract author information from change logs and Lisp source files. ROOT is the root directory under which to find the files. Interactively, read ROOT from the minibuffer. Accurate author information requires up-to-date change logs, so this first updates them, unless optional prefix argument NOLOGUPDATE is non-nil. The result is a buffer *Authors* containing authorship information, and a buffer *Authors Errors* containing references to unknown files." (interactive "DEmacs source directory: \nP") (setq root (expand-file-name root)) (unless (file-exists-p (expand-file-name "src/emacs.c" root)) (unless (y-or-n-p (format "Not the root directory of Emacs: %s, continue? " root)) (user-error "Not the root directory"))) ;; May contain your personal entries. (or (not (file-exists-p (expand-file-name "ChangeLog" root))) (y-or-n-p "Unversioned ChangeLog present, continue?") (user-error "Unversioned ChangeLog may have irrelevant entries")) (or nologupdate ;; There are likely to be things that need fixing, so we update ;; the versioned ChangeLog.N rather than the unversioned ChangeLog. (zerop (call-process "make" nil nil nil "-C" root "change-history-nocommit")) (error "Problem updating ChangeLog")) (let ((logs (process-lines find-program root "-name" "ChangeLog*")) (table (make-hash-table :test 'equal)) (buffer-name "*Authors*") authors-checked-files-alist authors-invalid-file-names authors-ignored-names) (authors-add-fixed-entries table) (dolist (log logs) (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log) (message "Scanning %s..." log) (authors-scan-change-log log table))) (let ((els (process-lines find-program root "-name" "*.el"))) (dolist (file els) (unless (authors-no-scan-file-p file) (message "Scanning %s..." file) (authors-scan-el file table)))) (message "Generating buffer %s..." buffer-name) (set-buffer (get-buffer-create buffer-name)) (erase-buffer) (set-buffer-file-coding-system authors-coding-system) (insert "Many people have contributed code included in the Free Software Foundation's distribution of GNU Emacs. To show our appreciation for their public spirit, we list here in alphabetical order a condensed list of their contributions.\n") (let (authors-author-list) (maphash #'authors-add-to-author-list table) (setq authors-author-list (sort authors-author-list (lambda (a b) (string-collate-lessp (car a) (car b) (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8"))))) (dolist (a authors-author-list) (let ((author (car a)) (wrote (nth 1 a)) (cowrote (nth 2 a)) (changed (nth 3 a))) (insert "\n" author ": ") (when wrote (insert "wrote") (dolist (file wrote) (if (> (+ (current-column) (length file)) 72) (insert "\n ")) (insert " " file)) (insert "\n")) (when cowrote (if wrote (insert "and ")) (insert "co-wrote") (dolist (file cowrote) (if (> (+ (current-column) (length file)) 72) (insert "\n ")) (insert " " file)) (insert "\n")) (when changed (if (or wrote cowrote) (insert "and ")) (insert "changed") (dolist (file changed) (if (> (+ (current-column) (length file)) 72) (insert "\n ")) (insert " " file)) (insert "\n"))))) (insert "\nLocal" " Variables:\ncoding: " (symbol-name authors-coding-system) "\nEnd:\n") (message "Generating buffer %s... done" buffer-name) (unless noninteractive (when (or authors-invalid-file-names authors-ignored-names) (with-current-buffer (get-buffer-create "*Authors Errors*") (setq buffer-read-only nil) (erase-buffer) (set-buffer-file-coding-system authors-coding-system) (when authors-invalid-file-names (insert "Unrecognized file entries found:\n\n") (mapc (lambda (f) (if (not (string-match "^[A-Za-z]+$" f)) (insert f "\n"))) (sort authors-invalid-file-names 'string-lessp))) (when authors-ignored-names (insert "\n\nThese authors were ignored:\n\n" (mapconcat 'identity (sort authors-ignored-names 'string-lessp) "\n"))) (goto-char (point-min)) (compilation-mode) (message "Errors were found. See buffer %s" (buffer-name)))) (pop-to-buffer buffer-name)))) (defun batch-update-authors () "Produce an AUTHORS file. Call this function in batch mode with two command line arguments FILE and ROOT. FILE is the file to write, ROOT is the root directory of the Emacs source tree, from which to build the file." (unless noninteractive (error "`batch-update-authors' is to be used only with -batch")) (when (/= (length command-line-args-left) 2) (error "Call `batch-update-authors' with the name of the file to write")) (let* ((file (pop command-line-args-left)) (root (pop command-line-args-left))) (authors root) (write-file file))) (provide 'authors) ;;; authors.el ends here
{ "pile_set_name": "Github" }
# Select Hose [![Build Status](https://secure.travis-ci.org/indutny/select-hose.png)](http://travis-ci.org/indutny/select-hose) [![NPM version](https://badge.fury.io/js/select-hose.svg)](http://badge.fury.io/js/select-hose) Hose the data to the handler ## LICENSE This software is licensed under the MIT License. Copyright Fedor Indutny, 2015. 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.
{ "pile_set_name": "Github" }
--- title: El especificador está duplicado. ms.date: 07/20/2015 f1_keywords: - bc30178 - vbc30178 helpviewer_keywords: - BC30178 ms.assetid: e57a63e2-b6ae-4ba4-8fec-adc6c959d8fa ms.openlocfilehash: e6b3a1b12bcbe6d4fea81c3f23d09283f5645e6d ms.sourcegitcommit: bf5c5850654187705bc94cc40ebfb62fe346ab02 ms.translationtype: MT ms.contentlocale: es-ES ms.lasthandoff: 09/23/2020 ms.locfileid: "91089980" --- # <a name="specifier-is-duplicated"></a>El especificador está duplicado. Una palabra clave aparece más de una vez en la misma declaración. **Identificador de error:** BC30178 ## <a name="to-correct-this-error"></a>Para corregir este error - Quite las repeticiones de la palabra clave de la declaración. ## <a name="see-also"></a>Vea también - [Elementos declarados](../programming-guide/language-features/declared-elements/index.md)
{ "pile_set_name": "Github" }
{ "name": "gulps", "version": "3.9.1", "description": "LuLu UI", "main": "mockup/index.php", "directories": { "doc": "mockup" }, "author": "zhangxinxu", "license": "ISC", "devDependencies": { "gulp": "^3.9.1", "gulp-clean": "^0.3.2", "gulp-concat": "^2.6.1", "gulp-ruby-sass": "^2.1.1", "gulp-sass": "^3.1.0", "gulp-util": "^3.0.7" }, "dependencies": { "node-sass": "^4.11.0" } }
{ "pile_set_name": "Github" }
/*********************************************************\ * File: SRPBackgroundSky.cpp * * * Copyright (C) 2002-2013 The PixelLight Team (http://www.pixellight.org/) * * This file is part of PixelLight. * * 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. \*********************************************************/ //[-------------------------------------------------------] //[ Includes ] //[-------------------------------------------------------] #include "PLCompositing/SRPBackgroundSky.h" //[-------------------------------------------------------] //[ Namespace ] //[-------------------------------------------------------] namespace PLCompositing { //[-------------------------------------------------------] //[ RTTI interface ] //[-------------------------------------------------------] pl_implement_class(SRPBackgroundSky) //[-------------------------------------------------------] //[ Protected functions ] //[-------------------------------------------------------] /** * @brief * Default constructor */ SRPBackgroundSky::SRPBackgroundSky() { } /** * @brief * Destructor */ SRPBackgroundSky::~SRPBackgroundSky() { } //[-------------------------------------------------------] //[ Namespace ] //[-------------------------------------------------------] } // PLCompositing
{ "pile_set_name": "Github" }
/* File: expreval.h Auth: Brian Allen Vanderburg II Date: Thursday, April 24, 2003 Desc: Main include file for ExprEval library This file is part of ExprEval. */ /* Include once */ #ifndef __BAVII_EXPREVAL_H #define __BAVII_EXPREVAL_H #ifdef __cplusplus extern "C" { #endif /* Define type of data to use */ typedef double EXPRTYPE; /* Defines for various things */ /* Max id size */ #define EXPR_MAXIDENTSIZE 255 /* Error values */ enum { EXPR_ERROR_UNKNOWN = -1, /* Unknown error */ EXPR_ERROR_NOERROR = 0, /* No Error */ EXPR_ERROR_MEMORY, /* Memory allocation failed */ EXPR_ERROR_NULLPOINTER, /* Null pointer passed to function */ EXPR_ERROR_NOTFOUND, /* Item not found in a list */ EXPR_ERROR_UNMATCHEDCOMMENT, /* Unmatched comment tags */ EXPR_ERROR_INVALIDCHAR, /* Invalid characters in expression */ EXPR_ERROR_ALREADYEXISTS, /* An item already called create */ EXPR_ERROR_ALREADYPARSEDBAD, /* Expression parsed already, but unsuccessfully. call free or clear */ EXPR_ERROR_ALREADYPARSEDGOOD, /* Expression parsed already, successfully, call free or clear */ EXPR_ERROR_EMPTYEXPR, /* Empty expression string passed to parse */ EXPR_ERROR_UNMATCHEDPAREN, /* Unmatched parenthesis */ EXPR_ERROR_SYNTAX, /* Syntax error in expression */ EXPR_ERROR_MISSINGSEMICOLON, /* Missing semicolon at end of expression */ EXPR_ERROR_BADIDENTIFIER, /* Identifier was to big or not formed right */ EXPR_ERROR_NOSUCHFUNCTION, /* Function does not exist in function list */ EXPR_ERROR_BADNUMBERARGUMENTS, /* Bad number of arguments in a function call */ EXPR_ERROR_BADEXPR, /* This is a bad expression to evaluate. It has not been parsed or has unsuccessfully */ EXPR_ERROR_UNABLETOASSIGN, /* Unable to do an assignment, maybe no variable list */ EXPR_ERROR_DIVBYZERO, /* Attempted a division by zero */ EXPR_ERROR_NOVARLIST, /* No variable list found but one is needed */ EXPR_ERROR_BREAK, /* Expression was broken by break function */ EXPR_ERROR_CONSTANTASSIGN, /* Assignment to a constant */ EXPR_ERROR_REFCONSTANT, /* Constant used as a reference parameter */ EXPR_ERROR_OUTOFRANGE, /* A bad value was passed to a function */ EXPR_ERROR_USER /* Custom errors should be larger than this */ }; /* Macros */ /* Forward declarations */ typedef struct _exprNode exprNode; typedef struct _exprFuncList exprFuncList; typedef struct _exprValList exprValList; typedef struct _exprObj exprObj; /* Function types */ typedef int (*exprFuncType) (exprObj * obj, exprNode * nodes, int nodecount, EXPRTYPE ** refs, int refcount, EXPRTYPE * val); typedef int (*exprBreakFuncType) (exprObj * obj); /* Functions */ /* Version information function */ void exprGetVersion(int *major, int *minor); /* Functions for function lists */ int exprFuncListCreate(exprFuncList ** flist); int exprFuncListAdd(exprFuncList * flist, char *name, exprFuncType ptr, int min, int max, int refmin, int refmax); int exprFuncListFree(exprFuncList * flist); int exprFuncListClear(exprFuncList * flist); int exprFuncListInit(exprFuncList * flist); /* Functions for value lists */ int exprValListCreate(exprValList ** vlist); int exprValListAdd(exprValList * vlist, char *name, EXPRTYPE val); int exprValListSet(exprValList * vlist, char *name, EXPRTYPE val); int exprValListGet(exprValList * vlist, char *name, EXPRTYPE * val); int exprValListAddAddress(exprValList * vlist, char *name, EXPRTYPE * addr); int exprValListGetAddress(exprValList * vlist, char *name, EXPRTYPE ** addr); void *exprValListGetNext(exprValList * vlist, char **name, EXPRTYPE * value, EXPRTYPE ** addr, void *cookie); int exprValListFree(exprValList * vlist); int exprValListClear(exprValList * vlist); int exprValListInit(exprValList * vlist); /* Functions for expression objects */ int exprCreate(exprObj ** obj, exprFuncList * flist, exprValList * vlist, exprValList * clist, exprBreakFuncType breaker, void *userdata); int exprFree(exprObj * obj); int exprClear(exprObj * obj); int exprParse(exprObj * obj, char *expr); int exprEval(exprObj * obj, EXPRTYPE * val); int exprEvalNode(exprObj * obj, exprNode * nodes, int curnode, EXPRTYPE * val); exprFuncList *exprGetFuncList(exprObj * obj); exprValList *exprGetVarList(exprObj * obj); exprValList *exprGetConstList(exprObj * obj); exprBreakFuncType exprGetBreakFunc(exprObj * obj); int exprGetBreakResult(exprObj * obj); void *exprGetUserData(exprObj * obj); void exprSetUserData(exprObj * obj, void *userdata); void exprSetBreakCount(exprObj * obj, int count); void exprGetErrorPosition(exprObj * obj, int *start, int *end); /* Other useful routines */ int exprValidIdent(char *name); /* Name mangling */ #ifdef __cplusplus } #endif #endif /* __BAVII_EXPREVAL_H */
{ "pile_set_name": "Github" }
input_pipeline: class: ParallelTextInputPipeline params: source_files: - ${HOME}/text-to-sql/data/academic/2018_02_08/query_split/8/8_encode.txt model_dir: ${HOME}/text-to-sql/models/academic/query_split/2018_02_09/attn_to_input/8 tasks: - class: DecodeText
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: e31e0b290af573546b43390bb4d2b475 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
package com.x.organization.assemble.personal.jaxrs.reset; import javax.persistence.EntityManager; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.project.jaxrs.StandardJaxrsAction; import com.x.organization.core.entity.Person; import com.x.organization.core.entity.Person_; abstract class BaseAction extends StandardJaxrsAction { Boolean credentialExisted(EntityManagerContainer emc, String credential) throws Exception { EntityManager em = emc.get(Person.class); CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Long> cq = cb.createQuery(Long.class); Root<Person> root = cq.from(Person.class); Predicate p = cb.equal(root.get(Person_.name), credential); p = cb.or(p, cb.equal(root.get(Person_.mobile), credential)); p = cb.or(p, cb.equal(root.get(Person_.id), credential)); cq.select(cb.count(root.get(Person_.id))).where(p); if (em.createQuery(cq).getSingleResult() == 1) { return true; } else { return false; } } }
{ "pile_set_name": "Github" }
)]}' { "id": "Hello-World", "name": "Hello-World", "parent": "My-Parent", "description": "Hello-World project", "state": "ACTIVE" }
{ "pile_set_name": "Github" }
/* * Copyright 2013-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by 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.cloudfoundry.operations.applications; import reactor.core.publisher.Mono; import java.util.Comparator; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; final class RouteUtils { private RouteUtils() { } static Mono<DecomposedRoute> decomposeRoute(List<DomainSummary> availableDomains, String route, String routePath) { String domain = null; String host = null; String path = null; Integer port = null; String routeWithoutSuffix = route; if (availableDomains.size() == 0) { throw new IllegalArgumentException(String.format("The route %s did not match any existing domains", route)); } List<DomainSummary> sortedDomains = availableDomains.stream() .sorted(Comparator.<DomainSummary>comparingInt(domainSummary -> domainSummary.getName().length()).reversed()) .collect(Collectors.toList()); if (route.contains("/")) { int index = route.indexOf("/"); path = routePath != null ? routePath : route.substring(index); routeWithoutSuffix = route.substring(0, index); } else if (hasPort(route)) { port = getPort(route); routeWithoutSuffix = route.substring(0, route.indexOf(":")); } for (DomainSummary item : sortedDomains) { if (isDomainMatch(routeWithoutSuffix, item.getName())) { domain = item.getName(); if (domain.length() < routeWithoutSuffix.length()) { host = routeWithoutSuffix.substring(0, routeWithoutSuffix.lastIndexOf(domain) - 1); } break; } } if (domain == null) { throw new IllegalArgumentException(String.format("The route %s did not match any existing domains", route)); } if ((host != null || path != null) && port != null) { throw new IllegalArgumentException(String.format("The route %s is invalid: Host/path cannot be set with port", route)); } return Mono.just(DecomposedRoute.builder() .domain(domain) .host(host) .path(path) .port(port) .build()); } private static Integer getPort(String route) { Pattern pattern = Pattern.compile(":\\d+$"); Matcher matcher = pattern.matcher(route); matcher.find(); return Integer.valueOf(route.substring(matcher.start() + 1, matcher.end())); } private static Boolean hasPort(String route) { Pattern pattern = Pattern.compile("^.+?:\\d+$"); Matcher matcher = pattern.matcher(route); return matcher.matches(); } private static boolean isDomainMatch(String route, String domain) { return route.equals(domain) || route.endsWith(domain) && route.charAt(route.length() - domain.length() - 1) == '.'; } }
{ "pile_set_name": "Github" }
using System.Collections.Generic; namespace ProceduralToolkit.Buildings { public interface ILayout : ILayoutElement, IEnumerable<ILayoutElement> { void Add(ILayoutElement element); } }
{ "pile_set_name": "Github" }
# # Copyright 2013-2016 Classmethod, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, 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. # implementation-class=jp.classmethod.aws.gradle.cloudwatch.AwsCloudWatchPlugin
{ "pile_set_name": "Github" }
/* Userspace key control operations * * Copyright (C) 2004-5 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * 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. */ #include <linux/module.h> #include <linux/init.h> #include <linux/sched.h> #include <linux/slab.h> #include <linux/syscalls.h> #include <linux/key.h> #include <linux/keyctl.h> #include <linux/fs.h> #include <linux/capability.h> #include <linux/string.h> #include <linux/err.h> #include <linux/vmalloc.h> #include <linux/security.h> #include <asm/uaccess.h> #include "internal.h" static int key_get_type_from_user(char *type, const char __user *_type, unsigned len) { int ret; ret = strncpy_from_user(type, _type, len); if (ret < 0) return ret; if (ret == 0 || ret >= len) return -EINVAL; if (type[0] == '.') return -EPERM; type[len - 1] = '\0'; return 0; } /* * Extract the description of a new key from userspace and either add it as a * new key to the specified keyring or update a matching key in that keyring. * * The keyring must be writable so that we can attach the key to it. * * If successful, the new key's serial number is returned, otherwise an error * code is returned. */ SYSCALL_DEFINE5(add_key, const char __user *, _type, const char __user *, _description, const void __user *, _payload, size_t, plen, key_serial_t, ringid) { key_ref_t keyring_ref, key_ref; char type[32], *description; void *payload; long ret; bool vm; ret = -EINVAL; if (plen > 1024 * 1024 - 1) goto error; /* draw all the data into kernel space */ ret = key_get_type_from_user(type, _type, sizeof(type)); if (ret < 0) goto error; description = strndup_user(_description, PAGE_SIZE); if (IS_ERR(description)) { ret = PTR_ERR(description); goto error; } /* pull the payload in if one was supplied */ payload = NULL; vm = false; if (_payload) { ret = -ENOMEM; payload = kmalloc(plen, GFP_KERNEL); if (!payload) { if (plen <= PAGE_SIZE) goto error2; vm = true; payload = vmalloc(plen); if (!payload) goto error2; } ret = -EFAULT; if (copy_from_user(payload, _payload, plen) != 0) goto error3; } /* find the target keyring (which must be writable) */ keyring_ref = lookup_user_key(ringid, KEY_LOOKUP_CREATE, KEY_WRITE); if (IS_ERR(keyring_ref)) { ret = PTR_ERR(keyring_ref); goto error3; } /* create or update the requested key and add it to the target * keyring */ key_ref = key_create_or_update(keyring_ref, type, description, payload, plen, KEY_PERM_UNDEF, KEY_ALLOC_IN_QUOTA); if (!IS_ERR(key_ref)) { ret = key_ref_to_ptr(key_ref)->serial; key_ref_put(key_ref); } else { ret = PTR_ERR(key_ref); } key_ref_put(keyring_ref); error3: if (!vm) kfree(payload); else vfree(payload); error2: kfree(description); error: return ret; } /* * Search the process keyrings and keyring trees linked from those for a * matching key. Keyrings must have appropriate Search permission to be * searched. * * If a key is found, it will be attached to the destination keyring if there's * one specified and the serial number of the key will be returned. * * If no key is found, /sbin/request-key will be invoked if _callout_info is * non-NULL in an attempt to create a key. The _callout_info string will be * passed to /sbin/request-key to aid with completing the request. If the * _callout_info string is "" then it will be changed to "-". */ SYSCALL_DEFINE4(request_key, const char __user *, _type, const char __user *, _description, const char __user *, _callout_info, key_serial_t, destringid) { struct key_type *ktype; struct key *key; key_ref_t dest_ref; size_t callout_len; char type[32], *description, *callout_info; long ret; /* pull the type into kernel space */ ret = key_get_type_from_user(type, _type, sizeof(type)); if (ret < 0) goto error; /* pull the description into kernel space */ description = strndup_user(_description, PAGE_SIZE); if (IS_ERR(description)) { ret = PTR_ERR(description); goto error; } /* pull the callout info into kernel space */ callout_info = NULL; callout_len = 0; if (_callout_info) { callout_info = strndup_user(_callout_info, PAGE_SIZE); if (IS_ERR(callout_info)) { ret = PTR_ERR(callout_info); goto error2; } callout_len = strlen(callout_info); } /* get the destination keyring if specified */ dest_ref = NULL; if (destringid) { dest_ref = lookup_user_key(destringid, KEY_LOOKUP_CREATE, KEY_WRITE); if (IS_ERR(dest_ref)) { ret = PTR_ERR(dest_ref); goto error3; } } /* find the key type */ ktype = key_type_lookup(type); if (IS_ERR(ktype)) { ret = PTR_ERR(ktype); goto error4; } /* do the search */ key = request_key_and_link(ktype, description, callout_info, callout_len, NULL, key_ref_to_ptr(dest_ref), KEY_ALLOC_IN_QUOTA); if (IS_ERR(key)) { ret = PTR_ERR(key); goto error5; } /* wait for the key to finish being constructed */ ret = wait_for_key_construction(key, 1); if (ret < 0) goto error6; ret = key->serial; error6: key_put(key); error5: key_type_put(ktype); error4: key_ref_put(dest_ref); error3: kfree(callout_info); error2: kfree(description); error: return ret; } /* * Get the ID of the specified process keyring. * * The requested keyring must have search permission to be found. * * If successful, the ID of the requested keyring will be returned. */ long keyctl_get_keyring_ID(key_serial_t id, int create) { key_ref_t key_ref; unsigned long lflags; long ret; lflags = create ? KEY_LOOKUP_CREATE : 0; key_ref = lookup_user_key(id, lflags, KEY_SEARCH); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); goto error; } ret = key_ref_to_ptr(key_ref)->serial; key_ref_put(key_ref); error: return ret; } /* * Join a (named) session keyring. * * Create and join an anonymous session keyring or join a named session * keyring, creating it if necessary. A named session keyring must have Search * permission for it to be joined. Session keyrings without this permit will * be skipped over. * * If successful, the ID of the joined session keyring will be returned. */ long keyctl_join_session_keyring(const char __user *_name) { char *name; long ret; /* fetch the name from userspace */ name = NULL; if (_name) { name = strndup_user(_name, PAGE_SIZE); if (IS_ERR(name)) { ret = PTR_ERR(name); goto error; } } /* join the session */ ret = join_session_keyring(name); kfree(name); error: return ret; } /* * Update a key's data payload from the given data. * * The key must grant the caller Write permission and the key type must support * updating for this to work. A negative key can be positively instantiated * with this call. * * If successful, 0 will be returned. If the key type does not support * updating, then -EOPNOTSUPP will be returned. */ long keyctl_update_key(key_serial_t id, const void __user *_payload, size_t plen) { key_ref_t key_ref; void *payload; long ret; ret = -EINVAL; if (plen > PAGE_SIZE) goto error; /* pull the payload in if one was supplied */ payload = NULL; if (_payload) { ret = -ENOMEM; payload = kmalloc(plen, GFP_KERNEL); if (!payload) goto error; ret = -EFAULT; if (copy_from_user(payload, _payload, plen) != 0) goto error2; } /* find the target key (which must be writable) */ key_ref = lookup_user_key(id, 0, KEY_WRITE); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); goto error2; } /* update the key */ ret = key_update(key_ref, payload, plen); key_ref_put(key_ref); error2: kfree(payload); error: return ret; } /* * Revoke a key. * * The key must be grant the caller Write or Setattr permission for this to * work. The key type should give up its quota claim when revoked. The key * and any links to the key will be automatically garbage collected after a * certain amount of time (/proc/sys/kernel/keys/gc_delay). * * If successful, 0 is returned. */ long keyctl_revoke_key(key_serial_t id) { key_ref_t key_ref; long ret; key_ref = lookup_user_key(id, 0, KEY_WRITE); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); if (ret != -EACCES) goto error; key_ref = lookup_user_key(id, 0, KEY_SETATTR); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); goto error; } } key_revoke(key_ref_to_ptr(key_ref)); ret = 0; key_ref_put(key_ref); error: return ret; } /* * Clear the specified keyring, creating an empty process keyring if one of the * special keyring IDs is used. * * The keyring must grant the caller Write permission for this to work. If * successful, 0 will be returned. */ long keyctl_keyring_clear(key_serial_t ringid) { key_ref_t keyring_ref; long ret; keyring_ref = lookup_user_key(ringid, KEY_LOOKUP_CREATE, KEY_WRITE); if (IS_ERR(keyring_ref)) { ret = PTR_ERR(keyring_ref); /* Root is permitted to invalidate certain special keyrings */ if (capable(CAP_SYS_ADMIN)) { keyring_ref = lookup_user_key(ringid, 0, 0); if (IS_ERR(keyring_ref)) goto error; if (test_bit(KEY_FLAG_ROOT_CAN_CLEAR, &key_ref_to_ptr(keyring_ref)->flags)) goto clear; goto error_put; } goto error; } clear: ret = keyring_clear(key_ref_to_ptr(keyring_ref)); error_put: key_ref_put(keyring_ref); error: return ret; } /* * Create a link from a keyring to a key if there's no matching key in the * keyring, otherwise replace the link to the matching key with a link to the * new key. * * The key must grant the caller Link permission and the the keyring must grant * the caller Write permission. Furthermore, if an additional link is created, * the keyring's quota will be extended. * * If successful, 0 will be returned. */ long keyctl_keyring_link(key_serial_t id, key_serial_t ringid) { key_ref_t keyring_ref, key_ref; long ret; keyring_ref = lookup_user_key(ringid, KEY_LOOKUP_CREATE, KEY_WRITE); if (IS_ERR(keyring_ref)) { ret = PTR_ERR(keyring_ref); goto error; } key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE, KEY_LINK); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); goto error2; } ret = key_link(key_ref_to_ptr(keyring_ref), key_ref_to_ptr(key_ref)); key_ref_put(key_ref); error2: key_ref_put(keyring_ref); error: return ret; } /* * Unlink a key from a keyring. * * The keyring must grant the caller Write permission for this to work; the key * itself need not grant the caller anything. If the last link to a key is * removed then that key will be scheduled for destruction. * * If successful, 0 will be returned. */ long keyctl_keyring_unlink(key_serial_t id, key_serial_t ringid) { key_ref_t keyring_ref, key_ref; long ret; keyring_ref = lookup_user_key(ringid, 0, KEY_WRITE); if (IS_ERR(keyring_ref)) { ret = PTR_ERR(keyring_ref); goto error; } key_ref = lookup_user_key(id, KEY_LOOKUP_FOR_UNLINK, 0); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); goto error2; } ret = key_unlink(key_ref_to_ptr(keyring_ref), key_ref_to_ptr(key_ref)); key_ref_put(key_ref); error2: key_ref_put(keyring_ref); error: return ret; } /* * Return a description of a key to userspace. * * The key must grant the caller View permission for this to work. * * If there's a buffer, we place up to buflen bytes of data into it formatted * in the following way: * * type;uid;gid;perm;description<NUL> * * If successful, we return the amount of description available, irrespective * of how much we may have copied into the buffer. */ long keyctl_describe_key(key_serial_t keyid, char __user *buffer, size_t buflen) { struct key *key, *instkey; key_ref_t key_ref; char *tmpbuf; long ret; key_ref = lookup_user_key(keyid, KEY_LOOKUP_PARTIAL, KEY_VIEW); if (IS_ERR(key_ref)) { /* viewing a key under construction is permitted if we have the * authorisation token handy */ if (PTR_ERR(key_ref) == -EACCES) { instkey = key_get_instantiation_authkey(keyid); if (!IS_ERR(instkey)) { key_put(instkey); key_ref = lookup_user_key(keyid, KEY_LOOKUP_PARTIAL, 0); if (!IS_ERR(key_ref)) goto okay; } } ret = PTR_ERR(key_ref); goto error; } okay: /* calculate how much description we're going to return */ ret = -ENOMEM; tmpbuf = kmalloc(PAGE_SIZE, GFP_KERNEL); if (!tmpbuf) goto error2; key = key_ref_to_ptr(key_ref); ret = snprintf(tmpbuf, PAGE_SIZE - 1, "%s;%d;%d;%08x;%s", key->type->name, key->uid, key->gid, key->perm, key->description ?: ""); /* include a NUL char at the end of the data */ if (ret > PAGE_SIZE - 1) ret = PAGE_SIZE - 1; tmpbuf[ret] = 0; ret++; /* consider returning the data */ if (buffer && buflen > 0) { if (buflen > ret) buflen = ret; if (copy_to_user(buffer, tmpbuf, buflen) != 0) ret = -EFAULT; } kfree(tmpbuf); error2: key_ref_put(key_ref); error: return ret; } /* * Search the specified keyring and any keyrings it links to for a matching * key. Only keyrings that grant the caller Search permission will be searched * (this includes the starting keyring). Only keys with Search permission can * be found. * * If successful, the found key will be linked to the destination keyring if * supplied and the key has Link permission, and the found key ID will be * returned. */ long keyctl_keyring_search(key_serial_t ringid, const char __user *_type, const char __user *_description, key_serial_t destringid) { struct key_type *ktype; key_ref_t keyring_ref, key_ref, dest_ref; char type[32], *description; long ret; /* pull the type and description into kernel space */ ret = key_get_type_from_user(type, _type, sizeof(type)); if (ret < 0) goto error; description = strndup_user(_description, PAGE_SIZE); if (IS_ERR(description)) { ret = PTR_ERR(description); goto error; } /* get the keyring at which to begin the search */ keyring_ref = lookup_user_key(ringid, 0, KEY_SEARCH); if (IS_ERR(keyring_ref)) { ret = PTR_ERR(keyring_ref); goto error2; } /* get the destination keyring if specified */ dest_ref = NULL; if (destringid) { dest_ref = lookup_user_key(destringid, KEY_LOOKUP_CREATE, KEY_WRITE); if (IS_ERR(dest_ref)) { ret = PTR_ERR(dest_ref); goto error3; } } /* find the key type */ ktype = key_type_lookup(type); if (IS_ERR(ktype)) { ret = PTR_ERR(ktype); goto error4; } /* do the search */ key_ref = keyring_search(keyring_ref, ktype, description); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); /* treat lack or presence of a negative key the same */ if (ret == -EAGAIN) ret = -ENOKEY; goto error5; } /* link the resulting key to the destination keyring if we can */ if (dest_ref) { ret = key_permission(key_ref, KEY_LINK); if (ret < 0) goto error6; ret = key_link(key_ref_to_ptr(dest_ref), key_ref_to_ptr(key_ref)); if (ret < 0) goto error6; } ret = key_ref_to_ptr(key_ref)->serial; error6: key_ref_put(key_ref); error5: key_type_put(ktype); error4: key_ref_put(dest_ref); error3: key_ref_put(keyring_ref); error2: kfree(description); error: return ret; } /* * Read a key's payload. * * The key must either grant the caller Read permission, or it must grant the * caller Search permission when searched for from the process keyrings. * * If successful, we place up to buflen bytes of data into the buffer, if one * is provided, and return the amount of data that is available in the key, * irrespective of how much we copied into the buffer. */ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) { struct key *key; key_ref_t key_ref; long ret; /* find the key first */ key_ref = lookup_user_key(keyid, 0, 0); if (IS_ERR(key_ref)) { ret = -ENOKEY; goto error; } key = key_ref_to_ptr(key_ref); /* see if we can read it directly */ ret = key_permission(key_ref, KEY_READ); if (ret == 0) goto can_read_key; if (ret != -EACCES) goto error; /* we can't; see if it's searchable from this process's keyrings * - we automatically take account of the fact that it may be * dangling off an instantiation key */ if (!is_key_possessed(key_ref)) { ret = -EACCES; goto error2; } /* the key is probably readable - now try to read it */ can_read_key: ret = key_validate(key); if (ret == 0) { ret = -EOPNOTSUPP; if (key->type->read) { /* read the data with the semaphore held (since we * might sleep) */ down_read(&key->sem); ret = key->type->read(key, buffer, buflen); up_read(&key->sem); } } error2: key_put(key); error: return ret; } /* * Change the ownership of a key * * The key must grant the caller Setattr permission for this to work, though * the key need not be fully instantiated yet. For the UID to be changed, or * for the GID to be changed to a group the caller is not a member of, the * caller must have sysadmin capability. If either uid or gid is -1 then that * attribute is not changed. * * If the UID is to be changed, the new user must have sufficient quota to * accept the key. The quota deduction will be removed from the old user to * the new user should the attribute be changed. * * If successful, 0 will be returned. */ long keyctl_chown_key(key_serial_t id, uid_t uid, gid_t gid) { struct key_user *newowner, *zapowner = NULL; struct key *key; key_ref_t key_ref; long ret; ret = 0; if (uid == (uid_t) -1 && gid == (gid_t) -1) goto error; key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE | KEY_LOOKUP_PARTIAL, KEY_SETATTR); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); goto error; } key = key_ref_to_ptr(key_ref); /* make the changes with the locks held to prevent chown/chown races */ ret = -EACCES; down_write(&key->sem); if (!capable(CAP_SYS_ADMIN)) { /* only the sysadmin can chown a key to some other UID */ if (uid != (uid_t) -1 && key->uid != uid) goto error_put; /* only the sysadmin can set the key's GID to a group other * than one of those that the current process subscribes to */ if (gid != (gid_t) -1 && gid != key->gid && !in_group_p(gid)) goto error_put; } /* change the UID */ if (uid != (uid_t) -1 && uid != key->uid) { ret = -ENOMEM; newowner = key_user_lookup(uid, current_user_ns()); if (!newowner) goto error_put; /* transfer the quota burden to the new user */ if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) { unsigned maxkeys = (uid == 0) ? key_quota_root_maxkeys : key_quota_maxkeys; unsigned maxbytes = (uid == 0) ? key_quota_root_maxbytes : key_quota_maxbytes; spin_lock(&newowner->lock); if (newowner->qnkeys + 1 >= maxkeys || newowner->qnbytes + key->quotalen >= maxbytes || newowner->qnbytes + key->quotalen < newowner->qnbytes) goto quota_overrun; newowner->qnkeys++; newowner->qnbytes += key->quotalen; spin_unlock(&newowner->lock); spin_lock(&key->user->lock); key->user->qnkeys--; key->user->qnbytes -= key->quotalen; spin_unlock(&key->user->lock); } atomic_dec(&key->user->nkeys); atomic_inc(&newowner->nkeys); if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) { atomic_dec(&key->user->nikeys); atomic_inc(&newowner->nikeys); } zapowner = key->user; key->user = newowner; key->uid = uid; } /* change the GID */ if (gid != (gid_t) -1) key->gid = gid; ret = 0; error_put: up_write(&key->sem); key_put(key); if (zapowner) key_user_put(zapowner); error: return ret; quota_overrun: spin_unlock(&newowner->lock); zapowner = newowner; ret = -EDQUOT; goto error_put; } /* * Change the permission mask on a key. * * The key must grant the caller Setattr permission for this to work, though * the key need not be fully instantiated yet. If the caller does not have * sysadmin capability, it may only change the permission on keys that it owns. */ long keyctl_setperm_key(key_serial_t id, key_perm_t perm) { struct key *key; key_ref_t key_ref; long ret; ret = -EINVAL; if (perm & ~(KEY_POS_ALL | KEY_USR_ALL | KEY_GRP_ALL | KEY_OTH_ALL)) goto error; key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE | KEY_LOOKUP_PARTIAL, KEY_SETATTR); if (IS_ERR(key_ref)) { ret = PTR_ERR(key_ref); goto error; } key = key_ref_to_ptr(key_ref); /* make the changes with the locks held to prevent chown/chmod races */ ret = -EACCES; down_write(&key->sem); /* if we're not the sysadmin, we can only change a key that we own */ if (capable(CAP_SYS_ADMIN) || key->uid == current_fsuid()) { key->perm = perm; ret = 0; } up_write(&key->sem); key_put(key); error: return ret; } /* * Get the destination keyring for instantiation and check that the caller has * Write permission on it. */ static long get_instantiation_keyring(key_serial_t ringid, struct request_key_auth *rka, struct key **_dest_keyring) { key_ref_t dkref; *_dest_keyring = NULL; /* just return a NULL pointer if we weren't asked to make a link */ if (ringid == 0) return 0; /* if a specific keyring is nominated by ID, then use that */ if (ringid > 0) { dkref = lookup_user_key(ringid, KEY_LOOKUP_CREATE, KEY_WRITE); if (IS_ERR(dkref)) return PTR_ERR(dkref); *_dest_keyring = key_ref_to_ptr(dkref); return 0; } if (ringid == KEY_SPEC_REQKEY_AUTH_KEY) return -EINVAL; /* otherwise specify the destination keyring recorded in the * authorisation key (any KEY_SPEC_*_KEYRING) */ if (ringid >= KEY_SPEC_REQUESTOR_KEYRING) { *_dest_keyring = key_get(rka->dest_keyring); return 0; } return -ENOKEY; } /* * Change the request_key authorisation key on the current process. */ static int keyctl_change_reqkey_auth(struct key *key) { struct cred *new; new = prepare_creds(); if (!new) return -ENOMEM; key_put(new->request_key_auth); new->request_key_auth = key_get(key); return commit_creds(new); } /* * Copy the iovec data from userspace */ static long copy_from_user_iovec(void *buffer, const struct iovec *iov, unsigned ioc) { for (; ioc > 0; ioc--) { if (copy_from_user(buffer, iov->iov_base, iov->iov_len) != 0) return -EFAULT; buffer += iov->iov_len; iov++; } return 0; } /* * Instantiate a key with the specified payload and link the key into the * destination keyring if one is given. * * The caller must have the appropriate instantiation permit set for this to * work (see keyctl_assume_authority). No other permissions are required. * * If successful, 0 will be returned. */ long keyctl_instantiate_key_common(key_serial_t id, const struct iovec *payload_iov, unsigned ioc, size_t plen, key_serial_t ringid) { const struct cred *cred = current_cred(); struct request_key_auth *rka; struct key *instkey, *dest_keyring; void *payload; long ret; bool vm = false; kenter("%d,,%zu,%d", id, plen, ringid); ret = -EINVAL; if (plen > 1024 * 1024 - 1) goto error; /* the appropriate instantiation authorisation key must have been * assumed before calling this */ ret = -EPERM; instkey = cred->request_key_auth; if (!instkey) goto error; rka = instkey->payload.data; if (rka->target_key->serial != id) goto error; /* pull the payload in if one was supplied */ payload = NULL; if (payload_iov) { ret = -ENOMEM; payload = kmalloc(plen, GFP_KERNEL); if (!payload) { if (plen <= PAGE_SIZE) goto error; vm = true; payload = vmalloc(plen); if (!payload) goto error; } ret = copy_from_user_iovec(payload, payload_iov, ioc); if (ret < 0) goto error2; } /* find the destination keyring amongst those belonging to the * requesting task */ ret = get_instantiation_keyring(ringid, rka, &dest_keyring); if (ret < 0) goto error2; /* instantiate the key and link it into a keyring */ ret = key_instantiate_and_link(rka->target_key, payload, plen, dest_keyring, instkey); key_put(dest_keyring); /* discard the assumed authority if it's just been disabled by * instantiation of the key */ if (ret == 0) keyctl_change_reqkey_auth(NULL); error2: if (!vm) kfree(payload); else vfree(payload); error: return ret; } /* * Instantiate a key with the specified payload and link the key into the * destination keyring if one is given. * * The caller must have the appropriate instantiation permit set for this to * work (see keyctl_assume_authority). No other permissions are required. * * If successful, 0 will be returned. */ long keyctl_instantiate_key(key_serial_t id, const void __user *_payload, size_t plen, key_serial_t ringid) { if (_payload && plen) { struct iovec iov[1] = { [0].iov_base = (void __user *)_payload, [0].iov_len = plen }; return keyctl_instantiate_key_common(id, iov, 1, plen, ringid); } return keyctl_instantiate_key_common(id, NULL, 0, 0, ringid); } /* * Instantiate a key with the specified multipart payload and link the key into * the destination keyring if one is given. * * The caller must have the appropriate instantiation permit set for this to * work (see keyctl_assume_authority). No other permissions are required. * * If successful, 0 will be returned. */ long keyctl_instantiate_key_iov(key_serial_t id, const struct iovec __user *_payload_iov, unsigned ioc, key_serial_t ringid) { struct iovec iovstack[UIO_FASTIOV], *iov = iovstack; long ret; if (_payload_iov == 0 || ioc == 0) goto no_payload; ret = rw_copy_check_uvector(WRITE, _payload_iov, ioc, ARRAY_SIZE(iovstack), iovstack, &iov, 1); if (ret < 0) goto err; if (ret == 0) goto no_payload_free; ret = keyctl_instantiate_key_common(id, iov, ioc, ret, ringid); err: if (iov != iovstack) kfree(iov); return ret; no_payload_free: if (iov != iovstack) kfree(iov); no_payload: return keyctl_instantiate_key_common(id, NULL, 0, 0, ringid); } /* * Negatively instantiate the key with the given timeout (in seconds) and link * the key into the destination keyring if one is given. * * The caller must have the appropriate instantiation permit set for this to * work (see keyctl_assume_authority). No other permissions are required. * * The key and any links to the key will be automatically garbage collected * after the timeout expires. * * Negative keys are used to rate limit repeated request_key() calls by causing * them to return -ENOKEY until the negative key expires. * * If successful, 0 will be returned. */ long keyctl_negate_key(key_serial_t id, unsigned timeout, key_serial_t ringid) { return keyctl_reject_key(id, timeout, ENOKEY, ringid); } /* * Negatively instantiate the key with the given timeout (in seconds) and error * code and link the key into the destination keyring if one is given. * * The caller must have the appropriate instantiation permit set for this to * work (see keyctl_assume_authority). No other permissions are required. * * The key and any links to the key will be automatically garbage collected * after the timeout expires. * * Negative keys are used to rate limit repeated request_key() calls by causing * them to return the specified error code until the negative key expires. * * If successful, 0 will be returned. */ long keyctl_reject_key(key_serial_t id, unsigned timeout, unsigned error, key_serial_t ringid) { const struct cred *cred = current_cred(); struct request_key_auth *rka; struct key *instkey, *dest_keyring; long ret; kenter("%d,%u,%u,%d", id, timeout, error, ringid); /* must be a valid error code and mustn't be a kernel special */ if (error <= 0 || error >= MAX_ERRNO || error == ERESTARTSYS || error == ERESTARTNOINTR || error == ERESTARTNOHAND || error == ERESTART_RESTARTBLOCK) return -EINVAL; /* the appropriate instantiation authorisation key must have been * assumed before calling this */ ret = -EPERM; instkey = cred->request_key_auth; if (!instkey) goto error; rka = instkey->payload.data; if (rka->target_key->serial != id) goto error; /* find the destination keyring if present (which must also be * writable) */ ret = get_instantiation_keyring(ringid, rka, &dest_keyring); if (ret < 0) goto error; /* instantiate the key and link it into a keyring */ ret = key_reject_and_link(rka->target_key, timeout, error, dest_keyring, instkey); key_put(dest_keyring); /* discard the assumed authority if it's just been disabled by * instantiation of the key */ if (ret == 0) keyctl_change_reqkey_auth(NULL); error: return ret; } /* * Read or set the default keyring in which request_key() will cache keys and * return the old setting. * * If a process keyring is specified then this will be created if it doesn't * yet exist. The old setting will be returned if successful. */ long keyctl_set_reqkey_keyring(int reqkey_defl) { struct cred *new; int ret, old_setting; old_setting = current_cred_xxx(jit_keyring); if (reqkey_defl == KEY_REQKEY_DEFL_NO_CHANGE) return old_setting; new = prepare_creds(); if (!new) return -ENOMEM; switch (reqkey_defl) { case KEY_REQKEY_DEFL_THREAD_KEYRING: ret = install_thread_keyring_to_cred(new); if (ret < 0) goto error; goto set; case KEY_REQKEY_DEFL_PROCESS_KEYRING: ret = install_process_keyring_to_cred(new); if (ret < 0) { if (ret != -EEXIST) goto error; ret = 0; } goto set; case KEY_REQKEY_DEFL_DEFAULT: case KEY_REQKEY_DEFL_SESSION_KEYRING: case KEY_REQKEY_DEFL_USER_KEYRING: case KEY_REQKEY_DEFL_USER_SESSION_KEYRING: case KEY_REQKEY_DEFL_REQUESTOR_KEYRING: goto set; case KEY_REQKEY_DEFL_NO_CHANGE: case KEY_REQKEY_DEFL_GROUP_KEYRING: default: ret = -EINVAL; goto error; } set: new->jit_keyring = reqkey_defl; commit_creds(new); return old_setting; error: abort_creds(new); return ret; } /* * Set or clear the timeout on a key. * * Either the key must grant the caller Setattr permission or else the caller * must hold an instantiation authorisation token for the key. * * The timeout is either 0 to clear the timeout, or a number of seconds from * the current time. The key and any links to the key will be automatically * garbage collected after the timeout expires. * * If successful, 0 is returned. */ long keyctl_set_timeout(key_serial_t id, unsigned timeout) { struct key *key, *instkey; key_ref_t key_ref; long ret; key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE | KEY_LOOKUP_PARTIAL, KEY_SETATTR); if (IS_ERR(key_ref)) { /* setting the timeout on a key under construction is permitted * if we have the authorisation token handy */ if (PTR_ERR(key_ref) == -EACCES) { instkey = key_get_instantiation_authkey(id); if (!IS_ERR(instkey)) { key_put(instkey); key_ref = lookup_user_key(id, KEY_LOOKUP_PARTIAL, 0); if (!IS_ERR(key_ref)) goto okay; } } ret = PTR_ERR(key_ref); goto error; } okay: key = key_ref_to_ptr(key_ref); key_set_timeout(key, timeout); key_put(key); ret = 0; error: return ret; } /* * Assume (or clear) the authority to instantiate the specified key. * * This sets the authoritative token currently in force for key instantiation. * This must be done for a key to be instantiated. It has the effect of making * available all the keys from the caller of the request_key() that created a * key to request_key() calls made by the caller of this function. * * The caller must have the instantiation key in their process keyrings with a * Search permission grant available to the caller. * * If the ID given is 0, then the setting will be cleared and 0 returned. * * If the ID given has a matching an authorisation key, then that key will be * set and its ID will be returned. The authorisation key can be read to get * the callout information passed to request_key(). */ long keyctl_assume_authority(key_serial_t id) { struct key *authkey; long ret; /* special key IDs aren't permitted */ ret = -EINVAL; if (id < 0) goto error; /* we divest ourselves of authority if given an ID of 0 */ if (id == 0) { ret = keyctl_change_reqkey_auth(NULL); goto error; } /* attempt to assume the authority temporarily granted to us whilst we * instantiate the specified key * - the authorisation key must be in the current task's keyrings * somewhere */ authkey = key_get_instantiation_authkey(id); if (IS_ERR(authkey)) { ret = PTR_ERR(authkey); goto error; } ret = keyctl_change_reqkey_auth(authkey); if (ret < 0) goto error; key_put(authkey); ret = authkey->serial; error: return ret; } /* * Get a key's the LSM security label. * * The key must grant the caller View permission for this to work. * * If there's a buffer, then up to buflen bytes of data will be placed into it. * * If successful, the amount of information available will be returned, * irrespective of how much was copied (including the terminal NUL). */ long keyctl_get_security(key_serial_t keyid, char __user *buffer, size_t buflen) { struct key *key, *instkey; key_ref_t key_ref; char *context; long ret; key_ref = lookup_user_key(keyid, KEY_LOOKUP_PARTIAL, KEY_VIEW); if (IS_ERR(key_ref)) { if (PTR_ERR(key_ref) != -EACCES) return PTR_ERR(key_ref); /* viewing a key under construction is also permitted if we * have the authorisation token handy */ instkey = key_get_instantiation_authkey(keyid); if (IS_ERR(instkey)) return PTR_ERR(instkey); key_put(instkey); key_ref = lookup_user_key(keyid, KEY_LOOKUP_PARTIAL, 0); if (IS_ERR(key_ref)) return PTR_ERR(key_ref); } key = key_ref_to_ptr(key_ref); ret = security_key_getsecurity(key, &context); if (ret == 0) { /* if no information was returned, give userspace an empty * string */ ret = 1; if (buffer && buflen > 0 && copy_to_user(buffer, "", 1) != 0) ret = -EFAULT; } else if (ret > 0) { /* return as much data as there's room for */ if (buffer && buflen > 0) { if (buflen > ret) buflen = ret; if (copy_to_user(buffer, context, buflen) != 0) ret = -EFAULT; } kfree(context); } key_ref_put(key_ref); return ret; } /* * Attempt to install the calling process's session keyring on the process's * parent process. * * The keyring must exist and must grant the caller LINK permission, and the * parent process must be single-threaded and must have the same effective * ownership as this process and mustn't be SUID/SGID. * * The keyring will be emplaced on the parent when it next resumes userspace. * * If successful, 0 will be returned. */ long keyctl_session_to_parent(void) { #ifdef TIF_NOTIFY_RESUME struct task_struct *me, *parent; const struct cred *mycred, *pcred; struct cred *cred, *oldcred; key_ref_t keyring_r; int ret; keyring_r = lookup_user_key(KEY_SPEC_SESSION_KEYRING, 0, KEY_LINK); if (IS_ERR(keyring_r)) return PTR_ERR(keyring_r); /* our parent is going to need a new cred struct, a new tgcred struct * and new security data, so we allocate them here to prevent ENOMEM in * our parent */ ret = -ENOMEM; cred = cred_alloc_blank(); if (!cred) goto error_keyring; cred->tgcred->session_keyring = key_ref_to_ptr(keyring_r); keyring_r = NULL; me = current; rcu_read_lock(); write_lock_irq(&tasklist_lock); parent = me->real_parent; ret = -EPERM; /* the parent mustn't be init and mustn't be a kernel thread */ if (parent->pid <= 1 || !parent->mm) goto not_permitted; /* the parent must be single threaded */ if (!thread_group_empty(parent)) goto not_permitted; /* the parent and the child must have different session keyrings or * there's no point */ mycred = current_cred(); pcred = __task_cred(parent); if (mycred == pcred || mycred->tgcred->session_keyring == pcred->tgcred->session_keyring) goto already_same; /* the parent must have the same effective ownership and mustn't be * SUID/SGID */ if (pcred->uid != mycred->euid || pcred->euid != mycred->euid || pcred->suid != mycred->euid || pcred->gid != mycred->egid || pcred->egid != mycred->egid || pcred->sgid != mycred->egid) goto not_permitted; /* the keyrings must have the same UID */ if ((pcred->tgcred->session_keyring && pcred->tgcred->session_keyring->uid != mycred->euid) || mycred->tgcred->session_keyring->uid != mycred->euid) goto not_permitted; /* if there's an already pending keyring replacement, then we replace * that */ oldcred = parent->replacement_session_keyring; /* the replacement session keyring is applied just prior to userspace * restarting */ parent->replacement_session_keyring = cred; cred = NULL; set_ti_thread_flag(task_thread_info(parent), TIF_NOTIFY_RESUME); write_unlock_irq(&tasklist_lock); rcu_read_unlock(); if (oldcred) put_cred(oldcred); return 0; already_same: ret = 0; not_permitted: write_unlock_irq(&tasklist_lock); rcu_read_unlock(); put_cred(cred); return ret; error_keyring: key_ref_put(keyring_r); return ret; #else /* !TIF_NOTIFY_RESUME */ /* * To be removed when TIF_NOTIFY_RESUME has been implemented on * m68k/xtensa */ #warning TIF_NOTIFY_RESUME not implemented return -EOPNOTSUPP; #endif /* !TIF_NOTIFY_RESUME */ } /* * The key control system call */ SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5) { switch (option) { case KEYCTL_GET_KEYRING_ID: return keyctl_get_keyring_ID((key_serial_t) arg2, (int) arg3); case KEYCTL_JOIN_SESSION_KEYRING: return keyctl_join_session_keyring((const char __user *) arg2); case KEYCTL_UPDATE: return keyctl_update_key((key_serial_t) arg2, (const void __user *) arg3, (size_t) arg4); case KEYCTL_REVOKE: return keyctl_revoke_key((key_serial_t) arg2); case KEYCTL_DESCRIBE: return keyctl_describe_key((key_serial_t) arg2, (char __user *) arg3, (unsigned) arg4); case KEYCTL_CLEAR: return keyctl_keyring_clear((key_serial_t) arg2); case KEYCTL_LINK: return keyctl_keyring_link((key_serial_t) arg2, (key_serial_t) arg3); case KEYCTL_UNLINK: return keyctl_keyring_unlink((key_serial_t) arg2, (key_serial_t) arg3); case KEYCTL_SEARCH: return keyctl_keyring_search((key_serial_t) arg2, (const char __user *) arg3, (const char __user *) arg4, (key_serial_t) arg5); case KEYCTL_READ: return keyctl_read_key((key_serial_t) arg2, (char __user *) arg3, (size_t) arg4); case KEYCTL_CHOWN: return keyctl_chown_key((key_serial_t) arg2, (uid_t) arg3, (gid_t) arg4); case KEYCTL_SETPERM: return keyctl_setperm_key((key_serial_t) arg2, (key_perm_t) arg3); case KEYCTL_INSTANTIATE: return keyctl_instantiate_key((key_serial_t) arg2, (const void __user *) arg3, (size_t) arg4, (key_serial_t) arg5); case KEYCTL_NEGATE: return keyctl_negate_key((key_serial_t) arg2, (unsigned) arg3, (key_serial_t) arg4); case KEYCTL_SET_REQKEY_KEYRING: return keyctl_set_reqkey_keyring(arg2); case KEYCTL_SET_TIMEOUT: return keyctl_set_timeout((key_serial_t) arg2, (unsigned) arg3); case KEYCTL_ASSUME_AUTHORITY: return keyctl_assume_authority((key_serial_t) arg2); case KEYCTL_GET_SECURITY: return keyctl_get_security((key_serial_t) arg2, (char __user *) arg3, (size_t) arg4); case KEYCTL_SESSION_TO_PARENT: return keyctl_session_to_parent(); case KEYCTL_REJECT: return keyctl_reject_key((key_serial_t) arg2, (unsigned) arg3, (unsigned) arg4, (key_serial_t) arg5); case KEYCTL_INSTANTIATE_IOV: return keyctl_instantiate_key_iov( (key_serial_t) arg2, (const struct iovec __user *) arg3, (unsigned) arg4, (key_serial_t) arg5); default: return -EOPNOTSUPP; } }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="rustdoc"> <meta name="description" content="API documentation for the Rust `DIGITS` constant in crate `std`."> <meta name="keywords" content="rust, rustlang, rust-lang, DIGITS"> <title>std::f64::DIGITS - Rust</title> <link rel="stylesheet" type="text/css" href="../../rustdoc.css"> <link rel="stylesheet" type="text/css" href="../../main.css"> <link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico"> </head> <body class="rustdoc"> <!--[if lte IE 8]> <div class="warning"> This old browser is unsupported and will most likely display funky things. </div> <![endif]--> <nav class="sidebar"> <a href='../../std/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='' width='100'></a> <p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>f64</a></p><script>window.sidebarCurrent = {name: 'DIGITS', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script> </nav> <nav class="sub"> <form class="search-form js-only"> <div class="search-container"> <input class="search-input" name="search" autocomplete="off" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"> </div> </form> </nav> <section id='main' class="content constant"> <h1 class='fqn'><span class='in-band'><a href='../index.html'>std</a>::<wbr><a href='index.html'>f64</a>::<wbr><a class='constant' href=''>DIGITS</a></span><span class='out-of-band'><span id='render-detail'> <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>&#x2212;</span>] </a> </span><a id='src-185' class='srclink' href='../../core/f64/constant.DIGITS.html?gotosrc=185' title='goto source code'>[src]</a></span></h1> <pre class='rust const'>pub const DIGITS: <a class='primitive' href='../primitive.u32.html'>u32</a><code> = </code><code>15</code></pre></section> <section id='search' class="content hidden"></section> <section class="footer"></section> <aside id="help" class="hidden"> <div> <h1 class="hidden">Help</h1> <div class="shortcuts"> <h2>Keyboard Shortcuts</h2> <dl> <dt>?</dt> <dd>Show this help dialog</dd> <dt>S</dt> <dd>Focus the search field</dd> <dt>&larrb;</dt> <dd>Move up in search results</dd> <dt>&rarrb;</dt> <dd>Move down in search results</dd> <dt>&#9166;</dt> <dd>Go to active search result</dd> </dl> </div> <div class="infos"> <h2>Search Tricks</h2> <p> Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type. </p> <p> Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>. </p> <p> Search functions by type signature (e.g. <code>vec -> usize</code>) </p> </div> </div> </aside> <script> window.rootPath = "../../"; window.currentCrate = "std"; window.playgroundUrl = "https://play.rust-lang.org/"; </script> <script src="../../jquery.js"></script> <script src="../../main.js"></script> <script src="../../playpen.js"></script> <script defer src="../../search-index.js"></script> </body> </html>
{ "pile_set_name": "Github" }
"use strict"; exports.__esModule = true; exports.default = remove; function remove(node) { return node.remove(); } module.exports = exports["default"];
{ "pile_set_name": "Github" }
package ToolKit; /** * Created by Luiz Arantes Sa on 1/23/15. */ public class Rectangle extends GeometricObject { private double width; private double height; public Rectangle() { } public Rectangle(double width, double height) { this.width = width; this.height = height; } /** Return width */ public double getWidth() { return width; } /** Set a new width */ public void setWidth(double width) { this.width = width; } /** Return height */ public double getHeight() { return height; } /** Set a new height */ public void setHeight(double height) { this.height = height; } /** Return area */ public double getArea() { return width * height; } /** Return perimeter */ public double getPerimeter() { return 2 * (width + height); } }
{ "pile_set_name": "Github" }
#!/usr/bin/env python #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright 2010 California Institute of Technology. ALL RIGHTS RESERVED. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in 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. # # United States Government Sponsorship acknowledged. This software is subject to # U.S. export control laws and regulations and has been classified as 'EAR99 NLR' # (No [Export] License Required except when exporting to an embargoed country, # end user, or in support of a prohibited end use). By downloading this software, # the user agrees to comply with all applicable U.S. export laws and regulations. # The user has the responsibility to obtain export licenses, or other export # authority as may be required before exporting this software to any 'EAR99' # embargoed foreign country or citizen of those countries. # # Author: Giangi Sacco #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import os Import('envCombLib') package = envCombLib['PACKAGE'] project = envCombLib['PROJECT'] install = os.path.join(envCombLib['PRJ_SCONS_INSTALL'], package) listFiles = ['Poly1D.py', 'Poly2D.py','Polynomial.py','PolyFactory.py'] envCombLib.Install(install,listFiles) envCombLib.Alias('install',install)
{ "pile_set_name": "Github" }
%% Convert Matlab Struct to OpenSim time Series Table % Input is a Maltab stucture where data.label = nX1 or nX3 array % eg s.LASI = [2 3 4; 4 5 6, ... % One of the structures values MUST be a time vector and called 'time' % Output is an OpenSim TimesSeriesTable % ----------------------------------------------------------------------- % % The OpenSim API is a toolkit for musculoskeletal modeling and % % simulation. See http://opensim.stanford.edu and the NOTICE file % % for more information. OpenSim is developed at Stanford University % % and supported by the US National Institutes of Health (U54 GM072970, % % R24 HD065690) and by DARPA through the Warrior Web program. % % % % Copyright (c) 2005-2019 Stanford University and the Authors % % Author(s): James Dunne % % % % 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. % % ----------------------------------------------------------------------- % % Written by: James Dunne, Tom Uchida, Chris Dembia, Ajay Seth, % Ayman Habib, Jen Hicks,Shrinidhi K. Lakshmikanth. %% function timeseriesosimtable = osimTableFromStruct(s) %% import Java Libraries import org.opensim.modeling.* %% Get all the data labels in the Structure labels = fieldnames(s); %% Check for, save, then remove the time array from the structure % Get the index for time array tIndex = find(cellfun(@(s) contains('time', s),lower(labels))); % Check to see if the time exists if isempty(tIndex) error('"time" field required, none found') end % Get the time vector time = s.time(); % Remove time from the struct s = rmfield(s,'time'); % remove time from the labels labels(tIndex) = []; nfields = length(labels); %% Check the structure for row and column length consistency across fields. for i = 1 : nfields % For all fields in s, check that the array size is either nX1 or nX3, % other array sizes are unsupported. [nRows,nCols] = size(s.(labels{i})); if i == 1 rowRef = nRows; colRef = nCols; % Check that the first field has 1 or 3 Columns if ~(colRef == 1 || colRef == 3) error(['Data Columns must be 1 or 3, s.' labels{i} ' has ' num2str(colRef)]) end else % Check that the current field has the same number of rows and % columns as the reference. if rowRef ~= nRows || colRef ~= nCols error('Array rows or columns are non-uniform across fields. Check input stucture for error') end end end %% Instantiate an empty OpenSim TimesSeriesTable() if colRef == 1 timeseriesosimtable = TimeSeriesTable(); else timeseriesosimtable = TimeSeriesTableVec3(); end % Set the TimesSeriesTable() column names osimlabels = StdVectorString(); for i = 1 : nfields osimlabels.add( labels{i} ); end timeseriesosimtable.setColumnLabels(osimlabels); %% Build the TimesSeriesTable() if colRef == 1 % Get an OpenSim Row Vector row = RowVector(nfields, NaN); % Fill row vector with data for iRow = 1 : nRows for iCol = 1 : nfields % Get the row value from each field of the struct row.set(iCol-1, s.(labels{iCol})(iRow) ); end % Append the row vector to the opensim table timeseriesosimtable.appendRow(iRow-1, row); end else % Get an OpenSim Row Vector row = RowVectorVec3(nfields); for iRow = 1 : nRows % Create and fill a row of data for iCol = 1 : nfields % Make a vec3 element from the rowdata row.set(iCol-1, osimVec3FromArray(s.(labels{iCol})(iRow,:))); end % Append the RowVectorofVec3's to the opensim table timeseriesosimtable.appendRow(iRow-1, row); end end %% Set the Time Column values timeColumn = timeseriesosimtable.getIndependentColumn(); for i = 1 : nRows timeColumn.set(i-1, time(i)); end end
{ "pile_set_name": "Github" }
package org.corfudb.universe; import com.spotify.docker.client.DefaultDockerClient; import com.spotify.docker.client.exceptions.DockerCertificateException; import lombok.Builder; import lombok.Builder.Default; import lombok.Getter; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; import org.corfudb.common.util.ClassUtils; import org.corfudb.universe.logging.LoggingParams; import org.corfudb.universe.scenario.fixture.Fixture; import org.corfudb.universe.scenario.fixture.Fixtures.UniverseFixture; import org.corfudb.universe.scenario.fixture.Fixtures.VmUniverseFixture; import org.corfudb.universe.universe.Universe; import org.corfudb.universe.universe.Universe.UniverseMode; import org.corfudb.universe.universe.UniverseException; import org.corfudb.universe.universe.UniverseParams; import org.corfudb.universe.universe.docker.DockerUniverse; import org.corfudb.universe.universe.process.ProcessUniverse; import org.corfudb.universe.universe.vm.ApplianceManager; import org.corfudb.universe.universe.vm.VmUniverse; import org.corfudb.universe.universe.vm.VmUniverseParams; import java.util.function.Consumer; /** * Manages UniverseWorkflow and provides api to build a universe workflow. */ @Builder public class UniverseManager { @NonNull private final String corfuServerVersion; @NonNull private final String testName; @Default @Getter private final UniverseMode universeMode = UniverseMode.DOCKER; /** * Creates a universe workflow. * * @param action testing logic * @param <T> a fixture type * @return universe workflow */ public <T extends Fixture<UniverseParams>> UniverseWorkflow workflow( Consumer<UniverseWorkflow<T>> action) { UniverseWorkflow<T> wf = workflow(); try { action.accept(wf); } finally { wf.shutdown(); } return wf; } private <T extends Fixture<UniverseParams>> UniverseWorkflow<T> workflow() { T fixture; switch (universeMode) { case DOCKER: case PROCESS: fixture = ClassUtils.cast(new UniverseFixture()); break; case VM: fixture = ClassUtils.cast(new VmUniverseFixture()); break; default: throw new IllegalStateException("Unexpected value: " + universeMode); } return UniverseWorkflow.<T>builder() .corfuServerVersion(corfuServerVersion) .universeMode(universeMode) .testName(testName) .fixture(fixture) .build() .init(); } /** * Manages a testing workflow lifecycle. * Provides api to: * - customize the universe parameters * - initialize and deploy the clusters in the universe * - get the universe fixture to setup the initial parameters * - shutdown the universe * * @param <T> */ @Slf4j @Builder @Getter public static class UniverseWorkflow<T extends Fixture<UniverseParams>> { @NonNull private final T fixture; @NonNull private final UniverseMode universeMode; @NonNull private String corfuServerVersion; @NonNull private final String testName; @Getter private Universe universe; private boolean initialized; public UniverseWorkflow<T> init() { switch (universeMode) { case DOCKER: case PROCESS: UniverseFixture dockerFixture = ClassUtils.cast(this.fixture); dockerFixture.getCluster().serverVersion(corfuServerVersion); break; case VM: VmUniverseFixture vmFixture = ClassUtils.cast(fixture); vmFixture.getCluster().serverVersion(corfuServerVersion); break; default: throw new IllegalStateException("Unexpected value: " + universeMode); } return this; } public UniverseWorkflow<T> initUniverse() { switch (universeMode) { case DOCKER: initDockerUniverse(); break; case VM: initVmUniverse(); break; case PROCESS: initProcessUniverse(); break; default: throw new IllegalStateException("Unexpected value: " + universeMode); } initialized = true; return this; } public UniverseWorkflow<T> deploy() { initUniverse(); switch (universeMode) { case DOCKER: deployDocker(); break; case VM: deployVm(); break; case PROCESS: deployProcess(); break; default: throw new IllegalStateException("Unexpected value: " + universeMode); } return this; } public UniverseWorkflow<T> setupDocker(Consumer<UniverseFixture> fixtureManager) { if (universeMode == UniverseMode.DOCKER) { fixtureManager.accept(ClassUtils.cast(fixture)); } return this; } public UniverseWorkflow<T> setupVm(Consumer<VmUniverseFixture> fixtureManager) { if (universeMode == UniverseMode.VM) { fixtureManager.accept(ClassUtils.cast(fixture)); } return this; } public UniverseWorkflow<T> setupProcess(Consumer<UniverseFixture> fixtureManager) { if (universeMode == UniverseMode.PROCESS) { fixtureManager.accept(ClassUtils.cast(fixture)); } return this; } private UniverseWorkflow<T> deployVm() { checkMode(UniverseMode.VM); universe.deploy(); return this; } private UniverseWorkflow<T> initVmUniverse() { checkMode(UniverseMode.VM); if (initialized) { return this; } VmUniverseParams universeParams = ClassUtils.cast(fixture.data()); ApplianceManager manager = ApplianceManager.builder() .universeParams(universeParams) .build(); VmUniverseFixture vmFixture = ClassUtils.cast(fixture); LoggingParams loggingParams = vmFixture .getLogging() .testName(testName) .build(); //Assign universe variable before deploy prevents resources leaks universe = VmUniverse.builder() .universeParams(universeParams) .loggingParams(loggingParams) .applianceManager(manager) .build(); return this; } private UniverseWorkflow<T> deployDocker() { //Assign universe variable before deploy stage, it prevents resources leaks. checkMode(UniverseMode.DOCKER); universe.deploy(); return this; } private UniverseWorkflow<T> initDockerUniverse() { checkMode(UniverseMode.DOCKER); if (initialized) { return this; } DefaultDockerClient docker; try { docker = DefaultDockerClient.fromEnv().build(); } catch (DockerCertificateException e) { throw new UniverseException("Can't initialize docker client"); } UniverseFixture dockerFixture = ClassUtils.cast(fixture); LoggingParams loggingParams = dockerFixture .getLogging() .testName(testName) .build(); universe = DockerUniverse.builder() .universeParams(dockerFixture.data()) .loggingParams(loggingParams) .docker(docker) .build(); return this; } private UniverseWorkflow<T> deployProcess() { checkMode(UniverseMode.PROCESS); universe.deploy(); return this; } private UniverseWorkflow<T> initProcessUniverse() { checkMode(UniverseMode.PROCESS); if (initialized) { return this; } UniverseFixture processFixture = ClassUtils.cast(fixture); LoggingParams loggingParams = processFixture .getLogging() .testName(testName) .build(); //Assign universe variable before deploy prevents resources leaks universe = ProcessUniverse.builder() .universeParams(fixture.data()) .loggingParams(loggingParams) .build(); return this; } public void shutdown() { if (universe != null) { universe.shutdown(); } else { String err = "The universe is null, can't shutdown the test properly."; log.error(err); } } private void checkMode(UniverseMode expected) { if (universeMode != expected) { String err = "Invalid mode: " + universeMode + ". Expected mode: " + expected; throw new IllegalStateException(err); } } } }
{ "pile_set_name": "Github" }
version: '2' services: container-crontab: image: rancher/container-crontab:v0.2.0 privileged: true volumes: - /var/run/docker.sock:/var/run/docker.sock labels: io.rancher.scheduler.global: true io.rancher.container.hostname_override: container_name
{ "pile_set_name": "Github" }
=== resources/clj_kondo/impl/cache/built_in/clj/clojure.zip.transit.json === insert-child {2 {:ret :vector}} left {1 {:ret #{:vector :nil}}} append-child {2 {:ret :vector}} down {1 {:ret #{:vector :nil}}} replace {2 {:ret :vector}} zipper {4 {:ret :vector}} end? {1 {:ret :boolean}} edit {:varargs {:ret :vector, :min-arity 2}} vector-zip {1 {:ret :vector}} up {1 {:ret #{:vector :nil}}} seq-zip {1 {:ret :vector}} right {1 {:ret #{:vector :nil}}} lefts {1 {:ret :seq}} xml-zip {1 {:ret :vector}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.core.server.transit.json === thread {:varargs {:min-arity 2, :args (:nilable/string nil nil nil)}} ex->data {2 {:ret :associative}} remote-prepl {:varargs {:min-arity 4, :args (:nilable/string nil nil nil nil nil)}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.spec.gen.alpha.transit.json === qualified? {1 {:ret :boolean}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.test.transit.json === file-position {1 {:ret :vector}} file-and-line {2 {:ret #{{:type :map, :val {:file {:row 341, :col 16, :end-row 341, :end-col 32}, :line {:row 341, :col 39, :end-row 341, :end-col 57}}} {:type :map, :val {:file {:row 342, :col 14, :end-row 342, :end-col 17, :tag :nil}, :line {:row 342, :col 24, :end-row 342, :end-col 27, :tag :nil}}}}}} stacktrace-file-and-line {1 {:ret #{{:type :map, :val {:file {:row 349, :col 12, :end-row 349, :end-col 15, :tag :nil}, :line {:row 349, :col 22, :end-row 349, :end-col 25, :tag :nil}}} {:type :map, :val {:file {:row 348, :col 14, :end-row 348, :end-col 30}, :line {:row 348, :col 37, :end-row 348, :end-col 55}}}}}} compose-fixtures {2 {:ret :fn}} function? {1 {:ret #{:nil :boolean}}} successful? {1 {:ret #{:nil :boolean}}} testing-vars-str {1 {:ret :string}} run-tests {0 {:ret :associative}, :varargs {:ret :associative, :min-arity 0}} === resources/clj_kondo/impl/cache/built_in/clj/java.math.BigInteger.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/java.lang.Math.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/java.lang.CharSequence.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.datafy.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.java.shell.transit.json === parse-args {1 {:ret :vector}} === resources/clj_kondo/impl/cache/built_in/clj/java.lang.Double.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/java.lang.Thread.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.core.specs.alpha.transit.json === even-number-of-forms? {1 {:ret :boolean}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.core.protocols.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.test.junit.transit.json === suite-attrs {2 {:ret #{{:type :map, :val {:name {:row 99, :col 22, :end-row 99, :end-col 31}}}}}} package-class {1 {:ret #{:vector}}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.pprint.transit.json === toks {1 {:ret :seq}} brackets {1 {:ret #{:vector}}} get-section {1 {:ret :vector}} buffer-length {1 {:ret #{:number :nat-int}}} integral? {1 {:ret #{:nil :boolean}}} write-initial-lines {2 {:args (nil :nilable/string)}} insert-scaled-decimal {2 {:ret #{:string}}} round-str {4 {:ret #{:vector}}} float-parts-base {1 {:ret #{:vector}}} set-max-column {2 {:ret :nil}} c-write-char {2 {:args (nil :nilable/int)}} realize-parameter-list {2 {:ret :vector}} get-format-arg {1 {:ret :vector}} split-at-newline {1 {:ret :vector}} group-by* {2 {:ret :seq}} insert-decimal {2 {:ret #{:string}}} realize-parameter {2 {:ret :vector}} get-sub-section {1 {:ret :seq}} execute-format {2 {:ret :nil}} inc-s {1 {:args (:nilable/string)}} unzip-map {1 {:ret :vector}} next-arg-or-nil {1 {:ret #{:vector}}} format-simple-ordinal {1 {:ret :string}} start-block {4 {:args (nil :nilable/string :nilable/string :nilable/string)}} process-directive-table-element {1 {:ret :vector}} set-pprint-dispatch {1 {:ret :nil}} remainders {2 {:ret :seq}} process-bracket {2 {:ret :vector}} translate-param {1 {:ret :vector}} pprint-reader-macro {1 {:ret #{:nil :boolean}}} compile-directive {2 {:ret :vector}} two-forms {1 {:ret {:type :map, :val {}}}} add-core-ns {1 {:ret {:type :map, :val {}}}} format-simple-cardinal {1 {:ret :string}} float-parts {1 {:ret #{:vector}}} get-fixed {3 {:ret #{:string}}} abort? {1 {:ret #{:boolean}}} map-params {4 {:ret :nilable/map}} p-write-char {2 {:args (nil :nilable/int)}} tokens-fit? {2 {:ret #{:boolean}}} tuple-map {2 {:ret {:type :map, :val {}}}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.spec.alpha.transit.json === alt-impl {3 {:ret :associative}} pvalid? {2 {:ret :boolean}, 3 {:ret :boolean}} explain-data* {5 {:ret #{{:type :map, :val {:user/problems {:row 214, :col 19, :end-row 214, :end-col 24, :tag {:call {:filename clojure/spec/alpha.clj, :type :call, :lang :clj, :base-lang :clj, :resolved-ns clojure.spec.alpha, :ns clojure.spec.alpha, :name explain*, :arity 5}}}, :user/spec {:row 215, :col 15, :end-row 215, :end-col 19}, :user/value {:row 216, :col 16, :end-row 216, :end-col 17}}} :nil}}} fn-sym {1 {:ret #{:symbol :nil}}} inst-in-range? {3 {:ret #{:nil :boolean}}} accept? {1 {:ret :boolean}} accept {1 {:ret {:type :map, :val {:user/op {:row 1375, :col 25, :end-row 1375, :end-col 33, :tag :keyword}, :ret {:row 1375, :col 39, :end-row 1375, :end-col 40}}}}} valid? {2 {:ret :boolean}, 3 {:ret :boolean}} int-in-range? {3 {:ret #{:nil :boolean}}} exercise {1 {:ret :seq}, 2 {:ret :seq}, 3 {:ret :seq}} explain-data {2 {:ret #{{:type :map, :val {:user/problems {:row 214, :col 19, :end-row 214, :end-col 24, :tag {:call {:filename clojure/spec/alpha.clj, :type :call, :lang :clj, :base-lang :clj, :resolved-ns clojure.spec.alpha, :ns clojure.spec.alpha, :name explain*, :arity 5}}}, :user/spec {:row 215, :col 15, :end-row 215, :end-col 19}, :user/value {:row 216, :col 16, :end-row 216, :end-col 17}}} :nil}}} inck {2 {:ret :associative}} invalid? {1 {:ret :boolean}} amp-impl {4 {:ret {:type :map, :val {:user/op {:row 1416, :col 9, :end-row 1416, :end-col 14, :tag :keyword}, :p1 {:row 1416, :col 19, :end-row 1416, :end-col 21}, :amp {:row 1416, :col 27, :end-row 1416, :end-col 34}, :ps {:row 1416, :col 39, :end-row 1416, :end-col 44}, :forms {:row 1416, :col 52, :end-row 1416, :end-col 62}}}}} rep-impl {2 {:ret #{{:type :map, :val {:user/op {:row 1399, :col 19, :end-row 1399, :end-col 24, :tag :keyword}, :p2 {:row 1399, :col 30, :end-row 1399, :end-col 32}, :splice {:row 1399, :col 42, :end-row 1399, :end-col 48}, :forms {:row 1399, :col 57, :end-row 1399, :end-col 61}, :id {:row 1399, :col 66, :end-row 1399, :end-col 93}}} :nil}}} filter-alt {4 {:ret #{:vector}}} call-valid? {3 {:ret #{:nil :boolean}}} rep* {5 {:ret #{{:type :map, :val {:user/op {:row 1399, :col 19, :end-row 1399, :end-col 24, :tag :keyword}, :p2 {:row 1399, :col 30, :end-row 1399, :end-col 32}, :splice {:row 1399, :col 42, :end-row 1399, :end-col 48}, :forms {:row 1399, :col 57, :end-row 1399, :end-col 61}, :id {:row 1399, :col 66, :end-row 1399, :end-col 93}}} :nil}}} maybe-impl {2 {:ret :associative}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.stacktrace.transit.json === print-throwable {1 {:ret #{:nil}}} === resources/clj_kondo/impl/cache/built_in/clj/java.lang.System.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.string.transit.json === ends-with? {2 {:args (:nilable/char-sequence :nilable/string)}} replace-first-char {3 {:args (:nilable/char-sequence :nilable/char nil)}} capitalize {1 {:args (:nilable/char-sequence)}} reverse {1 {:args (:nilable/char-sequence)}} replace-first {3 {:args (:nilable/char-sequence nil nil)}} replace-first-str {3 {:ret #{:nilable/string :string}, :args (:nilable/char-sequence :nilable/string :nilable/string)}} starts-with? {2 {:args (:nilable/char-sequence :nilable/string)}} escape {2 {:args (:nilable/char-sequence nil)}} last-index-of {2 {:args (:nilable/char-sequence nil)}, 3 {:args (:nilable/char-sequence nil :int)}} re-quote-replacement {1 {:args (:nilable/char-sequence)}} includes? {2 {:args (:nilable/char-sequence :nilable/char-sequence)}} replace {3 {:args (:nilable/char-sequence nil nil)}} split-lines {1 {:args (:nilable/char-sequence)}} lower-case {1 {:args (:nilable/char-sequence)}} trim-newline {1 {:args (:nilable/char-sequence)}} replace-by {3 {:args (:nilable/char-sequence nil nil)}} replace-first-by {3 {:ret #{:nilable/char-sequence :string}, :args (:nilable/char-sequence nil nil)}} upper-case {1 {:args (:nilable/char-sequence)}} split {2 {:args (:nilable/char-sequence nil)}, 3 {:args (:nilable/char-sequence nil nil)}} trimr {1 {:args (:nilable/char-sequence)}} index-of {2 {:args (:nilable/char-sequence nil)}, 3 {:args (:nilable/char-sequence nil :int)}} trim {1 {:args (:nilable/char-sequence)}} triml {1 {:args (:nilable/char-sequence)}} blank? {1 {:args (:nilable/char-sequence)}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.set.transit.json === union {0 {:ret :set}} superset? {2 {:ret #{:nil :boolean}}} subset? {2 {:ret #{:nil :boolean}}} rename {2 {:ret :set}} project {2 {:ret :set}} === resources/clj_kondo/impl/cache/built_in/clj/java.lang.Boolean.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.java.io.transit.json === append? {1 {:ret :boolean}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.java.browse-ui.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.repl.transit.json === namespace-doc {1 {:ret :associative}} special-doc {1 {:ret :associative}} stack-element-str {1 {:ret :string}} dir-fn {1 {:ret #{:list :seq}}} thread-stopper {0 {:ret :fn}, 1 {:ret :fn}} apropos {1 {:ret #{:list :seq}}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.inspector.transit.json === atom? {1 {:ret :boolean}} collection-tag {1 {:ret #{:keyword :nil}}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.instant.transit.json === validated {1 {:ret :fn}} zero-fill-right {2 {:args (:nilable/string nil)}} leap-year? {1 {:ret #{:nil :boolean}}} divisible? {2 {:ret :boolean}} read-instant-timestamp {1 {:args (:nilable/char-sequence)}} indivisible? {2 {:ret :boolean}} parse-int {1 {:args (:nilable/string)}} read-instant-calendar {1 {:args (:nilable/char-sequence)}} read-instant-date {1 {:args (:nilable/char-sequence)}} parse-timestamp {2 {:args (nil :nilable/char-sequence)}} === resources/clj_kondo/impl/cache/built_in/clj/java.lang.Long.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.tools.reader.transit.json === unquote-splicing? {1 {:ret #{:nil :boolean}}} starting-line-col-info {1 {:ret #{:vector :nil}}} wrapping-reader {1 {:ret :fn}} read+string {0 {:ret :vector}, 1 {:ret :vector}, 3 {:ret :vector}, 2 {:ret :vector}} read-unicode-char {4 {:args (:nilable/string :int :int :int)}} unquote? {1 {:ret #{:nil :boolean}}} syntax-quote-coll {2 {:ret #{:list}}} check-eof-error {3 {:args (nil nil :int)}} check-invalid-read-cond {3 {:args (nil nil :int)}} map-func {1 {:ret #{:symbol}}} ending-line-col-info {1 {:ret #{:vector :nil}}} garg {1 {:ret :symbol, :args (:int)}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.parallel.transit.json === pdistinct {1 {:ret :vector}} pvec {1 {:ret :vector}} pa-to-vec {1 {:ret :vector}} psummary {1 {:ret {:type :map, :val {:min {:row 156, :col 9, :end-row 156, :end-col 17}, :max {:row 156, :col 23, :end-row 156, :end-col 31}, :size {:row 156, :col 38, :end-row 156, :end-col 47}, :min-index {:row 156, :col 59, :end-row 156, :end-col 74}, :max-index {:row 156, :col 86, :end-row 156, :end-col 101}}}}, 2 {:ret {:type :map, :val {:min {:row 156, :col 9, :end-row 156, :end-col 17}, :max {:row 156, :col 23, :end-row 156, :end-col 31}, :size {:row 156, :col 38, :end-row 156, :end-col 47}, :min-index {:row 156, :col 59, :end-row 156, :end-col 74}, :max-index {:row 156, :col 86, :end-row 156, :end-col 101}}}}} pfilter-nils {1 {:ret :vector}} summary-map {1 {:ret {:type :map, :val {:min {:row 156, :col 9, :end-row 156, :end-col 17}, :max {:row 156, :col 23, :end-row 156, :end-col 31}, :size {:row 156, :col 38, :end-row 156, :end-col 47}, :min-index {:row 156, :col 59, :end-row 156, :end-col 74}, :max-index {:row 156, :col 86, :end-row 156, :end-col 101}}}}} psort {1 {:ret :vector}, 2 {:ret :vector}} pfilter-dupes {1 {:ret :vector}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.main.transit.json === stack-element-str {1 {:ret :string}} core-class? {1 {:args (:nilable/string)}} java-loc->source {2 {:ret #{:symbol}}} load-script {1 {:args (:nilable/string)}} skip-if-eol {1 {:ret #{:keyword :nil}}} file-name {1 {:args (:nilable/string)}} file-path {1 {:args (:nilable/string)}} ex-triage {1 {:ret :associative}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.walk.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.template.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.data.json.transit.json === codepoint-clause {1 {:ret #{:vector :nil}}} write-double {2 {:args (:nilable/double nil)}} read-integer {1 {:args (:nilable/string)}} write-string {2 {:args (:nilable/char-sequence nil)}} write-float {2 {:args (:nilable/double nil)}} read-decimal {1 {:args (:nilable/string)}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.xml.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.core.reducers.transit.json === cat {1 {:ret :fn}} monoid {2 {:ret :fn}} === resources/clj_kondo/impl/cache/built_in/clj/java.lang.String.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/java.math.BigDecimal.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/java.lang.Character.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.reflect.transit.json === access-flag {1 {:ret {:type :map, :val {:name {:row 57, :col 10, :end-row 57, :end-col 14}, :flag {:row 57, :col 21, :end-row 57, :end-col 25}, :contexts {:row 57, :col 36, :end-row 57, :end-col 64}}}}} declared-constructors {1 {:ret :set}} parse-method-descriptor {1 {:ret {:type :map, :val {:parameter-types {:row 193, :col 21, :end-row 193, :end-col 67}, :return-type {:row 194, :col 17, :end-row 194, :end-col 50}}}, :args (:nilable/string)}} field-descriptor->class-symbol {1 {:args (:nilable/string)}} declared-fields {1 {:ret :set}} declared-methods {1 {:ret :set}} === resources/clj_kondo/impl/cache/built_in/clj/java.lang.Integer.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.edn.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.java.browse.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.uuid.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.core.transit.json === +' {0 {:ret :nat-int}} sort-by {2 {:ret #{:list :seq}}, 3 {:ret #{:list :seq}}} is-runtime-annotation? {1 {:ret :boolean}} keep-indexed {1 {:ret :fn}} subs {2 {:ret :nilable/string, :args (:nilable/string nil)}, 3 {:ret :nilable/string, :args (:nilable/string nil nil)}} reader-conditional {2 {:args (nil :nilable/boolean)}} qualified-keyword? {1 {:ret :boolean}} satisfies? {2 {:ret :boolean}} take-nth {1 {:ret :fn}, 2 {:ret :seq}} newline {0 {:ret :nil}} dedupe {0 {:ret :fn}} pr-on {2 {:ret :nil}} mk-bound-fn {3 {:ret :fn}} pr {0 {:ret :nil}, 1 {:ret :nil}} = {1 {:ret :boolean}} take {1 {:ret :fn}, 2 {:ret :seq}} thread-bound? {:varargs {:ret :boolean, :min-arity 0}} any? {1 {:ret :boolean}} rand-int {1 {:ret :int}} map {1 {:ret :fn}, 2 {:ret :seq}, 3 {:ret :seq}, 4 {:ret :seq}, :varargs {:ret :seq, :min-arity 4}} juxt {1 {:ret :fn}, 2 {:ret :fn}, 3 {:ret :fn}, :varargs {:ret :fn, :min-arity 3}} < {1 {:ret :boolean}} make-hierarchy {0 {:ret {:type :map, :val {:parents {:row 5532, :col 16, :end-row 5532, :end-col 18, :tag {:type :map, :val {}}}, :descendants {:row 5532, :col 32, :end-row 5532, :end-col 34, :tag {:type :map, :val {}}}, :ancestors {:row 5532, :col 46, :end-row 5532, :end-col 48, :tag {:type :map, :val {}}}}}}} keep {1 {:ret :fn}, 2 {:ret :seq}} unchecked-long {1 {:args (:nilable/number)}} some? {1 {:ret :boolean}} get-super-and-interfaces {1 {:ret #{:vector}}} remove-tap {1 {:ret :nil}} inst? {1 {:ret :boolean}} range {0 {:ret :seq}} sort {1 {:ret #{:list :seq}}, 2 {:ret #{:list :seq}}} generate-class {1 {:ret :vector}} map-indexed {1 {:ret :fn}} comp {2 {:ret :fn}} simple-symbol? {1 {:ret #{:nil :boolean}}} fnil {2 {:ret :fn}, 3 {:ret :fn}, 4 {:ret :fn}} unchecked-float {1 {:args (:nilable/number)}} cat {1 {:ret :fn}} StackTraceElement->vec {1 {:ret :vector}} flush {0 {:ret :nil}} take-while {1 {:ret :fn}, 2 {:ret :seq}} <= {1 {:ret :boolean}} repeatedly {1 {:ret :seq}, 2 {:ret :seq}} remove {1 {:ret :transducer}, 2 {:ret :seq}} * {0 {:ret :pos-int}} nary-inline {1 {:ret :fn}, 2 {:ret :fn}} format {:varargs {:ret :nilable/string, :min-arity 1}} bound? {:varargs {:ret :boolean, :min-arity 0}} parse-opts+specs {1 {:ret :vector}} interleave {1 {:ret :seq}, 2 {:ret :seq}, :varargs {:ret :seq, :min-arity 2}} protocol? {1 {:ret :boolean}} into {0 {:ret :vector}} long {1 {:args (:nilable/number)}} double {1 {:args (:nilable/number)}} method-sig {1 {:ret :vector}} hash-ordered-coll {1 {:ret :int}} deref-as-map {1 {:ret {:type :map, :val {:status {:row 445, :col 6, :end-row 455, :end-col 14, :tag #{{:tag :keyword, :row 452, :col 7, :end-row 452, :end-col 15} {:tag :keyword, :row 449, :col 7, :end-row 449, :end-col 14} :nil}}, :val {:row 457, :col 11, :end-row 457, :end-col 14}}}}} empty? {1 {:ret :boolean}} short {1 {:args (:nilable/number)}} pref {0 {:ret :nil}} add-tap {1 {:ret :nil}} unchecked-double {1 {:args (:nilable/number)}} not= {1 {:ret :boolean}, 2 {:ret :boolean}, :varargs {:ret :boolean, :min-arity 2}} fits-table? {1 {:ret :boolean}} rand {1 {:ret :number}} > {1 {:ret :boolean}} replace {1 {:ret :transducer}} unchecked-int {1 {:args (:nilable/number)}} bound-fn* {1 {:ret :fn}} prn {:varargs {:ret #{:nil}, :min-arity 0}} extends? {2 {:ret :boolean}} spread {1 {:ret #{:nil :seq}}} agent-errors {1 {:ret #{:list :nil}}} float {1 {:args (:nilable/number)}} concat {0 {:ret :seq}, 1 {:ret :seq}, 2 {:ret :seq}} valid-java-method-name {1 {:ret :boolean, :args (:nilable/string)}} mod {2 {:ret #{:number}}} reductions {2 {:ret :seq}} hash-set {0 {:ret :set}} emit-hinted-impl {2 {:ret :vector}} strip-ns {1 {:ret #{:symbol :keyword}}} assoc-in {3 {:ret #{:associative}}} memoize {1 {:ret :fn}} simple-keyword? {1 {:ret #{:nil :boolean}}} neg-int? {1 {:ret #{:nil :boolean}}} drop {1 {:ret :fn}, 2 {:ret :seq}} split-at {2 {:ret :vector}} random-sample {1 {:ret :transducer}, 2 {:ret :seq}} update {3 {:ret :associative}, 4 {:ret :associative}, 5 {:ret :associative}, 6 {:ret :associative}, :varargs {:ret :associative, :min-arity 6}} group-by-sig {1 {:ret :seq}} list* {1 {:ret :seq}} *' {0 {:ret :pos-int}} mix-collection-hash {2 {:ret :int, :args (:int :int)}} re-find {2 {:ret :seq}} run! {2 {:ret :nil}} print-sequential {6 {:args (:nilable/string nil :nilable/string :nilable/string nil nil)}} not {1 {:ret #{:boolean}}} file-seq {1 {:ret :seq}} ident? {1 {:ret #{:boolean}}} qualified-ident? {1 {:ret :boolean}} / {1 {:ret :number}} binding-conveyor-fn {1 {:ret :fn}} vector {0 {:ret :vector}, 1 {:ret :vector}, 2 {:ret :vector}, 3 {:ret :vector}, 4 {:ret :vector}, 5 {:ret :vector}, 6 {:ret :vector}} >= {1 {:ret :boolean}} drop-last {1 {:ret :seq}, 2 {:ret :seq}} root-directory {1 {:ret :string}} distinct {0 {:ret :fn}} partition {2 {:ret :seq}, 3 {:ret :seq}, 4 {:ret :seq}} data-reader-urls {0 {:ret :seq}} mapv {3 {:ret :vector}, 4 {:ret :vector}, :varargs {:ret :vector, :min-arity 4}} partition-all {1 {:ret :fn, :args (:int)}, 2 {:ret :seq}, 3 {:ret :seq}} partition-by {1 {:ret :fn}, 2 {:ret :seq}} derive {2 {:ret :nil}} prep-hashes {4 {:ret #{:vector}}} subseq {5 {:ret #{:nil :seq}}} flatten {1 {:ret :seq}} halt-when {1 {:ret :fn}, 2 {:ret :fn}} nat-int? {1 {:ret #{:nil :boolean}}} subvec {2 {:ret :vector}} partial {2 {:ret :fn}, 3 {:ret :fn}, 4 {:ret :fn}, :varargs {:ret :fn, :min-arity 4}} replicate {2 {:ret :seq}} unchecked-byte {1 {:args (:nilable/number)}} every-pred {1 {:ret :fn}, 2 {:ret :fn}, 3 {:ret :fn}, :varargs {:ret :fn, :min-arity 3}} distinct? {1 {:ret :boolean}, 2 {:ret :boolean}} pos-int? {1 {:ret #{:nil :boolean}}} prep-ints {2 {:ret #{:vector}}} extenders {1 {:ret :seq}} unchecked-short {1 {:args (:nilable/number)}} odd? {1 {:ret :boolean}} rsubseq {5 {:ret #{:nil :seq}}} filter {1 {:ret :fn}, 2 {:ret :seq}} + {0 {:ret :nat-int}} split-with {2 {:ret :vector}} ctor-sigs {1 {:ret :seq}} str {0 {:ret :nilable/string}, 1 {:ret :nilable/string}, :varargs {:ret :nilable/string, :min-arity 1}} hash-map {0 {:ret {:type :map, :val {}}}} underive {2 {:ret :nil}} Throwable->map {1 {:ret :nilable/map}} some-fn {1 {:ret :fn}, 2 {:ret :fn}, 3 {:ret :fn}, :varargs {:ret :fn, :min-arity 3}} simple-ident? {1 {:ret #{:nil :boolean}}} generate-interface {1 {:ret :vector}} xml-seq {1 {:ret :seq}} byte {1 {:args (:nilable/number)}} == {1 {:ret :boolean}} root-resource {1 {:ret :string}} generate-proxy {2 {:ret :vector}} interpose {1 {:ret :fn}, 2 {:ret :seq}} emit-impl {1 {:ret :vector}} rational? {1 {:ret #{:boolean}}} clojure-version {0 {:ret :string}} merge-hash-collisions {4 {:ret :vector}} comparator {1 {:ret :fn}} drop-while {1 {:ret :fn}, 2 {:ret :seq}} complement {1 {:ret :fn}} constantly {1 {:ret :fn}} completing {1 {:ret :fn}, 2 {:ret :fn}} hash-unordered-coll {1 {:ret :int}} preserving-reduced {1 {:ret :fn}} qualified-symbol? {1 {:ret :boolean}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.data.transit.json === atom-diff {2 {:ret #{:vector}}} diff-associative-key {3 {:ret :vector}} diff-sequential {2 {:ret :vector}} === resources/clj_kondo/impl/cache/built_in/clj/java.lang.Byte.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.test.tap.transit.json === === resources/clj_kondo/impl/cache/built_in/clj/clojure.java.javadoc.transit.json === javadoc-url {1 {:args (:nilable/string)}} === resources/clj_kondo/impl/cache/built_in/clj/clojure.spec.test.alpha.transit.json === interpret-stack-trace-element {1 {:ret :nilable/map}} spec-checking-fn {3 {:ret :fn}} fn-spec-name? {1 {:ret #{:nil :boolean}}} make-check-result {3 {:ret :nilable/map}} enumerate-namespace {1 {:ret :set}} sym->check-map {1 {:ret {:type :map, :val {:s {:row 348, :col 9, :end-row 348, :end-col 10}, :v {:row 349, :col 9, :end-row 349, :end-col 10, :tag {:call {:filename clojure/spec/test/alpha.clj, :type :call, :lang :clj, :base-lang :clj, :resolved-ns clojure.core, :ns clojure.spec.test.alpha, :name resolve, :arity 1}}}, :spec {:row 350, :col 12, :end-row 350, :end-col 35}}}}}
{ "pile_set_name": "Github" }
{ "objectType": "activity", "verb": "post", "generator": { "displayName": "AndStatus", "objectType": "application", "published": "2018-02-08T15:54:24Z", "updated": "2018-02-08T15:54:24Z", "links": { "self": { "href": "https:\/\/identi.ca\/api\/application?id=urn%3Auuid%3A2598712c-7c2d-54cf-a49a-40129be504f0" } }, "likes": { "url": "https:\/\/identi.ca\/api\/application\/likes?id=urn%3Auuid%3A2598712c-7c2d-54cf-a49a-40129be504f0" }, "replies": { "url": "https:\/\/identi.ca\/api\/application\/replies?id=urn%3Auuid%3A2598712c-7c2d-54cf-a49a-40129be504f0" }, "shares": { "url": "https:\/\/identi.ca\/api\/application\/shares?id=urn%3Auuid%3A2598712c-7c2d-54cf-a49a-40129be504f0" }, "id": "urn:uuid:2598712c-7c2d-54cf-a49a-40129be504f0" }, "to": [ { "objectType": "collection", "updated": "2018-04-11T20:15:18Z", "links": { "self": { "href": "https:\/\/vegas.mobip.nl\/api\/collection?id=http%3A%2F%2Factivityschema.org%2Fcollection%2Fpublic" } }, "likes": { "url": "https:\/\/vegas.mobip.nl\/api\/collection\/likes?id=http%3A%2F%2Factivityschema.org%2Fcollection%2Fpublic" }, "replies": { "url": "https:\/\/vegas.mobip.nl\/api\/collection\/replies?id=http%3A%2F%2Factivityschema.org%2Fcollection%2Fpublic" }, "shares": { "url": "https:\/\/vegas.mobip.nl\/api\/collection\/shares?id=http%3A%2F%2Factivityschema.org%2Fcollection%2Fpublic" }, "liked": false, "pump_io": { "shared": false }, "displayName": "Public", "id": "http:\/\/activityschema.org\/collection\/public" } ], "actor": { "preferredUsername": "andstatus", "url": "https:\/\/identi.ca\/andstatus", "displayName": "AndStatus@Identi.ca", "links": { "self": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/profile" }, "activity-inbox": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/inbox" }, "activity-outbox": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/feed" } }, "objectType": "person", "followers": { "url": "https:\/\/identi.ca\/api\/user\/andstatus\/followers", "displayName": "Followers for AndStatus Project", "objectTypes": [ "person" ], "author": { "id": "acct:andstatus@identi.ca", "objectType": "person" }, "links": { "self": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/followers?offset=0&count=" }, "current": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/followers" }, "prev": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/followers?since=acct%3Aafleck%40microca.st" } }, "totalItems": 105 }, "following": { "url": "https:\/\/identi.ca\/api\/user\/andstatus\/following", "displayName": "Following for AndStatus Project", "objectTypes": [ "person" ], "author": { "id": "acct:andstatus@identi.ca", "objectType": "person" }, "links": { "self": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/following?offset=0&count=20" }, "current": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/following" }, "prev": { "href": "https:\/\/identi.ca\/api\/user\/andstatus\/following?since=acct%3Amacno%40fmrl.me" } }, "totalItems": 6 }, "favorites": { "url": "https:\/\/identi.ca\/api\/user\/andstatus\/favorites", "totalItems": 22 }, "lists": { "url": "https:\/\/identi.ca\/api\/user\/andstatus\/lists\/person", "totalItems": 4 }, "status_net": { "avatarLinks": [ { "url": "http:\/\/avatar3.status.net\/i\/identica\/923870-124-20120728170222.png", "rel": "avatar", "type": "image\/png", "width": 124, "height": 124 }, { "url": "http:\/\/avatar3.status.net\/i\/identica\/923870-96-20120728170222.png", "rel": "avatar", "type": "image\/png", "width": 96, "height": 96 }, { "url": "http:\/\/avatar3.status.net\/i\/identica\/923870-48-20120728170222.png", "rel": "avatar", "type": "image\/png", "width": 48, "height": 48 }, { "url": "http:\/\/avatar3.status.net\/i\/identica\/923870-24-20120728170222.png", "rel": "avatar", "type": "image\/png", "width": 24, "height": 24 } ], "profile_info": { "local_id": "923870" } }, "image": { "url": "https:\/\/identi.ca\/uploads\/andstatus\/2015\/8\/6\/C_k5cQ_thumb.png", "width": 96, "height": 96 }, "location": { "objectType": "place", "position": "-32.94132-60.66616\/", "lat": "-32.94132", "lon": "-60.66616", "displayName": "Moscow, Russia", "url": "http:\/\/www.geonames.org\/3846839" }, "portablecontacts_net": { "preferredUsername": "andstatus", "displayName": "AndStatus Project", "note": "Open Source community based project, creating AndStatus application for Android", "addresses": { "formatted": "Virtual" }, "urls": [ { "type": "homepage", "value": "http:\/\/andstatus.org", "primary": "true" } ] }, "upstreamDuplicates": [ "http:\/\/identi.ca\/user\/923870" ], "summary": "Open Source community based project, creating AndStatus social networking client for Android, which supports Pump.io, GNU Social, Mastodon, Twitter...\n\nHomepage: http:\/\/andstatus.org\nGitHub home: https:\/\/github.com\/andstatus\/andstatus", "updated": "2018-03-04T07:42:42Z", "pump_io": { "followed": false }, "id": "acct:andstatus@identi.ca" }, "object": { "stream": { "url": "https:\/\/identi.ca\/uploads\/andstatus\/2018\/4\/11\/7CmQmw.mp4" }, "objectType": "video", "published": "2018-04-11T20:38:34Z", "updated": "2018-04-11T20:38:34Z", "links": { "self": { "href": "https:\/\/identi.ca\/api\/video\/DVi-fPpFQ_O9BGajwJbUkQ" } }, "likes": { "url": "https:\/\/identi.ca\/api\/video\/DVi-fPpFQ_O9BGajwJbUkQ\/likes", "totalItems": 0 }, "replies": { "url": "https:\/\/identi.ca\/api\/video\/DVi-fPpFQ_O9BGajwJbUkQ\/replies", "totalItems": 0 }, "shares": { "url": "https:\/\/identi.ca\/api\/video\/DVi-fPpFQ_O9BGajwJbUkQ\/shares", "totalItems": 0 }, "url": "https:\/\/identi.ca\/andstatus\/video\/DVi-fPpFQ_O9BGajwJbUkQ", "id": "https:\/\/identi.ca\/api\/video\/DVi-fPpFQ_O9BGajwJbUkQ", "liked": false, "pump_io": { "shared": false } }, "updated": "2018-04-11T20:38:36Z", "id": "https:\/\/identi.ca\/api\/activity\/MpZuXybBSA2COEVTjmC5YA", "links": { "self": { "href": "https:\/\/identi.ca\/api\/activity\/MpZuXybBSA2COEVTjmC5YA" } }, "url": "https:\/\/identi.ca\/undefined\/activity\/MpZuXybBSA2COEVTjmC5YA", "published": "2018-04-11T20:38:36Z", "content": "<a href='https:\/\/identi.ca\/andstatus'>AndStatus@Identi.ca<\/a> posted <a href='https:\/\/identi.ca\/andstatus\/video\/DVi-fPpFQ_O9BGajwJbUkQ'>a video<\/a>" }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2006-2009 Erin Catto http://www.box2d.org * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ #ifndef BODY_TYPES_H #define BODY_TYPES_H class BodyTypes : public Test { public: BodyTypes() { b2Body* ground = NULL; { b2BodyDef bd; ground = m_world->CreateBody(&bd); b2EdgeShape shape; shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f)); b2FixtureDef fd; fd.shape = &shape; ground->CreateFixture(&fd); } // Define attachment { b2BodyDef bd; bd.type = b2_dynamicBody; bd.position.Set(0.0f, 3.0f); m_attachment = m_world->CreateBody(&bd); b2PolygonShape shape; shape.SetAsBox(0.5f, 2.0f); m_attachment->CreateFixture(&shape, 2.0f); } // Define platform { b2BodyDef bd; bd.type = b2_dynamicBody; bd.position.Set(-4.0f, 5.0f); m_platform = m_world->CreateBody(&bd); b2PolygonShape shape; shape.SetAsBox(0.5f, 4.0f, b2Vec2(4.0f, 0.0f), 0.5f * b2_pi); b2FixtureDef fd; fd.shape = &shape; fd.friction = 0.6f; fd.density = 2.0f; m_platform->CreateFixture(&fd); b2RevoluteJointDef rjd; rjd.Initialize(m_attachment, m_platform, b2Vec2(0.0f, 5.0f)); rjd.maxMotorTorque = 50.0f; rjd.enableMotor = true; m_world->CreateJoint(&rjd); b2PrismaticJointDef pjd; pjd.Initialize(ground, m_platform, b2Vec2(0.0f, 5.0f), b2Vec2(1.0f, 0.0f)); pjd.maxMotorForce = 1000.0f; pjd.enableMotor = true; pjd.lowerTranslation = -10.0f; pjd.upperTranslation = 10.0f; pjd.enableLimit = true; m_world->CreateJoint(&pjd); m_speed = 3.0f; } // Create a payload { b2BodyDef bd; bd.type = b2_dynamicBody; bd.position.Set(0.0f, 8.0f); b2Body* body = m_world->CreateBody(&bd); b2PolygonShape shape; shape.SetAsBox(0.75f, 0.75f); b2FixtureDef fd; fd.shape = &shape; fd.friction = 0.6f; fd.density = 2.0f; body->CreateFixture(&fd); } } void Keyboard(int key) { switch (key) { case GLFW_KEY_D: m_platform->SetType(b2_dynamicBody); break; case GLFW_KEY_S: m_platform->SetType(b2_staticBody); break; case GLFW_KEY_K: m_platform->SetType(b2_kinematicBody); m_platform->SetLinearVelocity(b2Vec2(-m_speed, 0.0f)); m_platform->SetAngularVelocity(0.0f); break; } } void Step(Settings* settings) { // Drive the kinematic body. if (m_platform->GetType() == b2_kinematicBody) { b2Vec2 p = m_platform->GetTransform().p; b2Vec2 v = m_platform->GetLinearVelocity(); if ((p.x < -10.0f && v.x < 0.0f) || (p.x > 10.0f && v.x > 0.0f)) { v.x = -v.x; m_platform->SetLinearVelocity(v); } } Test::Step(settings); g_debugDraw.DrawString(5, m_textLine, "Keys: (d) dynamic, (s) static, (k) kinematic"); m_textLine += DRAW_STRING_NEW_LINE; } static Test* Create() { return new BodyTypes; } b2Body* m_attachment; b2Body* m_platform; float32 m_speed; }; #endif
{ "pile_set_name": "Github" }
/* * Copyright (C) 2009 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * This program 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; * version 2.1 of the License (not later!) * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see <http://www.gnu.org/licenses> * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <asm/bug.h> #include "event-parse.h" #include "event-utils.h" /* * The TRACE_SEQ_POISON is to catch the use of using * a trace_seq structure after it was destroyed. */ #define TRACE_SEQ_POISON ((void *)0xdeadbeef) #define TRACE_SEQ_CHECK(s) \ do { \ if (WARN_ONCE((s)->buffer == TRACE_SEQ_POISON, \ "Usage of trace_seq after it was destroyed")) \ (s)->state = TRACE_SEQ__BUFFER_POISONED; \ } while (0) #define TRACE_SEQ_CHECK_RET_N(s, n) \ do { \ TRACE_SEQ_CHECK(s); \ if ((s)->state != TRACE_SEQ__GOOD) \ return n; \ } while (0) #define TRACE_SEQ_CHECK_RET(s) TRACE_SEQ_CHECK_RET_N(s, ) #define TRACE_SEQ_CHECK_RET0(s) TRACE_SEQ_CHECK_RET_N(s, 0) /** * trace_seq_init - initialize the trace_seq structure * @s: a pointer to the trace_seq structure to initialize */ void trace_seq_init(struct trace_seq *s) { s->len = 0; s->readpos = 0; s->buffer_size = TRACE_SEQ_BUF_SIZE; s->buffer = malloc(s->buffer_size); if (s->buffer != NULL) s->state = TRACE_SEQ__GOOD; else s->state = TRACE_SEQ__MEM_ALLOC_FAILED; } /** * trace_seq_reset - re-initialize the trace_seq structure * @s: a pointer to the trace_seq structure to reset */ void trace_seq_reset(struct trace_seq *s) { if (!s) return; TRACE_SEQ_CHECK(s); s->len = 0; s->readpos = 0; } /** * trace_seq_destroy - free up memory of a trace_seq * @s: a pointer to the trace_seq to free the buffer * * Only frees the buffer, not the trace_seq struct itself. */ void trace_seq_destroy(struct trace_seq *s) { if (!s) return; TRACE_SEQ_CHECK_RET(s); free(s->buffer); s->buffer = TRACE_SEQ_POISON; } static void expand_buffer(struct trace_seq *s) { char *buf; buf = realloc(s->buffer, s->buffer_size + TRACE_SEQ_BUF_SIZE); if (WARN_ONCE(!buf, "Can't allocate trace_seq buffer memory")) { s->state = TRACE_SEQ__MEM_ALLOC_FAILED; return; } s->buffer = buf; s->buffer_size += TRACE_SEQ_BUF_SIZE; } /** * trace_seq_printf - sequence printing of trace information * @s: trace sequence descriptor * @fmt: printf format string * * It returns 0 if the trace oversizes the buffer's free * space, 1 otherwise. * * The tracer may use either sequence operations or its own * copy to user routines. To simplify formating of a trace * trace_seq_printf is used to store strings into a special * buffer (@s). Then the output may be either used by * the sequencer or pulled into another buffer. */ int trace_seq_printf(struct trace_seq *s, const char *fmt, ...) { va_list ap; int len; int ret; try_again: TRACE_SEQ_CHECK_RET0(s); len = (s->buffer_size - 1) - s->len; va_start(ap, fmt); ret = vsnprintf(s->buffer + s->len, len, fmt, ap); va_end(ap); if (ret >= len) { expand_buffer(s); goto try_again; } s->len += ret; return 1; } /** * trace_seq_vprintf - sequence printing of trace information * @s: trace sequence descriptor * @fmt: printf format string * * The tracer may use either sequence operations or its own * copy to user routines. To simplify formating of a trace * trace_seq_printf is used to store strings into a special * buffer (@s). Then the output may be either used by * the sequencer or pulled into another buffer. */ int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args) { int len; int ret; try_again: TRACE_SEQ_CHECK_RET0(s); len = (s->buffer_size - 1) - s->len; ret = vsnprintf(s->buffer + s->len, len, fmt, args); if (ret >= len) { expand_buffer(s); goto try_again; } s->len += ret; return len; } /** * trace_seq_puts - trace sequence printing of simple string * @s: trace sequence descriptor * @str: simple string to record * * The tracer may use either the sequence operations or its own * copy to user routines. This function records a simple string * into a special buffer (@s) for later retrieval by a sequencer * or other mechanism. */ int trace_seq_puts(struct trace_seq *s, const char *str) { int len; TRACE_SEQ_CHECK_RET0(s); len = strlen(str); while (len > ((s->buffer_size - 1) - s->len)) expand_buffer(s); TRACE_SEQ_CHECK_RET0(s); memcpy(s->buffer + s->len, str, len); s->len += len; return len; } int trace_seq_putc(struct trace_seq *s, unsigned char c) { TRACE_SEQ_CHECK_RET0(s); while (s->len >= (s->buffer_size - 1)) expand_buffer(s); TRACE_SEQ_CHECK_RET0(s); s->buffer[s->len++] = c; return 1; } void trace_seq_terminate(struct trace_seq *s) { TRACE_SEQ_CHECK_RET(s); /* There's always one character left on the buffer */ s->buffer[s->len] = 0; } int trace_seq_do_fprintf(struct trace_seq *s, FILE *fp) { TRACE_SEQ_CHECK(s); switch (s->state) { case TRACE_SEQ__GOOD: return fprintf(fp, "%.*s", s->len, s->buffer); case TRACE_SEQ__BUFFER_POISONED: fprintf(fp, "%s\n", "Usage of trace_seq after it was destroyed"); break; case TRACE_SEQ__MEM_ALLOC_FAILED: fprintf(fp, "%s\n", "Can't allocate trace_seq buffer memory"); break; } return -1; } int trace_seq_do_printf(struct trace_seq *s) { return trace_seq_do_fprintf(s, stdout); }
{ "pile_set_name": "Github" }
package org.wikidata.query.rdf.updater; import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; import java.time.Instant; import javax.annotation.Nullable; import org.wikidata.query.rdf.tool.change.events.EventsMeta; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.ToString; import lombok.Value; @Value @ToString(callSuper = true) public class DiffEventData extends MutationEventData { @JsonProperty("rdf_added_data") @JsonInclude(NON_NULL) RDFDataChunk rdfAddedData; @JsonProperty("rdf_deleted_data") @JsonInclude(NON_NULL) RDFDataChunk rdfDeletedData; /** * Data that is *perhaps* used by other items and thus already present in the target store. */ @JsonProperty("rdf_linked_shared_data") @JsonInclude(NON_NULL) RDFDataChunk rdfLinkedSharedData; /** * Data that is no longer referenced from this item but *perhaps* still used by other items in the target store. */ @JsonProperty("rdf_unlinked_shared_data") @JsonInclude(NON_NULL) RDFDataChunk rdfUnlinkedSharedData; @JsonCreator public DiffEventData( @JsonProperty("meta") EventsMeta meta, @JsonProperty("entity") String entity, @JsonProperty("revision") long revision, @JsonProperty("event_time") Instant eventTime, @JsonProperty("sequence") int sequence, @JsonProperty("max_sequence") int maxSequence, @JsonProperty("operation") String operation, @JsonProperty("rdf_added_data") @Nullable RDFDataChunk rdfAddedData, @JsonProperty("rdf_deleted_data") @Nullable RDFDataChunk rdfDeletedData, @JsonProperty("rdf_linked_shared_data") @Nullable RDFDataChunk rdfLinkedSharedData, @JsonProperty("rdf_unlinked_shared_data") @Nullable RDFDataChunk rdfUnlinkedSharedData ) { // custom ctor still needed as lombok is unable to construct this parent call super(meta, entity, revision, eventTime, sequence, maxSequence, operation); this.rdfAddedData = rdfAddedData; this.rdfDeletedData = rdfDeletedData; this.rdfLinkedSharedData = rdfLinkedSharedData; this.rdfUnlinkedSharedData = rdfUnlinkedSharedData; } }
{ "pile_set_name": "Github" }
using System; using System.Collections; using System.IO; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities; using Org.BouncyCastle.Utilities.Collections; namespace Org.BouncyCastle.Bcpg.OpenPgp { /// <remarks> /// Class to hold a single master secret key and its subkeys. /// <p> /// Often PGP keyring files consist of multiple master keys, if you are trying to process /// or construct one of these you should use the <c>PgpSecretKeyRingBundle</c> class. /// </p> /// </remarks> public class PgpSecretKeyRing : PgpKeyRing { private readonly IList keys; private readonly IList extraPubKeys; internal PgpSecretKeyRing( IList keys) : this(keys, Platform.CreateArrayList()) { } private PgpSecretKeyRing( IList keys, IList extraPubKeys) { this.keys = keys; this.extraPubKeys = extraPubKeys; } public PgpSecretKeyRing( byte[] encoding) : this(new MemoryStream(encoding)) { } public PgpSecretKeyRing( Stream inputStream) { this.keys = Platform.CreateArrayList(); this.extraPubKeys = Platform.CreateArrayList(); BcpgInputStream bcpgInput = BcpgInputStream.Wrap(inputStream); PacketTag initialTag = bcpgInput.NextPacketTag(); if (initialTag != PacketTag.SecretKey && initialTag != PacketTag.SecretSubkey) { throw new IOException("secret key ring doesn't start with secret key tag: " + "tag 0x" + ((int)initialTag).ToString("X")); } SecretKeyPacket secret = (SecretKeyPacket) bcpgInput.ReadPacket(); // // ignore GPG comment packets if found. // while (bcpgInput.NextPacketTag() == PacketTag.Experimental2) { bcpgInput.ReadPacket(); } TrustPacket trust = ReadOptionalTrustPacket(bcpgInput); // revocation and direct signatures IList keySigs = ReadSignaturesAndTrust(bcpgInput); IList ids, idTrusts, idSigs; ReadUserIDs(bcpgInput, out ids, out idTrusts, out idSigs); keys.Add(new PgpSecretKey(secret, new PgpPublicKey(secret.PublicKeyPacket, trust, keySigs, ids, idTrusts, idSigs))); // Read subkeys while (bcpgInput.NextPacketTag() == PacketTag.SecretSubkey || bcpgInput.NextPacketTag() == PacketTag.PublicSubkey) { if (bcpgInput.NextPacketTag() == PacketTag.SecretSubkey) { SecretSubkeyPacket sub = (SecretSubkeyPacket) bcpgInput.ReadPacket(); // // ignore GPG comment packets if found. // while (bcpgInput.NextPacketTag() == PacketTag.Experimental2) { bcpgInput.ReadPacket(); } TrustPacket subTrust = ReadOptionalTrustPacket(bcpgInput); IList sigList = ReadSignaturesAndTrust(bcpgInput); keys.Add(new PgpSecretKey(sub, new PgpPublicKey(sub.PublicKeyPacket, subTrust, sigList))); } else { PublicSubkeyPacket sub = (PublicSubkeyPacket) bcpgInput.ReadPacket(); TrustPacket subTrust = ReadOptionalTrustPacket(bcpgInput); IList sigList = ReadSignaturesAndTrust(bcpgInput); extraPubKeys.Add(new PgpPublicKey(sub, subTrust, sigList)); } } } /// <summary>Return the public key for the master key.</summary> public PgpPublicKey GetPublicKey() { return ((PgpSecretKey) keys[0]).PublicKey; } /// <summary>Return the master private key.</summary> public PgpSecretKey GetSecretKey() { return (PgpSecretKey) keys[0]; } /// <summary>Allows enumeration of the secret keys.</summary> /// <returns>An <c>IEnumerable</c> of <c>PgpSecretKey</c> objects.</returns> public IEnumerable GetSecretKeys() { return new EnumerableProxy(keys); } public PgpSecretKey GetSecretKey( long keyId) { foreach (PgpSecretKey k in keys) { if (keyId == k.KeyId) { return k; } } return null; } /// <summary> /// Return an iterator of the public keys in the secret key ring that /// have no matching private key. At the moment only personal certificate data /// appears in this fashion. /// </summary> /// <returns>An <c>IEnumerable</c> of unattached, or extra, public keys.</returns> public IEnumerable GetExtraPublicKeys() { return new EnumerableProxy(extraPubKeys); } public byte[] GetEncoded() { MemoryStream bOut = new MemoryStream(); Encode(bOut); return bOut.ToArray(); } public void Encode( Stream outStr) { if (outStr == null) throw new ArgumentNullException("outStr"); foreach (PgpSecretKey key in keys) { key.Encode(outStr); } foreach (PgpPublicKey extraPubKey in extraPubKeys) { extraPubKey.Encode(outStr); } } /// <summary> /// Replace the public key set on the secret ring with the corresponding key off the public ring. /// </summary> /// <param name="secretRing">Secret ring to be changed.</param> /// <param name="publicRing">Public ring containing the new public key set.</param> public static PgpSecretKeyRing ReplacePublicKeys( PgpSecretKeyRing secretRing, PgpPublicKeyRing publicRing) { IList newList = Platform.CreateArrayList(secretRing.keys.Count); foreach (PgpSecretKey sk in secretRing.keys) { PgpPublicKey pk = publicRing.GetPublicKey(sk.KeyId); newList.Add(PgpSecretKey.ReplacePublicKey(sk, pk)); } return new PgpSecretKeyRing(newList); } /// <summary> /// Return a copy of the passed in secret key ring, with the master key and sub keys encrypted /// using a new password and the passed in algorithm. /// </summary> /// <param name="ring">The <c>PgpSecretKeyRing</c> to be copied.</param> /// <param name="oldPassPhrase">The current password for key.</param> /// <param name="newPassPhrase">The new password for the key.</param> /// <param name="newEncAlgorithm">The algorithm to be used for the encryption.</param> /// <param name="rand">Source of randomness.</param> public static PgpSecretKeyRing CopyWithNewPassword( PgpSecretKeyRing ring, char[] oldPassPhrase, char[] newPassPhrase, SymmetricKeyAlgorithmTag newEncAlgorithm, SecureRandom rand) { IList newKeys = Platform.CreateArrayList(ring.keys.Count); foreach (PgpSecretKey secretKey in ring.GetSecretKeys()) { if (secretKey.IsPrivateKeyEmpty) { newKeys.Add(secretKey); } else { newKeys.Add(PgpSecretKey.CopyWithNewPassword(secretKey, oldPassPhrase, newPassPhrase, newEncAlgorithm, rand)); } } return new PgpSecretKeyRing(newKeys, ring.extraPubKeys); } /// <summary> /// Returns a new key ring with the secret key passed in either added or /// replacing an existing one with the same key ID. /// </summary> /// <param name="secRing">The secret key ring to be modified.</param> /// <param name="secKey">The secret key to be inserted.</param> /// <returns>A new <c>PgpSecretKeyRing</c></returns> public static PgpSecretKeyRing InsertSecretKey( PgpSecretKeyRing secRing, PgpSecretKey secKey) { IList keys = Platform.CreateArrayList(secRing.keys); bool found = false; bool masterFound = false; for (int i = 0; i != keys.Count; i++) { PgpSecretKey key = (PgpSecretKey) keys[i]; if (key.KeyId == secKey.KeyId) { found = true; keys[i] = secKey; } if (key.IsMasterKey) { masterFound = true; } } if (!found) { if (secKey.IsMasterKey) { if (masterFound) throw new ArgumentException("cannot add a master key to a ring that already has one"); keys.Insert(0, secKey); } else { keys.Add(secKey); } } return new PgpSecretKeyRing(keys, secRing.extraPubKeys); } /// <summary>Returns a new key ring with the secret key passed in removed from the key ring.</summary> /// <param name="secRing">The secret key ring to be modified.</param> /// <param name="secKey">The secret key to be removed.</param> /// <returns>A new <c>PgpSecretKeyRing</c>, or null if secKey is not found.</returns> public static PgpSecretKeyRing RemoveSecretKey( PgpSecretKeyRing secRing, PgpSecretKey secKey) { IList keys = Platform.CreateArrayList(secRing.keys); bool found = false; for (int i = 0; i < keys.Count; i++) { PgpSecretKey key = (PgpSecretKey)keys[i]; if (key.KeyId == secKey.KeyId) { found = true; keys.RemoveAt(i); } } return found ? new PgpSecretKeyRing(keys, secRing.extraPubKeys) : null; } } }
{ "pile_set_name": "Github" }
/* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have included with MySQL. 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, version 2.0, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #define LOG_COMPONENT_TAG "test_x_sessions_deinit" #include <fcntl.h> #include <mysql/plugin.h> #include <stdlib.h> #include <mysql/components/my_service.h> #include <mysql/components/services/log_builtins.h> #include <mysqld_error.h> #include "my_dbug.h" #include "my_inttypes.h" #include "my_io.h" #include "my_sys.h" // my_write, my_malloc #include "template_utils.h" static const char *log_filename = "test_x_sessions_deinit"; #define MAX_SESSIONS 128 #define STRING_BUFFER_SIZE 512 #define WRITE_STR(format) \ snprintf(buffer, sizeof(buffer), "%s", format); \ my_write(outfile, (uchar *)buffer, strlen(buffer), MYF(0)) #define WRITE_VAL(format, value) \ snprintf(buffer, sizeof(buffer), format, value); \ my_write(outfile, (uchar *)buffer, strlen(buffer), MYF(0)) static const char *sep = "========================================================================" "\n"; #define WRITE_SEP() \ my_write(outfile, pointer_cast<const uchar *>(sep), strlen(sep), MYF(0)) /* SQL (system) variable to control number of sessions */ /* Only effective at start od mysqld by setting it as option --loose-... */ int nb_sessions; static MYSQL_SYSVAR_INT(nb_sessions, nb_sessions, PLUGIN_VAR_RQCMDARG, "number of sessions", nullptr, nullptr, 1, 1, 500, 0); static SYS_VAR *test_services_sysvars[] = {MYSQL_SYSVAR(nb_sessions), nullptr}; static SERVICE_TYPE(registry) *reg_srv = nullptr; SERVICE_TYPE(log_builtins) *log_bi = nullptr; SERVICE_TYPE(log_builtins_string) *log_bs = nullptr; static File outfile; static void test_session_open(void *) { char buffer[STRING_BUFFER_SIZE]; DBUG_TRACE; MYSQL_SESSION sessions[MAX_SESSIONS]; void *plugin_ctx = nullptr; WRITE_VAL("nb_sessions = %d\n", nb_sessions); /* Open sessions: Must pass */ for (int i = 0; i < nb_sessions; i++) { WRITE_VAL("srv_session_open %d - ", i + 1); sessions[i] = srv_session_open(NULL, plugin_ctx); if (!sessions[i]) { WRITE_STR("Failed\n"); } else { WRITE_STR("Success\n"); } } } static void test_session(void *) { char buffer[STRING_BUFFER_SIZE]; DBUG_TRACE; MYSQL_SESSION sessions[MAX_SESSIONS]; void *plugin_ctx = nullptr; bool session_ret = false; WRITE_VAL("nb_sessions = %d\n", nb_sessions); /* Open sessions: Must pass */ for (int i = 0; i < nb_sessions; i++) { WRITE_VAL("srv_session_open %d - ", i + 1); sessions[i] = srv_session_open(NULL, plugin_ctx); if (!sessions[i]) { WRITE_STR("Failed\n"); } else { WRITE_STR("Success\n"); } } /* close sessions: Must pass */ for (int i = 0; i < nb_sessions; i++) { WRITE_VAL("srv_session_close %d - ", nb_sessions - 1 - i + 1); // 1 indexed session_ret = srv_session_close(sessions[nb_sessions - 1 - i]); if (session_ret) { WRITE_STR("Failed\n"); } else { WRITE_STR("Success\n"); } } /* close sessions: Fail as not opened */ for (int i = 0; i < nb_sessions; i++) { WRITE_VAL("srv_session_close %d - ", nb_sessions - 1 - i + 1); // 1 indexed session_ret = srv_session_close(sessions[nb_sessions - 1 - i]); if (session_ret) { WRITE_STR("Failed\n"); } else { WRITE_STR("Success\n"); } } } struct test_thread_context { my_thread_handle thread; void *p; bool thread_finished; void (*test_function)(void *); }; static void *test_sql_threaded_wrapper(void *param) { char buffer[STRING_BUFFER_SIZE]; struct test_thread_context *context = (struct test_thread_context *)param; WRITE_SEP(); WRITE_STR("init thread\n"); if (srv_session_init_thread(context->p)) LogPluginErr(ERROR_LEVEL, ER_LOG_PRINTF_MSG, "srv_session_init_thread failed."); context->test_function(context->p); WRITE_STR("deinit thread\n"); srv_session_deinit_thread(); context->thread_finished = true; return nullptr; } static void create_log_file(const char *log_name) { char filename[FN_REFLEN]; fn_format(filename, log_name, "", ".log", MY_REPLACE_EXT | MY_UNPACK_FILENAME); unlink(filename); outfile = my_open(filename, O_CREAT | O_RDWR, MYF(0)); } static void test_in_spawned_thread(void *p, void (*test_function)(void *)) { my_thread_attr_t attr; /* Thread attributes */ my_thread_attr_init(&attr); (void)my_thread_attr_setdetachstate(&attr, MY_THREAD_CREATE_JOINABLE); struct test_thread_context context; context.p = p; context.thread_finished = false; context.test_function = test_function; /* now create the thread and call test_session within the thread. */ if (my_thread_create(&(context.thread), &attr, test_sql_threaded_wrapper, &context) != 0) LogPluginErr(ERROR_LEVEL, ER_LOG_PRINTF_MSG, "Could not create test session thread"); else my_thread_join(&context.thread, nullptr); } static int test_session_service_plugin_init(void *p MY_ATTRIBUTE((unused))) { DBUG_TRACE; if (init_logging_service_for_plugin(&reg_srv, &log_bi, &log_bs)) return 1; LogPluginErr(INFORMATION_LEVEL, ER_LOG_PRINTF_MSG, "Installation."); return 0; } static int test_session_service_plugin_deinit(void *p) { char buffer[STRING_BUFFER_SIZE]; DBUG_TRACE; LogPluginErr(INFORMATION_LEVEL, ER_LOG_PRINTF_MSG, "Uninstallation."); deinit_logging_service_for_plugin(&reg_srv, &log_bi, &log_bs); create_log_file(log_filename); WRITE_SEP(); WRITE_STR("Test in a server thread\n"); test_session(p); /* Test in a new thread */ WRITE_STR("Follows threaded run\n"); test_in_spawned_thread(p, test_session); WRITE_STR("Follows threaded run and leaves open session (Bug#21966621)\n"); // Bug#21966621 - Leave session open at srv thread exit which is doing the // release in following way: // 1) Lock LOCK_collection while doing release callback for // every session 2) Second attempt of LOCK_collection fails // while removing session by the callback. While exiting both // function LOCK_collection is left in invalid state because it // was released 2 times, lock 1 time 3) at next attempt of // LOCK_collection usage causes deadlock test_in_spawned_thread(p, test_session_open); // step 1, 2 test_in_spawned_thread(p, test_session); // step 3 WRITE_STR("Follows threaded run and leaves open session (Bug#21983102)\n"); // Bug#21983102 - iterates through sessions list in which elements are removed // thus the iterator becomes invalid causing random crashes and // hangings test_in_spawned_thread(p, test_session_open); my_close(outfile, MYF(0)); return 0; } struct st_mysql_daemon test_session_service_plugin = { MYSQL_DAEMON_INTERFACE_VERSION}; /* Plugin library descriptor */ mysql_declare_plugin(test_daemon){ MYSQL_DAEMON_PLUGIN, &test_session_service_plugin, "test_x_sessions_deinit", PLUGIN_AUTHOR_ORACLE, "Test session service in deinit", PLUGIN_LICENSE_GPL, test_session_service_plugin_init, /* Plugin Init */ nullptr, /* Plugin Check uninstall */ test_session_service_plugin_deinit, /* Plugin Deinit */ 0x0100, /* 1.0 */ nullptr, /* status variables */ test_services_sysvars, /* system variables */ nullptr, /* config options */ 0, /* flags */ } mysql_declare_plugin_end;
{ "pile_set_name": "Github" }
/*============================================================================== Copyright (c) 2011 Hartmut Kaiser 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) ==============================================================================*/ #if !defined(BOOST_PHOENIX_PREPROCESSED_EXPRESSION) #define BOOST_PHOENIX_PREPROCESSED_EXPRESSION #if BOOST_PHOENIX_LIMIT <= 10 #include <boost/phoenix/core/preprocessed/expression_10.hpp> #elif BOOST_PHOENIX_LIMIT <= 20 #include <boost/phoenix/core/preprocessed/expression_20.hpp> #elif BOOST_PHOENIX_LIMIT <= 30 #include <boost/phoenix/core/preprocessed/expression_30.hpp> #elif BOOST_PHOENIX_LIMIT <= 40 #include <boost/phoenix/core/preprocessed/expression_40.hpp> #elif BOOST_PHOENIX_LIMIT <= 50 #include <boost/phoenix/core/preprocessed/expression_50.hpp> #else #error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers" #endif #endif
{ "pile_set_name": "Github" }
#include "script_component.hpp" /* * Author: ShackTac, SilentSpike * Converts a damage value into a representative RGBA colour. * Damage colouring follows a "white, cyan, blue" colour scale with 10 steps, Bezier interpolation and Correct lightness gradient. * See: https://gka.github.io/palettes * * Arguments: * 0: The damage value (range [0,1]) <NUMBER> * * Return Value: * Representative RGBA colour <ARRAY> * * Example: * [0.4] call ace_medical_gui_fnc_damageToRGBA * * Public: No */ params ["_damage"]; private _frD = 0 max (_damage / DAMAGE_BLUE_THRESHOLD) min 1; private _colorInt = ceil (_frD * (DAMAGE_TOTAL_COLORS - 1)); [ [1.00, 1.00, 1.00, 1], // #ffffff [0.75, 0.95, 1.00, 1], // #bff2ff [0.63, 0.87, 1.00, 1], // #a0ddff [0.54, 0.77, 1.00, 1], // #8ac4ff [0.48, 0.67, 1.00, 1], // #7aacff [0.42, 0.57, 1.00, 1], // #6c91ff [0.37, 0.47, 1.00, 1], // #5e77ff [0.31, 0.35, 1.00, 1], // #4e5aff [0.22, 0.23, 1.00, 1], // #383bff [0.00, 0.00, 1.00, 1] // #0000ff ] select _colorInt
{ "pile_set_name": "Github" }
using System; using System.Data; using System.Data.SqlClient; using SampleProject.Application; using SampleProject.Application.Configuration.Data; namespace SampleProject.Infrastructure.Database { public class SqlConnectionFactory : ISqlConnectionFactory, IDisposable { private readonly string _connectionString; private IDbConnection _connection; public SqlConnectionFactory(string connectionString) { this._connectionString = connectionString; } public IDbConnection GetOpenConnection() { if (this._connection == null || this._connection.State != ConnectionState.Open) { this._connection = new SqlConnection(_connectionString); this._connection.Open(); } return this._connection; } public void Dispose() { if (this._connection != null && this._connection.State == ConnectionState.Open) { this._connection.Dispose(); } } } }
{ "pile_set_name": "Github" }
D10 18 70 7 0.009800000000000001 0.0259 AT 0.0070 23.0 0.018 25.0 0.027 20.25 0.066 20.25 0.073 18.5 0.094 20.25 0.112 20.75 0.137 19.75 0.163 21.5 0.202 20.75 0.231 20.75 0.254 22.75 0.27 20.75 0.504 20.0 0.536 18.25 0.607 17.0 0.687 14.75 0.751 14.25 0.84 11.25 0.998 8.25 1.024 8.25 1.248 2.5 1.385 0.0
{ "pile_set_name": "Github" }
import React, { useRef } from 'react'; import PropTypes from 'prop-types'; import I18n from 'i18n-js'; import { StyledPagerNavigation, StyledPagerNavInner, StyledPagerNoSelect } from './pager.style'; import NumberInput from '../../../__experimental__/components/number'; import Events from '../../../utils/helpers/events'; import createGuid from '../../../utils/helpers/guid'; import PagerNavigationLink from './pager-navigation-link.component'; import Label from '../../../__experimental__/components/label'; const PagerNavigation = ({ pageSize, currentPage, setCurrentPage, onNext, onPrevious, onFirst, onLast, onPagination, pageCount, ...props }) => { const guid = useRef(createGuid()); const currentPageId = `Pager_${guid.current}`; const handlePageInputChange = (ev) => { if (Number(ev.target.value) <= 0 || Number.isNaN(Number(ev.target.value))) { setCurrentPage(1); onPagination(1, pageSize, 'input'); return '1'; } if (Number(ev.target.value) > pageCount) { setCurrentPage(pageCount); onPagination(pageCount, pageSize, 'input'); return pageCount; } setCurrentPage(Number(ev.target.value)); onPagination(Number(ev.target.value), pageSize, 'input'); return ev.target.value; }; const handleCurrentPageChange = (e) => { setCurrentPage(e.target.value); }; const pagerNavigationLinkProps = { currentPage, pageSize, pageCount, onPagination }; return ( <StyledPagerNavigation { ...props }> <PagerNavigationLink type='first' onClick={ onFirst } { ...pagerNavigationLinkProps } /> <PagerNavigationLink type='previous' onClick={ onPrevious } { ...pagerNavigationLinkProps } /> <StyledPagerNavInner> <StyledPagerNoSelect> { I18n.t('pager.page_x', { defaultValue: 'Page ' }) } </StyledPagerNoSelect> <Label htmlFor={ currentPageId }> <NumberInput value={ currentPage.toString() } data-element='current-page' onChange={ handleCurrentPageChange } onBlur={ handlePageInputChange } id={ currentPageId } onKeyUp={ (ev) => { if (!Events.isEnterKey(ev)) { return false; } return handlePageInputChange(ev); } } /> </Label> <StyledPagerNoSelect> { I18n.t('pager.of_y', { defaultValue: ' of ' }) }{ pageCount } </StyledPagerNoSelect> </StyledPagerNavInner> <PagerNavigationLink type='next' onClick={ onNext } { ...pagerNavigationLinkProps } /> <PagerNavigationLink type='last' onClick={ onLast } { ...pagerNavigationLinkProps } /> </StyledPagerNavigation> ); }; PagerNavigation.propTypes = { /** Current visible page */ currentPage: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, /** Pagination page size */ pageSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /* Count of all of the pages */ pageCount: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** Sets the current page being shown */ setCurrentPage: PropTypes.func, /** onFirst Callback trigered when first link is triggered */ onFirst: PropTypes.func, /** onPrevious Callback trigered when previous link is triggered */ onPrevious: PropTypes.func, /** onNext Callback trigered when next link is triggered */ onNext: PropTypes.func, /** onLast Callback trigered when last link is triggered */ onLast: PropTypes.func, /** onPagination Callback trigered when a change is triggered */ onPagination: PropTypes.func }; export default PagerNavigation;
{ "pile_set_name": "Github" }
project_path: /web/_project.yaml book_path: /web/updates/_book.yaml description: Houdini is a collection of APIs that expose the CSS engine’s internals to developers {# wf_updated_on: 2019-04-17 #} {# wf_published_on: 2016-05-19 #} {# wf_tags: houdini,css #} {# wf_featured_image: /web/updates/images/2016/05/houdini/compworklet_small.png #} # Houdini: Demystifying CSS {: .page-title } {% include "web/_shared/contributors/surma.html" %} 참고: 본 글의 내용들은 연관 표준의 최신 내용으로 업데이트하고 있습니다. CSS가 할 수 있는 일들을 생각해본 적이 있나요? 여러분이 하나의 CSS 속성을 바꾸면 전체 웹 페이지를 완전히 다른 레이아웃으로 변경할 수 있습니다. 그런 점에 있어서 *마법*과도 같죠. (앞으로 제가 무슨 말을 할 지 감이 오시나요?!) 지금까지 우리 웹 개발자들은 이러한 마법을 바라보기만 했었습니다. 만약 여러분만의 마법을 부리고 싶다면요? 만약 우리가 *마법사가 되고 싶다면요*? Houdini를 시작해보세요! Houdini 프로젝트는 Mozilla, Apple, Opera, Microsoft, HP, Intel 그리고 Google의 엔지니어들로 구성되어 (번역자: LG도 있습니다!) CSS 엔진의 일부분에 웹 개발자들이 접근할 수 있도록 협업하고 있습니다. 이 프로젝트는 공식 W3C 표준으로 채택되기 위한 *표준 초안*들을 작성하고 있습니다. 프로젝트의 구성원들은 표준안에 대한 몇 가지 높은 수준의 목표를 세워 표준 초안을 작성하였으며 이를 기반으로 하위 수준 사양의 표준 문서들이 개발되었습니다. 결국, “Houdini”라하면 이 표준 문서들의 내용을 의미합니다. 표준안 개발 작업이 진행되는 동안 [Houdini 표준안 초안][Houdini Drafts]들은 미완성 단계이며 일부 초안은 다소 가안입니다. 이것이 Houdini를 개발하는 초기 단계입니다. <div class="video-wrapper-full-width"> <iframe class="devsite-embedded-youtube-video" data-video-id="EUlIxr8mk7s" data-autohide="1" data-showinfo="0" frameborder="0" allowfullscreen> </iframe> </div> 주의: 저는 Houdini 표준안에 대한 간단한 개요를 통해 Houdini에서 어떠한 문제를 풀고자 하는지 알려드리고 싶었습니다. 현재의 표준안이 지원 가능한 수준에서, 코드 샘플 또한 공유드립니다. 표준안들은 계속 수정되고 있음을 유념하시길 바랍니다. 향후에 본 글에서 설명하고 있는 코드의 결과는 정확하지 않을 수 있고, 일부 표준안의 내용은 공식 표준이 되지 않을 수 있습니다. ## 표준안 ### Worklets ([spec][Worklets spec]) Worklets 자체는 큰 의미가 있지 않습니다. Worklets는 다른 연관 표준안을 가능하게 하기 위해 도입된 개념입니다. “Worklet”을 접했을 때 Web Workers가 생각난다면 틀린 것이 아닙니다. 이 둘은 많은 개념적인 유사성을 가지고 있습니다. 그렇다면 이미 Workers가 있는데 왜 새로운 개념이 생겼을까요? Houdini의 목표는 웹 개발자가 자신의 코드를 CSS 엔진과 주변 시스템에 연결할 수 있도록 새로운 API를 제공하는 것입니다. 아마도 이러한 코드의 일부를 모든 단일 프레임에서 실행한다고 가정해보는 것은 비현실적이지는 않습니다. 어쩌면 그렇게 되는 것이 당연합니다. [Web Worker 표준]에는 다음과 같은 내용이 있습니다.: > Workers [...] 는 상대적으로 무거우며 한 페이지에 많은 수의 Workers 사용은 권장하지 않습니다. 예를 들어 4 mega pixel 이미지의 각 pixel마다 하나의 Worker를 생성하는 것은 적절하지 않습니다. 이는 곧 web workers가 Houdini가 하려고 했던 것을 하기에는 무리라는 의미입니다. 따라서 worklets이 만들어졌습니다. Worklets은 ES2015의 class들을 써서 method 집합들, worklet의 미리 정의된 타입인 signature들을 정의합니다. 그렇기 때문에 Worklet은 보다 경량화가 되었으며 수명 주기가 짧습니다. ### CSS Paint API ([spec][Paint Worklet spec]) **Status update:** Paint API는 Chrome 65의 기본 기능으로 제공됩니다. 자세한 내용은 [여기](/web/updates/2018/01/paintapi)를 참고해주세요. ### Compositor worklet 참고: 이 곳에 서술된 API는 더 이상 사용되지 않습니다. Compositor worklet 는 현재 “Animation Worklet”으로 새로 디자인되었습니다. 해당 API에 대한 더 자세한 사항은 [여기](https://dassur.ma/things/animworklet/)에서 찾아보실 수 있습니다. Compositor Worklet이 WICG로 옮겨졌고 계속 내용이 바뀌고 있지만, 저에게는 가장 흥미로운 표준안입니다. 아시다시피 일부 작업은 CSS 엔진에 의해 그래픽 카드로 아웃소싱되며 일반적으로 그래픽 카드와 장치 모두에 의존합니다. 브라우저는 일반적으로 DOM 트리를 사용하고 특정 기준에 따라 일부 branch 혹은 하위 트리에 자체 [레이어][HTML5Rocks layers]를 공개합니다. 이러한 하위 트리는 스스로 해당 레이어에 그립니다. (향후에는 paint worklet을 사용하여 그릴 수도 있겠죠!) 마지막 단계로, 페인트 과정이 완료된 모든 개별 레이어는 z-index, 3D Transform등을 고려하여 서로 중첩이 되어 화면에 보이는 최종 이미지를 완성합니다. 이 프로세스를 “컴포지팅 (Compositing)”이라고 하며 컴포지터(Compositor)가 실행합니다. 이 프로세스의 장점은 페이지가 조금 스크롤될 때 *모든* 요소를 다시 그릴 필요가 없다는 것입니다. 대신, 이전 프레임에서 레이어를 재사용하고 변경된 스크롤 위치로 컴포지터를 다시 실행할 수 있습니다. 이로 인하여 빠른 처리가 가능합니다. 이는 60fps를 맞출수 있게 해줍니다. 이런 성능 개선은 [Paul Lewis]를 행복하게 해줍니다! <img src="/web/updates/images/2016/05/houdini/compworklet_small.png"> 이름에서 알 수 있듯이 compositor worklet을 사용하면 컴포지션에 연결하여 이미 그린 레이어의 요소 레이어를 다른 레이어 위에 배치하고 레이어에 적용하는 방식에 영향을 줄 수 있습니다. 좀 더 구체적으로 설명하면, 특정 DOM 노드의 컴포지팅 과정에 연결하고 스크롤 위치, `transform` 또는 `opacity`와 같은 특정 속성에 대한 액세스를 요청할 수 있다고 브라우저에 알릴 수 있습니다. 이러한 방법으로 해당 요소는 자체의 레이어에서, 또한 여러분의 코드는 *각 프레임*에서 실행되게 해줍니다. 여러분은 레이어 변환을 조작하여 레이어를 이동시킬 수 있고 레이어의 속성 (`opacity` 같은)을 변경하여 60fps에서 실행되는 무엇인가 매우 멋진 것들을 구현할 수 있습니다. 다음 예제는 compositor worklet을 사용하여 parallax scrolling을 구현한 *전체* 코드입니다. // main.js window.compositorWorklet.import('worklet.js') .then(function() { var animator = new CompositorAnimator('parallax'); animator.postMessage([ new CompositorProxy($('.scroller'), ['scrollTop']), new CompositorProxy($('.parallax'), ['transform']), ]); }); // worklet.js registerCompositorAnimator('parallax', class { tick(timestamp) { var t = self.parallax.transform; t.m42 = -0.1 * self.scroller.scrollTop; self.parallax.transform = t; } onmessage(e) { self.scroller = e.data[0]; self.parallax = e.data[1]; }; }); 저의 동료 Robert Flack이 Compositor Worklet을 위한 [polyfill][CompWorklet polyfill]을 구현했으니 사용해보세요 - 확실히 성능이 향상된 것을 볼 수 있습니다. ### Layout worklet ([spec][Layout Worklet spec]) 참고: 첫 공식 표준안이 제안되었음 표준안의 구현도 상당히 진행되었습니다. 다시 말하지만, 본 표준안의 실질적인 내용은 그리 많지는 않으나, 개념은 흥미롭습니다.: 여러분만의 레이아웃을 작성해보세요! Layout Worklet은 여러분이 `display: layout('myLayout')`와 같은 자바스크립트를 코드를 작성하면 이를 실행하여 구현 내용에 따라 특정 노드의 box안에 해당 노드의 자식 요소들을 배치합니다. 물론, CSS `flex-box` Layout을 모두 자바스크립트로 구현하는 것은 동일한 기능을 native에서 실행하는 것보다 느리겠지만 성능 상의 이득을 얻을 수 있는 지름길을 택하는 시나리오를 생각해볼 수 있습니다. Windows 10 또는 [Masonry] 스타일의 레이아웃으로 구성된 웹 페이지를 상상해보세요. absolute/fixed positioning은 사용되지 않으며, `z-index` 나 요소가 겹치거나 어떤 종류의 border 혹은 overflow도 없습니다. 재 레이아웃 시 이러한 모든 검사를 건너뛸 수 있으면 성능이 향상될 수 있습니다. registerLayout('random-layout', class { static get inputProperties() { return []; } static get childrenInputProperties() { return []; } layout(children, constraintSpace, styleMap) { Const width = constraintSpace.width; Const height =constraintSpace.height; for (let child of children) { const x = Math.random()*width; const y = Math.random()*height; const constraintSubSpace = new ConstraintSpace(); constraintSubSpace.width = width-x; constraintSubSpace.height = height-y; const childFragment = child.doLayout(constraintSubSpace); childFragment.x = x; childFragment.y = y; } return { minContent: 0, maxContent: 0, width: width, height: height, fragments: [], unPositionedChildren: [], breakToken: null }; } }); ### Typed CSSOM ([spec][Typed CSSOM spec]) 참고: Chrome Canary에서 “Experimental Web Platform features” 플래그를 설정하시면 “거의 완성된” 구현을 사용해볼 수 있습니다. Typed CSSOM (CSS 객체 모델 혹은 계층 스타일 시트 객체 모델)은 아마 이제까지 우리들 모두가 마주했으며 참아왔었던 문제들을 다룹니다. 자바스크립트 코드로 설명해보겠습니다: $('#someDiv').style.height = getRandomInt() + 'px'; 위의 코드에서는 덧셈 연산이 이루어지며 숫자를 문자열 형식으로 변환한 뒤 단위에 해당하는 문자열도 더하여 해당 문자열을 브라우저가 파싱하고 그것을 다시 숫자로 변환하여 CSS 엔진이 처리하도록 합니다. 이 과정은 여러분이 [자바스크립트로 변형 속성을 변경하려 할 때][Aerotwist FLIP] 더 복잡해집니다. 더 이상 이런 일은 없습니다! CSS로 타이핑을 할 수 있습니다! 이 표준안은 Houdini 표준안 중에서 완성도가 높은 표준안이며 [polyfill][Typed CSSOM polyfill]은 이미 작업 중입니다. (주의 사항: polyfill을 사용하면 분명히 *더 많은* 계산 오버헤드가 들 것입니다. 요점은 API가 얼마나 편리한지 보여주는 것입니다.) 여러분은 문자열 대신에 요소의 `StylePropertyMap`에서 작업 하게 됩니다. `StylePropertyMap`에서 각 CSS 속성은 자체의 키와 그에 해당하는 값 유형을 가집니다. `width`와 같은 속성의 값 유형으로는 `LengthValue`가 있습니다. `LengthValue`는 `em`, `rem`, `px`, `percent` 등과 같은 모든 CSS 단위를 의미합니다. `height: calc(5px + 5%)`로 명시하는 것은 `LengthValue{px: 5, percent: 5}`와 동일한 의미입니다. `box-sizing`과 같은 일부 속성은 특정 키워드를 값으로 가지므로 `KeywordValue`를 값 유형로 가집니다. 이러한 해당 속성들의 유효성은 런타임에 확인할 수 있습니다. <div style="width: 200px;" id="div1"></div> <div style="width: 300px;" id="div2"></div> <div id="div3"></div> <div style="margin-left: calc(5em + 50%);" id="div4"></div> var w1 = $('#div1').styleMap.get('width'); var w2 = $('#div2').styleMap.get('width'); $('#div3').styleMap.set('background-size', [new SimpleLength(200, 'px'), w1.add(w2)]) $('#div4')).styleMap.get('margin-left') // => {em: 5, percent: 50} ### Properties and values ([spec][Properties and Values spec]) 참고: 표준안은 상당히 완성되었습니다. 하지만 아직 사용 가능한 구현은 없습니다. [CSS Custom Properties] (비공식적으로는 “CSS Variables”로도 불립니다.) 를 아시나요? 이것은 타입이 있는 변수입니다! 지금까지, 변수들은 string 값들 만을 가지거나 간단한 검색 및 교체 방식을 사용했습니다. 이 표준안은 여러분이 변수에 대한 유형을 정의할 수 있게 해줄 뿐만 아니라 기본값을 정의하고 자바스크립트 API를 이용해서 상속 과정에도 영향을 줍니다. 이론적으로, 이를 이용하면 표준 CSS 전환을 사용하여 사용자 정의 속성에 애니메이션을 적용할 수 있고 비슷하게 애니메이션 표준에 응용하는 것도 논의되고 있습니다. ["--scale-x", "--scale-y"].forEach(function(name) { document.registerProperty({ name: name, syntax: "<number>", inherits: false, initialValue: "1" }); }); ### Font metrics Font metrics는 들리는 바로 그대로를 의미합니다. 만일 제가 문자열 X를 Y폰트의 Z크기로 렌더한다면 bounding box(혹은 다수의 bounding box들)은 어떻게 될까요? 만약 제가 [ruby annotations]로 복잡한 unicode를 사용한다면요? 이러한 기능은 예전부터 요청되었는데, 드디어 Houdini에서 현실화되었습니다. ### 잠시만요, 아직 끝이 아닙니다! Houdini의 초안 목록에는 더 많은 사양이 있습니다. 해당 내용들이 앞으로 지원 가능할지는 다소 불확실하지만 아이디어는 무궁무진합니다. 예를 들면, 사용자 정의 overflow 동작, CSS 구문 확장 API, 네이티브 스크롤 동작 확장 그리고 이와 유사하게 이제까지 웹 플랫폼이 하지 못했던 것을 가능하게 하는 야심찬 아이디어들이 있습니다. ## 데모 제가 만든 [데모 코드][Houdini Samples]와 (polyfill을 사용한 [live demo][Houdini Demo]) 비디오를 공개하였으니 실제로 worklet이 어떻게 동작하는지 살펴보세요. 앞으로도 Canary에서 지원 가능한 새로운 API들을 기반으로 새로운 데모들을 업데이트할 것입니다. 함께 참여하고 싶으시다면 언제든지 [Houdini 메일링 리스트]에 문의하세요. [Houdini Drafts]: http://dev.w3.org/houdini/ [Worklets spec]: https://drafts.css-houdini.org/worklets/ [Web Worker spec]: https://www.w3.org/TR/workers/ [Paint Worklet spec]: https://drafts.css-houdini.org/css-paint-api/ [Fragmentation spec]: https://www.w3.org/TR/css3-break/ [HTML5Rocks layers]: http://www.html5rocks.com/en/tutorials/speed/layers/ [Paul Lewis]: https://twitter.com/aerotwist [Layout Worklet spec]: https://drafts.css-houdini.org/css-layout-api/ [Masonry]: http://masonry.desandro.com/ [Typed CSSOM spec]: https://drafts.css-houdini.org/css-typed-om/ [Aerotwist FLIP]: https://aerotwist.com/blog/flip-your-animations/#got-code [Typed CSSOM polyfill]: https://github.com/css-typed-om/typed-om [ruby annotations]: https://en.wikipedia.org/wiki/Ruby_character [Properties and Values spec]: https://drafts.css-houdini.org/css-properties-values-api/ [Houdini Samples]: https://github.com/GoogleChrome/houdini-samples [Houdini 메일링 리스트]: https://lists.w3.org/Archives/Public/public-houdini/ [CompWorklet Polyfill]: https://github.com/googlechrome/houdini-samples [Web Components]: http://webcomponents.org/ [parallax scrolling]: https://en.wikipedia.org/wiki/Parallax_scrolling [CSS Custom Properties]: https://developers.google.com/web/updates/2016/02/css-variables-why-should-you-care [Houdini Demo]: https://googlechrome.github.io/houdini-samples/animation-worklet/twitter-header/ [Paint Worklet demo]: http://googlechrome.github.io/houdini-samples/paint-worklet/ripple/ [Paint Worklet source]: https://github.com/GoogleChrome/houdini-samples/tree/master/paint-worklet/ripple Translated By: {% include "web/_shared/contributors/jihyerish.html" %}
{ "pile_set_name": "Github" }
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2019 Google Inc. All rights reserved. // http://ceres-solver.org/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * 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. // * Neither the name of Google Inc. nor the names of its contributors may be // used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT OWNER 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. // // Author: sameeragarwal@google.com (Sameer Agarwal) // mierle@gmail.com (Keir Mierle) #ifndef CERES_PUBLIC_DYNAMIC_AUTODIFF_COST_FUNCTION_H_ #define CERES_PUBLIC_DYNAMIC_AUTODIFF_COST_FUNCTION_H_ #include <cmath> #include <memory> #include <numeric> #include <vector> #include "ceres/dynamic_cost_function.h" #include "ceres/internal/fixed_array.h" #include "ceres/jet.h" #include "glog/logging.h" namespace ceres { // This autodiff implementation differs from the one found in // autodiff_cost_function.h by supporting autodiff on cost functions // with variable numbers of parameters with variable sizes. With the // other implementation, all the sizes (both the number of parameter // blocks and the size of each block) must be fixed at compile time. // // The functor API differs slightly from the API for fixed size // autodiff; the expected interface for the cost functors is: // // struct MyCostFunctor { // template<typename T> // bool operator()(T const* const* parameters, T* residuals) const { // // Use parameters[i] to access the i'th parameter block. // } // }; // // Since the sizing of the parameters is done at runtime, you must // also specify the sizes after creating the dynamic autodiff cost // function. For example: // // DynamicAutoDiffCostFunction<MyCostFunctor, 3> cost_function( // new MyCostFunctor()); // cost_function.AddParameterBlock(5); // cost_function.AddParameterBlock(10); // cost_function.SetNumResiduals(21); // // Under the hood, the implementation evaluates the cost function // multiple times, computing a small set of the derivatives (four by // default, controlled by the Stride template parameter) with each // pass. There is a tradeoff with the size of the passes; you may want // to experiment with the stride. template <typename CostFunctor, int Stride = 4> class DynamicAutoDiffCostFunction : public DynamicCostFunction { public: explicit DynamicAutoDiffCostFunction(CostFunctor* functor) : functor_(functor) {} virtual ~DynamicAutoDiffCostFunction() {} bool Evaluate(double const* const* parameters, double* residuals, double** jacobians) const override { CHECK_GT(num_residuals(), 0) << "You must call DynamicAutoDiffCostFunction::SetNumResiduals() " << "before DynamicAutoDiffCostFunction::Evaluate()."; if (jacobians == NULL) { return (*functor_)(parameters, residuals); } // The difficulty with Jets, as implemented in Ceres, is that they were // originally designed for strictly compile-sized use. At this point, there // is a large body of code that assumes inside a cost functor it is // acceptable to do e.g. T(1.5) and get an appropriately sized jet back. // // Unfortunately, it is impossible to communicate the expected size of a // dynamically sized jet to the static instantiations that existing code // depends on. // // To work around this issue, the solution here is to evaluate the // jacobians in a series of passes, each one computing Stride * // num_residuals() derivatives. This is done with small, fixed-size jets. const int num_parameter_blocks = static_cast<int>(parameter_block_sizes().size()); const int num_parameters = std::accumulate( parameter_block_sizes().begin(), parameter_block_sizes().end(), 0); // Allocate scratch space for the strided evaluation. using JetT = Jet<double, Stride>; internal::FixedArray<JetT, (256 * 7) / sizeof(JetT)> input_jets( num_parameters); internal::FixedArray<JetT, (256 * 7) / sizeof(JetT)> output_jets( num_residuals()); // Make the parameter pack that is sent to the functor (reused). internal::FixedArray<Jet<double, Stride>*> jet_parameters( num_parameter_blocks, nullptr); int num_active_parameters = 0; // To handle constant parameters between non-constant parameter blocks, the // start position --- a raw parameter index --- of each contiguous block of // non-constant parameters is recorded in start_derivative_section. std::vector<int> start_derivative_section; bool in_derivative_section = false; int parameter_cursor = 0; // Discover the derivative sections and set the parameter values. for (int i = 0; i < num_parameter_blocks; ++i) { jet_parameters[i] = &input_jets[parameter_cursor]; const int parameter_block_size = parameter_block_sizes()[i]; if (jacobians[i] != NULL) { if (!in_derivative_section) { start_derivative_section.push_back(parameter_cursor); in_derivative_section = true; } num_active_parameters += parameter_block_size; } else { in_derivative_section = false; } for (int j = 0; j < parameter_block_size; ++j, parameter_cursor++) { input_jets[parameter_cursor].a = parameters[i][j]; } } // When `num_active_parameters % Stride != 0` then it can be the case // that `active_parameter_count < Stride` while parameter_cursor is less // than the total number of parameters and with no remaining non-constant // parameter blocks. Pushing parameter_cursor (the total number of // parameters) as a final entry to start_derivative_section is required // because if a constant parameter block is encountered after the // last non-constant block then current_derivative_section is incremented // and would otherwise index an invalid position in // start_derivative_section. Setting the final element to the total number // of parameters means that this can only happen at most once in the loop // below. start_derivative_section.push_back(parameter_cursor); // Evaluate all of the strides. Each stride is a chunk of the derivative to // evaluate, typically some size proportional to the size of the SIMD // registers of the CPU. int num_strides = static_cast<int>( ceil(num_active_parameters / static_cast<float>(Stride))); int current_derivative_section = 0; int current_derivative_section_cursor = 0; for (int pass = 0; pass < num_strides; ++pass) { // Set most of the jet components to zero, except for // non-constant #Stride parameters. const int initial_derivative_section = current_derivative_section; const int initial_derivative_section_cursor = current_derivative_section_cursor; int active_parameter_count = 0; parameter_cursor = 0; for (int i = 0; i < num_parameter_blocks; ++i) { for (int j = 0; j < parameter_block_sizes()[i]; ++j, parameter_cursor++) { input_jets[parameter_cursor].v.setZero(); if (active_parameter_count < Stride && parameter_cursor >= (start_derivative_section[current_derivative_section] + current_derivative_section_cursor)) { if (jacobians[i] != NULL) { input_jets[parameter_cursor].v[active_parameter_count] = 1.0; ++active_parameter_count; ++current_derivative_section_cursor; } else { ++current_derivative_section; current_derivative_section_cursor = 0; } } } } if (!(*functor_)(&jet_parameters[0], &output_jets[0])) { return false; } // Copy the pieces of the jacobians into their final place. active_parameter_count = 0; current_derivative_section = initial_derivative_section; current_derivative_section_cursor = initial_derivative_section_cursor; for (int i = 0, parameter_cursor = 0; i < num_parameter_blocks; ++i) { for (int j = 0; j < parameter_block_sizes()[i]; ++j, parameter_cursor++) { if (active_parameter_count < Stride && parameter_cursor >= (start_derivative_section[current_derivative_section] + current_derivative_section_cursor)) { if (jacobians[i] != NULL) { for (int k = 0; k < num_residuals(); ++k) { jacobians[i][k * parameter_block_sizes()[i] + j] = output_jets[k].v[active_parameter_count]; } ++active_parameter_count; ++current_derivative_section_cursor; } else { ++current_derivative_section; current_derivative_section_cursor = 0; } } } } // Only copy the residuals over once (even though we compute them on // every loop). if (pass == num_strides - 1) { for (int k = 0; k < num_residuals(); ++k) { residuals[k] = output_jets[k].a; } } } return true; } private: std::unique_ptr<CostFunctor> functor_; }; } // namespace ceres #endif // CERES_PUBLIC_DYNAMIC_AUTODIFF_COST_FUNCTION_H_
{ "pile_set_name": "Github" }
/************** * List boxes * **************/ .list, .list-row { font-weight: normal; background-color: @base_color; } .list-row.button { padding: 4px; background-color: @base_color; color: @fg_color; font-weight: normal; border: none; border-radius: 0px; } .list-row.button:hover { transition: none; background-color: mix(@base_color,@bg_color, 0.2); color: @fg_color; } .list-row.button:active, .list-row.button:active:hover { background-color: mix(@base_color,@bg_color, 0.4); color: @theme_fg_color; } .list-row.button:selected:hover { background-color: @selected_bg_color; color: @selected_fg_color; } .list-row.button:checked, .list-row.button:selected, .list-row:selected, .list-row.button:selected:active:hover { background-color: shade(@selected_bg_color, 0.9); color: @selected_fg_color; } /*selected-row buttons*/ .list-row.button:selected .button:hover, .list-row.button:selected .button:active { color: @selected_fg_color; }
{ "pile_set_name": "Github" }
/* Copyright 2016 Firewalla LLC * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 'use strict' let chai = require('chai'); let should = chai.should; let expect = chai.expect; let assert = chai.assert; let redis = require('redis'); let rclient = redis.createClient(); let sem = require('../sensor/SensorEventManager.js').getInstance(); let log = require('../net2/logger')(__filename); let sample = require('./sample_data'); let license = require('../util/license.js'); let Promise = require('bluebird'); Promise.promisifyAll(redis.RedisClient.prototype); Promise.promisifyAll(redis.Multi.prototype); let IntelTool = require('../net2/IntelTool'); let intelTool = new IntelTool(); let Bootstrap = require('../net2/Bootstrap'); describe('IntelTool', () => { describe('._parseX509Subject', () => { it('should parse subject correctly', (done) => { let subject = "CN=*.crashlytics.com,OU=COMODO SSL Wildcard,OU=Domain Control Validated"; let result = intelTool._parseX509Subject(subject); expect(result.CN).to.equal('*.crashlytics.com'); expect(result.OU).to.equal('Domain Control Validated'); done(); }); }); describe('.getSSLCertificate', () => { beforeEach((done) => { (async() =>{ await sample.addSampleSSLInfo(); done(); })(); }) afterEach((done) => { (async() =>{ await sample.removeSampleSSLInfo(); done(); })(); }) it('should get ssl certificate correctly', (done) => { (async() =>{ let result = await intelTool.getSSLCertificate(sample.hostIP); expect(result.server_name).to.equal('www.google.com'); expect(result.CN).to.equal('*.google.com'); expect(result.OU).to.equal('ABCDEF'); done(); })(); }) }); describe('.getDNS', () => { beforeEach((done) => { (async() =>{ await sample.addSampleDNSInfo(); done(); })(); }) afterEach((done) => { (async() =>{ await sample.removeSampleDNSInfo(); done(); })(); }) it('should get dns info correctly', (done) => { (async() =>{ let result = await intelTool.getDNS(sample.hostIP); expect(result).to.equal('www.google.com'); done(); })(); }) }); describe('.checkIntelFromCloud', function () { this.timeout(10000); before((done) => { (async() =>{ await license.writeLicenseAsync(sample.sampleLicense); await Bootstrap.bootstrap(); done(); })(); }) beforeEach((done) => { intelTool.debugMode = false; done(); }); it('should be able to load youtube info from Cloud successfully (debug-mode)', (done) => { (async() =>{ intelTool.debugMode = true; let result = await intelTool.checkIntelFromCloud([], ["youtube.com"]); expect(result.length).to.equal(1); let r1 = result[0]; expect(r1.ip).to.equal('LvOZqM9U3cK9V1r05/4lr38ecDvgztKSGdyzL4bvE8c='); expect(r1.c).to.equal('av'); expect(r1.cs).to.equal('["social"]'); // expect(r1.apps).to.not.equal(undefined); // expect(r1.apps.youtube).to.equal('100'); done(); })(); }) it.skip('should be able to load wechat info from Cloud successfully (debug-mode)', (done) => { (async() =>{ intelTool.debugMode = true; let result = await intelTool.checkIntelFromCloud([], ["hkshort.weixin.qq.com"]); expect(result.length).to.equal(2); log.debug(result); let r1 = result[0]; expect(r1.ip).to.equal('hkshort.weixin.qq.com'); expect(r1.apps).to.not.equal(undefined); expect(r1.apps.wechat).to.equal('100'); done(); })(); }) it('should be able to load youtube info from Cloud successfully (non-debug-mode)', (done) => { (async() =>{ let result = await intelTool.checkIntelFromCloud([], ["youtube.com"]); expect(result.length).to.equal(1); log.debug(result); let r1 = result[0] expect(r1.ip).to.equal('LvOZqM9U3cK9V1r05/4lr38ecDvgztKSGdyzL4bvE8c='); expect(r1.c).to.equal('av') expect(JSON.parse(r1.cs)[0]).to.equal('social'); done(); })(); }) it.skip('should be able to load wechat info from Cloud successfully (non-debug-mode)', (done) => { (async() =>{ let result = await intelTool.checkIntelFromCloud([], ["hkshort.weixin.qq.com"]); console.log(result); expect(result.length).to.equal(1); log.debug(result); let r1 = result[0]; expect(r1.ip).to.equal('LvOZqM9U3cK9V1r05/4lr38ecDvgztKSGdyzL4bvE8c='); // expect(r1.c).to.equal('av') // expect(JSON.parse(r1.cs)[0]).to.equal('social'); done(); })(); }) }) describe('.addIntel', () => { it('should add intel to redis correctly', (done) => { let intel = { ip: sample.hostIP, host: 'www.google.com', apps: JSON.stringify({search_engine: '100'}) }; (async() =>{ await intelTool.addIntel(sample.hostIP, intel) let e = await intelTool.intelExists(sample.hostIP); expect(e).to.equal(true); let r = await intelTool.getIntel(sample.hostIP); expect(r.ip).to.equal(sample.hostIP); expect(r.host).to.equal('www.google.com') expect(JSON.parse(r.apps).search_engine).to.equal('100'); intelTool.removeIntel(sample.hostIP) done(); })(); }) }) describe('.appExists', () => { beforeEach((done) => { sample.addSampleIntelInfo() .then(() => done()) }) afterEach((done) => { sample.removeSampleIntelInfo() .then(() => done()) }) it('should be able to check whether this ip is related to any app', (done) => { (async() =>{ let result = await intelTool.appExists(sample.destIP); expect(result).to.equal(true); done(); })(); }) }) });
{ "pile_set_name": "Github" }