text
stringlengths
2
100k
meta
dict
// Vendor Prefixes // // All vendor mixins are deprecated as of v3.2.0 due to the introduction of // Autoprefixer in our Gruntfile. They have been removed in v4. // - Animations // - Backface visibility // - Box shadow // - Box sizing // - Content columns // - Hyphens // - Placeholder text // - Transformations // - Transitions // - User Select // Animations .animation(@animation) { -webkit-animation: @animation; -o-animation: @animation; animation: @animation; } .animation-name(@name) { -webkit-animation-name: @name; animation-name: @name; } .animation-duration(@duration) { -webkit-animation-duration: @duration; animation-duration: @duration; } .animation-timing-function(@timing-function) { -webkit-animation-timing-function: @timing-function; animation-timing-function: @timing-function; } .animation-delay(@delay) { -webkit-animation-delay: @delay; animation-delay: @delay; } .animation-iteration-count(@iteration-count) { -webkit-animation-iteration-count: @iteration-count; animation-iteration-count: @iteration-count; } .animation-direction(@direction) { -webkit-animation-direction: @direction; animation-direction: @direction; } .animation-fill-mode(@fill-mode) { -webkit-animation-fill-mode: @fill-mode; animation-fill-mode: @fill-mode; } // Backface visibility // Prevent browsers from flickering when using CSS 3D transforms. // Default value is `visible`, but can be changed to `hidden` .backface-visibility(@visibility) { -webkit-backface-visibility: @visibility; -moz-backface-visibility: @visibility; backface-visibility: @visibility; } // Drop shadows // // Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's // supported browsers that have box shadow capabilities now support it. .box-shadow(@shadow) { -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1 box-shadow: @shadow; } // Box sizing .box-sizing(@boxmodel) { -webkit-box-sizing: @boxmodel; -moz-box-sizing: @boxmodel; box-sizing: @boxmodel; } // CSS3 Content Columns .content-columns(@column-count; @column-gap: @grid-gutter-width) { -webkit-column-count: @column-count; -moz-column-count: @column-count; column-count: @column-count; -webkit-column-gap: @column-gap; -moz-column-gap: @column-gap; column-gap: @column-gap; } // Optional hyphenation .hyphens(@mode: auto) { word-wrap: break-word; -webkit-hyphens: @mode; -moz-hyphens: @mode; -ms-hyphens: @mode; // IE10+ -o-hyphens: @mode; hyphens: @mode; } // Placeholder text .placeholder(@color: @input-color-placeholder) { // Firefox &::-moz-placeholder { color: @color; opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526 } &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ &::-webkit-input-placeholder { color: @color; } // Safari and Chrome } // Transformations .scale(@ratio) { -webkit-transform: scale(@ratio); -ms-transform: scale(@ratio); // IE9 only -o-transform: scale(@ratio); transform: scale(@ratio); } .scale(@ratioX; @ratioY) { -webkit-transform: scale(@ratioX, @ratioY); -ms-transform: scale(@ratioX, @ratioY); // IE9 only -o-transform: scale(@ratioX, @ratioY); transform: scale(@ratioX, @ratioY); } .scaleX(@ratio) { -webkit-transform: scaleX(@ratio); -ms-transform: scaleX(@ratio); // IE9 only -o-transform: scaleX(@ratio); transform: scaleX(@ratio); } .scaleY(@ratio) { -webkit-transform: scaleY(@ratio); -ms-transform: scaleY(@ratio); // IE9 only -o-transform: scaleY(@ratio); transform: scaleY(@ratio); } .skew(@x; @y) { -webkit-transform: skewX(@x) skewY(@y); -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+ -o-transform: skewX(@x) skewY(@y); transform: skewX(@x) skewY(@y); } .translate(@x; @y) { -webkit-transform: translate(@x, @y); -ms-transform: translate(@x, @y); // IE9 only -o-transform: translate(@x, @y); transform: translate(@x, @y); } .translate3d(@x; @y; @z) { -webkit-transform: translate3d(@x, @y, @z); transform: translate3d(@x, @y, @z); } .rotate(@degrees) { -webkit-transform: rotate(@degrees); -ms-transform: rotate(@degrees); // IE9 only -o-transform: rotate(@degrees); transform: rotate(@degrees); } .rotateX(@degrees) { -webkit-transform: rotateX(@degrees); -ms-transform: rotateX(@degrees); // IE9 only -o-transform: rotateX(@degrees); transform: rotateX(@degrees); } .rotateY(@degrees) { -webkit-transform: rotateY(@degrees); -ms-transform: rotateY(@degrees); // IE9 only -o-transform: rotateY(@degrees); transform: rotateY(@degrees); } .perspective(@perspective) { -webkit-perspective: @perspective; -moz-perspective: @perspective; perspective: @perspective; } .perspective-origin(@perspective) { -webkit-perspective-origin: @perspective; -moz-perspective-origin: @perspective; perspective-origin: @perspective; } .transform-origin(@origin) { -webkit-transform-origin: @origin; -moz-transform-origin: @origin; -ms-transform-origin: @origin; // IE9 only transform-origin: @origin; } // Transitions .transition(@transition) { -webkit-transition: @transition; -o-transition: @transition; transition: @transition; } .transition-property(@transition-property) { -webkit-transition-property: @transition-property; transition-property: @transition-property; } .transition-delay(@transition-delay) { -webkit-transition-delay: @transition-delay; transition-delay: @transition-delay; } .transition-duration(@transition-duration) { -webkit-transition-duration: @transition-duration; transition-duration: @transition-duration; } .transition-timing-function(@timing-function) { -webkit-transition-timing-function: @timing-function; transition-timing-function: @timing-function; } .transition-transform(@transition) { -webkit-transition: -webkit-transform @transition; -moz-transition: -moz-transform @transition; -o-transition: -o-transform @transition; transition: transform @transition; } // User select // For selecting text on the page .user-select(@select) { -webkit-user-select: @select; -moz-user-select: @select; -ms-user-select: @select; // IE10+ user-select: @select; }
{ "pile_set_name": "Github" }
/* jQuery Colorbox language configuration language: Danish (da) translated by: danieljuhl site: danieljuhl.dk */ jQuery.extend(jQuery.colorbox.settings, { current: "Billede {current} af {total}", previous: "Forrige", next: "Næste", close: "Luk", xhrError: "Indholdet fejlede i indlæsningen.", imgError: "Billedet fejlede i indlæsningen.", slideshowStart: "Start slideshow", slideshowStop: "Stop slideshow" });
{ "pile_set_name": "Github" }
# Machine Learning for iOS **Last Update: January 12, 2018.** Curated list of resources for iOS developers in following topics: - [Core ML](#coreml) - [Machine Learning Libraries](#gpmll) - [Deep Learning Libraries](#dll) - [Deep Learning: Model Compression](#dlmc) - [Computer Vision](#cv) - [Natural Language Processing](#nlp) - [Speech Recognition (TTS) and Generation (STT)](#tts) - [Text Recognition (OCR)](#ocr) - [Other AI](#ai) - [Machine Learning Web APIs](#web) - [Opensource ML Applications](#mlapps) - [Game AI](#gameai) - Other related staff - [Linear algebra](#la) - [Statistics, random numbers](#stat) - [Mathematical optimization](#mo) - [Feature extraction](#fe) - [Data Visualization](#dv) - [Bioinformatics (kinda)](#bio) - [Big Data (not really)](#bd) - [iOS ML Blogs](#blogs) - [Mobile ML books](#books) - [GPU Computing Blogs](#gpublogs) - [Learn Machine Learning](#learn) - [Other Lists](#lists) Most of the de-facto standard tools in AI-related domains are written in iOS-unfriendly languages (Python/Java/R/Matlab) so finding something appropriate for your iOS application may be a challenging task. This list consists mainly of libraries written in Objective-C, Swift, C, C++, JavaScript and some other languages that can be easily ported to iOS. Also, I included links to some relevant web APIs, blog posts, videos and learning materials. Resources are sorted alphabetically or randomly. The order doesn't reflect my personal preferences or anything else. Some of the resources are awesome, some are great, some are fun, and some can serve as an inspiration. Have fun! **Pull-requests are welcome [here](https://github.com/alexsosn/iOS_ML)**. # <a name="coreml"/>Core ML * [coremltools](https://pypi.python.org/pypi/coremltools) is a Python package. It contains converters from some popular machine learning libraries to the Apple format. * [Core ML](https://developer.apple.com/documentation/coreml) is an Apple framework to run inference on device. It is highly optimized to Apple hardware. Currently CoreML is compatible (partially) with the following machine learning packages via [coremltools python package](https://apple.github.io/coremltools/): - [Caffe](http://caffe.berkeleyvision.org) - [Keras](https://keras.io/) - [libSVM](https://www.csie.ntu.edu.tw/~cjlin/libsvm/) - [scikit-learn](http://scikit-learn.org/) - [XGBoost](https://xgboost.readthedocs.io/en/latest/) Third-party converters to [CoreML format](https://apple.github.io/coremltools/coremlspecification/) are also available for some models from: - [Turicreate](https://github.com/apple/turicreate) - [TensorFlow](https://github.com/tf-coreml/tf-coreml) - [MXNet](https://github.com/apache/incubator-mxnet/tree/master/tools/coreml) - [Torch7](https://github.com/prisma-ai/torch2coreml) - [CatBoost](https://tech.yandex.com/catboost/doc/dg/features/export-model-to-core-ml-docpage/) There are many curated lists of pre-trained neural networks in Core ML format: [\[1\]](https://github.com/SwiftBrain/awesome-CoreML-models), [\[2\]](https://github.com/cocoa-ai/ModelZoo), [\[3\]](https://github.com/likedan/Awesome-CoreML-Models). Core ML currently doesn't support training models, but still, you can replace model by downloading a new one from a server in runtime. [Here is a demo](https://github.com/zedge/DynamicCoreML) of how to do it. It uses generator part of MNIST GAN as Core ML model. # <a name="gpmll"/>General-Purpose Machine Learning Libraries <p></p> <table rules="groups"> <thead> <tr> <th style="text-align: center">Library</th> <th style="text-align: center">Algorithms</th> <th style="text-align: center">Language</th> <th style="text-align: center">License</th> <th style="text-align: center">Code</th> <th style="text-align: center">Dependency manager</th> </tr> </thead> <tr> <td style="text-align: center"><a href="https://github.com/KevinCoble/AIToolbox">AIToolbox</a></td> <td> <ul> <li>Graphs/Trees</li> <ul> <li>Depth-first search</li> <li>Breadth-first search</li> <li>Hill-climb search</li> <li>Beam Search</li> <li>Optimal Path search</li> </ul> <li>Alpha-Beta (game tree)</li> <li>Genetic Algorithms</li> <li>Constraint Propogation</li> <li>Linear Regression</li> <li>Non-Linear Regression</li> <ul> <li>parameter-delta</li> <li>Gradient-Descent</li> <li>Gauss-Newton</li> </ul> <li>Logistic Regression</li> <li>Neural Networks</li> <ul> <li>multiple layers, several non-linearity models</li> <li>on-line and batch training</li> <li>feed-forward or simple recurrent layers can be mixed in one network</li> <li>LSTM network layer implemented - needs more testing</li> <li>gradient check routines</li> </ul> <li>Support Vector Machine</li> <li>K-Means</li> <li>Principal Component Analysis</li> <li>Markov Decision Process</li> <ul> <li>Monte-Carlo (every-visit, and first-visit)</li> <li>SARSA</li> </ul> <li>Single and Multivariate Gaussians</li> <li>Mixture Of Gaussians</li> <li>Model validation</li> <li>Deep Network</li> <ul> <li>Convolution layers</li> <li>Pooling layers</li> <li>Fully-connected NN layers</li> </ul> </ul> </td> <td>Swift</td> <td>Apache 2.0</td> <td><p><a href="https://github.com/KevinCoble/AIToolbox">GitHub</a></p></td> <td> </td> </tr> <tr> <td style="text-align: center"> <a href="http://dlib.net/"> <img src="http://dlib.net/dlib-logo.png" width="100" > <br>dlib</a> </td> <td> <ul> <li>Deep Learning</li> <li>Support Vector Machines</li> <li>Reduced-rank methods for large-scale classification and regression</li> <li>Relevance vector machines for classification and regression</li> <li>A Multiclass SVM</li> <li>Structural SVM</li> <li>A large-scale SVM-Rank</li> <li>An online kernel RLS regression</li> <li>An online SVM classification algorithm</li> <li>Semidefinite Metric Learning</li> <li>An online kernelized centroid estimator/novelty detector and offline support vector one-class classification</li> <li>Clustering algorithms: linear or kernel k-means, Chinese Whispers, and Newman clustering</li> <li>Radial Basis Function Networks</li> <li>Multi layer perceptrons</li> </ul> </td> <td>C++</td> <td>Boost</td> <td><a href="https://github.com/davisking/dlib">GitHub</a></td> <td></td> </tr> <tr> <td style="text-align: center"><a href="http://leenissen.dk/fann/wp/">FANN</a></td> <td> <ul> <li>Multilayer Artificial Neural Network</li> <li>Backpropagation (RPROP, Quickprop, Batch, Incremental)</li> <li>Evolving topology training</li> </ul> </td> <td>C++</td> <td>GNU LGPL 2.1</td> <td><a href="https://github.com/libfann/fann">GitHub</a></td> <td><a href="https://cocoapods.org/pods/FANN">Cocoa Pods</a></td> </tr> <tr> <td style="text-align: center"><a href="https://github.com/lemire/lbimproved">lbimproved</a></td> <td>k-nearest neighbors and Dynamic Time Warping</td> <td>C++</td> <td>Apache 2.0</td> <td><a href="https://github.com/lemire/lbimproved">GitHub</a> </td> <td> </td> </tr> <tr> <td style="text-align: center"><a href="https://github.com/gianlucabertani/MAChineLearning">MAChineLearning</a></td> <td> <ul> <li>Neural Networks</li> <ul> <li>Activation functions: Linear, ReLU, Step, sigmoid, TanH</li> <li>Cost functions: Squared error, Cross entropy</li> <li>Backpropagation: Standard, Resilient (a.k.a. RPROP).</li> <li>Training by sample or by batch.</li> </ul> <li>Bag of Words</li> <li>Word Vectors</li> </ul> </td> <td>Objective-C</td> <td>BSD 3-clause</td> <td><a href="https://github.com/gianlucabertani/MAChineLearning">GitHub</a> </td> <td> </td> </tr> <tr> <td style="text-align: center"><a href="https://github.com/Somnibyte/MLKit"><img width="100" src="https://github.com/Somnibyte/MLKit/raw/master/MLKitSmallerLogo.png"><br>MLKit</a></td> <td> <ul> <li>Linear Regression: simple, ridge, polynomial</li> <li>Multi-Layer Perceptron, & Adaline ANN Architectures</li> <li>K-Means Clustering</li> <li>Genetic Algorithms</li> </ul> </td> <td>Swift</td> <td>MIT</td> <td><a href="https://github.com/Somnibyte/MLKit">GitHub</a></td> <td><a href="https://cocoapods.org/pods/MachineLearningKit">Cocoa Pods</a></td> </tr> <tr> <td style="text-align: center"><a href="https://github.com/saniul/Mendel"><img width="100" src="https://github.com/saniul/Mendel/raw/master/[email protected]"><br>Mendel</a></td> <td>Evolutionary/genetic algorithms</td> <td>Swift</td> <td>?</td> <td><a href="https://github.com/saniul/Mendel">GitHub</a></td> <td></td> </tr> <tr> <td style="text-align: center"><a href="https://github.com/vincentherrmann/multilinear-math">multilinear-math</a></td> <td> <ul> <li>Linear algebra and tensors</li> <li>Principal component analysis</li> <li>Multilinear subspace learning algorithms for dimensionality reduction</li> <li>Linear and logistic regression</li> <li>Stochastic gradient descent</li> <li>Feedforward neural networks</li> <ul> <li>Sigmoid</li> <li>ReLU</li> <li>Softplus activation functions</li> </ul> </ul> </td> <td>Swift</td> <td>Apache 2.0</td> <td><a href="https://github.com/vincentherrmann/multilinear-math">GitHub</a> </td> <td>Swift Package Manager</td> </tr> <tr> <td style="text-align: center"><a href="http://opencv.org/"><img width="100" src="http://opencv.org/assets/theme/logo.png">OpenCV</a></td> <td> <ul> <li>Multi-Layer Perceptrons</li> <li>Boosted tree classifier</li> <li>decision tree</li> <li>Expectation Maximization</li> <li>K-Nearest Neighbors</li> <li>Logistic Regression</li> <li>Bayes classifier</li> <li>Random forest</li> <li>Support Vector Machines</li> <li>Stochastic Gradient Descent SVM classifier</li> <li>Grid search</li> <li>Hierarchical k-means</li> <li>Deep neural networks</li> </ul> </td> <td>C++</td> <td>3-clause BSD</td> <td><a href="https://github.com/opencv">GitHub</a> </td> <td> <a href="https://cocoapods.org/pods/OpenCV">Cocoa Pods</a></td> </tr> <tr> <td style="text-align: center"><a href="http://image.diku.dk/shark/sphinx_pages/build/html/index.html"><img width="100" src="http://image.diku.dk/shark/sphinx_pages/build/html/_static/SharkLogo.png"><br>Shark</a></td> <td> <ul> <li><b>Supervised:</b> </li> <ul> <li>Linear discriminant analysis (LDA)</li> <li>Fisher–LDA</li> <li>Linear regression</li> <li>SVMs</li> <li>FF NN</li> <li>RNN</li> <li>Radial basis function networks</li> <li>Regularization networks</li> <li>Gaussian processes for regression</li> <li>Iterative nearest neighbor classification and regression</li> <li>Decision trees</li> <li>Random forest</li> </ul> <li><b>Unsupervised:</b> </li> <ul> <li>PCA</li> <li>Restricted Boltzmann machines</li> <li>Hierarchical clustering</li> <li>Data structures for efficient distance-based clustering</li> </ul> <li><b>Optimization:</b> </li> <ul> <li>Evolutionary algorithms</li> <li>Single-objective optimization (e.g., CMA–ES)</li> <li>Multi-objective optimization</li> <li>Basic linear algebra and optimization algorithms</li> </ul> </ul> </td> <td>C++</td> <td>GNU LGPL</td> <td><a href="https://github.com/lemire/lbimproved">GitHub</a> </td> <td><a href="https://cocoapods.org/pods/Shark-SDK">Cocoa Pods</a></td> </tr> <tr> <td style="text-align: center"><a href="https://github.com/yconst/YCML"><img width="100" src="https://raw.githubusercontent.com/yconst/YCML/master/Logo.png"><br>YCML</a></td> <td> <ul> <li>Gradient Descent Backpropagation</li> <li>Resilient Backpropagation (RProp)</li> <li>Extreme Learning Machines (ELM)</li> <li>Forward Selection using Orthogonal Least Squares (for RBF Net), also with the PRESS statistic</li> <li>Binary Restricted Boltzmann Machines (CD & PCD)</li> <li><b>Optimization algorithms</b>: </li> <ul> <li>Gradient Descent (Single-Objective, Unconstrained)</li> <li>RProp Gradient Descent (Single-Objective, Unconstrained)</li> <li>NSGA-II (Multi-Objective, Constrained)</li> </ul> </ul> </td> <td>Objective-C</td> <td>GNU GPL 3.0</td> <td><a href="https://github.com/yconst/ycml/">GitHub</a> </td> <td> </td> </tr> <tr> <td style="text-align: center"><a href="https://github.com/Kalvar"><img width="100" src="https://avatars2.githubusercontent.com/u/1835631?v=4&s=460"><br>Kalvar Lin's libraries</a></td> <td> <ul> <li><a href="https://github.com/Kalvar/ios-KRHebbian-Algorithm">ios-KRHebbian-Algorithm</a> - <a href="https://en.wikipedia.org/wiki/Hebbian_theory">Hebbian Theory</a></li> <li><a href="https://github.com/Kalvar/ios-KRKmeans-Algorithm">ios-KRKmeans-Algorithm</a> - <a href="https://en.wikipedia.org/wiki/K-means_clustering">K-Means</a> clustering method.</li> <li><a href="https://github.com/Kalvar/ios-KRFuzzyCMeans-Algorithm">ios-KRFuzzyCMeans-Algorithm</a> - <a href="https://en.wikipedia.org/wiki/Fuzzy_clustering">Fuzzy C-Means</a>, the fuzzy clustering algorithm.</li> <li><a href="https://github.com/Kalvar/ios-KRGreyTheory">ios-KRGreyTheory</a> - <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.678.3477&amp;rep=rep1&amp;type=pdf">Grey Theory</a> / <a href="http://www.mecha.ee.boun.edu.tr/Prof.%20Dr.%20Okyay%20Kaynak%20Publications/c%20Journal%20Papers(appearing%20in%20SCI%20or%20SCIE%20or%20CompuMath)/62.pdf">Grey system theory-based models in time series prediction</a></li> <li><a href="https://github.com/Kalvar/ios-KRSVM">ios-KRSVM</a> - Support Vector Machine and SMO.</li> <li><a href="https://github.com/Kalvar/ios-KRKNN">ios-KRKNN</a> - kNN implementation.</li> <li><a href="https://github.com/Kalvar/ios-KRRBFNN">ios-KRRBFNN</a> - Radial basis function neural network and OLS.</li> </ul> </td> <td>Objective-C</td> <td>MIT</td> <td><a href="https://github.com/Kalvar">GitHub</a></td> <td></td> </tr> </table> **Multilayer perceptron implementations:** - [Brain.js](https://github.com/harthur/brain) - JS - [SNNeuralNet](https://github.com/devongovett/SNNeuralNet) - Objective-C port of brain.js - [MLPNeuralNet](https://github.com/nikolaypavlov/MLPNeuralNet) - Objective-C, Accelerate - [Swift-AI](https://github.com/Swift-AI/Swift-AI) - Swift - [SwiftSimpleNeuralNetwork](https://github.com/davecom/SwiftSimpleNeuralNetwork) - Swift - <a href="https://github.com/Kalvar/ios-BPN-NeuralNetwork">ios-BPN-NeuralNetwork</a> - Objective-C - <a href="https://github.com/Kalvar/ios-Multi-Perceptron-NeuralNetwork">ios-Multi-Perceptron-NeuralNetwork</a>- Objective-C - <a href="https://github.com/Kalvar/ios-KRDelta">ios-KRDelta</a> - Objective-C - [ios-KRPerceptron](https://github.com/Kalvar/ios-KRPerceptron) - Objective-C # <a name="dll"/>Deep Learning Libraries: ### On-Device training and inference * [Birdbrain](https://github.com/jordenhill/Birdbrain) - RNNs and FF NNs on top of Metal and Accelerate. Not ready for production. * [BrainCore](https://github.com/aleph7/BrainCore) - simple but fast neural network framework written in Swift. It uses Metal framework to be as fast as possible. ReLU, LSTM, L2 ... * [Caffe](http://caffe.berkeleyvision.org) - A deep learning framework developed with cleanliness, readability, and speed in mind. [GitHub](https://github.com/BVLC/caffe). [BSD] * [iOS port](https://github.com/aleph7/caffe) * [caffe-mobile](https://github.com/solrex/caffe-mobile) - another iOS port. * C++ examples: [Classifying ImageNet](http://caffe.berkeleyvision.org/gathered/examples/cpp_classification.html), [Extracting Features](http://caffe.berkeleyvision.org/gathered/examples/feature_extraction.html) * [Caffe iOS sample](https://github.com/noradaiko/caffe-ios-sample) * [Caffe2](https://caffe2.ai/) - a cross-platform framework made with expression, speed, and modularity in mind. * [Cocoa Pod](https://github.com/RobertBiehl/caffe2-ios) * [iOS demo app](https://github.com/KleinYuan/Caffe2-iOS) * [Convnet.js](http://cs.stanford.edu/people/karpathy/convnetjs/) - ConvNetJS is a Javascript library for training Deep Learning models by [Andrej Karpathy](https://twitter.com/karpathy). [GitHub](https://github.com/karpathy/convnetjs) * [ConvNetSwift](https://github.com/alexsosn/ConvNetSwift) - Swift port [work in progress]. * [Deep Belief SDK](https://github.com/jetpacapp/DeepBeliefSDK) - The SDK for Jetpac's iOS Deep Belief image recognition framework * [TensorFlow](http://www.tensorflow.org/) - an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API. * [iOS examples](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/ios_examples) * [another example](https://github.com/hollance/TensorFlow-iOS-Example) * [Perfect-TensorFlow](https://github.com/PerfectlySoft/Perfect-TensorFlow) - TensorFlow binding for [Perfect](http://perfect.org/) (server-side Swift framework). Includes only C TF API. * [tiny-dnn](https://github.com/tiny-dnn/tiny-dnn) - header only, dependency-free deep learning framework in C++11. * [iOS example](https://github.com/tiny-dnn/tiny-dnn/tree/d4fff53fa0d01f59eb162de2ec32c652a1f6f467/examples/ios) * [Torch](http://torch.ch/) is a scientific computing framework with wide support for machine learning algorithms. * [Torch4iOS](https://github.com/jhondge/torch4ios) * [Torch-iOS](https://github.com/clementfarabet/torch-ios) ### Deep Learning: Running pre-trained models on device These libraries doesn't support training, so you need to pre-train models in some ML framework. * [Bender](https://github.com/xmartlabs/Bender) - Framework for building fast NNs. Supports TensorFlow models. It uses Metal under the hood. * [Core ML](#coreml) * [DeepLearningKit](http://deeplearningkit.org/) - Open Source Deep Learning Framework from Memkite for Apple's tvOS, iOS and OS X. * [Espresso](https://github.com/codinfox/espresso) - A minimal high performance parallel neural network framework running on iOS. * [Forge](https://github.com/hollance/Forge) - A neural network toolkit for Metal. * [Keras.js](https://transcranial.github.io/keras-js/#/) - run [Keras](https://keras.io/) models in a web view. * [KSJNeuralNetwork](https://github.com/woffle/KSJNeuralNetwork) - A Neural Network Inference Library Built atop BNNS and MPS * [Converter for Torch models](https://github.com/woffle/torch2ios) * [MXNet](https://mxnet.incubator.apache.org/) - MXNet is a deep learning framework designed for both efficiency and flexibility. * [Deploying pre-trained mxnet model to a smartphone](https://mxnet.incubator.apache.org/how_to/smart_device.html) * [Quantized-CNN](https://github.com/jiaxiang-wu/quantized-cnn) - compressed convolutional neural networks for Mobile Devices * [WebDNN](https://mil-tokyo.github.io/webdnn/) - You can run deep learning model in a web view if you want. Three modes: WebGPU acceleration, WebAssembly acceleration and pure JS (on CPU). No training, inference only. ### Deep Learning: Low-level routines libraries * [BNNS](https://developer.apple.com/reference/accelerate/1912851-bnns) - Apple Basic neural network subroutines (BNNS) is a collection of functions that you use to implement and run neural networks, using previously obtained training data. * [BNNS usage examples](https://github.com/shu223/iOS-10-Sampler) in iOS 10 sampler. * [An example](https://github.com/bignerdranch/bnns-cocoa-example) of a neural network trained by tensorflow and executed using BNNS * [MetalPerformanceShaders](https://developer.apple.com/reference/metalperformanceshaders) - CNNs on GPU from Apple. * [MetalCNNWeights](https://github.com/kakugawa/MetalCNNWeights) - a Python script to convert Inception v3 for MPS. * [MPSCNNfeeder](https://github.com/kazoo-kmt/MPSCNNfeeder) - Keras to MPS models conversion. * [NNPACK](https://github.com/Maratyszcza/NNPACK) - Acceleration package for neural networks on multi-core CPUs. Prisma [uses](http://prisma-ai.com/libraries.html) this library in the mobile app. * [STEM](https://github.com/abeschneider/stem) - Swift Tensor Engine for Machine-learning * [Documentation](http://stem.readthedocs.io/en/latest/) ### <a name="dlmc"/>Deep Learning: Model Compression * TensorFlow implementation of [knowledge distilling](https://github.com/chengshengchan/model_compression) method * [MobileNet-Caffe](https://github.com/shicai/MobileNet-Caffe) - Caffe Implementation of Google's MobileNets * [keras-surgeon](https://github.com/BenWhetton/keras-surgeon) - Pruning for trained Keras models. # <a name="cv"/>Computer Vision * [ccv](http://libccv.org) - C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library * [iOS demo app](https://github.com/liuliu/klaus) * [OpenCV](http://opencv.org) – Open Source Computer Vision Library. [BSD] * [OpenCV crash course](http://www.pyimagesearch.com/free-opencv-crash-course/) * [OpenCVSwiftStitch](https://github.com/foundry/OpenCVSwiftStitch) * [Tutorial: using and building openCV on iOS devices](http://maniacdev.com/2011/07/tutorial-using-and-building-opencv-open-computer-vision-on-ios-devices) * [A Collection of OpenCV Samples For iOS](https://github.com/woffle/OpenCV-iOS-Demos) * [OpenFace](https://github.com/TadasBaltrusaitis/OpenFace) – a state-of-the art open source tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation. * [iOS port](https://github.com/FaceAR/OpenFaceIOS) * [iOS demo](https://github.com/FaceAR/OpenFaceIOS) * [trackingjs](http://trackingjs.com/) – Object tracking in JS * [Vision](https://developer.apple.com/documentation/vision) is an Apple framework for computer vision. # <a name="nlp"/>Natural Language Processing * [CoreLinguistics](https://github.com/rxwei/CoreLinguistics) - POS tagging (HMM), ngrams, Naive Bayes, IBM alignment models. * [GloVe](https://github.com/rxwei/GloVe-swift) Swift package. Vector words representations. * [NSLinguisticTagger](http://nshipster.com/nslinguistictagger/) * [Parsimmon](https://github.com/ayanonagon/Parsimmon) * [Twitter text](https://github.com/twitter/twitter-text-objc) - An Objective-C implementation of Twitter's text processing library. The library includes methods for extracting user names, mentions headers, hashtags, and more – all the tweet specific language syntax you could ever want. * [Verbal expressions for Swift](https://github.com/VerbalExpressions/SwiftVerbalExpressions), like regexps for humans. * [Word2Vec](https://code.google.com/p/word2vec/) - Original C implementation of Word2Vec Deep Learning algorithm. Works on iPhone like a charm. # <a name="tts"/>Speech Recognition (TTS) and Generation (STT) * [Kaldi-iOS framework](http://keenresearch.com/) - on-device speech recognition using deep learning. * [Proof of concept app](https://github.com/keenresearch/kaldi-ios-poc) * [MVSpeechSynthesizer](https://github.com/vimalmurugan89/MVSpeechSynthesizer) * [OpenEars™: free speech recognition and speech synthesis for the iPhone](http://www.politepix.com/openears/) - OpenEars™ makes it simple for you to add offline speech recognition and synthesized speech/TTS to your iPhone app quickly and easily. It lets everyone get the great results of using advanced speech UI concepts like statistical language models and finite state grammars in their app, but with no more effort than creating an NSArray or NSDictionary. * [Tutorial (Russian)](http://habrahabr.ru/post/237589/) * [TLSphinx](https://github.com/tryolabs/TLSphinx), [Tutorial](http://blog.tryolabs.com/2015/06/15/tlsphinx-automatic-speech-recognition-asr-in-swift/) # <a name="ocr"/>Text Recognition (OCR) * [ocrad.js](https://github.com/antimatter15/ocrad.js) - JS OCR * **Tesseract** * [Install and Use Tesseract on iOS](http://lois.di-qual.net/blog/install-and-use-tesseract-on-ios-with-tesseract-ios/) * [tesseract-ios-lib](https://github.com/ldiqual/tesseract-ios-lib) * [tesseract-ios](https://github.com/ldiqual/tesseract-ios) * [Tesseract-OCR-iOS](https://github.com/gali8/Tesseract-OCR-iOS) * [OCR-iOS-Example](https://github.com/robmathews/OCR-iOS-Example) # <a name="ai"/>Other AI * [Axiomatic](https://github.com/JadenGeller/Axiomatic) - Swift unification framework for logic programming. * [Build Your Own Lisp In Swift](https://github.com/hollance/BuildYourOwnLispInSwift) * [Logician](https://github.com/mdiep/Logician) - Logic programming in Swift * [Swiftlog](https://github.com/JadenGeller/Swiftlog) - A simple Prolog-like language implemented entirely in Swift. # <a name="web"/>Machine Learning Web APIs * [**IBM** Watson](http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/) - Enable Cognitive Computing Features In Your App Using IBM Watson's Language, Vision, Speech and Data APIs. * [Introducing the (beta) IBM Watson iOS SDK](https://developer.ibm.com/swift/2015/12/18/introducing-the-new-watson-sdk-for-ios-beta/) * [AlchemyAPI](http://www.alchemyapi.com/) - Semantic Text Analysis APIs Using Natural Language Processing. Now part of IBM Watson. * [**Microsoft** Project Oxford](https://www.projectoxford.ai/) * [**Google** Prediction engine](https://cloud.google.com/prediction/docs) * [Objective-C API](https://code.google.com/p/google-api-objectivec-client/wiki/Introduction) * [Google Translate API](https://cloud.google.com/translate/docs) * [Google Cloud Vision API](https://cloud.google.com/vision/) * [**Amazon** Machine Learning](http://aws.amazon.com/documentation/machine-learning/) - Amazon ML is a cloud-based service for developers. It provides visualization tools to create machine learning models. Obtain predictions for application using APIs. * [iOS developer guide](https://docs.aws.amazon.com/mobile/sdkforios/developerguide/getting-started-machine-learning.html). * [iOS SDK](https://github.com/aws/aws-sdk-ios) * [**PredictionIO**](https://prediction.io/) - opensource machine learning server for developers and ML engineers. Built on Apache Spark, HBase and Spray. * [Swift SDK](https://github.com/minhtule/PredictionIO-Swift-SDK) * [Tapster iOS Demo](https://github.com/minhtule/Tapster-iOS-Demo) - This demo demonstrates how to use the PredictionIO Swift SDK to integrate an iOS app with a PredictionIO engine to make your mobile app more interesting. * [Tutorial](https://github.com/minhtule/Tapster-iOS-Demo/blob/master/TUTORIAL.md) on using Swift with PredictionIO. * [**Wit.AI**](https://wit.ai/) - NLP API * [**Yandex** SpeechKit](https://tech.yandex.com/speechkit/mobilesdk/) Text-to-speech and speech-to-text for Russian language. iOS SDK available. * [**Abbyy** OCR SDK](http://www.abbyy.com/mobile-ocr/iphone-ocr/) * [**Clarifai**](http://www.clarifai.com/#) - deep learning web api for image captioning. [iOS starter project](https://github.com/Clarifai/clarifai-ios-starter) * [**MetaMind**](https://www.metamind.io/) - deep learning web api for image captioning. * [Api.AI](https://api.ai/) - Build intelligent speech interfaces for apps, devices, and web * [**CloudSight.ai**](https://cloudsight.ai/) - deep learning web API for fine grained object detection or whole screen description, including natural language object captions. [Objective-C](https://github.com/cloudsight/cloudsight-objc) API client is available. # <a name="mlapps"/>Opensource ML Applications ### Deep Learning * [DeepDreamer](https://github.com/johndpope/deepdreamer) - Deep Dream application * [DeepDreamApp](https://github.com/johndpope/DeepDreamApp) - Deep Dream Cordova app. * [Texture Networks](https://github.com/DmitryUlyanov/texture_nets), Lua implementation * [Feedforward style transfer](https://github.com/jcjohnson/fast-neural-style), Lua implementation * [TensorFlow implementation of Neural Style](https://github.com/cysmith/neural-style-tf) * [Corrosion detection app](https://github.com/jmolayem/corrosionapp) * [ios_camera_object_detection](https://github.com/yjmade/ios_camera_object_detection) - Realtime mobile visualize based Object Detection based on TensorFlow and YOLO model * [TensorFlow MNIST iOS demo](https://github.com/mattrajca/MNIST) - Getting Started with Deep MNIST and TensorFlow on iOS * [Drummer App](https://github.com/hollance/RNN-Drummer-Swift) with RNN and Swift * [What'sThis](https://github.com/pppoe/WhatsThis-iOS) * [enVision](https://github.com/IDLabs-Gate/enVision) - Deep Learning Models for Vision Tasks on iOS\ * [GoogLeNet on iOS demo](https://github.com/krasin/MetalDetector) * [Neural style in Android](https://github.com/naman14/Arcade) * [mnist-bnns](https://github.com/paiv/mnist-bnns) - TensorFlow MNIST demo port to BNNS * [Benchmark of BNNS vs. MPS](https://github.com/hollance/BNNS-vs-MPSCNN) * [VGGNet on Metal](https://github.com/hollance/VGGNet-Metal) * A [Sudoku Solver](https://github.com/waitingcheung/deep-sudoku-solver) that leverages TensorFlow and iOS BNNS for deep learning. * [HED CoreML Implementation](https://github.com/s1ddok/HED-CoreML) is a demo with tutorial on how to use Holistically-Nested Edge Detection on iOS with CoreML and Swift ### Traditional Computer Vision * [SwiftOCR](https://github.com/garnele007/SwiftOCR) * [GrabCutIOS](https://github.com/naver/grabcutios) - Image segmentation using GrabCut algorithm for iOS ### NLP * [Classical ELIZA chatbot in Swift](https://gist.github.com/hollance/be70d0d7952066cb3160d36f33e5636f) * [InfiniteMonkeys](https://github.com/craigomac/InfiniteMonkeys) - A Keras-trained RNN to emulate the works of a famous poet, powered by BrainCore ### Other * [Swift implementation of Joel Grus's "Data Science from Scratch"](https://github.com/graceavery/LearningMachineLearning) * [Neural Network built in Apple Playground using Swift](https://github.com/Luubra/EmojiIntelligence) # <a name="gameai"/>Game AI * [Introduction to AI Programming for Games](http://www.raywenderlich.com/24824/introduction-to-ai-programming-for-games) * [dlib](http://dlib.net/) is a library which has many useful tools including machine learning. * [MicroPather](http://www.grinninglizard.com/MicroPather/) is a path finder and A* solver (astar or a-star) written in platform independent C++ that can be easily integrated into existing code. * Here is a [list](http://www.ogre3d.org/tikiwiki/List+Of+Libraries#Artificial_intelligence) of some AI libraries suggested on OGRE3D website. Seems they are mostly written in C++. * [GameplayKit Programming Guide](https://developer.apple.com/library/content/documentation/General/Conceptual/GameplayKit_Guide/) # Other related staff ### <a name="la"/>Linear algebra * [Accelerate-in-Swift](https://github.com/hyperjeff/Accelerate-in-Swift) - Swift example codes for the Accelerate.framework * [cuda-swift](https://github.com/rxwei/cuda-swift) - Swift binding to CUDA. Not iOS, but still interesting. * [Dimensional](https://github.com/JadenGeller/Dimensional) - Swift matrices with friendly semantics and a familiar interface. * [Eigen](http://eigen.tuxfamily.org/) - A high-level C++ library of template headers for linear algebra, matrix and vector operations, numerical solvers and related algorithms. [MPL2] * [Matrix](https://github.com/hollance/Matrix) - convenient matrix type with different types of subscripts, custom operators and predefined matrices. A fork of Surge. * [NDArray](https://github.com/t-ae/ndarray) - Float library for Swift, accelerated with Accelerate Framework. * [Swift-MathEagle](https://github.com/rugheid/Swift-MathEagle) - A general math framework to make using math easy. Currently supports function solving and optimisation, matrix and vector algebra, complex numbers, big int, big frac, big rational, graphs and general handy extensions and functions. * [SwiftNum](https://github.com/donald-pinckney/SwiftNum) - linear algebra, fft, gradient descent, conjugate GD, plotting. * [Swix](https://github.com/scottsievert/swix) - Swift implementation of NumPy and OpenCV wrapper. * [Surge](https://github.com/mattt/Surge) from Mattt * [Upsurge](https://github.com/aleph7/Upsurge) - generic tensors, matrices on top of Accelerate. A fork of Surge. * [YCMatrix](https://github.com/yconst/YCMatrix) - A flexible Matrix library for Objective-C and Swift (OS X / iOS) ### <a name="stat"/>Statistics, random numbers * [SigmaSwiftStatistics](https://github.com/evgenyneu/SigmaSwiftStatistics) - A collection of functions for statistical calculation written in Swift. * [SORandom](https://github.com/SebastianOsinski/SORandom) - Collection of functions for generating psuedorandom variables from various distributions * [RandKit](https://github.com/aidangomez/RandKit) - Swift framework for random numbers & distributions. ### <a name="mo"/>Mathematical optimization * [fmincg-c](https://github.com/gautambhatrcb/fmincg-c) - Conjugate gradient implementation in C * [libLBFGS](https://github.com/chokkan/liblbfgs) - a C library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) * [SwiftOptimizer](https://github.com/haginile/SwiftOptimizer) - QuantLib Swift port. ### <a name="fe"/>Feature extraction * [IntuneFeatures](https://github.com/venturemedia/intune-features) framework contains code to generate features from audio files and feature labels from the respective MIDI files. * [matchbox](https://github.com/hfink/matchbox) - Mel-Frequency-Cepstral-Coefficients and Dynamic-Time-Warping for iOS/OSX. **Warning: the library was updated last time when iOS 4 was still hot.** * [LibXtract](https://github.com/jamiebullock/LibXtract) is a simple, portable, lightweight library of audio feature extraction functions. ### <a name="dv"/>Data Visualization * [Charts](https://github.com/danielgindi/Charts) - The Swift port of the MPAndroidChart. * [iOS-Charts](https://github.com/danielgindi/ios-charts) * [Core Plot](https://github.com/core-plot/core-plot) * [Awesome iOS charts](https://github.com/sxyx2008/awesome-ios-chart) * [JTChartView](https://github.com/kubatru/JTChartView) * [VTK](http://www.vtk.org/gallery/) * [VTK in action](http://www.vtk.org/vtk-in-action/) * [D3.js iOS binding](https://github.com/lee-leonardo/iOS-D3) ### <a name="bio"/>Bioinformatics (kinda) * [BioJS](http://biojs.net/) - a set of tools for bioinformatics in the browser. BioJS builds a infrastructure, guidelines and tools to avoid the reinvention of the wheel in life sciences. Community builds modules than can be reused by anyone. * [BioCocoa](http://www.bioinformatics.org/biococoa/wiki/pmwiki.php) - BioCocoa is an open source OpenStep (GNUstep/Cocoa) framework for bioinformatics written in Objective-C. [Dead project]. * [iBio](https://github.com/Lizhen0909/iBio) - A Bioinformatics App for iPhone. ### <a name="bd"/>Big Data (not really) * [HDF5Kit](https://github.com/aleph7/HDF5Kit) - This is a Swift wrapper for the HDF5 file format. HDF5 is used in the scientific comunity for managing large volumes of data. The objective is to make it easy to read and write HDF5 files from Swift, including playgrounds. ### <a name="ip"/>IPython + Swift * [iSwift](https://github.com/KelvinJin/iSwift) - Swift kernel for IPython notebook. # <a name="blogs"/>iOS ML Blogs ### Regular mobile ML * **[The "Machine, think!" blog](http://machinethink.net/blog/) by Matthijs Hollemans** * [The “hello world” of neural networks](http://matthijshollemans.com/2016/08/24/neural-network-hello-world/) - Swift and BNNS * [Convolutional neural networks on the iPhone with VGGNet](http://matthijshollemans.com/2016/08/30/vggnet-convolutional-neural-network-iphone/) * **[Pete Warden's blog](https://petewarden.com/)** * [How to Quantize Neural Networks with TensorFlow](https://petewarden.com/2016/05/03/how-to-quantize-neural-networks-with-tensorflow/) ### Accidental mobile ML * **[Google research blog](https://research.googleblog.com)** * **[Apple Machine Learning Journal](https://machinelearning.apple.com/)** * **[Invasive Code](https://www.invasivecode.com/weblog/) blog** * [Machine Learning for iOS](https://www.invasivecode.com/weblog/machine-learning-swift-ios/) * [Convolutional Neural Networks in iOS 10 and macOS](https://www.invasivecode.com/weblog/convolutional-neural-networks-ios-10-macos-sierra/) * **Big Nerd Ranch** - [Use TensorFlow and BNNS to Add Machine Learning to your Mac or iOS App](https://www.bignerdranch.com/blog/use-tensorflow-and-bnns-to-add-machine-learning-to-your-mac-or-ios-app/) ### Other * [Intelligence in Mobile Applications](https://medium.com/@sadmansamee/intelligence-in-mobile-applications-ca3be3c0e773#.lgk2gt6ik) * [An exclusive inside look at how artificial intelligence and machine learning work at Apple](https://backchannel.com/an-exclusive-look-at-how-ai-and-machine-learning-work-at-apple-8dbfb131932b) * [Presentation on squeezing DNNs for mobile](https://www.slideshare.net/mobile/anirudhkoul/squeezing-deep-learning-into-mobile-phones) * [Curated list of papers on deep learning models compression and acceleration](https://handong1587.github.io/deep_learning/2015/10/09/acceleration-model-compression.html) # <a name="gpublogs"/>GPU Computing Blogs * [OpenCL for iOS](https://github.com/linusyang/opencl-test-ios) - just a test. * Exploring GPGPU on iOS. * [Article](http://ciechanowski.me/blog/2014/01/05/exploring_gpgpu_on_ios/) * [Code](https://github.com/Ciechan/Exploring-GPGPU-on-iOS) * GPU-accelerated video processing for Mac and iOS. [Article](http://www.sunsetlakesoftware.com/2010/10/22/gpu-accelerated-video-processing-mac-and-ios0). * [Concurrency and OpenGL ES](https://developer.apple.com/library/ios/documentation/3ddrawing/conceptual/opengles_programmingguide/ConcurrencyandOpenGLES/ConcurrencyandOpenGLES.html) - Apple programming guide. * [OpenCV on iOS GPU usage](http://stackoverflow.com/questions/10704916/opencv-on-ios-gpu-usage) - SO discussion. ### Metal * Simon's Gladman \(aka flexmonkey\) [blog](http://flexmonkey.blogspot.com/) * [Talk on iOS GPU programming](https://realm.io/news/altconf-simon-gladman-ios-gpu-programming-with-swift-metal/) with Swift and Metal at Realm Altconf. * [The Supercomputer In Your Pocket: Metal & Swift](https://realm.io/news/swift-summit-simon-gladman-metal/) - a video from the Swift Summit Conference 2015 * https://github.com/FlexMonkey/MetalReactionDiffusion * https://github.com/FlexMonkey/ParticleLab * [Memkite blog](http://memkite.com/) - startup intended to create deep learning library for iOS. * [Swift and Metal example for General Purpose GPU Processing on Apple TVOS 9.0](https://github.com/memkite/MetalForTVOS) * [Data Parallel Processing with Swift and Metal on GPU for iOS8](https://github.com/memkite/SwiftMetalGPUParallelProcessing) * [Example of Sharing Memory between GPU and CPU with Swift and Metal for iOS8](http://memkite.com/blog/2014/12/30/example-of-sharing-memory-between-gpu-and-cpu-with-swift-and-metal-for-ios8/) * [Metal by Example blog](http://metalbyexample.com/) * [objc-io article on Metal](https://www.objc.io/issues/18-games/metal/) # <a name="books"/>Mobile ML Books * <b>Building Mobile Applications with TensorFlow</b> by Pete Warden. [Book page](http://www.oreilly.com/data/free/building-mobile-applications-with-tensorflow.csp). <b>[Free download](http://www.oreilly.com/data/free/building-mobile-applications-with-tensorflow.csp?download=true)</b> # <a name="learn"/>Learn Machine Learning <i>Please note that in this section, I'm not trying to collect another list of ALL machine learning study resources, but only composing a list of things that I found useful.</i> * <b>[Academic Torrents](http://academictorrents.com/browse.php?cat=7)</b>. Sometimes awesome courses or datasets got deleted from their sites. But this doesn't mean, that they are lost. * [Arxiv Sanity Preserver](http://www.arxiv-sanity.com/) - a tool to keep pace with the ML research progress. ## Free Books * Immersive Linear Algebra [interactive book](http://immersivemath.com/ila/index.html) by J. Ström, K. Åström, and T. Akenine-Möller. * ["Natural Language Processing with Python"](http://www.nltk.org/book/) - free online book. * [Probabilistic Programming & Bayesian Methods for Hackers](http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/) - An intro to Bayesian methods and probabilistic programming from a computation/understanding-first, mathematics-second point of view. * ["Deep learning"](http://www.deeplearningbook.org/) - the book by Ian Goodfellow and Yoshua Bengio and Aaron Courville ## Free Courses * [Original Machine Learning Coursera course](https://www.coursera.org/learn/machine-learning/home/info) by Andrew Ng. * [Machine learning playlist on Youtube](https://www.youtube.com/playlist?list=PLD0F06AA0D2E8FFBA). * Free online interactive book ["Neural Networks and Deep Learning"](http://neuralnetworksanddeeplearning.com/). * [Heterogeneous Parallel Programming](https://www.coursera.org/course/hetero) course. * [Deep Learning for Perception](https://computing.ece.vt.edu/~f15ece6504/) by Virginia Tech, Electrical and Computer Engineering, Fall 2015: ECE 6504 * [CAP 5415 - Computer Vision](http://crcv.ucf.edu/courses/CAP5415/Fall2014/index.php) by UCF * [CS224d: Deep Learning for Natural Language Processing](http://cs224d.stanford.edu/syllabus.html) by Stanford * [Machine Learning: 2014-2015 Course materials](https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/) by Oxford * [Stanford CS class CS231n: Convolutional Neural Networks for Visual Recognition.](http://cs231n.stanford.edu/) * [Deep Learning for Natural Language Processing \(without Magic\)](http://nlp.stanford.edu/courses/NAACL2013/) * [Videos](http://videolectures.net/deeplearning2015_montreal/) from Deep Learning Summer School, Montreal 2015. * [Deep Learning Summer School, Montreal 2016](http://videolectures.net/deeplearning2016_montreal/) # <a name="lists"/>Other Lists * [Awesome Machine Learning](https://github.com/josephmisiti/awesome-machine-learning) * [Machine Learning Courses](https://github.com/prakhar1989/awesome-courses#machine-learning) * [Awesome Data Science](https://github.com/okulbilisim/awesome-datascience) * [Awesome Computer Vision](https://github.com/jbhuang0604/awesome-computer-vision) * [Speech and language processing](https://github.com/edobashira/speech-language-processing) * [The Rise of Chat Bots:](https://stanfy.com/blog/the-rise-of-chat-bots-useful-links-articles-libraries-and-platforms/) Useful Links, Articles, Libraries and Platforms by Pavlo Bashmakov. * [Awesome Machine Learning for Cyber Security](https://github.com/jivoi/awesome-ml-for-cybersecurity)
{ "pile_set_name": "Github" }
Foobaz Foobarbaz
{ "pile_set_name": "Github" }
// dnlib: See LICENSE.txt for more info namespace dnlib.DotNet { /// <summary> /// A resolver that always fails /// </summary> public sealed class NullResolver : IAssemblyResolver, IResolver { /// <summary> /// The one and only instance of this type /// </summary> public static readonly NullResolver Instance = new NullResolver(); NullResolver() { } /// <inheritdoc/> public AssemblyDef Resolve(IAssembly assembly, ModuleDef sourceModule) => null; /// <inheritdoc/> public TypeDef Resolve(TypeRef typeRef, ModuleDef sourceModule) => null; /// <inheritdoc/> public IMemberForwarded Resolve(MemberRef memberRef) => null; } }
{ "pile_set_name": "Github" }
{ "@context": { "@vocab": "http://example.org/", "input": {"@container": "@graph"} }, "input": [{ "@graph": { "value": "x" } }, { "@graph": { "value": "y" } }] }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="generator" content="HTML Tidy, see www.w3.org" /> <title>FreeBSD 7.0-RELEASE 发行说明</title> <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79" /> <link rel="STYLESHEET" type="text/css" href="docbook.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body class="ARTICLE" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084" alink="#0000FF"> <div class="ARTICLE"> <div class="TITLEPAGE"> <h1 class="TITLE"><a id="AEN2" name="AEN2">FreeBSD 7.0-RELEASE 发行说明</a></h1> <h3 class="CORPAUTHOR">The FreeBSD Project</h3> <p class="COPYRIGHT">版权 &copy; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The FreeBSD Documentation Project</p> <p class="PUBDATE">$FreeBSD: src/release/doc/zh_CN.GB2312/relnotes/article.sgml,v 1.1.2.2.2.3 2008/02/17 01:16:40 delphij Exp $<br /> </p> <div class="LEGALNOTICE"><a id="TRADEMARKS" name="TRADEMARKS"></a> <p>FreeBSD 是 FreeBSD基金会的注册商标</p> <p>IBM、 AIX、 EtherJet、 Netfinity、 OS/2、 PowerPC、 PS/2、 S/390 以及 ThinkPad 是国际商用机器公司在美国和其他国家的注册商标或商标。</p> <p>IEEE, POSIX, 和 802 是 Institute of Electrical and Electronics Engineers, Inc. 在美国的注册商标。</p> <p>Intel, Celeron, EtherExpress, i386, i486, Itanium, Pentium, 和 Xeon 是 Intel Corporation 及其分支机构在美国和其他国家的商标或注册商标。</p> <p>Sparc, Sparc64, SPARCEngine, 以及 UltraSPARC 是 SPARC International, Inc 在美国和其他国家的商标。 包含 SPARC 商标的产品基于 Sun Microsystems, Inc. 开发的架构。</p> <p>许多制造商和经销商使用一些称为商标的图案或文字设计来彰显自己的产品。 本文档中出现的, 为 FreeBSD Project 所知晓的商标,后面将以 '&trade;' 或 '&reg;' 符号来标注。</p> </div> <div> <div class="ABSTRACT"><a id="AEN24" name="AEN24"></a> <p>  这份 FreeBSD 7.0-RELEASE 的发行说明, 概括了 FreeBSD 基本系统在 7-STABLE 开发线上所做的改动。 本文档列举了自前一发行版本以来所有适用的安全公告, 以及对于 FreeBSD 内核以及系统附带的应用程序所做的重要修改。 对在升级时需要注意的一些问题, 也进行了简略的介绍。</p> </div> </div> <hr /> </div> <div class="TOC"> <dl> <dt><b>目录</b></dt> <dt>1 <a href="#INTRO">简介</a></dt> <dt>2 <a href="#NEW">最新变动</a></dt> <dd> <dl> <dt>2.1 <a href="#SECURITY">安全公告</a></dt> <dt>2.2 <a href="#KERNEL">对内核的改动</a></dt> <dd> <dl> <dt>2.2.1 <a href="#BOOT">引导加载器变动</a></dt> <dt>2.2.2 <a href="#PROC">硬件支持</a></dt> <dt>2.2.3 <a href="#NET-PROTO">网络协议</a></dt> <dt>2.2.4 <a href="#DISKS">磁盘和存储</a></dt> <dt>2.2.5 <a href="#FS">File Systems</a></dt> </dl> </dd> <dt>2.3 <a href="#USERLAND">用户态环境变动</a></dt> <dd> <dl> <dt>2.3.1 <a href="#RC-SCRIPTS"><tt class="FILENAME">/etc/rc.d</tt> 脚本</a></dt> </dl> </dd> <dt>2.4 <a href="#CONTRIB">基本系统中的第三方软件</a></dt> <dt>2.5 <a href="#PORTS">Ports/Packages 套件基础结构</a></dt> <dt>2.6 <a href="#RELENG">发布工程与系统集成</a></dt> <dt>2.7 <a href="#DOC">文档</a></dt> </dl> </dd> <dt>3 <a href="#UPGRADE">从先前版本的 FreeBSD 升级</a></dt> </dl> </div> <div class="SECT1"> <h2 class="SECT1"><a id="INTRO" name="INTRO">1 简介</a></h2> <p>  这篇文档包括了 FreeBSD 7.0-RELEASE 的发行说明。 它描述了最近刚刚加入、 修改或删除了的 FreeBSD 特性的说明。 同时, 它也将给出如何从先前的 FreeBSD 版本完成升级的说明。</p> <p>  这是一份 FreeBSD 7.0-RELEASE 的 snapshot 发布包。 您可以从 <a href="http://www.FreeBSD.org/snapshots/" target="_top">http://www.FreeBSD.org/snapshots/</a> 或其他镜像那里得到它的副本。 关于这个 (或其他) snapshot 发布包的更多信息,可以在 <a href="../../../../doc/en_US.ISO8859-1/books/handbook/" target="_top">FreeBSD 手册</a> 中的 <a href="../../../../doc/en_US.ISO8859-1/books/handbook/mirrors.html" target="_top">“如何获得 FreeBSD”附录</a> 中找到。</p> <p>  我们鼓励所有的用户在开始安装 FreeBSD 之前首先参考这一版本所对应的勘误信息。 勘误文档将随时更新,以便为用户提供在发布工程后期或该版本发布之后 “新发现的” 问题和相关信息。 通常,这包括已知的 bug,安全公告,以及对于文档的修订内容。 最新的 FreeBSD 7.0-RELEASE 勘误信息可以从 FreeBSD 网站获得。</p> </div> <div class="SECT1"> <hr /> <h2 class="SECT1"><a id="NEW" name="NEW">2 最新变动</a></h2> <p>  这一节描述了 FreeBSD 自 6.0-RELEASE 以来最明显的新功能和变化。 一般说来, 没有注明 [已合并] 的那些新特性是 7-STABLE 所独有的。</p> <p>  发行说明中的绝大多数条目是在说明自从 6.0-RELEASE 以来的安全公告、新的驱动程序或硬件支持、新的命令或是选项、 重要的错误修补,以及基本系统中来自第三方的软件升级。 重要的 ports 和 packages 变动,或关于交付工程的变动也会在这份文档中体现。 显而易见地,发行说明不可能涵盖 FreeBSD 版本之间的每一个微小变动; 这篇文档主要关注的,仍然是安全公告,用户可以察觉的修改, 以及重要的架构改良。</p> <div class="SECT2"> <hr /> <h3 class="SECT2"><a id="SECURITY" name="SECURITY">2.1 安全公告</a></h3> <p>  修正了 2 个 BIND 远程拒绝服务的问题 (一个关于 DNSSEC 一个关于 DNS 递归查询)。 要了解进一步详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-07:02.bind.asc" target="_top">FreeBSD-SA-07:02.bind</a>. [已合并]</p> <p>  现在可以通过设置 <code class="VARNAME">net.inet6.ip6.rthdr0_allowed</code> sysctl 变量来控制 IPv6 类型 0 路由头的处理。 默认值为<tt class="LITERAL">0</tt> (off)。 要了解进一步详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-07:03.ipv6.asc" target="_top">FreeBSD-SA-07:03.ipv6</a>. [已合并]</p> <p>  修正了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=file&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">file</span>(1)</span></a> 工具 (和其依赖的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=libmagic&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">libmagic</span>(3)</span></a> 库) 一个潜在的堆溢出问题。 要了解进一步详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-07:04.file.asc" target="_top">FreeBSD-SA-07:04.file</a>. [已合并]</p> <p>  修正了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=libarchive&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">libarchive</span>(3)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=tar&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">tar</span>(1)</span></a> 处理损坏的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">tar</span>(5)</span></a> 归档文件的错误。 要了解进一步详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-07:05.libarchive.asc" target="_top">FreeBSD-SA-07:05.libarchive</a>. [已合并]</p> <p>  修正了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=tcpdump&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">tcpdump</span>(1)</span></a> 中缓冲区溢出的问题。 要了解进一步详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-07:06.tcpdump.asc" target="_top">FreeBSD-SA-07:06.tcpdump</a>. [已合并]</p> <p>  修正了一个 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=named&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">named</span>(8)</span></a> 中的错误, 这个错误会导致攻击者能够破坏解析器的 DNS 缓存。 要了解进一步详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-07:07.bind.asc" target="_top">FreeBSD-SA-07:07.bind</a>. [已合并]</p> <p>  修正了一个 OpenSSL 中缓冲区溢出的问题 (由前一个安全补丁的错误修改造成)。 要进一步了解详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-07:08.openssl.asc" target="_top">FreeBSD-SA-07:08.openssl</a>. [已合并]</p> <p>  修正了一个 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=random&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">random</span>(4)</span></a> 可能泄漏前一次生成数据的缺陷。 要进一步了解详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-07:09.random.asc" target="_top">FreeBSD-SA-07:09.random</a>. [已合并]</p> <p>  修正了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=openpty&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">openpty</span>(3)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ptsname&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ptsname</span>(3)</span></a> 中发现的信息泄露问题。 要进一步了解详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-08:01.pty.asc" target="_top">FreeBSD-SA-08:01.pty</a>. [已合并]</p> <p>  修正了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=inet_network&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">inet_network</span>(3)</span></a> Internet 地址管理函数中的一处可能导致覆盖用户定义的数据区内存内容的问题。 要进一步了解详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-08:02.libc.asc" target="_top">FreeBSD-SA-08:02.libc</a>. [已合并]</p> <p>  修正了可能导致 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sendfile&sektion=2&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sendfile</span>(2)</span></a> 越权访问文件内容的问题。 要进一步了解详情, 请参阅安全公告 <a href="http://security.FreeBSD.org/advisories/FreeBSD-SA-08:03.sendfile.asc" target="_top">FreeBSD-SA-08:03.sendfile</a>. [已合并]</p> <p>  </p> </div> <div class="SECT2"> <hr /> <h3 class="SECT2"><a id="KERNEL" name="KERNEL">2.2 对内核的改动</a></h3> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=acpi&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">acpi</span>(4)</span></a> 提供了对 HPET 时钟计数器的基本支持。[已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=acpi_ibm&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">acpi_ibm</span>(4)</span></a> 驱动提供了将风扇配置为手动或自动控制, 以及在手动控制模式下调节风扇转速的能力。 要启用对风扇转速的手动控制, 需要将 sysctl 变量 <code class="VARNAME">dev.acpi_ibm.<tt class="REPLACEABLE"><i>0</i></tt>.fan</code> 设置为零 (手动)。 这样做时必须非常小心,因为禁用自动风扇控制, 可能会使硬件过热, 从而导致永久性的损坏。</p> <p>  改进了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=apm&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">apm</span>(4)</span></a> 挂起/唤醒 支持。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cpufreq&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cpufreq</span>(4)</span></a> CPU 频率控制框架现已在 <tt class="FILENAME">GENERIC</tt> 默认内核中启用。</p> <p>  对 Camellia 块密码的支持已被加入到 FreeBSD 内核。 它能被指定为 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ipsec&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ipsec</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=geli&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">geli</span>(8)</span></a> 的块算法。 更多关于 Camellia 的信息能够在 RFC 4132 中找到。</p> <p>  由于已经不再需要, 内核配置选项 <tt class="LITERAL">options COMPAT_43</tt> 已经从 <tt class="FILENAME">GENERIC</tt> 及相关配置文件中删除。 这一变动可以为某些程序带来微小的性能提升。</p> <p>  哑终端驱动 (<a href="http://www.FreeBSD.org/cgi/man.cgi?query=dcons&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">dcons</span>(4)</span></a>) 在 <tt class="FILENAME">GENERIC</tt> 内核默认启用。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ddb&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ddb</span>(4)</span></a> 调试器新增了 <tt class="LITERAL">show sleepq</tt> 命令。 这个命令需要指定一个等待通道作为其参数, 起作用是显示与那一等待通道关联的休眠队列。</p> <p>  修正了文件描述符处理中的一个会导致在某些情况下按 <tt class="LITERAL">close(0); dup(fd)</tt> 顺序执行时不返回描述符 <tt class="LITERAL">0</tt> 的 bug。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gdb&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gdb</span>(1)</span></a> 远程调试接口提供了对于将控制台信息复制到远程调试器实例的能力。 要启用这一特性, 需要在 <tt class="FILENAME">loader.conf</tt> 中配置 <tt class="LITERAL">debug.gdbcons="1"</tt>, 并在加载器提示符出现时输入 <tt class="LITERAL">boot -d; gdb; step</tt>, 再从远程机器挂接 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gdb&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gdb</span>(1)</span></a>。 sysctl 变量 <code class="VARNAME">debug.gdbcons</code> 可以用来控制这一功能的开关状态。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=hwpmc&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">hwpmc</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pmcstat&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pmcstat</span>(8)</span></a> 提供了对动态加载的内核模块以及通过 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=dlopen&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">dlopen</span>(3)</span></a> 加载的动态连接库的性能分析支持。 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pmcstat&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pmcstat</span>(8)</span></a> 新增了通过网络 socket 将数据记录到远程主机的能力。</p> <p>  新增一个 sysctl 变量 <code class="VARNAME">kern.hostuuid</code> 用来保存全局唯一标识符 (UUID)。 此 UUID 是由 <tt class="FILENAME">rc.d/hostid</tt> 启动脚本计算生成, 为使其在每次的系统重启后不丢失,它会被保存在磁盘上。</p> <p>  对内核配置选项 <code class="OPTION">INCLUDE_CONFIG_FILE</code> 进行了改进。 正在运行的内核的完整配置, 可以通过 <tt class="COMMAND">sysctl -b kern.conftxt</tt> 来直接提取了。 此外, 也可以通过 <tt class="COMMAND">config -x kernelfile</tt> 从内核文件中提取配置文件。 如果希望保持配置文件中的注释, 可以使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=config&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">config</span>(8)</span></a> 的 <code class="OPTION">-C</code> 选项。</p> <p>  对于内核调度实体 (KSE) 的支持变成了内核选项 (过去是内核中的必选功能)。 在除了 sun4v 之外的所有硬件架构的 GENERIC 内核中, 都依然默认启用这一功能 (因而这一变动并不会产生功能上的变化)。</p> <p>  对 Linux ABI 支持进行了增强, 以支持对 Linux 2.6.16 的模拟。 这一功能默认并不启用。 如果希望启用, 则需要通过将 <code class="VARNAME">compat.linux.osrelease</code> sysctl 变量设置为 <tt class="LITERAL">2.6.16</tt>。 请注意, 这一支持目前仍是试验性的。</p> <p>  在内核的 PCI 支持代码中新增了对于 消息信号中断 (MSI) 以及 扩展消息信号中断 (MSI-X) 的支持。 [已合并]</p> <p>  新增了内核接口 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=priv&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">priv</span>(9)</span></a>。 其作用是检查线程及信任状是否拥有某些特权。 与现有的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=suser&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">suser</span>(9)</span></a> 接口不同, <a href="http://www.FreeBSD.org/cgi/man.cgi?query=priv&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">priv</span>(9)</span></a> 采用符号化的名称来标示特权, 这样就便于表达更复杂一些的特权授予策略了。</p> <p>  FreeBSD 能够支持对同一文件的并发 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=read&sektion=2&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">read</span>(2)</span></a>/<a href="http://www.FreeBSD.org/cgi/man.cgi?query=readv&sektion=2&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">readv</span>(2)</span></a> 访问了。</p> <p>  内核的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sx&sektion=9&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">sx</span>(9)</span></a> 锁进行了优化, 在多数情况下采用简单的原子操作, 来获得和释放共享及互斥锁。 尽管这一变动一般而言并不是用户可见的, 但它带来了相当可观的性能改善。o</p> <p>  对 ULE 进程调度器进行了修改, 以改进其行为, 特别是在高负载条件下的互操作性应用, 以及针对单处理器和多处理器系统的改良。 这些改进也被称作 “ULE 3.0”。 (ULE 3.0 先前曾被称作 SCHED_SMP, 它基于 ULE 调度器的 2.0 版本。 ULE 2.0 并未在已经发行过的 FreeBSD 发行版 中出现过, 但其开发过程中进行了大量的修改、 测试以及性能评估。)</p> <p>  新增了 <tt class="LITERAL">SIGCHLD</tt> 信号队列能力。 对于状态发生变化的子进程, 内核会保持在队列中的一个与之对应的 <tt class="LITERAL">SIGCHLD</tt> 实例。 如果没有对信号进行处理, 并且进程对此改变状态, 则信号信息会被更新, 以反映最新的进程状态。 新增的引导加载器选项 <code class="VARNAME">kern.sigqueue.queue_sigchild</code> 可以控制这一行为, 将其设置为零表示禁用 <tt class="LITERAL">SIGCHLD</tt> 队列功能。</p> <p>  新增了 sysctl 变量 <code class="VARNAME">kern.malloc_stats</code>。 它能够以二进制流化的数据结构形式导出内核 malloc 的统计数据。</p> <p>  新增了 sysctl 变量 <code class="VARNAME">kern.forcesigexit</code>。 如果设置了这个变量, 并且 trap 信号被当前线程占有, 或被进程忽略, 它会强制执行 sigexit。 这一功能默认启用。</p> <p>  删去了与 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=syscons&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">syscons</span>(4)</span></a> 提供类似功能的 pcvt(4) 驱动程序, 因为它已经无法适应内核中其他部分的变化了。</p> <p>  实现了 RedZone, 一种用于内核 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=malloc&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">malloc</span>(9)</span></a> 的缓冲区溢出检测机制。 它能够在运行中的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=free&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">free</span>(9)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=realloc&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">realloc</span>(9)</span></a> 时刻检测缓冲区的上溢和下溢, 并显示分配和释放内存的调用栈。 如欲了解进一步的详情, 请参见联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=redzone&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">redzone</span>(9)</span></a>。</p> <p>  新增了引导加载器选项 <code class="VARNAME">vm.kmem_size_min</code>, 这个选项用于指定 <code class="VARNAME">vm.kmem_size</code> 的最小值。</p> <p>  新增了 sysctl 变量 <code class="VARNAME">vm.zone_stats</code>。 它能够以二进制流化的数据结构形式导出 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uma&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uma</span>(9)</span></a> 分配器的统计数据。</p> <p>  将 sysctl 变量 <code class="VARNAME">hw.pci.do_powerstate</code> 分拆成了两个 sysctl 变量 <code class="VARNAME">hw.pci.do_powerstate_nodriver</code> 和 <code class="VARNAME">hw.pci.do_powerstate_resume</code>。 另外, 这些变量由布尔值改为了范围值。 <tt class="LITERAL">0</tt> 表示不进行任何电源管理, <tt class="LITERAL">1</tt> 表示保守电源管理, 即导致过问题的设备类型, 会被加入到监视列表中, <tt class="LITERAL">2</tt> 表示激进的电源管理, 表示将对系统不重要的设备都加入到列表中, 而 <tt class="LITERAL">3</tt> 则表示将全部设备的电源无条件关闭。 <code class="VARNAME">hw.pci.do_powerstate_nodriver</code> 的默认值是 <tt class="LITERAL">0</tt>, 而 <code class="VARNAME">hw.pci.do_powerstate_resume</code> 的默认值则是 <tt class="LITERAL">1</tt>。</p> <p>  [ia64] 在 <tt class="FILENAME">GENERIC</tt> 内核中默认启用了 SMP 支持。</p> <p>  新增了用以示范托管访问控制框架的内核配置文件 <tt class="FILENAME">src/sys/<tt class="REPLACEABLE"><i>arch</i></tt>/conf/MAC</tt>。</p> <p>  <code class="VARNAME">POSIX_TIMERS</code> 支持更新到了 200112L。</p> <p>  新增了对 POSIX 消息队列的试验性支持。</p> <p>  对 UNIX domain socket 的上锁策略进行了修订以改善其并发能力; 这一变动为一些 SMP 计算负载带来了显著的性能提升 (特别是在 8-路 amd64 系统上运行的 MySQL), 而在 UP 系统上则几乎没有增加其他开销。</p> <p>  为了支持过滤式中断处理方式, 对 Newbus API 进行了一些微小但范围很大的修改。 由于这些改动也会使内核 ABI 发生变化, 因此全部第三方设备驱动程序也需要进行修改并重新编译。</p> <div class="SECT3"> <hr /> <h4 class="SECT3"><a id="BOOT" name="BOOT">2.2.1 引导加载器变动</a></h4> <p>  新增了用于设置在 <tt class="FILENAME">boot2</tt> 中设置串口控制台速率, 并可用于 <tt class="FILENAME">/boot.config</tt> 文件及 <samp class="PROMPT">boot:</samp> 提示行处的 <code class="OPTION">-S</code> 选项。</p> <p>  [amd64, i386] 为引导加载器新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=firewire&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">firewire</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=dcons&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">dcons</span>(4)</span></a> 支持。 如果需要启用, 则可在 <tt class="FILENAME">/etc/make.conf</tt> 中加入 <tt class="LITERAL">LOADER_FIREWIRE_SUPPORT=yes</tt> 并重新联编引导加载器。</p> <p>  [pc98] 在 boot0.5 中对 <b class="APPLICATION">IPLware</b> 的支持进行了强化, 以支持版本 3.33。</p> </div> <div class="SECT3"> <hr /> <h4 class="SECT3"><a id="PROC" name="PROC">2.2.2 硬件支持</a></h4> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cardbus&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cardbus</span>(4)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pccard&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pccard</span>(4)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pccbb&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pccbb</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ex&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">ex</span>(4)</span></a> 驱动程序可以作为内核模块联编了。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=acpi_dock&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">acpi_dock</span>(4)</span></a> 驱动程序, 它为通过 ACPI 控制笔记本扩展坞的支持。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=acpi_thermal&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">acpi_thermal</span>(4)</span></a> 驱动程序支持自定义 <tt class="LITERAL">_PSV</tt>、 <tt class="LITERAL">_HOT</tt> 和 <tt class="LITERAL">_CRT</tt> 温度值了。</p> <p>  删去了对 alpha 硬件架构的支持。 对于 Alpha 的支持仍会在 RELENG_5 和 RELENG_6 开发线中继续保留。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cardbus&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cardbus</span>(4)</span></a> 驱动程序支持 <tt class="FILENAME">/dev/cardbus<tt class="REPLACEABLE"><i>%d</i></tt>.cis</tt> 了。</p> <p>  [i386, amd64] 新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=coretemp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">coretemp</span>(4)</span></a> 驱动程序, 它能够读取 <span class="TRADEMARK">Intel</span>&reg; <span class="TRADEMARK">Core</span>&#8482; 处理器的核心温度读数。 [已合并]</p> <p>  <tt class="LITERAL">est</tt> <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cpufreq&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cpufreq</span>(4)</span></a> 驱动程序支持对 VIA C7-M 系列处理器的频率控制了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=firewire&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">firewire</span>(4)</span></a> 代码是 MPSAFE 的了。</p> <p>  新增了 icee(4) 驱动程序, 用以支持 I2C EEPROM。</p> <p>  修正了导致无法卸载内核模块 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ichsmb&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ichsmb</span>(4)</span></a> 的 bug。</p> <p>  [amd64, i386] 在启用了 SMP 的内核中, 双核处理器 (例如 Intel Core Duo) 的处理核心都可以使用了。 [已合并]</p> <p>  [ia64, powerpc] 引导加载器选项 <code class="VARNAME">debug.mpsafevfs</code> 默认设为 <tt class="LITERAL">1</tt> 了。</p> <p>  删去了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sab&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sab</span>(4)</span></a> 驱动程序 (它已被 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=scc&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">scc</span>(4)</span></a> 驱动程序取代)。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=scc&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">scc</span>(4)</span></a> 驱动程序。 这个驱动程序提供了对串口通讯控制器的范型支持, 并将对通道和模式的控制交由具体的驱动程序, 如 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uart&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uart</span>(4)</span></a> 处理。</p> <p>  [amd64] smbios(4) 驱动程序新增了对 amd64 的支持。</p> <p>  [sun4v] FreeBSD 现在提供了对于 Sun Microsystems UltraSPARC-T1 架构的初步支持。 FreeBSD/sun4v 已经可以在 Sun Fire T1000 和 Sun Fire T2000 服务器上运行。 关于这一工作的进一步信息, 可以在 <a href="http://www.FreeBSD.org/platforms/sun4v.html" target="_top">sun4v 项目</a> 主页上找到。</p> <p>  新增了 tnt4882(4) 驱动程序, 它支持 National Instruments PCI-GPIB 卡。</p> <p>  [amd64, i386, ia64, sparc64] <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uart&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uart</span>(4)</span></a> 驱动程序现已加入到默认的 <tt class="FILENAME">GENERIC</tt> 内核。 当 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sio&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sio</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uart&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uart</span>(4)</span></a> 都能管理同一个串口时, 会优先采用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sio&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sio</span>(4)</span></a>。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uark&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uark</span>(4)</span></a> 驱动程序, 它支持基于 Arkmicro Technologies ARK3116 的 USB 串口适配器。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uart&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uart</span>(4)</span></a> 驱动新增了对于将 LOM (Lights Out Management) 和 RSC (Remote System Control) 设备作为控制台的支持。</p> <p>  删除了 zs 驱动程序, 它提供的功能已经由 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uart&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uart</span>(4)</span></a> 驱动程序取代。</p> <p>  [i386] 新增了引导加载器选项 <code class="VARNAME">hw.apic.enable_extint</code>。 这个选项可以用于禁止屏蔽第一个 I/O APIC 上的 ExtINT 引脚。 至少有一种用于 Intel Pentium III 的芯片组需要这个选项, 即使所有 8259A 的引脚都被屏蔽也是如此。 默认值依然是屏蔽 ExtINT 引脚。</p> <div class="SECT4"> <hr /> <h5 class="SECT4"><a id="MM" name="MM">2.2.2.1 多媒体支持</a></h5> <p>  新增了基于 NetBSD 的新的 midi(4) 驱动程序。 它支持 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_cmi&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_cmi</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_emu10k1&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_emu10k1</span>(4)</span></a> 驱动程序。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_cmi&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_cmi</span>(4)</span></a> 驱动程序是 MPSAFE 的了。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_emu10kx&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_emu10kx</span>(4)</span></a> 驱动程序, 它支持 Creative SoundBlaster Live! 和 Audigy 系列声卡, 并提供了可选的伪多声道回放功能。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_envy24&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_envy24</span>(4)</span></a> 驱动程序, 它支持 Envy24 系列的音效芯片。 [已合并]</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_envy24ht&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_envy24ht</span>(4)</span></a> 驱动程序, 它支持 VIA Envy24HT 系列的音效芯片。 [已合并]</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_hda&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_hda</span>(4)</span></a> 驱动程序。 它支持符合 Intel High Definition Audio 1.0 版本规范的设备。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_solo&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_solo</span>(4)</span></a> 驱动程序是 MPSAFE 的了。 [已合并]</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_spicds&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_spicds</span>(4)</span></a> 驱动程序, 它支持 I2S SPI 音效编码解码芯片。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uaudio&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uaudio</span>(4)</span></a> 驱动程序新增了对 24/32 位声音格式和转换的支持。</p> </div> <div class="SECT4"> <hr /> <h5 class="SECT4"><a id="NET-IF" name="NET-IF">2.2.2.2 网络接口支持</a></h5> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ath&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ath</span>(4)</span></a> 驱动程序更新到了 HAL 0.9.20.3 版。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=axe&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">axe</span>(4)</span></a> 驱动程序支持 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=altq&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">altq</span>(4)</span></a> 了。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=bge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">bge</span>(4)</span></a> 驱动程序的 Jumbo frame (巨型帧) 支持是 MPSAFE 的了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=bge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">bge</span>(4)</span></a> 驱动程序新增了对高位在前 (big-endian) 硬件平台, 如 sparc64 的支持。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=iwi&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">iwi</span>(4)</span></a> 驱动程序所需要的固件映像文件, 现在成为了 FreeBSD 基本系统的一部分。 如果想要加载这个固件, 您必须同意位于 <tt class="FILENAME">/usr/share/doc/legal/intel_iwi/LICENSE</tt> 的授权许可协议, 并在 <tt class="FILENAME">/boot/loader.conf</tt> 中设置 <tt class="LITERAL">legal.intel_iwi.license_ack=1</tt>。 这个驱动程序先前的版本, 需要使用由 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/net/iwi-firmware-kmod/pkg-descr"><tt class="FILENAME">net/iwi-firmware-kmod</tt></a> port/package 或 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/net/iwi-firmware/pkg-descr"><tt class="FILENAME">net/iwi-firmware</tt></a> port/package 安装的固件映像文件。</p> <p>  新增了 ixgbe 驱动程序, 它能够支持 Intel 10G (万兆以太网) PCI-Express 适配器 (82598)。</p> <p>  删去了 lnc(4) 驱动程序。 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=le&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">le</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pcn&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pcn</span>(4)</span></a> 驱动程序能够支持过去由 lnc(4) 支持的所有设备。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=msk&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">msk</span>(4)</span></a> 驱动程序。 它能够支持使用 Marvell/SysKonnect Yukon II</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cm&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">cm</span>(4)</span></a> 驱动程序是 MPSAFE 的了。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cxgb&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cxgb</span>(4)</span></a> 驱动程序, 它提供了对基于 Chelsio T3 和 T3B 芯片组的 10 Gigabit (万兆) 以太网适配器的支持。 [已合并]</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=edsc&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">edsc</span>(4)</span></a> 驱动程序, 它提供了对 Ethernet discard 网络接口的支持。 [已合并]</p> <p>  由于使用的人太少, 删去了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=el&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">el</span>(4)</span></a> 驱动程序。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=em&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">em</span>(4)</span></a> 驱动程序更新到了来自 Intel 的 6.7.3 版本。 除了其他修改之外, 这个版本新增了对基于 80003、 82571、 82571EB、 82572 以及 82575 网卡, 以及基于 ICH8 芯片组的板载网卡的支持。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=em&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">em</span>(4)</span></a> 驱动程序包含了对挂起和唤醒功能的初步支持。</p> <p>  通过使用快速中断处理程序和 taskqueue 代替 ithread 中断处理程序, 改善了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=em&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">em</span>(4)</span></a> 驱动程序的性能。 出于调试目的, 这一变动可以通过定义内核选项 <tt class="LITERAL">NO_EM_FASTINTR</tt> 来禁用。</p> <p>  在 <tt class="FILENAME">GENERIC</tt> 内核中启用了基于火线的 IP 驱动程序 (<a href="http://www.FreeBSD.org/cgi/man.cgi?query=fwip&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">fwip</span>(4)</span></a>)。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gem&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gem</span>(4)</span></a> 驱动程序新增了对 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=altq&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">altq</span>(4)</span></a> 的支持。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ipw&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ipw</span>(4)</span></a> 驱动程序所需要的固件映像文件, 现在成为了 FreeBSD 基本系统的一部分。 如果想要加载这个固件, 您必须同意位于 <tt class="FILENAME">/usr/share/doc/legal/intel_ipw/LICENSE</tt> 的授权许可协议, 并在 <tt class="FILENAME">/boot/loader.conf</tt> 中设置 <tt class="LITERAL">legal.intel_ipw.license_ack=1</tt>。 这个驱动程序先前的版本, 需要使用由 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/net/ipw-firmware-kmod/pkg-descr"><tt class="FILENAME">net/ipw-firmware-kmod</tt></a> port/package 或 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/net/ipw-firmware/pkg-descr"><tt class="FILENAME">net/ipw-firmware</tt></a> port/package 安装的固件映像文件。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=iwi&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">iwi</span>(4)</span></a> 驱动程序新增了对高位在前 (big-endian) 硬件平台, 如 sparc64 的支持。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=iwi&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">iwi</span>(4)</span></a> 驱动程序所需要的固件映像文件, 现在成为了 FreeBSD 基本系统的一部分。 如果想要加载这个固件, 您必须同意位于 <tt class="FILENAME">/usr/share/doc/legal/intel_iwi/LICENSE</tt> 的授权许可协议, 并在 <tt class="FILENAME">/boot/loader.conf</tt> 中设置 <tt class="LITERAL">legal.intel_iwi.license_ack=1</tt>。 这个驱动程序先前的版本, 需要使用由 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/net/iwi-firmware-kmod/pkg-descr"><tt class="FILENAME">net/iwi-firmware-kmod</tt></a> port/package 或 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/net/iwi-firmware/pkg-descr"><tt class="FILENAME">net/iwi-firmware</tt></a> port/package 安装的固件映像文件。</p> <p>  新增了 ixgbe 驱动程序, 它能够支持 Intel 10G (万兆以太网) PCI-Express 适配器 (82598)。</p> <p>  删去了 lnc(4) 驱动程序。 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=le&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">le</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pcn&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pcn</span>(4)</span></a> 驱动程序能够支持过去由 lnc(4) 支持的所有设备。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=msk&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">msk</span>(4)</span></a> 驱动程序。 它能够支持使用 Marvell/SysKonnect Yukon II 千兆以太网控制器的网卡。 [已合并]</p> <p>  [amd64, i386] 新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mxge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mxge</span>(4)</span></a> 驱动程序, 它能够支持 Myricom Myri10GE 10 Gigabit (万兆) 以太网适配器。 如欲了解进一步的详情, 请参阅联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mxge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mxge</span>(4)</span></a>。 [已合并]</p> <p>  [amd64, i386] 新增了来自 OpenBSD 的开放源代码的 nForce 以太网设备驱动程序 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=nfe&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">nfe</span>(4)</span></a>。 在 <tt class="FILENAME">GENERIC</tt> 内核中, 这个驱动程序取代了原先使用的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=nve&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">nve</span>(4)</span></a> 驱动程序。</p> <p>  [arm] 新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=npe&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">npe</span>(4)</span></a> 驱动程序, 它能够支持 Intel XScale 网络处理引擎。 [已合并]</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=nxge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">nxge</span>(4)</span></a> 驱动程序, 它能够支持 Neterion Xframe 10 Gigabit (万兆) 以太网适配器。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=re&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">re</span>(4)</span></a> 驱动程序新增了对 D-Link DGE-528(T) 千兆以太网卡的支持。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rum&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">rum</span>(4)</span></a> 驱动程序。 它能够支持基于 Ralink RT2501USB 和 RT2601USB 芯片组的 WLAN 适配器。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ti&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">ti</span>(4)</span></a> 驱动程序新增了对高位在前 (big-endian) 硬件平台, 如 sparc64 的支持。</p> <p>  新增了用于 FOMA (由日本 NTT DoCoMo, Inc. 设计的第三代移动电话系统) 的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ufoma&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ufoma</span>(4)</span></a> 驱动程序。 它能够支持基于日本 MCPC (移动计算推进委员会) 颁布的 USB 实现指导说明书所设计的第三代移动电话。</p> <p>  新增了 vgapci(4) 驱动程序。 这是一个用于 VGA PCI 设备的框架驱动程序, 以总线驱动的形式提供服务, 这样, 类似 drm(4)、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=acpi_video&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">acpi_video</span>(4)</span></a>, 以及 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=agp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">agp</span>(4)</span></a> 这些驱动程序就可以与其配合工作, 使得在同一个设备上使用多个驱动程序成为可能。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=vge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">vge</span>(4)</span></a> 驱动新增了对 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=altq&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">altq</span>(4)</span></a> 的支持。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wi&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">wi</span>(4)</span></a> 驱动程序可以以内核模块的形式联编了。</p> <p>  [amd64, i386, pc98] 在默认的 <tt class="FILENAME">GENERIC</tt> 中加入了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wlan_wep&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">wlan_wep</span>(4)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wlan_ccmp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">wlan_ccmp</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wlan_tkip&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">wlan_tkip</span>(4)</span></a> 驱动程序。</p> <p>  [amd64, i386] 新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wpi&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">wpi</span>(4)</span></a> 驱动程序, 它提供了对 Intel 3945 无线 LAN 控制器的支持。</p> <p>  [amd64, i386] 新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=zyd&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">zyd</span>(4)</span></a> 驱动程序。 它提供了对 ZyDAS ZD1211/ZD1211B USB IEEE 802.11 b/g 无线网络设备的支持。</p> <p>  从 OpenBSD 引入了网络接口组功能。 举例说来, 这个功能允许管理员在一组网络接口上应用防火墙规则。 更多信息, 请参阅联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ifconfig&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ifconfig</span>(8)</span></a>。</p> <p>  对 802.11 协议栈进行了大幅度的改写。 重要的新增功能, 包括支持后台扫描、 在多个 AP 之间漫游, 以及对拥有 802.11n 能力的设备所需要的支持基础。</p> <p>  802.11 协议栈新增了对于 900 MHz 无线网卡, 以及对 802.11a 四分和对分频道的支持。 [已合并]</p> <p>  FreeBSD 网络协议栈现在在运行时已经完全没有内核全局锁 Giant, 并完全使用内核的细粒度锁原语来管理并发了。 这显著地改善了在多处理器系统上的网络协议栈性能; 即使是在单处理器的系统中, 也可以看到性能的提升。 ISDN4BSD 和 netatm 目前已临时从联编过程中摘除。 这些模块在运行时仍然需要全局锁, 而摘除了这两个模块, 使得删除 NET_NEEDS_GIANT 兼容代码。 我们计划将这些模块转换为使用细粒度的内核上锁方式, 并在 FreeBSD 7.1-RELEASE 时重新连入联编过程。</p> </div> </div> <div class="SECT3"> <hr /> <h4 class="SECT3"><a id="NET-PROTO" name="NET-PROTO">2.2.3 网络协议</a></h4> <p>  [amd64, i386, pc98] 为 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=bpf&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">bpf</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ng_bpf&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ng_bpf</span>(4)</span></a> 实现了试验性的 BPF 即时编译器。 如果希望启用这个功能, 需要使用内核选项 <tt class="LITERAL">options BPF_JITTER</tt>。 使用 <code class="VARNAME">net.bpf_jitter.enable</code> 可以禁用这个功能。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=bpf&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">bpf</span>(4)</span></a> 设备新增了一系列新的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ioctl&sektion=2&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ioctl</span>(2)</span></a> 调用, 用于检查输入和输出的数据包, 以及发到网络上的数据包。</p> <p>  在系统中删去了 bridge(4) 驱动程序。 它的功能已经由 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=if_bridge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">if_bridge</span>(4)</span></a> 完全取代了。</p> <p>  用于支持 RFC 1701 和 RFC 1702 中介绍的 GRE 封装的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gre&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gre</span>(4)</span></a> 驱动程序能够支持 GRE 上的 IPv6 了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=if_bridge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">if_bridge</span>(4)</span></a> 驱动程序新增了对 RSTP, 即快速生成树协议 (802.1w) 的支持。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=if_bridge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">if_bridge</span>(4)</span></a> 驱动程序在桥接端口上新增了 <tt class="LITERAL">private</tt> 标志; 网桥上的非 private 端口可以与任何其他非 private 端口通讯。 这个功能对于在服务器网路中使用多个客户 VLAN 的场景比较有用; 此外, 它也可以用来阻止客户 VLAN 之间互相访问, 但又同时允许它们访问服务器网络。 网桥端口上的 private 标志可以通过 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ifconfig&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ifconfig</span>(8)</span></a> 来设置或清除。</p> <p>  删去了原先硬编码的 IPv4 多播组成员限制 (先前的值是 20)。</p> <p>  IPv6 多播转发现在可以通过内核模块 <tt class="FILENAME">ip_mroute.ko</tt> 来动态载入了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ipfw&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ipfw</span>(4)</span></a> 包过滤器支持针对 Routing Header Type 0 和 Mobile IPv6 Routing Header Type 2 以及对于 Routing Header 的不做区分的过滤了。</p> <p>  删去了 ip6fw(8) 包过滤器。 由于 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ipfw&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ipfw</span>(4)</span></a> 已经能够支持 IPv6, 因此应使用它来代替。 请注意某些规则可能需要进行少量调整。</p> <p>  删去了 KAME 的 IPsec 实现。 作为替代, <tt class="LITERAL">FAST_IPSEC</tt> 成为了 FreeBSD 内核支持的唯一一个 IPsec 实现。 过去曾用来表示 KAME IPsec 的内核选项 <tt class="LITERAL">IPSEC</tt> 现在用于启用 <tt class="LITERAL">FAST_IPSEC</tt>。 <tt class="LITERAL">FAST_IPSEC</tt> 提供了对 IPv4 和 IPv6 的支持, 使用了细粒度的内核上锁, 并支持基于硬件的加密加速。</p> <p>  删去了对 IP 上的 IPX 隧道支持。</p> <p>  新增了从 OpenBSD 和 NetBSD 移植的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=lagg&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">lagg</span>(4)</span></a> 驱动程序, 它支持一系列链路聚合、 故障转移和容错协议及算法。 [已合并]</p> <p>  原生模式 ATM 协议层 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=natm&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">natm</span>(4)</span></a> 是 MPSAFE 的了。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ng_car&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ng_car</span>(4)</span></a> Netgraph 节点类型, 实现了若干种流量整形和速率限制算法。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ng_deflate&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ng_deflate</span>(4)</span></a> Netgraph 节点类型, 实现了 Deflate PPP 压缩。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ng_h4&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ng_h4</span>(4)</span></a> Netgraph 节点是 MPSAFE 的了。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ng_ppp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ng_ppp</span>(4)</span></a> Netgraph 节点是 MPSAFE 的了。 [已合并]</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ng_pred1&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ng_pred1</span>(4)</span></a> Netgraph 节点类型, 实现了 Predictor-1 PPP 压缩。 [已合并]</p> <p>  TCP 传输方式的 NFS 默认重传计时器变改为了 60 秒。 这个变动能够防止不必要地重传非幂等的 NFS 请求。 此外, <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rc.conf&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">rc.conf</span>(5)</span></a> 中的 <code class="VARNAME">nfs_access_cache</code> 变量的默认值也改为了 60。</p> <p>  nfsiod 内核线程的默认数量 (<a href="http://www.FreeBSD.org/cgi/man.cgi?query=sysctl&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sysctl</span>(8)</span></a> 变量 <code class="VARNAME">vfs.nfs.iodmin</code>) 由原先的 4 调整为 0。</p> <p>  新增了 sysctl 变量 <code class="VARNAME">net.inet.icmp.reply_from_interface</code>。 这表示让 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=icmp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">icmp</span>(4)</span></a> 以数据包进入的网络接口上的 IP 地址来回应非本地数据包。 对于路由器而言, 这可以让 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=traceroute&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">traceroute</span>(8)</span></a> 显示出包实际经过的路径, 而不是可能出现的另一条路。</p> <p>  新增了 sysctl 变量 <code class="VARNAME">net.inet.icmp.quotelen</code>。 它可以调节 ICMP 回应中引用的原数据包长度。 系统内部会确保最小长度为 8 字节。 最大的引用长度, 取决于回应 mbuf 中的剩余空间。 加入这一选项是为了解决 I-D <tt class="FILENAME">draft-gont-icmp-payload-00.txt</tt> 提到的问题。</p> <p>  如果需要, 在回应和分配 mbuf 时, <a href="http://www.FreeBSD.org/cgi/man.cgi?query=icmp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">icmp</span>(4)</span></a> 会引用完整的 TCP 头了。 这个变动修正了由 I-D <tt class="FILENAME">draft-gont-icmp-payload-00.txt</tt> 提到的问题。</p> <p>  新增了 socket 选项 <tt class="LITERAL">IP_MINTTL</tt>。 这个选项可以控制在 socket 上收到的包的最小 TTL 值。 所有包含更小 TTL 的包都会被直接丢弃。 目前这已经能够在 RAW、 UDP 和 TCP 监听 socket 上使用。 该选项唯一一个有用的值是 <tt class="LITERAL">255</tt>, 表示阻止本地 socket 监听接受所有来自直接连接的网络之外的数据包。 此外, 这个选项也使得在用户态实现 RFC 3682 “The Generalized TTL Security Mechanism (GTSM)” 成为可能。</p> <p>  内核 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ppp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ppp</span>(4)</span></a> 驱动程序支持 IPv6 了。</p> <p>  隐蔽转发 (stealth forwarding) 同时支持 IPv6 和 IPv4 了。 这一行为可以通过新增的 sysctl 变量 <code class="VARNAME">net.inet6.ip6.stealth</code> 来控制。</p> <p>  删去了内核选项 <tt class="LITERAL">PIM</tt>。 相关代码现在由内核选项 <tt class="LITERAL">MROUTING</tt> 提供。</p> <p>  新增了对于 RFC 3678 特定源组播 (SSM) socket API 的支持。 更多细节, 请参阅联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sourcefilter&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sourcefilter</span>(3)</span></a>。</p> <p>  新增了对于 流控制传输协议 (SCTP) 的支持。 SCTP 实现了由 RFC 4960 定义的支持可靠的、 面向消息的传输协议。 在 FreeBSD 中可以通过 <tt class="LITERAL">SCTP</tt> 内核选项来启用这种支持, 它是 <tt class="FILENAME">GENERIC</tt> 内核的一部分。 关于它的进一步信息, 请参见联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sctp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sctp</span>(4)</span></a>。</p> <p>  <tt class="LITERAL">IPV6_V6ONLY</tt> socket 选项支持 UDP 了。</p> <p>  内核选项 <tt class="LITERAL">TCP_DROP_SYNFIN</tt> 现在是默认启用的了。 <code class="VARNAME">net.inet.tcp.drop_synfin</code> sysctl 变量的默认值, 和之前一样仍然是 <tt class="LITERAL">0</tt>。</p> <p>  FreeBSD 网络协议栈新增了对于网卡等硬件提供的 TCP 分片协处理 (TSO) 能力的支持。 通过将大块数据分拆成多个 TCP 分片这样的操作交给网卡来进行, TSO 能够减少发送大量 TCP 数据时的开销。 这一功能, 可以以网络接口为单位, 通过 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ifconfig&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ifconfig</span>(8)</span></a> 的 <tt class="LITERAL">tso</tt> 和 <tt class="LITERAL">-tso</tt> 参数, 来启用和禁用。 目前, 支持 TSO 的网卡驱动包括 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=em&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">em</span>(4)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mxge&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mxge</span>(4)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cxgb&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cxgb</span>(4)</span></a>。</p> <p>  FreeBSD 提供了对 TCP socket 缓冲的自动尺寸收放能力。 这使得 socket 缓冲区尺寸能够依据网络条件自动适应, 而不再需要静态地设置。 这一功能的行为, 可以通过 <code class="VARNAME">net.inet.tcp.sendbuf_*</code> 和 <code class="VARNAME">net.inet.tcp.recvbuf_*</code> sysctl 变量来调整。</p> <p>  为 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=tap&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">tap</span>(4)</span></a> 驱动程序新增了 sysctl 变量 <code class="VARNAME">net.link.tap.up_on_open</code>。 如果启用, 则新的 tap 设备会在创建时直接标记为 <tt class="LITERAL">up</tt>。 [已合并]</p> </div> <div class="SECT3"> <hr /> <h4 class="SECT3"><a id="DISKS" name="DISKS">2.2.4 磁盘和存储</a></h4> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=aac&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">aac</span>(4)</span></a> 驱动程序新增了对一些惠普机器上使用的 Adaptec 2610SA SATA-RAID 控制器的支持。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ahc&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ahc</span>(4)</span></a> 驱动程序是 MPSAFE 的了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ahd&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ahd</span>(4)</span></a> 驱动程序是 MPSAFE 的了。</p> <p>  CAM 子系统是 MPSAFE 的了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ciss&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ciss</span>(4)</span></a> 驱动程序是 MPSAFE 的了。</p> <p>  GEOM 存储变换系统新增了 <tt class="LITERAL">GEOM_JOURNAL</tt> class。 它支持块级别的日志操作, 可以为文件系统模块保持一致性提供文件系统日志。 (目前, 这一功能只支持 UFS 文件系统。) 关于它的操作, 可以由 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gjournal&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gjournal</span>(8)</span></a> 工具进行控制。</p> <p>  新增了用以支持多种磁盘设备访问路径的 GEOM_MULTIPATH class。 新增的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gmultipath&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gmultipath</span>(8)</span></a> 工具可以利用这个功能控制磁盘的行为。</p> <p>  新增了用以提供以物理设备为后端, 支持任意尺寸虚拟存储设备 的 <tt class="LITERAL">GEOM_VIRSTOR</tt> class。 关于它的进一步信息, 请参见联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gvirstor&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gvirstor</span>(8)</span></a>。</p> <p>  为了保持命名方式一致, 将 GEOM class 内核模块 <tt class="FILENAME">g_md.ko</tt> 改名为 <tt class="FILENAME">geom_md.ko</tt>。</p> <p>  [amd64, i386] 新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=hptiop&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">hptiop</span>(4)</span></a> 驱动。 该驱动支持 Highpoint RocketRAID 3xxx 和 4xxx 系列的 SAS 和 SATA RAID控制器。</p> <p>  [amd64, i386] 新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=hptrr&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">hptrr</span>(4)</span></a> 驱动程序, 它能够支持多种 HighPoint RocketRAID 控制器 (更多细节, 可以在联机手册中找到)。 [已合并]</p> <p>  [amd64, i386] 对 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=hptmv&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">hptmv</span>(4)</span></a> 驱动程序进行了更新, 它支持 amd64 和 PAE 了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=isp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">isp</span>(4)</span></a> 驱动程序是 MPSAFE 的了。</p> <p>  对 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mpt&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mpt</span>(4)</span></a> 驱动程序进行了更新, 以支持包括 RAID 卷, 以及 RAID 成员状态/设置报告、 周期性卷重同步状态报告, 以及用于设置卷重同步速率、 卷成员写入缓存状态和卷事务队列深度等信功能。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mpt&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mpt</span>(4)</span></a> 驱动程序新增了 SAS HBA (部分)、 64-位 PCI 以及大规模数据传输的支持。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mpt&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mpt</span>(4)</span></a> 驱动程序是 MPSAFE 的了。</p> <p>  在较早版本的 FreeBSD 中出现过的 rr232x(4) 驱动程序已不再支持, 其功能已经被 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=hptrr&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">hptrr</span>(4)</span></a> 驱动程序所取代。 根据 Highpoint 的要求, 这一版本中删去了 rr232x(4) 驱动程序。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=twa&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">twa</span>(4)</span></a> 驱动更新到了 3ware 网站上公布的 3.70.03.007 版本。 这个版本对 AMCC 的 3ware 9650 系列 SATA 控制器提供了支持。 [已合并]</p> <p>  新增了用于 Internet SCSI (iSCSI) 协议的内核驱动 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=iscsi_initiator&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">iscsi_initiator</span>(4)</span></a>。 这个驱动允许通过 TCP/IP 网络访问远程的 SCSI 设备。 用户态环境工具 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=iscontrol&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">iscontrol</span>(8)</span></a> 可以用来控制这一驱动程序的操作。</p> <p>  新增了模拟 Linux SCSI SG 直通设备 API 的大部分功能子集的 scsi_sg 驱动程序。 这使得以 Linux 模拟方式 (以及 FreeBSD 原生应用程序) 能够以和在 Linux 上面相同的方式操作 <tt class="FILENAME">/dev/sg<tt class="REPLACEABLE"><i>*</i></tt></tt> 设备。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=umass&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">umass</span>(4)</span></a> 驱动提供了对命令 <tt class="LITERAL">PLAY_MSF</tt>、 <tt class="LITERAL">PLAY_TRACK</tt>、 <tt class="LITERAL">PLAY_TRACK_REL</tt>、 <tt class="LITERAL">PAUSE</tt>、 <tt class="LITERAL">PLAY_12</tt> 的支持, 这使得 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cdcontrol&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cdcontrol</span>(1)</span></a> 工具能够操作 USB CD 驱动器了。</p> </div> <div class="SECT3"> <hr /> <h4 class="SECT3"><a id="FS" name="FS">2.2.5 File Systems</a></h4> <p>  FreeBSD NFS 子系统中的一部分 (与协议栈及 callout 的接口和 NFS 客户端部分) 是 MPSAFE 的了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pseudofs&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pseudofs</span>(9)</span></a> 伪文件系统构建包及使用它实现的文件系统 (<a href="http://www.FreeBSD.org/cgi/man.cgi?query=procfs&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">procfs</span>(5)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=linprocfs&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">linprocfs</span>(5)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=linsysfs&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">linsysfs</span>(5)</span></a>) 是 MPSAFE 的了。</p> <p>  [amd64, i386] 增加了试验性的 TMPFS 文件系统支持。 TMPFS 是一种高效的内存文件系统, 它由 NetBSD 项目在 Google 的 Summer of Code 活动中开发。 关于这种文件系统的进一步信息, 请参见联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=tmpfs&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">tmpfs</span>(5)</span></a>。</p> <p>  重新实现了 unionfs 文件系统。 与之前的实现相比, 这个版本解决了许多崩溃和上锁问题。 此外, 它还提供了新增的 “transparent” (透明) 和 “masquerade” (伪装) 这两种工作模式, 能够自动在文件系统聚合的上层创建文件。 关于这个文件系统的进一步信息, 请参考联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mount_unionfs&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mount_unionfs</span>(8)</span></a>。 [已合并]</p> <p>  [amd64, i386, pc98] 加入了对 Sun 的 ZFS 的支持。 关于这一文件系统的更多信息, 请参见联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=zfs&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">zfs</span>(8)</span></a> 或 <a href="http://www.opensolaris.org/os/community/zfs/" target="_top">OpenSolaris ZFS 主页</a>。</p> <p>  加入了初步的 (只读) 对 SGI 的 XFS 文件系统的支持。</p> </div> </div> <div class="SECT2"> <hr /> <h3 class="SECT2"><a id="USERLAND" name="USERLAND">2.3 用户态环境变动</a></h3> <p>  从 <tt class="FILENAME">libc</tt> 删去了原先随 INRIA IPv6 实现引入的 addr2ascii() 和 ascii2addr() 库函数调用。 在 FreeBSD 基本系统中已经不再有使用它们的地方。 作为相关的改动, 为 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=getnameinfo&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">getnameinfo</span>(3)</span></a> 增加了对于 <tt class="LITERAL">AF_LINK</tt> 地址的支持。</p> <p>  删去了 <code class="VARNAME">struct addrinfo</code> 中的 <code class="VARNAME">ai_addrlen</code> 原先用于保持 ABI 兼容性的补位桩。 例如, 这个变动会破坏 64 位平台, 包括 FreeBSD/amd64、 FreeBSD/ia64 以及 FreeBSD/sparc64 上 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=getaddrinfo&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">getaddrinfo</span>(3)</span></a> 函数的 ABI 兼容性。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=atrun&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">atrun</span>(8)</span></a> 工具新增了 PAM 支持。 在开始为用户帐号运行任务之前, 它会首先通过 PAM 检查用户帐号的状态。 默认的不可用的帐户定义包括已过期用户, 以及使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pw&sektion=8&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">pw</span>(8)</span></a> 锁定的用户。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=camcontrol&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">camcontrol</span>(8)</span></a> 新增了用于显示设备容量的 <tt class="COMMAND">readcap</tt> 命令。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cron&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cron</span>(8)</span></a> 服务新增了 PAM 支持。 在运行帐户私有的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=crontab&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">crontab</span>(5)</span></a> 文件中的命令之前, 它会通过 PAM 检查帐户的状态, 如果帐户不可用, 则跳过命令。 默认的不可用帐户定义包括已过期用户, 以及使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pw&sektion=8&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">pw</span>(8)</span></a> 锁定的用户。 此外, <a href="http://www.FreeBSD.org/cgi/man.cgi?query=cron&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">cron</span>(8)</span></a> 如果系统中存在 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=nologin&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">nologin</span>(5)</span></a> 文件, 除非 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=crontab&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">crontab</span>(5)</span></a> 属主的登录类型 (login class) 不受 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=nologin&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">nologin</span>(5)</span></a> 限制, 否则也会跳过其 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=crontab&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">crontab</span>(5)</span></a> 中的命令。 系统文件 <tt class="FILENAME">/etc/crontab</tt> 中配置的命令, 不受 PAM 检查的限制。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=dhclient&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">dhclient</span>(8)</span></a> 程序新增了 RFC 3422 描述的无类静态路由选项支持。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=dump&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">dump</span>(8)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=restore&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">restore</span>(8)</span></a> 程序能够保存和恢复文件的扩展属性信息了。</p> <p>  新增了实现用于操作 ELF 文件的 SVR4 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=elf&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">elf</span>(3)</span></a> / <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gelf&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gelf</span>(3)</span></a> API 的 <b class="APPLICATION">libelf</b> 函数库。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=fdisk&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">fdisk</span>(8)</span></a> 程序新增了用于以 fdisk 配置文件格式显示 slice 表的 <code class="OPTION">-p</code> 选项。 [已合并]</p> <p>  删去了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=finger&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">finger</span>(1)</span></a> 的 T/TCP 支持 (以及用于启用该支持的 <code class="OPTION">-T</code> 选项)。</p> <p>  修正了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=find&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">find</span>(1)</span></a> 程序无法正确处理传给 <code class="OPTION">-user</code> 和 <code class="OPTION">-group</code> 的数字格式的参数的 bug。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=freebsd-update&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">freebsd-update</span>(8)</span></a> 命令新增了 <tt class="COMMAND">upgrade</tt> 子命令, 用于完成在不同的 FreeBSD 版本之间的二进制升级。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ftpd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ftpd</span>(8)</span></a> 工具新增了对 RFC2389 (FEAT) 和 RFC2640 (UTF8) 的支持。 RFC2640 支持是可选的, 可以通过新增的 <code class="OPTION">-8</code> 参数来启用。 更多信息, 可以在 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ftpd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ftpd</span>(8)</span></a> 联机手册中找到。 [已合并]</p> <p>  默认启用了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gcc&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gcc</span>(1)</span></a> SSP (堆栈溢出保护) 支持。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gbde&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gbde</span>(8)</span></a> 工具新增了 <code class="OPTION">-k</code> 和 <code class="OPTION">-K</code> 选项, 用于指定通行字之外的密钥文件。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gpt&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gpt</span>(8)</span></a> 新增了设置 GPT 分区卷标的能力。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=gvinum&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">gvinum</span>(8)</span></a> 工具新增了 <tt class="COMMAND">resetconfig</tt> 子命令。</p> <p>  新增了 RFC2743 和 RFC2744 描述的第 2 版通用安全服务 (Generic Security Service) API (GSS-API) 及其 C 绑定接口。 这是一个新增的可扩展 GSS-API 层, 它支持 GSS-API 插件, 与 Solaris 实现类似, 而原有的 Kerberos 5 GSS 机制, 则进行了重写, 作为新实现的插件库提供。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=hccontrol&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">hccontrol</span>(8)</span></a> 工具支持 HCI 节点自动探测了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=id&sektion=1&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">id</span>(1)</span></a> 工具会在组 ID 之后显示生效用户 ID 了。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ipfwpcap&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ipfwpcap</span>(8)</span></a> 工具。 它能够截获 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=divert&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">divert</span>(4)</span></a> socket 并将数据以 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pcap&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pcap</span>(3)</span></a> (也就是 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=tcpdump&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">tcpdump</span>(1)</span></a> 所使用的) 格式写入文件或管道。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=kdump&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">kdump</span>(1)</span></a> 程序能够将系统调用参数以符号化的名字显示了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=kenv&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">kenv</span>(1)</span></a> 工具新增了用于禁止警告信息的 <code class="OPTION">-q</code> 选项。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=kgdb&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">kgdb</span>(1)</span></a> 新增了用于以读写模式打开 kmem target 的 <code class="OPTION">-w</code> 选项。 这使得 kgdb 能够直接作用于 <tt class="FILENAME">/dev/mem</tt> 并修改正在运行的系统的内核内存内容。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=libarchive&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">libarchive</span>(3)</span></a> 支持 POSIX.1e-风格的扩展属性了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=libarchive&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">libarchive</span>(3)</span></a> 库能够处理 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ar&sektion=1&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">ar</span>(1)</span></a>-格式的文件了。</p> <p>  <b class="APPLICATION">libc</b> 库中, 新增了对符号映射和版本化符号定义的实现。</p> <p>  <b class="APPLICATION">libedit</b> 库更新到了 NetBSD 源代码 2005 年 8 月的版本。</p> <p>  <b class="APPLICATION">libm</b> 库中, 新增了对符号映射和版本化符号定义的实现。</p> <p>  引入了新的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=malloc&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">malloc</span>(3)</span></a> 实现。 这个实现, 也称作 “jemalloc”, 是为改善多线程程序, 特别是在 SMP 系统上运行时的性能而设计的, 同时兼顾了单线程程序的性能。 由于采用了不同的算法和数据结构, jemalloc 可能会暴露一些以前没有发现的用户态代码的 bug, 不过尽管如此, 绝大多数 FreeBSD 基本系统和常用的 ports 都已经进行了测试和修正。 请注意, jemalloc 使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mmap&sektion=2&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mmap</span>(2)</span></a> 来获取内存, 而只在十分有限的情况下使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sbrk&sektion=2&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sbrk</span>(2)</span></a> (并且这有限的情形仅限 32-位 硬件架构)。 其结果是, <tt class="LITERAL">datasize</tt> 资源限制对典型的应用而言, 其效果会被严重削弱。 不过, 您可以使用 <tt class="LITERAL">vmemoryuse</tt> 资源限制, 来限定进程能够使用的虚拟内存量, 具体细节, 请参见联机手册 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=limits&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">limits</span>(1)</span></a>。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mdconfig&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mdconfig</span>(8)</span></a> 工具能够将设备列表以 XML 格式输出了。 目前 <tt class="COMMAND">list</tt> 和 <tt class="COMMAND">query</tt> 子命令支持这个功能。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mdconfig&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mdconfig</span>(8)</span></a> 工具的 <code class="OPTION">-u</code> 选项, 支持指定以逗号分割的多个设备了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mdmfs&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mdmfs</span>(8)</span></a> 工具新增了用于在以 vnode 作为后端存储的虚拟盘上, 跳过 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=newfs&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">newfs</span>(8)</span></a> 执行步骤的 <code class="OPTION">-P</code> 参数。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mdmfs&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mdmfs</span>(8)</span></a> 工具新增了 <code class="OPTION">-E</code> 参数, 用于指定默认位置 (<tt class="FILENAME">/sbin/mdconfig</tt>) 以外的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mdconfig&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mdconfig</span>(8)</span></a> 工具的位置。</p> <p>  在 <tt class="FILENAME">libc</tt> 中新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=memmem&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">memmem</span>(3)</span></a> 函数。 这与 <tt class="FILENAME">glibc</tt> 中的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=strstr&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">strstr</span>(3)</span></a> 函数是二进制兼容的。</p> <p>  删去了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mount&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mount</span>(8)</span></a> 的 <tt class="LITERAL">dev</tt> 和 <tt class="LITERAL">nodev</tt> 选项。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mount&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mount</span>(8)</span></a> 工具新增了对 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mqueuefs&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mqueuefs</span>(5)</span></a> 的支持。</p> <p>  修正了导致 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mount&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mount</span>(8)</span></a> 工具无法通过 <tt class="COMMAND">mount -u -o rw</tt>, 将读写挂接升级为只读挂接的问题。</p> <p>  删去了一系列文件系统专用的 <tt class="COMMAND">mount_<tt class="REPLACEABLE"><i>*</i></tt></tt> 工具, 因为现在 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mount&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mount</span>(8)</span></a> 命令提供了更为通用的 <code class="OPTION">-t</code> 选项。 具体说来, 下列命令已经删除掉了: <tt class="COMMAND">mount_devfs</tt>、 <tt class="COMMAND">mount_ext2fs</tt>、 <tt class="COMMAND">mount_fdescfs</tt>、 <tt class="COMMAND">mount_linprocfs</tt>、 <tt class="COMMAND">mount_procfs</tt>、 <tt class="COMMAND">mount_std</tt>、 <tt class="COMMAND">mount_linsysfs</tt>、 <tt class="COMMAND">mount_reiserfs</tt>, 以及 <tt class="COMMAND">mount_umapfs</tt>。</p> <p>  从 FreeBSD 基本系统中删去了 mrouted(8) 多播路由服务。 这个服务实现了 DVMRP 多播路由协议, 然而在许多多播系统中, 这种协议已经被 PIM 取代。 与此相关的 map-mbone(8) 和 mrinfo(8) 工具也已经被删除。 这些程序现在可以通过 FreeBSD Ports 套件中的 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/net/mrouted/pkg-descr"><tt class="FILENAME">net/mrouted</tt></a> 来安装。</p> <p>  为 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=netstat&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">netstat</span>(1)</span></a> 增加了显示 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sctp&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sctp</span>(4)</span></a> 协议统计数据的能力。</p> <p>  <tt class="FILENAME">/etc/nsswitch.conf</tt> 文件现在改为静态地安装, 而不是在每次系统启动时自动生成了。</p> <p>  删去了 objformat(1) 工具和 getobjformat(3) 函数库 (对于 a.out 可执行文件格式支持的最后残存物)。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pam_nologin&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pam_nologin</span>(8)</span></a> 模块不再提供验证 (authentication) 功能; 与此同时, 它转而提供帐户管理 (account management) 功能。 位于 <tt class="FILENAME">/usr/local/etc/pam.d</tt> 的第三方文件, 可能需要手工编辑以适应这一变动; 具体而言, 这些文件中形如下面这行的配置:</p> <pre class="SCREEN"> auth required pam_nologin.so no_warn </pre> <br /> <br /> <p>  这些配置中的 <tt class="LITERAL">auth</tt> 关键字, 应改为 <tt class="LITERAL">account</tt>。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=nscd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">nscd</span>(8)</span></a>。 这是一个能够缓存 nsswitch 查询 (例如口令、 组, 以及服务数据库) 的服务, 它能够改善系统性能。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pkill&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pkill</span>(1)</span></a> 工具新增了用于将搜索范围限定于指定 pidfile 文件中所记录的 PID 进程中的 <code class="OPTION">-F</code> 选项。 当配合另一个新增选项 <code class="OPTION">-L</code> 使用时, pidfile 还必须首先由 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=flock&sektion=2&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">flock</span>(2)</span></a> 系统调用锁定, 或由 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pidfile&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pidfile</span>(3)</span></a> 创建。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pkill&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pkill</span>(1)</span></a> 工具新增了 <code class="OPTION">-I</code> 选项, 其工作方式类似于 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rm&sektion=1&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">rm</span>(1)</span></a> 的 <code class="OPTION">-i</code> 参数。 当指定了这个选项时, <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pkill&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pkill</span>(1)</span></a> 在发出信号前, 会对每个进程要求用户确认。</p> <p>  对 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pmcstat&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pmcstat</span>(8)</span></a> 程序进行了一系列改进: 现在它可以通过网络 socket 在远程主机上进行日志记录了。 <code class="OPTION">-c</code> 能够接受以逗号分隔的用于配置 PMA 分配的 CPU 列表。 <code class="OPTION">-t</code> 选项进行了增强, 能够支持以命令名的正则表达式来选择进程。 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pmcstat&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pmcstat</span>(8)</span></a> 默认在全部 CPU 上分配系统 PMC, 而不是只限于 CPU 0。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=powerd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">powerd</span>(8)</span></a> 新增了用以指定 pidfile 的 <code class="OPTION">-P</code> 选项。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pw&sektion=8&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">pw</span>(8)</span></a> 程序支持使用 <code class="OPTION">-M</code> 选项来自动设置新创建的主目录权限了。 [已合并]</p> <p>  在 FreeBSD 的 <b class="APPLICATION">libc</b> 中的 DNS 解析库更新到了 BIND 9.4.1 中的版本。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rpcbind&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">rpcbind</span>(8)</span></a> 程序现在能够通过使用 <code class="OPTION">-h</code> 参数来指定 INADDR_ANY 以外的 IP 地址上的 TCP 监听了。 新增的 <code class="OPTION">-6</code> 标志则可以指定只绑定到 IPv6 地址。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rpcgen&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">rpcgen</span>(1)</span></a> 工具现在默认生成符合 ANSI C 编译器标准的头文件和 stub 文件了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rpc.lockd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">rpc.lockd</span>(8)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rpc.statd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">rpc.statd</span>(8)</span></a> 程序新增了用于指定绑定端口的 <code class="OPTION">-p</code> 选项。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rtld&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">rtld</span>(1)</span></a> 运行环境连接器提供了对于 GNU 语义的 ELF 符号版本支持。 这个实现的主要目标是与 GNU libc 实现, 并在 <a href="http://people.redhat.com/~drepper/symbol-versioning" target="_top">http://people.redhat.com/~drepper/symbol-versioning</a> 和 LSB 3.0 文档中介绍的功能兼容。 同时, 新增的 <code class="FUNCTION">dlvsym()</code> 提供了查找某个符号特定版本的功能。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sa&sektion=8&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">sa</span>(8)</span></a> 工具新增了 <code class="OPTION">-U</code> 和 <code class="OPTION">-P</code> 参数。 它们分别可以用来指定用户和进程统计文件的位置。</p> <p>  新增了用于编辑磁盘分区和 label 的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sade&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sade</span>(8)</span></a> 工具。 这个工具基于 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sysinstall&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sysinstall</span>(8)</span></a> 中的部分代码。</p> <p>  修正了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sed&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sed</span>(1)</span></a> 工具无法计算某些模式空间长度的问题。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sed&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sed</span>(1)</span></a> 工具新增了对于大小写不敏感模式匹配的支持; 这一功能可以通过在正则表达式分割符后面指定参数 <tt class="LITERAL">I</tt> 来启用。</p> <p>  对 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=setenv&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">setenv</span>(3)</span></a> 系列库函数调用的行为进行了修改, 由之前的 BSD API 行为改为 POSIX 强制的行为。 其结果是, 更新了许多依赖于旧 API 的基本系统工具来支持这一变动。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=setfacl&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">setfacl</span>(1)</span></a> 的 <code class="OPTION">-h</code> 参数能够正确地在符号连接, 而不是其所指对象上设置 ACL 了。</p> <p>  为显示连接和监听网络 socket 的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sockstat&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sockstat</span>(1)</span></a> 工具新增了命令行选项 <code class="OPTION">-P</code>, 用以按照协议名称 (在 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=protocols&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">protocols</span>(5)</span></a> 中列出) 过滤输出结果。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sysctl&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sysctl</span>(8)</span></a> 新增了 <code class="OPTION">-q</code> 参数来制止一部分警告和错误信息的产生。</p> <p>  由于年久失修, 删去了 FreeBSD 基本系统中提供的 tcpslice 版本。 它的最新版本可以通过 Ports 套件中的 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/net/tcpslice/pkg-descr"><tt class="FILENAME">net/tcpslice</tt></a> 来安装。</p> <p>  收到 <tt class="LITERAL">SIGINFO</tt> 信号时, <a href="http://www.FreeBSD.org/cgi/man.cgi?query=time&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">time</span>(1)</span></a> 工具会显示指定的进程运行消耗的时间了。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=top&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">top</span>(1)</span></a> 程序新增了 <code class="OPTION">-a</code> 选项来指定显示进程参数向量中指定的标题; 这个功能对于监控使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=setproctitle&sektion=3&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">setproctitle</span>(3)</span></a> 修改自身进程标题的进程而言会很有用。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=top&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">top</span>(1)</span></a> 新增了用于指定 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=jail&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">jail</span>(8)</span></a> ID 的 <code class="OPTION">-j</code> 选项来显示其中的进程。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=touch&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">touch</span>(1)</span></a> 工具新增了 <code class="OPTION">-A</code> 标志来将文件的访问和修改时间修改为指定的值。 [已合并]</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=truss&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">truss</span>(1)</span></a> 工具新增了 <code class="OPTION">-s</code> 选项以提供与 strace (<a href="http://www.FreeBSD.org/cgi/url.cgi?ports/devel/strace/pkg-descr"><tt class="FILENAME">devel/strace</tt></a>) 同样的功能。</p> <p>  <a href="http://www.FreeBSD.org/cgi/man.cgi?query=truss&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">truss</span>(1)</span></a> 不再依赖于 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=procfs&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">procfs</span>(5)</span></a> 文件系统工作了; 它现在使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ptrace&sektion=2&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ptrace</span>(2)</span></a> 接口来控制被跟踪的进程。</p> <p>  [powerpc] <a href="http://www.FreeBSD.org/cgi/man.cgi?query=truss&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">truss</span>(1)</span></a> 工具支持 FreeBSD/powerpc 了。</p> <p>  删去了 usbd(8) 工具。 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=devd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">devd</span>(8)</span></a> 工具及其配置文件现在已经能够完全支持其功能了。</p> <p>  将 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=uuidgen&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">uuidgen</span>(1)</span></a> 工具从 <tt class="FILENAME">/usr/bin</tt> 挪到了 <tt class="FILENAME">/bin</tt>。</p> <p>  删去了已经被 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mdconfig&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mdconfig</span>(8)</span></a> 替代多时的 vnconfig(8) 工具。</p> <p>  删去了 wicontrol(8) 工具。 对于 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wi&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">wi</span>(4)</span></a> 网络接口的配置应通过 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ifconfig&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ifconfig</span>(8)</span></a> 来进行。</p> <p>  由于一些可能发生的 ABI 变动, 调整了所有动态连接库的版本。 这些库包括: snmp_<tt class="REPLACEABLE"><i>*</i></tt>, libdialog, libg2c, libobjc, libreadline, libregex, libstdc++, libkrb5, libalias, libarchive, libbegemot, libbluetooth, libbsnmp, libbz2, libc_r, libcrypt, libdevstat, libedit, libexpat, libfetch, libftpio, libgpib, libipsec, libkiconv, libmagic, libmp, libncp, libncurses, libnetgraph, libngatm, libopie, libpam, libpthread, libradius, libsdp, libsmb, libtacplus, libthr, libthread_db, libugidfw, libusbhid, libutil, libvgl, libwrap, libypclnt, libm, libcrypto, libssh, 以及 libssl。</p> <p>  新实现了 <code class="FUNCTION">wcsdup()</code> 函数, 这个函数在 Microsoft 和 GNU 系统中十分流行。</p> <p>  将 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wlandebug&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">wlandebug</span>(8)</span></a> 工具加入到了 FreeBSD 的主源码树 (之前它在 tools 目录中)。 它提供了一系列针对 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wlan&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">wlan</span>(4)</span></a> 模块及相关驱动的控制功能, 在调试无线网络问题时会很有用。</p> <p>  新增了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=wpa_passphrase&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">wpa_passphrase</span>(8)</span></a> 工具。 它能够从 ASCII 口令生成 256-位 的预分发 WPA 密钥。 [已合并]</p> <div class="SECT3"> <hr /> <h4 class="SECT3"><a id="RC-SCRIPTS" name="RC-SCRIPTS">2.3.1 <tt class="FILENAME">/etc/rc.d</tt> 脚本</a></h4> <p>  新增了用于启动独立的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ftpd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ftpd</span>(8)</span></a> 的 <tt class="FILENAME">ftpd</tt> 脚本。</p> <p>  由于新增了功能更强的 <tt class="FILENAME">encswap</tt> 脚本, <tt class="FILENAME">gbde_swap</tt> 被淘汰了, 前者也提供了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=geli&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">geli</span>(8)</span></a> 加密交换分区的支持。</p> <p>  新增了用于在引导时配置 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=geli&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">geli</span>(8)</span></a> 设备的 <tt class="FILENAME">geli</tt> 和 <tt class="FILENAME">geli2</tt> 脚本。</p> <p>  由于基本系统中已经不再提供 IPsec IKE 服务, 删去了与之对应的 <tt class="FILENAME">ike</tt> 脚本。</p> <p>  新增了用以处理 vnode 后端的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=md&sektion=4&manpath=FreeBSD+7.0-RELEASE"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">md</span>(4)</span></a> 设备的 <tt class="FILENAME">mdconfig</tt> 脚本。 这个脚本的主要目的是替代先前的 <tt class="FILENAME">ramdisk</tt> 脚本, 因此先前的 <code class="VARNAME">ramdisk_*</code> 变量均改名为 <code class="VARNAME">mdconfig_*</code>。 此外, 新增了两个 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=rc.conf&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">rc.conf</span>(5)</span></a> 变量 <code class="VARNAME">mdconfig_<tt class="REPLACEABLE"><i>*</i></tt>_files</code> 和 <code class="VARNAME">mdconfig_<tt class="REPLACEABLE"><i>*</i></tt>_cmd</code>。 例如:</p> <pre class="PROGRAMLISTING"> mdconfig_md0="-t malloc -s 10m" mdconfig_md1="-t vnode -f /var/foo.img" </pre> <p>  删去了位于 <tt class="FILENAME">/etc/rc.d</tt> 中的 <tt class="FILENAME">rcconf.sh</tt> 脚本, 并增加了用以标记引导过程中的早期和晚期分界点的变量 <code class="VARNAME">early_late_divider</code>。</p> <p>  <tt class="FILENAME">rc.initdiskless</tt> 脚本使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=tar&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">tar</span>(1)</span></a> 代替了 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pax&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pax</span>(1)</span></a>, 因为 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pax&sektion=1&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pax</span>(1)</span></a> 需要可写的临时目录, 而在这个脚本执行时, 可能并没有这样的目录。</p> <p>  由于 OLDCARD 已被宣告过时, 因此 <tt class="FILENAME">pccard</tt> 脚本也被宣告过时了。</p> <p>  <tt class="FILENAME">sendmail</tt> 脚本在别名 (aliases) 数据库不存在或比别名文件旧时, 不再自动对其进行重建了。 [已合并] 如果有需要, 可以在 rc.conf 中将新增的 <code class="VARNAME">sendmail_rebuild_aliases</code> 变量设置为 "YES" 来恢复这一功能。</p> <p>  删去了 <code class="VARNAME">removable_interfaces</code> 变量。</p> <p>  为 <code class="VARNAME">ifconfig_<tt class="REPLACEABLE"><i>ifn</i></tt></code> 新增了关键字 <tt class="LITERAL">NOAUTO</tt>。 这会阻止网络接口在系统引导过程中或通过 <tt class="FILENAME">/etc/pccard_ether</tt> 启用, 但允许使用 <tt class="FILENAME">/etc/rc.d/netif</tt> 来以纯手工的方式启用和停用接口。</p> <p>  <tt class="FILENAME">/etc/rc.d/nfslocking</tt> 脚本已被宣告过时, 并将在未来的版本中删去。 其功能已经由 <tt class="FILENAME">/etc/rc.d/lockd</tt> 和 <tt class="FILENAME">/etc/rc.d/statd</tt> 脚本取代。 [已合并]</p> </div> </div> <div class="SECT2"> <hr /> <h3 class="SECT2"><a id="CONTRIB" name="CONTRIB">2.4 基本系统中的第三方软件</a></h3> <p>  <b class="APPLICATION">Intel ACPI-CA</b> 升级到了 20070320。</p> <p>  <b class="APPLICATION">awk</b> 由 2005 年 4 月 24 日版升级到了 2007 年 5 月 1 日版。 [已合并]</p> <p>  <b class="APPLICATION">BIND</b> 由 9.3.3 升级到了 9.4.2。</p> <p>  <b class="APPLICATION">BSNMPD</b> 由 1.11 升级到了 1.12。</p> <p>  <b class="APPLICATION">BZIP2</b> 由 1.0.3 升级到了 1.0.4。 [已合并]</p> <p>  GNU <b class="APPLICATION">Diffutils</b> 由 2.7 升级到了 2.8.7。 [已合并]</p> <p>  <b class="APPLICATION">DRM</b> 更新到了 DRI CVS 20060517 的快照。 [已合并]</p> <p>  引导加载器使用的 Forth Inspired Command Language (<b class="APPLICATION">FICL</b>) 升级到了 3.03。</p> <p>  <b class="APPLICATION">FILE</b> 由 4.12 升级到了 4.23。</p> <p>  <b class="APPLICATION">GCC</b> 由 3.4.6 升级到了 4.2.1。</p> <p>  <b class="APPLICATION">GNU Readline library</b> 由 5.0 升级到了 5.2 patch 2。 [已合并]</p> <p>  GNU 版本的 <b class="APPLICATION">gzip</b> 被替换成了一个经过修改的来自 NetBSD 的 gzip。 [已合并]</p> <p>  <b class="APPLICATION">IPFilter</b> 由 4.1.13 升级到了 4.1.28 版。 [已合并]</p> <p>  <b class="APPLICATION">less</b> 由 v394 升级到了 v416 版。 [已合并]</p> <p>  <b class="APPLICATION">libpcap</b> 由 0.9.4 升级到了 0.9.8 版。</p> <p>  <b class="APPLICATION">netcat</b> 由 OpenBSD 3.9 升级到了 OpenBSD 4.1 中的版本。 [已合并]</p> <p>  <b class="APPLICATION">OpenSSL</b> 由 0.9.7e 更新到了 0.9.8e。</p> <p>  <b class="APPLICATION">ncurses</b> 由 5.2-20020615 更新到了 5.6-20061217 版。 ncurses 新增了宽字符支持。 [已合并]</p> <p>  <b class="APPLICATION">hostapd</b> 由 0.3.9 版更新到了 0.5.8 版。</p> <p>  <b class="APPLICATION">PF</b> 由 OpenBSD 的 3.7 版更新到了 OpenBSD 4.1 版。 这一更新包含了一系列功能方面的增强。 两个比较显著的变动是, 在 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pf.conf&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">pf.conf</span>(5)</span></a> 中, <tt class="LITERAL">keep state</tt> 以及 <tt class="LITERAL">flags S/SA</tt> 是 TCP 规则默认的行为了。 如有需求, 则需要使用对应的选项 <tt class="LITERAL">no state</tt> 和 <tt class="LITERAL">flags any</tt> 来分别禁用带状态过滤和 TCP 标志检查。</p> <p>  <b class="APPLICATION">sendmail</b> 由 8.13.8 更新到了 8.14.2 版。 [已合并]</p> <p>  <b class="APPLICATION">tcpdump</b> 由 3.9.4 更新到了 3.9.8 版。</p> <p>  时区数据库从 <b class="APPLICATION">tzdata2006g</b> 版升级到了 <b class="APPLICATION">tzdata2007k</b> 版。 [已合并]</p> <p>  <b class="APPLICATION">tip</b> 更新到了来自 OpenBSD 与 20060831 的快照版本。</p> <p>  TrustedBSD <b class="APPLICATION">OpenBSM</b>, 由 1.0 alpha 12 更新到了 1.0 版。</p> <p>  <b class="APPLICATION">WPA Supplicant</b> 由 0.3.9 版更新到了 0.5.8 版。</p> </div> <div class="SECT2"> <hr /> <h3 class="SECT2"><a id="PORTS" name="PORTS">2.5 Ports/Packages 套件基础结构</a></h3> <p>  </p> </div> <div class="SECT2"> <hr /> <h3 class="SECT2"><a id="RELENG" name="RELENG">2.6 发布工程与系统集成</a></h3> <p>  对现有的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sysinstall&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sysinstall</span>(8)</span></a> 工具的分区算法进行了修改。</p> <ul> <li> <p>在磁盘容量超过 (3 * RAM尺寸 + 10GB) 时, 默认的分区尺寸为:</p> <div class="INFORMALTABLE"><a id="AEN1542" name="AEN1542"></a> <table border="0" frame="void" class="CALSTABLE"> <col width="1*" /> <col width="2*" /> <thead> <tr> <th>分区</th> <th>尺寸</th> </tr> </thead> <tbody> <tr> <td>交换区</td> <td>RAM尺寸 * 2</td> </tr> <tr> <td><tt class="FILENAME">/</tt></td> <td>512 MB</td> </tr> <tr> <td><tt class="FILENAME">/tmp</tt></td> <td>512 MB</td> </tr> <tr> <td><tt class="FILENAME">/var</tt></td> <td>1024 MB + RAM尺寸</td> </tr> <tr> <td><tt class="FILENAME">/usr</tt></td> <td>余下的部分 (8GB 或更多)</td> </tr> </tbody> </table> </div> </li> <li> <p>在磁盘尺寸大于 (RAM尺寸 / 8 + 2 GB) 时, 默认的尺寸为下面的范围, 而空间则按比例分配:</p> <div class="INFORMALTABLE"><a id="AEN1572" name="AEN1572"></a> <table border="0" frame="void" class="CALSTABLE"> <col width="1*" /> <col width="2*" /> <thead> <tr> <th>分区</th> <th>尺寸</th> </tr> </thead> <tbody> <tr> <td>交换区</td> <td>从 RAM尺寸 / 8 到 RAM尺寸 * 2</td> </tr> <tr> <td><tt class="FILENAME">/</tt></td> <td>从 256MB 到 512MB</td> </tr> <tr> <td><tt class="FILENAME">/tmp</tt></td> <td>从 128MB 到 512MB</td> </tr> <tr> <td><tt class="FILENAME">/var</tt></td> <td>从 128MB 到 1024MB</td> </tr> <tr> <td><tt class="FILENAME">/usr</tt></td> <td>从 1536MB 到 8192MB</td> </tr> </tbody> </table> </div> </li> <li> <p>如果系统中的磁盘空间更少, 则采用先前的分配策略。</p> </li> </ul> <p>  在 <tt class="FILENAME">src/Makefile</tt> 中新增了 <tt class="LITERAL">showconfig</tt> target, 其作用是显示用于联编 FreeBSD 源代码树的配置。</p> <p>  新增了用于指定每次构建 FreeBSD 源代码树时构建参数的 <tt class="FILENAME">src.conf</tt> 文件。 要了解进一步的详情, 请参见 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=build&sektion=7&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">build</span>(7)</span></a> 和 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=src.conf&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">src.conf</span>(5)</span></a>。</p> <p>  支持的 <b class="APPLICATION">GNOME</b> 桌面环境 (<a href="http://www.FreeBSD.org/cgi/url.cgi?ports/x11/gnome2/pkg-descr"><tt class="FILENAME">x11/gnome2</tt></a>) 的版本, 从 2.16.1 升级到了 2.20.1。 [已合并]</p> <p>  支持的 <b class="APPLICATION">KDE</b> 桌面环境 (<a href="http://www.FreeBSD.org/cgi/url.cgi?ports/x11/kde3/pkg-descr"><tt class="FILENAME">x11/kde3</tt></a>) 的版本, 从 3.5.4 升级到了 3.5.7。 [已合并]</p> <p>  支持的 <b class="APPLICATION">Xorg</b> 视窗系统 (<a href="http://www.FreeBSD.org/cgi/url.cgi?ports/x11/xorg/pkg-descr"><tt class="FILENAME">x11/xorg</tt></a>) 的版本, 从 6.9.2 升级到了 7.3.0。 [已合并]</p> <p>  默认的 <code class="VARNAME">X11BASE</code> 变量设置, 已由 <tt class="FILENAME">/usr/X11R6</tt> 改为 <tt class="FILENAME">/usr/local</tt>, 即与 <code class="VARNAME">LOCALBASE</code> 的默认值相同。 [已合并]</p> <p>  这一版本的 FreeBSD 开始采用 700MB CDROM 介质的 ISO 映像文件。 多数较早的 FreeBSD 版本采用的是 650MB 的 CDROM 介质。 [已合并]</p> </div> <div class="SECT2"> <hr /> <h3 class="SECT2"><a id="DOC" name="DOC">2.7 文档</a></h3> <p>  通过新增下列联机手册, 加强了对现有功能的文档化描述: <a href="http://www.FreeBSD.org/cgi/man.cgi?query=acpi_sony&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">acpi_sony</span>(4)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=device_get_sysctl&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">device_get_sysctl</span>(9)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ext2fs&sektion=5&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">ext2fs</span>(5)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=mca&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">mca</span>(8)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=nanobsd&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">nanobsd</span>(8)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_mss&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_mss</span>(4)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=snd_t4dwave&sektion=4&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">snd_t4dwave</span>(4)</span></a>、 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sysctl&sektion=9&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sysctl</span>(9)</span></a>。</p> <p>  在 <tt class="FILENAME">src/sys/doc/subsys</tt> 中增加了通过利用 <a href="http://www.FreeBSD.org/cgi/url.cgi?ports/devel/doxygen/pkg-descr"><tt class="FILENAME">devel/doxygen</tt></a> 来生成内核子系统 API 文档的初步支持。 如果要生成 API 文档, 只需在 <tt class="FILENAME">src/</tt> 目录中执行 <tt class="COMMAND">make doxygen</tt> 即可。</p> </div> </div> <div class="SECT1"> <hr /> <h2 class="SECT1"><a id="UPGRADE" name="UPGRADE">3 从先前版本的 FreeBSD 升级</a></h2> <p>  [i386、 amd64] 从 FreeBSD 6.2-RELEASE 开始, 系统已经能够通过使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=freebsd-update&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">freebsd-update</span>(8)</span></a> 来实现 RELEASE 版本之间 (以及不同安全分支的快照版本) 的二进制升级。 二进制升级过程将更新未经修改的 userland 工具, 以及随官方 FreeBSD 发行版发布的、 未作修改的 GENERIC 或 SMP 内核。 使用 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=freebsd-update&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">freebsd-update</span>(8)</span></a> 工具的主机, 需要有可用的 Internet 连接。</p> <p>  旧式的二进制升级, 则是通过随 CDROM 发行介质提供的 <a href="http://www.FreeBSD.org/cgi/man.cgi?query=sysinstall&sektion=8&manpath=FreeBSD+7.0-RELEASE"> <span class="CITEREFENTRY"><span class="REFENTRYTITLE">sysinstall</span>(8)</span></a> 的 <tt class="COMMAND">Upgrade</tt> 选项来完成的。 这种二进制升级方式, 对于 非-i386、 非-amd64 的, 以及没有接入 Internet 的系统而言会比较有用。</p> <p>  此外, 也可以使用源代码从较早版本升级的方式 (通过从源代码重新编译 FreeBSD 的基本系统), 其操作方法请参见 <tt class="FILENAME">/usr/src/UPDATING</tt>。</p> <div class="IMPORTANT"> <blockquote class="IMPORTANT"> <p><b>重要:</b> 很显然,升级 FreeBSD 时,应该首先备份 <span class="emphasis"><b class="EMPHASIS">全部</b></span> 数据和配置文件。</p> </blockquote> </div> </div> </div> <hr /> <p align="center"><small>这份文档,以及其他与FreeBSD发行版本有关的文档,都可以在 <a href="http://www.FreeBSD.org/snapshots/">http://www.FreeBSD.org/snapshots/</a>下载。</small></p> <p align="center"><small>在遇到关于FreeBSD的技术问题时,请首先阅读 <a href="http://www.FreeBSD.org/docs.html">文档</a> 之后再考虑联系 &#60;<a href="mailto:[email protected]">[email protected]</a>&#62;。</small></p> <p align="center"><small>所有 FreeBSD 7-STABLE 的用户都应该订阅 &#60;<a href="mailto:[email protected]">[email protected]</a>&#62; 邮件列表。</small></p> <p align="center"><small>关于这份文档的任何问题,请致信 &#60;<a href="mailto:[email protected]">[email protected]</a>&#62;。</small></p> </body> </html>
{ "pile_set_name": "Github" }
/* * Copyright 2013-2018 consulo.io * * 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 consulo.unity3d.projectImport.change; import java.util.function.Consumer; import com.intellij.lang.javascript.JavaScriptFileType; import com.intellij.openapi.fileTypes.FileType; import consulo.csharp.lang.CSharpFileType; import consulo.dotnet.dll.DotNetModuleFileType; /** * @author VISTALL * @since 2018-01-12 */ public class DefaultUnity3dProjectSourceFileTypeFactory implements Unity3dProjectSourceFileTypeFactory { @Override public void registerFileTypes(Consumer<FileType> consumer) { consumer.accept(DotNetModuleFileType.INSTANCE); consumer.accept(CSharpFileType.INSTANCE); consumer.accept(JavaScriptFileType.INSTANCE); } }
{ "pile_set_name": "Github" }
[ { "EventCode": "0xC2", "EventName": "PREFETCH_LINEFILL", "BriefDescription": "Linefill because of prefetch" }, { "EventCode": "0xC3", "EventName": "PREFETCH_LINEFILL_DROP", "BriefDescription": "Instruction Cache Throttle occurred" }, { "EventCode": "0xC4", "EventName": "READ_ALLOC_ENTER", "BriefDescription": "Entering read allocate mode" }, { "EventCode": "0xC5", "EventName": "READ_ALLOC", "BriefDescription": "Read allocate mode" }, { "EventCode": "0xC8", "EventName": "EXT_SNOOP", "BriefDescription": "SCU Snooped data from another CPU for this CPU" } ]
{ "pile_set_name": "Github" }
/*- * #%L * This file is part of QuPath. * %% * Copyright (C) 2018 - 2020 QuPath developers, The University of Edinburgh * %% * QuPath 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. * * QuPath 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 QuPath. If not, see <https://www.gnu.org/licenses/>. * #L% */ package qupath.process.gui.ml; import java.awt.image.BufferedImage; import java.util.Collection; import java.util.TreeSet; import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javafx.beans.binding.Bindings; import javafx.beans.binding.ObjectExpression; import javafx.scene.control.TextField; import qupath.lib.common.GeneralTools; import qupath.lib.projects.Project; /** * Class to help with formatting text fields for entering pixel and object classifier names. * * @author Pete Bankhead */ public class ProjectClassifierBindings { private final static Logger logger = LoggerFactory.getLogger(ProjectClassifierBindings.class); /** * Set styling for a text field to use pixel classifier names for the current project. * @param textField * @param project */ public static void bindPixelClassifierNameInput(TextField textField, ObjectExpression<Project<BufferedImage>> project) { var existingNames = new TreeSet<String>(); updatePixelClassifierNames(project.get(), existingNames); // Could use autocomplete, but it can be quite annoying whenever tabs interfere by setting the name // TextFields.bindAutoCompletion(textField, v -> existingNames); bindStyle(textField, existingNames); textField.focusedProperty().addListener((v, o, n) -> { updatePixelClassifierNames(project.get(), existingNames); }); } private static void updatePixelClassifierNames(Project<?> project, Collection<String> names) { if (project == null) { names.clear(); return; } try { var currentNames = project.getPixelClassifiers().getNames(); names.clear(); names.addAll(currentNames.stream().map(n -> n.toLowerCase()).collect(Collectors.toList())); } catch (Exception e) { logger.debug("Error updating pixel classifier names: {}", e.getLocalizedMessage()); names.clear(); } } private static void bindStyle(TextField tf, Collection<String> existingNames) { tf.styleProperty().bind(Bindings.createStringBinding( () -> getStyle(tf.getText(), existingNames), tf.textProperty(), tf.focusedProperty())); } private static String getStyle(String name, Collection<String> existingNames) { if (name == null) return null; name = GeneralTools.stripInvalidFilenameChars(name); if (existingNames.contains(name.toLowerCase())) return "-fx-font-style: italic;"; else return null; } /** * Set styling for a text field to use object classifier names for the current project. * @param textField * @param project */ public static void bindObjectClassifierNameInput(TextField textField, ObjectExpression<Project<BufferedImage>> project) { var existingNames = new TreeSet<String>(); updateObjectClassifierNames(project.get(), existingNames); // TextFields.bindAutoCompletion(textField, v -> existingNames); bindStyle(textField, existingNames); textField.focusedProperty().addListener((v, o, n) -> { updateObjectClassifierNames(project.get(), existingNames); }); } private static void updateObjectClassifierNames(Project<?> project, Collection<String> names) { if (project == null) { names.clear(); return; } try { var currentNames = project.getObjectClassifiers().getNames(); names.clear(); names.addAll(currentNames.stream().map(n -> n.toLowerCase()).collect(Collectors.toList())); } catch (Exception e) { logger.debug("Error updating object classifier names: {}", e.getLocalizedMessage()); names.clear(); } } }
{ "pile_set_name": "Github" }
[Desktop Entry] Icon=preferences-system-windows-movement Type=Service X-KDE-ServiceTypes=KCModule Exec=kcmshell5 kwinmoving X-DocPath=kcontrol/windowbehaviour/index.html#action-moving Icon=preferences-system-windows-move X-KDE-Library=kcm_kwinoptions X-KDE-PluginKeyword=kwinmoving Name=Window Movement Name[az]=Pəncərə yerdəyişdirilməsi Name[ca]=Moviment de les finestres Name[cs]=Pohyb oken Name[da]=Flytning af vinduer Name[en_GB]=Window Movement Name[es]=Movimiento de las ventanas Name[et]=Akna liigutamine Name[eu]=Leihoaren mugimendua Name[fi]=Ikkunoiden siirtäminen Name[fr]=Déplacement des fenêtres Name[gl]=Movemento das xanelas Name[ia]=Movimento de fenestra Name[id]=Pemindahan Window Name[it]=Spostamento delle finestre Name[ko]=창 이동 Name[lt]=Langų perkėlimas Name[nl]=Verplaatsen van vensters Name[nn]=Vidaugs­flytting Name[pl]=Przesuwanie okien Name[pt]=Movimentação das Janelas Name[pt_BR]=Movimento da janela Name[ru]=Перемещение окон Name[sk]=Presuny okien Name[sl]=Premikanje oken Name[sv]=Fönsterförflyttning Name[uk]=Пересування вікон Name[x-test]=xxWindow Movementxx Name[zh_CN]=窗口移动 Name[zh_TW]=視窗移動 Comment=Configure window movement options Comment[az]=Pəncərə yerdəyişdirilməsinin tənzimlənməsi Comment[ca]=Configura les opcions de moviment de les finestres Comment[cs]=Nastavit volby pohybu oken Comment[da]=Indstil flytning af vinduer Comment[en_GB]=Configure window movement options Comment[es]=Configurar las opciones del movimiento de las ventanas Comment[et]=Akende liigutamise seadistamine Comment[eu]=Konfiguratu leiho mugimenduaren aukerak Comment[fi]=Ikkunoiden siirtämisen asetukset Comment[fr]=Configurer les options de déplacement des fenêtres Comment[gl]=Configurar o movemento das xanelas Comment[ia]=Configura optiones de movimento de fenestra Comment[id]=Konfigurasikan opsi pemindahan window Comment[it]=Configura opzioni di spostamento delle finestre Comment[ko]=창 이동 옵션 설정 Comment[lt]=Konfigūruoti langų perkėlimo parinktis Comment[nl]=Opties voor vensterverplaatsing configureren Comment[nn]=Set opp vindaugsflytting Comment[pl]=Ustawienia opcji przesuwania okien Comment[pt]=Configurar as opções de movimentação das janelas Comment[pt_BR]=Configure as opções de movimento da janela Comment[ru]=Настройка поведения при перемещении окон Comment[sk]=Nastavenie spôsobu presunu okien Comment[sl]=Nastavi možnosti premikanja okna Comment[sv]=Anpassa alternativ för fönsterförflyttning Comment[uk]=Налаштовування параметрів пересування вікон Comment[x-test]=xxConfigure window movement optionsxx Comment[zh_CN]=配置窗口移动选项 Comment[zh_TW]=設定視窗移動選項 X-KDE-Keywords=moving,smart,cascade,maximize,maximise,snap zone,snap,border X-KDE-Keywords[az]=köçürmə,yerdəyişmə,ağıllı,kaskad,genişləndirmə,qopma zonası,çərçivə X-KDE-Keywords[bs]=pomjeranje,pametno,kaskada,povećali,povećalo,namjestiti zonu,namjestiti,granica X-KDE-Keywords[ca]=moviment,intel·ligent,cascada,maximització,zona d'ajust,ajust,vora X-KDE-Keywords[ca@valencia]=moviment,intel·ligent,cascada,maximització,zona d'ajust,ajust,vora X-KDE-Keywords[da]=flytning,smart,kaskade,maksimer,hægtzone,hægt,kant X-KDE-Keywords[de]=Verschieben,Gestaffelt,Maximieren,Minimieren,Einrastzone,Ränder X-KDE-Keywords[el]=κίνηση,έξυπνη,διαδοχική,μεγιστοποίηση,ελαχιστοποίηση,snap zone,snap,περίγραμμα X-KDE-Keywords[en_GB]=moving,smart,cascade,maximize,maximise,snap zone,snap,border X-KDE-Keywords[es]=movimiento,inteligente,cascada,maximizar,maximizar,zona de instantánea,instantánea,borde X-KDE-Keywords[et]=liigutamine,nutikas,kaskaad,maksimeerimine,haardetsoon,haaramine,piire X-KDE-Keywords[eu]=lekuz aldatzea,adimendun,kaskada,maximizatu,atxikitze-eremu,atxikitu,ertz X-KDE-Keywords[fi]=siirtäminen,älykäs,porrastus,suurentaminen,tarttuminen,kiinnitysalue,tartunta,kiinnitys,kiinnittyminen,reuna X-KDE-Keywords[fr]=déplacement, intelligent, cascade, maximiser, maximise, zone de rupture, rupture, bordure X-KDE-Keywords[gl]=mover,intelixente,solapar,fervenza,maximizar,minimizar,zona de adherencia, adherencia,bordo,beira,bordo X-KDE-Keywords[hu]=mozgatás,intelligens,lépcsőzetes,maximalizálás,maximalizálás,vonzási távolság,szegély X-KDE-Keywords[ia]=movente,intelligente,cascada,maximisa,maximisa,zona de ruptura,ruptura,margine X-KDE-Keywords[id]=pemindahan,cerdas,kaskade,maksimalkan,maksimalkan,zona jepret,jepret,bingkai X-KDE-Keywords[it]=spostamento,intelligente,cascata,massimizza,zona di aggancio,agganciamento,bordo X-KDE-Keywords[kk]=moving,smart,cascade,maximize,maximise,snap zone,snap,border X-KDE-Keywords[km]=moving,smart,cascade,maximize,maximise,snap zone,snap,border X-KDE-Keywords[ko]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,이동,스마트,계단식,최대화,경계선 X-KDE-Keywords[lt]=perkėlimas,perkelti,perkelimas,išmanus,ismanus,mažiausias persidengimas,maziausias persidengimas,mažiausio persidengimo,maziausio persidengimo,pakopomis,kaskada,išskleisti,isskleisti,isdidinti,išdidinti,pritraukimo zona,traukimo zona,pritraukimas,traukimas,rėmelis,remelis,rėmas,remas X-KDE-Keywords[nb]=flytting,smart,kaskade,maksimer,gripesone,gripe,kant X-KDE-Keywords[nds]=Bewegen,klook,överenanner,maximeren,Andockrebeet,andocken,Rahmen,Kant X-KDE-Keywords[nl]=verplaatsen,smart,cascade,maximaliseren,zone vastzetten,vastzetten,grens X-KDE-Keywords[nn]=flytting,smart,kaskade,maksimering,gripesone,gripa,kant X-KDE-Keywords[pl]=przesuwanie,elegancki,kaskada,maksymalizuj,obszar przyciągania,przyciągaj,obramowanie X-KDE-Keywords[pt]=movimento,inteligente,cascata,maximizar,ajuste à zona,ajuste,contorno X-KDE-Keywords[pt_BR]=movimento,movimentação,inteligente,cascata,maximizar,ajuste à área,ajuste,borda X-KDE-Keywords[ru]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,перемещение,каскад,распахнуть,свернуть,захват,привязка,граница X-KDE-Keywords[sk]=presun,smart,kaskáda,maximalizácia,miinmalizácia,oblasť prichytenia,prichytenie,rám X-KDE-Keywords[sl]=premikanje,pametno premikanje,kaskada,povečaj,razpni,območje pripenjanja,pripenjanje,rob,robovi,obroba,obrobe X-KDE-Keywords[sr]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,померање,паметно,наслагано,максимизуј,зона лепљења,лепљење,ивица X-KDE-Keywords[sr@ijekavian]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,померање,паметно,наслагано,максимизуј,зона лепљења,лепљење,ивица X-KDE-Keywords[sr@ijekavianlatin]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,pomeranje,pametno,naslagano,maksimizuj,zona lepljenja,lepljenje,ivica X-KDE-Keywords[sr@latin]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,pomeranje,pametno,naslagano,maksimizuj,zona lepljenja,lepljenje,ivica X-KDE-Keywords[sv]=flytta,smart,kaskad,maximera,låszon,lås,kanter X-KDE-Keywords[tr]=taşıma,akıllı,döşeme,büyütme,en büyük,kopma alanı,kopma,kenarlık X-KDE-Keywords[uk]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,пересування,кмітливе,каскадом,максимізувати,розгорнути,прилипання,зона прилипання,межа X-KDE-Keywords[x-test]=xxmovingxx,xxsmartxx,xxcascadexx,xxmaximizexx,xxmaximisexx,xxsnap zonexx,xxsnapxx,xxborderxx X-KDE-Keywords[zh_CN]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,移动,智能,最大化,级联,吸附区,吸附,边框 X-KDE-Keywords[zh_TW]=moving,smart,cascade,maximize,maximise,snap zone,snap,border
{ "pile_set_name": "Github" }
package railo.runtime.exp; import railo.runtime.config.Config; import railo.runtime.type.Collection; import railo.runtime.type.KeyImpl; /** * * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ public class ExpressionException extends PageExceptionImpl { private static final Collection.Key ERR_NUMBER = KeyImpl.intern("ErrNumber"); /** * Class Constuctor * @param message error message */ public ExpressionException(String message) { super(message,"expression"); } /** * Class Constuctor * @param message error message * @param detail detailed error message */ public ExpressionException(String message, String detail) { super(message,"expression"); setDetail(detail); } @Override public CatchBlock getCatchBlock(Config config) { CatchBlock sct=super.getCatchBlock(config); sct.setEL(ERR_NUMBER,new Double(0)); return sct; } /** * @param e * @return pageException */ public static ExpressionException newInstance(Exception e) { if(e instanceof ExpressionException) return (ExpressionException) e; else if(e instanceof PageException) { PageException pe=(PageException)e; ExpressionException ee = new ExpressionException(pe.getMessage()); ee.detail=pe.getDetail(); ee.setStackTrace(pe.getStackTrace()); return ee; } else { ExpressionException ee = new ExpressionException(e.getMessage()); ee.setStackTrace(e.getStackTrace()); return ee; } } }
{ "pile_set_name": "Github" }
=================== Virtual CPU hotplug =================== A complete example of vCPU hotplug (and hot-unplug) using QMP ``device_add`` and ``device_del``. vCPU hotplug ------------ (1) Launch QEMU as follows (note that the "maxcpus" is mandatory to allow vCPU hotplug):: $ qemu-system-x86_64 -display none -no-user-config -m 2048 \ -nodefaults -monitor stdio -machine pc,accel=kvm,usb=off \ -smp 1,maxcpus=2 -cpu IvyBridge-IBRS \ -qmp unix:/tmp/qmp-sock,server,nowait (2) Run 'qmp-shell' (located in the source tree, under: "scripts/qmp/) to connect to the just-launched QEMU:: $> ./qmp-shell -p -v /tmp/qmp-sock [...] (QEMU) (3) Find out which CPU types could be plugged, and into which sockets:: (QEMU) query-hotpluggable-cpus { "execute": "query-hotpluggable-cpus", "arguments": {} } { "return": [ { "type": "IvyBridge-IBRS-x86_64-cpu", "vcpus-count": 1, "props": { "socket-id": 1, "core-id": 0, "thread-id": 0 } }, { "qom-path": "/machine/unattached/device[0]", "type": "IvyBridge-IBRS-x86_64-cpu", "vcpus-count": 1, "props": { "socket-id": 0, "core-id": 0, "thread-id": 0 } } ] } (QEMU) (4) The ``query-hotpluggable-cpus`` command returns an object for CPUs that are present (containing a "qom-path" member) or which may be hot-plugged (no "qom-path" member). From its output in step (3), we can see that ``IvyBridge-IBRS-x86_64-cpu`` is present in socket 0, while hot-plugging a CPU into socket 1 requires passing the listed properties to QMP ``device_add``:: (QEMU) device_add id=cpu-2 driver=IvyBridge-IBRS-x86_64-cpu socket-id=1 core-id=0 thread-id=0 { "execute": "device_add", "arguments": { "socket-id": 1, "driver": "IvyBridge-IBRS-x86_64-cpu", "id": "cpu-2", "core-id": 0, "thread-id": 0 } } { "return": {} } (QEMU) (5) Optionally, run QMP `query-cpus-fast` for some details about the vCPUs:: (QEMU) query-cpus-fast { "execute": "query-cpus-fast", "arguments": {} } { "return": [ { "qom-path": "/machine/unattached/device[0]", "target": "x86_64", "thread-id": 11534, "cpu-index": 0, "props": { "socket-id": 0, "core-id": 0, "thread-id": 0 }, "arch": "x86" }, { "qom-path": "/machine/peripheral/cpu-2", "target": "x86_64", "thread-id": 12106, "cpu-index": 1, "props": { "socket-id": 1, "core-id": 0, "thread-id": 0 }, "arch": "x86" } ] } (QEMU) vCPU hot-unplug --------------- From the 'qmp-shell', invoke the QMP ``device_del`` command:: (QEMU) device_del id=cpu-2 { "execute": "device_del", "arguments": { "id": "cpu-2" } } { "return": {} } (QEMU) .. note:: vCPU hot-unplug requires guest cooperation; so the ``device_del`` command above does not guarantee vCPU removal -- it's a "request to unplug". At this point, the guest will get a System Control Interrupt (SCI) and calls the ACPI handler for the affected vCPU device. Then the guest kernel will bring the vCPU offline and tell QEMU to unplug it.
{ "pile_set_name": "Github" }
[Year, Make, Model, Description, Price] ======================= 1 [1997, Ford, E350, ac, abs, moon, 3000.00] ----------------------- 2 [1999, Chevy, Venture "Extended Edition", null, 4900.00] ----------------------- 3 [1996, Jeep, Grand Cherokee, MUST SELL! air, moon roof, loaded, 4799.00] ----------------------- 4 [1999, Chevy, Venture "Extended Edition, Very Large", null, 5000.00] ----------------------- 5 [null, null, Venture "Extended Edition", null, 4900.00] -----------------------
{ "pile_set_name": "Github" }
<?php namespace App\Admin; use App\Entity\Article; use Sonata\AdminBundle\Admin\AbstractAdmin; use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Form\FormMapper; use Sonata\CoreBundle\Form\Type\DatePickerType; use Sonata\CoreBundle\Model\Metadata; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\TextType; class ArticleAdmin extends AbstractAdmin { protected $datagridValues = [ '_page' => 1, '_per_page' => 32, '_sort_order' => 'DESC', '_sort_by' => 'publishedAt', ]; /** * @param Article $object * * @return Metadata */ public function getObjectMetadata($object) { return new Metadata($object->getTitle(), $object->getDescription(), $object->getMedia()->getPath()); } public function getTemplate($name) { if ('outer_list_rows_mosaic' === $name) { return 'admin/media/mosaic.html.twig'; } return parent::getTemplate($name); } protected function configureFormFields(FormMapper $formMapper) { $formMapper ->with('Méta-données', ['class' => 'col-md-8']) ->add('title', TextType::class, [ 'label' => 'Titre', 'filter_emojis' => true, ]) ->add('description', TextareaType::class, [ 'label' => 'Description', 'filter_emojis' => true, ]) ->add('twitterDescription', TextareaType::class, [ 'label' => 'Description pour Twitter', 'filter_emojis' => true, 'required' => false, ]) ->add('keywords', null, [ 'label' => 'Mots clés de recherche', 'required' => false, ]) ->add('media', null, [ 'label' => 'Image principale', 'required' => false, ]) ->add('displayMedia', CheckboxType::class, [ 'label' => 'Afficher l\'image principale dans l\'article', 'required' => false, ]) ->add('themes', null, [ 'label' => 'Thèmes', ]) ->end() ->with('Publication', ['class' => 'col-md-4']) ->add('published', CheckboxType::class, [ 'label' => 'Publier l\'article', 'required' => false, ]) ->add('publishedAt', DatePickerType::class, [ 'label' => 'Date de publication', ]) ->add('slug', null, [ 'label' => 'URL de publication', 'help' => 'Ne spécifier que la fin : http://en-marche.fr/articles/[votre-valeur]<br />Doit être unique', ]) ->add('category', null, [ 'label' => 'Catégorie de publication', ]) ->end() ->with('Contenu', ['class' => 'col-md-12']) ->add('content', TextareaType::class, [ 'label' => 'Contenu', 'required' => false, 'filter_emojis' => true, 'attr' => ['class' => 'content-editor', 'rows' => 20], ]) ->end() ; } protected function configureDatagridFilters(DatagridMapper $datagridMapper) { $datagridMapper ->add('title', null, [ 'label' => 'Titre', 'show_filter' => true, ]) ->add('category', null, [ 'label' => 'Catégorie', ]) ; } protected function configureListFields(ListMapper $listMapper) { $listMapper ->addIdentifier('title', null, [ 'label' => 'Nom', ]) ->add('category', null, [ 'label' => 'Catégorie', ]) ->add('published', null, [ 'label' => 'Publié ?', ]) ->add('publishedAt', null, [ 'label' => 'Date de publication', ]) ->add('updatedAt', null, [ 'label' => 'Dernière mise à jour', ]) ->add('_action', null, [ 'virtual_field' => true, 'actions' => [ 'preview' => [ 'template' => 'admin/article/list_preview.html.twig', ], 'edit' => [], 'delete' => [], ], ]) ; } }
{ "pile_set_name": "Github" }
import jwt from flask import Blueprint, jsonify, request from flask import current_app as app from backend.utils.response import Response from backend.utils.errors import ErrorResponse from backend.schemas.errors import ( PayloadNotFound, OperationNotFound ) router = Blueprint('oAuthToken', __name__) @router.route('/oauth_token', methods=['POST']) def oauth_token(): try: data = request.get_json() except Exception: return ErrorResponse(PayloadNotFound().message, 422, {'Content-Type': 'application/json'}).respond() try: token = jwt.encode( {'user': data.get('username')}, app.config.get('SECRET_KEY')) except Exception: return ErrorResponse(OperationNotFound().message, 422, {'Content-Type': 'application/json'}).respond() return jsonify( Response(200).generateToken( token.decode('UTF-8')))
{ "pile_set_name": "Github" }
/* * Copyright(c) 2011-2016 Intel Corporation. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * 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. * * Authors: * Kevin Tian <[email protected]> * * Contributors: * Bing Niu <[email protected]> * Xu Han <[email protected]> * Ping Gao <[email protected]> * Xiaoguang Chen <[email protected]> * Yang Liu <[email protected]> * Tina Zhang <[email protected]> * */ #ifndef _GVT_FB_DECODER_H_ #define _GVT_FB_DECODER_H_ #define _PLANE_CTL_FORMAT_SHIFT 24 #define _PLANE_CTL_TILED_SHIFT 10 #define _PIPE_V_SRCSZ_SHIFT 0 #define _PIPE_V_SRCSZ_MASK (0xfff << _PIPE_V_SRCSZ_SHIFT) #define _PIPE_H_SRCSZ_SHIFT 16 #define _PIPE_H_SRCSZ_MASK (0x1fff << _PIPE_H_SRCSZ_SHIFT) #define _PRI_PLANE_FMT_SHIFT 26 #define _PRI_PLANE_STRIDE_MASK (0x3ff << 6) #define _PRI_PLANE_X_OFF_SHIFT 0 #define _PRI_PLANE_X_OFF_MASK (0x1fff << _PRI_PLANE_X_OFF_SHIFT) #define _PRI_PLANE_Y_OFF_SHIFT 16 #define _PRI_PLANE_Y_OFF_MASK (0xfff << _PRI_PLANE_Y_OFF_SHIFT) #define _CURSOR_MODE 0x3f #define _CURSOR_ALPHA_FORCE_SHIFT 8 #define _CURSOR_ALPHA_FORCE_MASK (0x3 << _CURSOR_ALPHA_FORCE_SHIFT) #define _CURSOR_ALPHA_PLANE_SHIFT 10 #define _CURSOR_ALPHA_PLANE_MASK (0x3 << _CURSOR_ALPHA_PLANE_SHIFT) #define _CURSOR_POS_X_SHIFT 0 #define _CURSOR_POS_X_MASK (0x1fff << _CURSOR_POS_X_SHIFT) #define _CURSOR_SIGN_X_SHIFT 15 #define _CURSOR_SIGN_X_MASK (1 << _CURSOR_SIGN_X_SHIFT) #define _CURSOR_POS_Y_SHIFT 16 #define _CURSOR_POS_Y_MASK (0xfff << _CURSOR_POS_Y_SHIFT) #define _CURSOR_SIGN_Y_SHIFT 31 #define _CURSOR_SIGN_Y_MASK (1 << _CURSOR_SIGN_Y_SHIFT) #define _SPRITE_FMT_SHIFT 25 #define _SPRITE_COLOR_ORDER_SHIFT 20 #define _SPRITE_YUV_ORDER_SHIFT 16 #define _SPRITE_STRIDE_SHIFT 6 #define _SPRITE_STRIDE_MASK (0x1ff << _SPRITE_STRIDE_SHIFT) #define _SPRITE_SIZE_WIDTH_SHIFT 0 #define _SPRITE_SIZE_HEIGHT_SHIFT 16 #define _SPRITE_SIZE_WIDTH_MASK (0x1fff << _SPRITE_SIZE_WIDTH_SHIFT) #define _SPRITE_SIZE_HEIGHT_MASK (0xfff << _SPRITE_SIZE_HEIGHT_SHIFT) #define _SPRITE_POS_X_SHIFT 0 #define _SPRITE_POS_Y_SHIFT 16 #define _SPRITE_POS_X_MASK (0x1fff << _SPRITE_POS_X_SHIFT) #define _SPRITE_POS_Y_MASK (0xfff << _SPRITE_POS_Y_SHIFT) #define _SPRITE_OFFSET_START_X_SHIFT 0 #define _SPRITE_OFFSET_START_Y_SHIFT 16 #define _SPRITE_OFFSET_START_X_MASK (0x1fff << _SPRITE_OFFSET_START_X_SHIFT) #define _SPRITE_OFFSET_START_Y_MASK (0xfff << _SPRITE_OFFSET_START_Y_SHIFT) enum GVT_FB_EVENT { FB_MODE_SET_START = 1, FB_MODE_SET_END, FB_DISPLAY_FLIP, }; enum DDI_PORT { DDI_PORT_NONE = 0, DDI_PORT_B = 1, DDI_PORT_C = 2, DDI_PORT_D = 3, DDI_PORT_E = 4 }; struct intel_gvt; /* color space conversion and gamma correction are not included */ struct intel_vgpu_primary_plane_format { u8 enabled; /* plane is enabled */ u32 tiled; /* tiling mode: linear, X-tiled, Y tiled, etc */ u8 bpp; /* bits per pixel */ u32 hw_format; /* format field in the PRI_CTL register */ u32 drm_format; /* format in DRM definition */ u32 base; /* framebuffer base in graphics memory */ u64 base_gpa; u32 x_offset; /* in pixels */ u32 y_offset; /* in lines */ u32 width; /* in pixels */ u32 height; /* in lines */ u32 stride; /* in bytes */ }; struct intel_vgpu_sprite_plane_format { u8 enabled; /* plane is enabled */ u8 tiled; /* X-tiled */ u8 bpp; /* bits per pixel */ u32 hw_format; /* format field in the SPR_CTL register */ u32 drm_format; /* format in DRM definition */ u32 base; /* sprite base in graphics memory */ u64 base_gpa; u32 x_pos; /* in pixels */ u32 y_pos; /* in lines */ u32 x_offset; /* in pixels */ u32 y_offset; /* in lines */ u32 width; /* in pixels */ u32 height; /* in lines */ u32 stride; /* in bytes */ }; struct intel_vgpu_cursor_plane_format { u8 enabled; u8 mode; /* cursor mode select */ u8 bpp; /* bits per pixel */ u32 drm_format; /* format in DRM definition */ u32 base; /* cursor base in graphics memory */ u64 base_gpa; u32 x_pos; /* in pixels */ u32 y_pos; /* in lines */ u8 x_sign; /* X Position Sign */ u8 y_sign; /* Y Position Sign */ u32 width; /* in pixels */ u32 height; /* in lines */ u32 x_hot; /* in pixels */ u32 y_hot; /* in pixels */ }; struct intel_vgpu_pipe_format { struct intel_vgpu_primary_plane_format primary; struct intel_vgpu_sprite_plane_format sprite; struct intel_vgpu_cursor_plane_format cursor; enum DDI_PORT ddi_port; /* the DDI port that pipe is connected to */ }; struct intel_vgpu_fb_format { struct intel_vgpu_pipe_format pipes[I915_MAX_PIPES]; }; int intel_vgpu_decode_primary_plane(struct intel_vgpu *vgpu, struct intel_vgpu_primary_plane_format *plane); int intel_vgpu_decode_cursor_plane(struct intel_vgpu *vgpu, struct intel_vgpu_cursor_plane_format *plane); int intel_vgpu_decode_sprite_plane(struct intel_vgpu *vgpu, struct intel_vgpu_sprite_plane_format *plane); #endif
{ "pile_set_name": "Github" }
/* Simple DirectMedia Layer Copyright (C) 1997-2019 Sam Lantinga <[email protected]> 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. */ /** * \file SDL_quit.h * * Include file for SDL quit event handling. */ #ifndef SDL_quit_h_ #define SDL_quit_h_ #include "SDL_stdinc.h" #include "SDL_error.h" /** * \file SDL_quit.h * * An ::SDL_QUIT event is generated when the user tries to close the application * window. If it is ignored or filtered out, the window will remain open. * If it is not ignored or filtered, it is queued normally and the window * is allowed to close. When the window is closed, screen updates will * complete, but have no effect. * * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) * and SIGTERM (system termination request), if handlers do not already * exist, that generate ::SDL_QUIT events as well. There is no way * to determine the cause of an ::SDL_QUIT event, but setting a signal * handler in your application will override the default generation of * quit events for that signal. * * \sa SDL_Quit() */ /* There are no functions directly affecting the quit event */ #define SDL_QuitRequested() \ (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) #endif /* SDL_quit_h_ */
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Leftover6 { /// <summary> /// A guy that knows how to compare itself with other guys /// </summary> class EquatableGuy : Guy, IEquatable<Guy> { public EquatableGuy(string name, int age, int cash) : base(name, age, cash) { } /// <summary> /// Compare this object against another EquatableGuy /// </summary> /// <param name="other">The EquatableGuy object to compare with</param> /// <returns>True if the objects have the same values, false otherwise</returns> public bool Equals(Guy other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Name, Name) && other.Age == Age && other.Cash == Cash; } /// <summary> /// Override the Equals method and have it call Equals(Guy) /// </summary> /// <param name="obj">The object to compare to</param> /// <returns>True if the value of the other object is equal to this one</returns> public override bool Equals(object obj) { if (!(obj is Guy)) return false; return Equals((Guy)obj); } /// <summary> /// Part of the contract for overriding Equals is that you need to override /// GetHashCode() as well. It should compare the values and return true /// if the values are equal. /// </summary> /// <returns></returns> public override int GetHashCode() { const int prime = 397; int result = Age; result = (result * prime) ^ (Name != null ? Name.GetHashCode() : 0); result = (result * prime) ^ Cash; return result; } } }
{ "pile_set_name": "Github" }
# Copyright 2016 NEC Corporation. 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. import sqlalchemy as sa def apply_filters(query, model, **filters): filter_dict = {} for key, value in filters.items(): column_attr = getattr(model, key) if key == 'tags': continue if isinstance(value, dict): if 'in' in value: query = query.filter(column_attr.in_(value['in'])) elif 'nin' in value: query = query.filter(~column_attr.in_(value['nin'])) elif 'neq' in value: query = query.filter(column_attr != value['neq']) elif 'gt' in value: query = query.filter(column_attr > value['gt']) elif 'gte' in value: query = query.filter(column_attr >= value['gte']) elif 'lt' in value: query = query.filter(column_attr < value['lt']) elif 'lte' in value: query = query.filter(column_attr <= value['lte']) elif 'eq' in value: query = query.filter(column_attr == value['eq']) elif 'has' in value: like_pattern = '%{0}%'.format(value['has']) query = query.filter(column_attr.like(like_pattern)) else: filter_dict[key] = value # We need to handle tag case seprately. As tag datatype is MutableList. # TODO(hparekh): Need to think how can we get rid of this. tags = filters.pop('tags', None) if isinstance(tags, dict): tags = tags.get("eq") # To match the tag list, a resource must contain at least all of the # tags present in the filter parameter. if tags: if ',' in tags: tags = tags.split(',') tag_attr = getattr(model, 'tags') if not isinstance(tags, list): expr = tag_attr.contains(tags) else: expr = sa.and_(*[tag_attr.contains(tag) for tag in tags]) query = query.filter(expr) if filter_dict: query = query.filter_by(**filter_dict) return query
{ "pile_set_name": "Github" }
/* * Copyright (c) 2006-2011 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 B2_TIME_STEP_H #define B2_TIME_STEP_H #include <Box2D/Common/b2Math.h> /// Profiling data. Times are in milliseconds. struct b2Profile { float32 step; float32 collide; float32 solve; float32 solveInit; float32 solveVelocity; float32 solvePosition; float32 broadphase; float32 solveTOI; }; /// This is an internal structure. struct b2TimeStep { float32 dt; // time step float32 inv_dt; // inverse time step (0 if dt == 0). float32 dtRatio; // dt * inv_dt0 int32 velocityIterations; int32 positionIterations; bool warmStarting; }; /// This is an internal structure. struct b2Position { b2Vec2 c; float32 a; }; /// This is an internal structure. struct b2Velocity { b2Vec2 v; float32 w; }; /// Solver Data struct b2SolverData { b2TimeStep step; b2Position* positions; b2Velocity* velocities; }; #endif
{ "pile_set_name": "Github" }
/* * Copyright 2015-2018 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which * accompanies this distribution and is available at * * http://www.eclipse.org/legal/epl-v20.html */ package junit.vintage; import static org.junit.Assert.assertEquals; import org.junit.Test; public class JUnit4Test { @Test public void test() { assertEquals(3, 1 + 2); } }
{ "pile_set_name": "Github" }
/////////////////////////////////////////////////////////////////////////////// /// \file default_function_impl.hpp /// Contains definition of the default_function_impl, the implementation of the /// _default transform for function-like nodes. // // Copyright 2008 Eric Niebler. 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) template<typename Grammar, typename Expr, typename State, typename Data> struct default_function_impl<Grammar, Expr, State, Data, 3> : transform_impl<Expr, State, Data> { typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename proto::detail::result_of_fixup<r0>::type function_type; typedef typename BOOST_PROTO_RESULT_OF< function_type(r1 , r2) >::type result_type; result_type operator ()( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d ) const { return this->invoke(e, s, d, is_member_function_pointer<function_type>()); } private: result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::false_ ) const { return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )( typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) ); } result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::true_ ) const { BOOST_PROTO_USE_GET_POINTER(); typedef typename detail::class_member_traits<function_type>::class_type class_type; return ( BOOST_PROTO_GET_POINTER(class_type, (typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ))) ->* typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d ) )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d )); } }; template<typename Grammar, typename Expr, typename State, typename Data> struct default_function_impl<Grammar, Expr, State, Data, 4> : transform_impl<Expr, State, Data> { typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename proto::detail::result_of_fixup<r0>::type function_type; typedef typename BOOST_PROTO_RESULT_OF< function_type(r1 , r2 , r3) >::type result_type; result_type operator ()( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d ) const { return this->invoke(e, s, d, is_member_function_pointer<function_type>()); } private: result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::false_ ) const { return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )( typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) ); } result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::true_ ) const { BOOST_PROTO_USE_GET_POINTER(); typedef typename detail::class_member_traits<function_type>::class_type class_type; return ( BOOST_PROTO_GET_POINTER(class_type, (typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ))) ->* typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d ) )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d )); } }; template<typename Grammar, typename Expr, typename State, typename Data> struct default_function_impl<Grammar, Expr, State, Data, 5> : transform_impl<Expr, State, Data> { typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename proto::detail::result_of_fixup<r0>::type function_type; typedef typename BOOST_PROTO_RESULT_OF< function_type(r1 , r2 , r3 , r4) >::type result_type; result_type operator ()( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d ) const { return this->invoke(e, s, d, is_member_function_pointer<function_type>()); } private: result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::false_ ) const { return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )( typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) ); } result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::true_ ) const { BOOST_PROTO_USE_GET_POINTER(); typedef typename detail::class_member_traits<function_type>::class_type class_type; return ( BOOST_PROTO_GET_POINTER(class_type, (typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ))) ->* typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d ) )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d )); } }; template<typename Grammar, typename Expr, typename State, typename Data> struct default_function_impl<Grammar, Expr, State, Data, 6> : transform_impl<Expr, State, Data> { typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename proto::detail::result_of_fixup<r0>::type function_type; typedef typename BOOST_PROTO_RESULT_OF< function_type(r1 , r2 , r3 , r4 , r5) >::type result_type; result_type operator ()( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d ) const { return this->invoke(e, s, d, is_member_function_pointer<function_type>()); } private: result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::false_ ) const { return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )( typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) ); } result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::true_ ) const { BOOST_PROTO_USE_GET_POINTER(); typedef typename detail::class_member_traits<function_type>::class_type class_type; return ( BOOST_PROTO_GET_POINTER(class_type, (typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ))) ->* typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d ) )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d )); } }; template<typename Grammar, typename Expr, typename State, typename Data> struct default_function_impl<Grammar, Expr, State, Data, 7> : transform_impl<Expr, State, Data> { typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename result_of::child_c< Expr, 6>::type e6; typedef typename Grammar::template impl<e6, State, Data>::result_type r6; typedef typename proto::detail::result_of_fixup<r0>::type function_type; typedef typename BOOST_PROTO_RESULT_OF< function_type(r1 , r2 , r3 , r4 , r5 , r6) >::type result_type; result_type operator ()( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d ) const { return this->invoke(e, s, d, is_member_function_pointer<function_type>()); } private: result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::false_ ) const { return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )( typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) ); } result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::true_ ) const { BOOST_PROTO_USE_GET_POINTER(); typedef typename detail::class_member_traits<function_type>::class_type class_type; return ( BOOST_PROTO_GET_POINTER(class_type, (typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ))) ->* typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d ) )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d )); } }; template<typename Grammar, typename Expr, typename State, typename Data> struct default_function_impl<Grammar, Expr, State, Data, 8> : transform_impl<Expr, State, Data> { typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename result_of::child_c< Expr, 6>::type e6; typedef typename Grammar::template impl<e6, State, Data>::result_type r6; typedef typename result_of::child_c< Expr, 7>::type e7; typedef typename Grammar::template impl<e7, State, Data>::result_type r7; typedef typename proto::detail::result_of_fixup<r0>::type function_type; typedef typename BOOST_PROTO_RESULT_OF< function_type(r1 , r2 , r3 , r4 , r5 , r6 , r7) >::type result_type; result_type operator ()( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d ) const { return this->invoke(e, s, d, is_member_function_pointer<function_type>()); } private: result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::false_ ) const { return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )( typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) ); } result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::true_ ) const { BOOST_PROTO_USE_GET_POINTER(); typedef typename detail::class_member_traits<function_type>::class_type class_type; return ( BOOST_PROTO_GET_POINTER(class_type, (typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ))) ->* typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d ) )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d )); } }; template<typename Grammar, typename Expr, typename State, typename Data> struct default_function_impl<Grammar, Expr, State, Data, 9> : transform_impl<Expr, State, Data> { typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename result_of::child_c< Expr, 6>::type e6; typedef typename Grammar::template impl<e6, State, Data>::result_type r6; typedef typename result_of::child_c< Expr, 7>::type e7; typedef typename Grammar::template impl<e7, State, Data>::result_type r7; typedef typename result_of::child_c< Expr, 8>::type e8; typedef typename Grammar::template impl<e8, State, Data>::result_type r8; typedef typename proto::detail::result_of_fixup<r0>::type function_type; typedef typename BOOST_PROTO_RESULT_OF< function_type(r1 , r2 , r3 , r4 , r5 , r6 , r7 , r8) >::type result_type; result_type operator ()( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d ) const { return this->invoke(e, s, d, is_member_function_pointer<function_type>()); } private: result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::false_ ) const { return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )( typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) , typename Grammar::template impl<e8, State, Data>()( proto::child_c< 8>( e), s, d ) ); } result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::true_ ) const { BOOST_PROTO_USE_GET_POINTER(); typedef typename detail::class_member_traits<function_type>::class_type class_type; return ( BOOST_PROTO_GET_POINTER(class_type, (typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ))) ->* typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d ) )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) , typename Grammar::template impl<e8, State, Data>()( proto::child_c< 8>( e), s, d )); } }; template<typename Grammar, typename Expr, typename State, typename Data> struct default_function_impl<Grammar, Expr, State, Data, 10> : transform_impl<Expr, State, Data> { typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename result_of::child_c< Expr, 6>::type e6; typedef typename Grammar::template impl<e6, State, Data>::result_type r6; typedef typename result_of::child_c< Expr, 7>::type e7; typedef typename Grammar::template impl<e7, State, Data>::result_type r7; typedef typename result_of::child_c< Expr, 8>::type e8; typedef typename Grammar::template impl<e8, State, Data>::result_type r8; typedef typename result_of::child_c< Expr, 9>::type e9; typedef typename Grammar::template impl<e9, State, Data>::result_type r9; typedef typename proto::detail::result_of_fixup<r0>::type function_type; typedef typename BOOST_PROTO_RESULT_OF< function_type(r1 , r2 , r3 , r4 , r5 , r6 , r7 , r8 , r9) >::type result_type; result_type operator ()( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d ) const { return this->invoke(e, s, d, is_member_function_pointer<function_type>()); } private: result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::false_ ) const { return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )( typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) , typename Grammar::template impl<e8, State, Data>()( proto::child_c< 8>( e), s, d ) , typename Grammar::template impl<e9, State, Data>()( proto::child_c< 9>( e), s, d ) ); } result_type invoke( typename default_function_impl::expr_param e , typename default_function_impl::state_param s , typename default_function_impl::data_param d , mpl::true_ ) const { BOOST_PROTO_USE_GET_POINTER(); typedef typename detail::class_member_traits<function_type>::class_type class_type; return ( BOOST_PROTO_GET_POINTER(class_type, (typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ))) ->* typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d ) )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) , typename Grammar::template impl<e8, State, Data>()( proto::child_c< 8>( e), s, d ) , typename Grammar::template impl<e9, State, Data>()( proto::child_c< 9>( e), s, d )); } };
{ "pile_set_name": "Github" }
import sys import time import subprocess import webbrowser from codelab_adapter.core_extension import Extension from codelab_adapter.utils import verify_token, open_path_in_system_file_manager from codelab_adapter.settings import TOKEN ''' 当前插件只允许运行表达式 如果你希望执行任意python代码,请使用: https://github.com/CodeLabClub/codelab_adapter_extensions/blob/master/extensions_v2/extension_python_kernel_exec.py,注意风险 安全性原则: 打开这个插件前,提醒社区用户确认积木中没有危险的Python代码, 允许社区成员举报危险代码 也可以在Scratch EIM插件中运行Python代码 ''' class PyHelper: def open_url(self, url): webbrowser.open(url) def open(self, path): open_path_in_system_file_manager(path) def bin2dec(self, string): return str(int(string, 2)) class PythonKernelExtension(Extension): NODE_ID = "eim/extension_python" HELP_URL = "http://adapter.codelab.club/extension_guide/extension_python_kernel/" WEIGHT = 95 VERSION = "1.0" # extension version DESCRIPTION = "Python eval" def __init__(self, **kwargs): super().__init__(**kwargs) self.PyHelper = PyHelper() def run_python_code(self, code): ''' mode 1 exec 2 eval 3 pass ''' try: # 出于安全考虑, 放弃使用exec,如果需要,可以自行下载exec版本 # eval(expression, globals=None, locals=None) # 如果只是调用(插件指责)可以使用json-rpc output = eval(code, {"__builtins__": None}, { "PyHelper": self.PyHelper, }) except Exception as e: output = e return output @verify_token def extension_message_handle(self, topic, payload): ''' 所有可能运行代码的地方,都加上验证,确认payload中代码风险和token ''' self.logger.info(f'python code: {payload["content"]}') message_id = payload.get("message_id") python_code = payload["content"] output = self.run_python_code(python_code) payload["content"] = str(output) message = {"payload": payload} # 无论是否有message_id都返回 self.publish(message) def run(self): "避免插件结束退出" while self._running: time.sleep(0.5) export = PythonKernelExtension
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <Scheme LastUpgradeVersion = "0700" version = "1.3"> <BuildAction parallelizeBuildables = "YES" buildImplicitDependencies = "YES"> <BuildActionEntries> <BuildActionEntry buildForTesting = "YES" buildForRunning = "YES" buildForProfiling = "YES" buildForArchiving = "YES" buildForAnalyzing = "YES"> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "580C376E1AB104AF0015E709" BuildableName = "libRCTTest.a" BlueprintName = "RCTTest" ReferencedContainer = "container:RCTTest.xcodeproj"> </BuildableReference> </BuildActionEntry> </BuildActionEntries> </BuildAction> <TestAction buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> <Testables> </Testables> <AdditionalOptions> </AdditionalOptions> </TestAction> <LaunchAction buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> <MacroExpansion> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "580C376E1AB104AF0015E709" BuildableName = "libRCTTest.a" BlueprintName = "RCTTest" ReferencedContainer = "container:RCTTest.xcodeproj"> </BuildableReference> </MacroExpansion> <AdditionalOptions> </AdditionalOptions> </LaunchAction> <ProfileAction buildConfiguration = "Release" shouldUseLaunchSchemeArgsEnv = "YES" savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> <MacroExpansion> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "580C376E1AB104AF0015E709" BuildableName = "libRCTTest.a" BlueprintName = "RCTTest" ReferencedContainer = "container:RCTTest.xcodeproj"> </BuildableReference> </MacroExpansion> </ProfileAction> <AnalyzeAction buildConfiguration = "Debug"> </AnalyzeAction> <ArchiveAction buildConfiguration = "Release" revealArchiveInOrganizer = "YES"> </ArchiveAction> </Scheme>
{ "pile_set_name": "Github" }
package agent import ( "errors" "os" "reflect" "runtime" "testing" "github.com/buildkite/agent/v3/logger" "github.com/stretchr/testify/assert" ) func TestFetchingTags(t *testing.T) { tags := (&tagFetcher{}).Fetch(logger.Discard, FetchTagsConfig{ Tags: []string{"llamas", "rock"}, }) if !reflect.DeepEqual(tags, []string{"llamas", "rock"}) { t.Fatalf("bad tags: %#v", tags) } } func TestFetchingTagsWithHostTags(t *testing.T) { tags := (&tagFetcher{}).Fetch(logger.Discard, FetchTagsConfig{ Tags: []string{"llamas", "rock"}, TagsFromHost: true, }) assert.Contains(t, tags, "llamas") assert.Contains(t, tags, "rock") hostname, err := os.Hostname() if err != nil { t.Fatal(err) } assert.Contains(t, tags, "hostname="+hostname) assert.Contains(t, tags, "os="+runtime.GOOS) } func TestFetchingTagsFromEC2(t *testing.T) { fetcher := &tagFetcher{ ec2MetaDataDefault: func() (map[string]string, error) { return map[string]string{ `aws:instance-id`: "i-blahblah", `aws:instance-type`: "t2.small", }, nil }, ec2Tags: func() (map[string]string, error) { return map[string]string{ `custom_tag`: "true", }, nil }, } tags := fetcher.Fetch(logger.Discard, FetchTagsConfig{ Tags: []string{"llamas", "rock"}, TagsFromEC2MetaData: true, TagsFromEC2Tags: true, }) assert.ElementsMatch(t, tags, []string{"llamas", "rock", "aws:instance-id=i-blahblah", "aws:instance-type=t2.small", "custom_tag=true"}) } func TestFetchingTagsFromEC2Tags(t *testing.T) { fetcher := &tagFetcher{ ec2Tags: func() (map[string]string, error) { return map[string]string{ `custom_tag`: "true", }, nil }, } tags := fetcher.Fetch(logger.Discard, FetchTagsConfig{ TagsFromEC2Tags: true, }) assert.ElementsMatch(t, tags, []string{"custom_tag=true"}) } func TestFetchingTagsFromGCP(t *testing.T) { // Force test coverage of retry code, at the cost of 1000-2000ms. // This could be removed/improved later if we want faster tests. calls := 0 fetcher := &tagFetcher{ gcpMetaDataDefault: func() (map[string]string, error) { defer func() { calls++ }() if calls <= 0 { return nil, errors.New("transient failure, should retry") } return map[string]string{ `gcp:instance-id`: "my-instance", `gcp:zone`: "blah", }, nil }, gcpLabels: func() (map[string]string, error) { return map[string]string{ `custom_tag`: "true", }, nil }, } tags := fetcher.Fetch(logger.Discard, FetchTagsConfig{ Tags: []string{"llamas", "rock"}, TagsFromGCPMetaData: true, TagsFromGCPLabels: true, }) assert.ElementsMatch(t, tags, []string{"llamas", "rock", "gcp:instance-id=my-instance", "gcp:zone=blah", "custom_tag=true"}) } func TestFetchingTagsFromAllSources(t *testing.T) { fetcher := &tagFetcher{ gcpMetaDataDefault: func() (map[string]string, error) { return map[string]string{`gcp_metadata`: "true"}, nil }, gcpMetaDataPaths: func(paths map[string]string) (map[string]string, error) { assert.Equal(t, paths, map[string]string{"tag": "some/gcp/value"}) return map[string]string{`gcp_metadata_paths`: "true"}, nil }, gcpLabels: func() (map[string]string, error) { return map[string]string{`gcp_labels`: "true"}, nil }, ec2Tags: func() (map[string]string, error) { return map[string]string{`ec2_tags`: "true"}, nil }, ec2MetaDataDefault: func() (map[string]string, error) { return map[string]string{`ec2_metadata`: "true"}, nil }, ec2MetaDataPaths: func(paths map[string]string) (map[string]string, error) { assert.Equal(t, paths, map[string]string{"tag": "some/ec2/value"}) return map[string]string{`ec2_metadata_paths`: "true"}, nil }, } tags := fetcher.Fetch(logger.Discard, FetchTagsConfig{ Tags: []string{"llamas", "rock"}, TagsFromGCPMetaData: true, TagsFromGCPMetaDataPaths: []string{"tag=some/gcp/value"}, TagsFromGCPLabels: true, TagsFromHost: true, TagsFromEC2MetaData: true, TagsFromEC2MetaDataPaths: []string{"tag=some/ec2/value"}, TagsFromEC2Tags: true, }) hostname, err := os.Hostname() if err != nil { t.Fatal(err) } assert.Contains(t, tags, "llamas") assert.Contains(t, tags, "rock") assert.Contains(t, tags, "gcp_metadata=true") assert.Contains(t, tags, "gcp_metadata_paths=true") assert.Contains(t, tags, "gcp_labels=true") assert.Contains(t, tags, "ec2_tags=true") assert.Contains(t, tags, "ec2_metadata=true") assert.Contains(t, tags, "ec2_metadata_paths=true") assert.Contains(t, tags, "hostname="+hostname) assert.Contains(t, tags, "os="+runtime.GOOS) }
{ "pile_set_name": "Github" }
web: R -f /app/app.R
{ "pile_set_name": "Github" }
#ifndef HEADER_CURL_PINGPONG_H #define HEADER_CURL_PINGPONG_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ***************************************************************************/ #include "curl_setup.h" #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \ !defined(CURL_DISABLE_POP3) || !defined(CURL_DISABLE_SMTP) #define USE_PINGPONG #endif /* forward-declaration, this is defined in urldata.h */ struct connectdata; typedef enum { FTPTRANSFER_BODY, /* yes do transfer a body */ FTPTRANSFER_INFO, /* do still go through to get info/headers */ FTPTRANSFER_NONE, /* don't get anything and don't get info */ FTPTRANSFER_LAST /* end of list marker, never used */ } curl_pp_transfer; /* * 'pingpong' is the generic struct used for protocols doing server<->client * conversations in a back-and-forth style such as FTP, IMAP, POP3, SMTP etc. * * It holds response cache and non-blocking sending data. */ struct pingpong { char *cache; /* data cache between getresponse()-calls */ size_t cache_size; /* size of cache in bytes */ size_t nread_resp; /* number of bytes currently read of a server response */ char *linestart_resp; /* line start pointer for the server response reader function */ bool pending_resp; /* set TRUE when a server response is pending or in progress, and is cleared once the last response is read */ char *sendthis; /* allocated pointer to a buffer that is to be sent to the server */ size_t sendleft; /* number of bytes left to send from the sendthis buffer */ size_t sendsize; /* total size of the sendthis buffer */ struct timeval response; /* set to Curl_tvnow() when a command has been sent off, used to time-out response reading */ long response_time; /* When no timeout is given, this is the amount of milliseconds we await for a server response. */ struct connectdata *conn; /* points to the connectdata struct that this belongs to */ /* Function pointers the protocols MUST implement and provide for the pingpong layer to function */ CURLcode (*statemach_act)(struct connectdata *conn); bool (*endofresp)(struct connectdata *conn, char *ptr, size_t len, int *code); }; /* * Curl_pp_statemach() * * called repeatedly until done. Set 'wait' to make it wait a while on the * socket if there's no traffic. */ CURLcode Curl_pp_statemach(struct pingpong *pp, bool block); /* initialize stuff to prepare for reading a fresh new response */ void Curl_pp_init(struct pingpong *pp); /* Returns timeout in ms. 0 or negative number means the timeout has already triggered */ long Curl_pp_state_timeout(struct pingpong *pp); /*********************************************************************** * * Curl_pp_sendf() * * Send the formated string as a command to a pingpong server. Note that * the string should not have any CRLF appended, as this function will * append the necessary things itself. * * made to never block */ CURLcode Curl_pp_sendf(struct pingpong *pp, const char *fmt, ...); /*********************************************************************** * * Curl_pp_vsendf() * * Send the formated string as a command to a pingpong server. Note that * the string should not have any CRLF appended, as this function will * append the necessary things itself. * * made to never block */ CURLcode Curl_pp_vsendf(struct pingpong *pp, const char *fmt, va_list args); /* * Curl_pp_readresp() * * Reads a piece of a server response. */ CURLcode Curl_pp_readresp(curl_socket_t sockfd, struct pingpong *pp, int *code, /* return the server code if done */ size_t *size); /* size of the response */ CURLcode Curl_pp_flushsend(struct pingpong *pp); /* call this when a pingpong connection is disconnected */ CURLcode Curl_pp_disconnect(struct pingpong *pp); int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks, int numsocks); /*********************************************************************** * * Curl_pp_moredata() * * Returns whether there are still more data in the cache and so a call * to Curl_pp_readresp() will not block. */ bool Curl_pp_moredata(struct pingpong *pp); #endif /* HEADER_CURL_PINGPONG_H */
{ "pile_set_name": "Github" }
# frozen_string_literal: true # Copyright 2020 Google LLC # # 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 # # 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. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "helper" require "gapic/grpc/service_stub" require "google/analytics/admin/v1alpha/analytics_admin_service" class ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::ClientPathsTest < Minitest::Test def test_account_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.account_path account: "value0" assert_equal "accounts/value0", path end end def test_android_app_data_stream_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.android_app_data_stream_path property: "value0", android_app_data_stream: "value1" assert_equal "properties/value0/androidAppDataStreams/value1", path end end def test_data_sharing_settings_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.data_sharing_settings_path account: "value0" assert_equal "accounts/value0/dataSharingSettings", path end end def test_enhanced_measurement_settings_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.enhanced_measurement_settings_path property: "value0", web_data_stream: "value1" assert_equal "properties/value0/webDataStreams/value1/enhancedMeasurementSettings", path end end def test_firebase_link_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.firebase_link_path property: "value0", firebase_link: "value1" assert_equal "properties/value0/firebaseLinks/value1", path end end def test_global_site_tag_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.global_site_tag_path property: "value0" assert_equal "properties/value0/globalSiteTag", path end end def test_google_ads_link_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.google_ads_link_path property: "value0", google_ads_link: "value1" assert_equal "properties/value0/googleAdsLinks/value1", path end end def test_ios_app_data_stream_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.ios_app_data_stream_path property: "value0", ios_app_data_stream: "value1" assert_equal "properties/value0/iosAppDataStreams/value1", path end end def test_property_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.property_path property: "value0" assert_equal "properties/value0", path end end def test_user_link_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.user_link_path account: "value0", user_link: "value1" assert_equal "accounts/value0/userLinks/value1", path path = client.user_link_path property: "value0", user_link: "value1" assert_equal "properties/value0/userLinks/value1", path end end def test_web_data_stream_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, nil do client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| config.credentials = grpc_channel end path = client.web_data_stream_path property: "value0", web_data_stream: "value1" assert_equal "properties/value0/webDataStreams/value1", path end end end
{ "pile_set_name": "Github" }
/* ** $Id: lmathlib.c,v 1.83.1.1 2013/04/12 18:48:47 roberto Exp $ ** Standard mathematical library ** See Copyright Notice in lua.h */ #include <stdlib.h> #include <math.h> #define lmathlib_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #undef PI #define PI ((lua_Number)(3.1415926535897932384626433832795)) #define RADIANS_PER_DEGREE ((lua_Number)(PI/180.0)) static int math_abs (lua_State *L) { lua_pushnumber(L, l_mathop(fabs)(luaL_checknumber(L, 1))); return 1; } static int math_sin (lua_State *L) { lua_pushnumber(L, l_mathop(sin)(luaL_checknumber(L, 1))); return 1; } static int math_sinh (lua_State *L) { lua_pushnumber(L, l_mathop(sinh)(luaL_checknumber(L, 1))); return 1; } static int math_cos (lua_State *L) { lua_pushnumber(L, l_mathop(cos)(luaL_checknumber(L, 1))); return 1; } static int math_cosh (lua_State *L) { lua_pushnumber(L, l_mathop(cosh)(luaL_checknumber(L, 1))); return 1; } static int math_tan (lua_State *L) { lua_pushnumber(L, l_mathop(tan)(luaL_checknumber(L, 1))); return 1; } static int math_tanh (lua_State *L) { lua_pushnumber(L, l_mathop(tanh)(luaL_checknumber(L, 1))); return 1; } static int math_asin (lua_State *L) { lua_pushnumber(L, l_mathop(asin)(luaL_checknumber(L, 1))); return 1; } static int math_acos (lua_State *L) { lua_pushnumber(L, l_mathop(acos)(luaL_checknumber(L, 1))); return 1; } static int math_atan (lua_State *L) { lua_pushnumber(L, l_mathop(atan)(luaL_checknumber(L, 1))); return 1; } static int math_atan2 (lua_State *L) { lua_pushnumber(L, l_mathop(atan2)(luaL_checknumber(L, 1), luaL_checknumber(L, 2))); return 1; } static int math_ceil (lua_State *L) { lua_pushnumber(L, l_mathop(ceil)(luaL_checknumber(L, 1))); return 1; } static int math_floor (lua_State *L) { lua_pushnumber(L, l_mathop(floor)(luaL_checknumber(L, 1))); return 1; } static int math_fmod (lua_State *L) { lua_pushnumber(L, l_mathop(fmod)(luaL_checknumber(L, 1), luaL_checknumber(L, 2))); return 1; } static int math_modf (lua_State *L) { lua_Number ip; lua_Number fp = l_mathop(modf)(luaL_checknumber(L, 1), &ip); lua_pushnumber(L, ip); lua_pushnumber(L, fp); return 2; } static int math_sqrt (lua_State *L) { lua_pushnumber(L, l_mathop(sqrt)(luaL_checknumber(L, 1))); return 1; } static int math_pow (lua_State *L) { lua_Number x = luaL_checknumber(L, 1); lua_Number y = luaL_checknumber(L, 2); lua_pushnumber(L, l_mathop(pow)(x, y)); return 1; } static int math_log (lua_State *L) { lua_Number x = luaL_checknumber(L, 1); lua_Number res; if (lua_isnoneornil(L, 2)) res = l_mathop(log)(x); else { lua_Number base = luaL_checknumber(L, 2); if (base == (lua_Number)10.0) res = l_mathop(log10)(x); else res = l_mathop(log)(x)/l_mathop(log)(base); } lua_pushnumber(L, res); return 1; } #if defined(LUA_COMPAT_LOG10) static int math_log10 (lua_State *L) { lua_pushnumber(L, l_mathop(log10)(luaL_checknumber(L, 1))); return 1; } #endif static int math_exp (lua_State *L) { lua_pushnumber(L, l_mathop(exp)(luaL_checknumber(L, 1))); return 1; } static int math_deg (lua_State *L) { lua_pushnumber(L, luaL_checknumber(L, 1)/RADIANS_PER_DEGREE); return 1; } static int math_rad (lua_State *L) { lua_pushnumber(L, luaL_checknumber(L, 1)*RADIANS_PER_DEGREE); return 1; } static int math_frexp (lua_State *L) { int e; lua_pushnumber(L, l_mathop(frexp)(luaL_checknumber(L, 1), &e)); lua_pushinteger(L, e); return 2; } static int math_ldexp (lua_State *L) { lua_Number x = luaL_checknumber(L, 1); int ep = luaL_checkint(L, 2); lua_pushnumber(L, l_mathop(ldexp)(x, ep)); return 1; } static int math_min (lua_State *L) { int n = lua_gettop(L); /* number of arguments */ lua_Number dmin = luaL_checknumber(L, 1); int i; for (i=2; i<=n; i++) { lua_Number d = luaL_checknumber(L, i); if (d < dmin) dmin = d; } lua_pushnumber(L, dmin); return 1; } static int math_max (lua_State *L) { int n = lua_gettop(L); /* number of arguments */ lua_Number dmax = luaL_checknumber(L, 1); int i; for (i=2; i<=n; i++) { lua_Number d = luaL_checknumber(L, i); if (d > dmax) dmax = d; } lua_pushnumber(L, dmax); return 1; } static int math_random (lua_State *L) { /* the `%' avoids the (rare) case of r==1, and is needed also because on some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */ lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX; switch (lua_gettop(L)) { /* check number of arguments */ case 0: { /* no arguments */ lua_pushnumber(L, r); /* Number between 0 and 1 */ break; } case 1: { /* only upper limit */ lua_Number u = luaL_checknumber(L, 1); luaL_argcheck(L, (lua_Number)1.0 <= u, 1, "interval is empty"); lua_pushnumber(L, l_mathop(floor)(r*u) + (lua_Number)(1.0)); /* [1, u] */ break; } case 2: { /* lower and upper limits */ lua_Number l = luaL_checknumber(L, 1); lua_Number u = luaL_checknumber(L, 2); luaL_argcheck(L, l <= u, 2, "interval is empty"); lua_pushnumber(L, l_mathop(floor)(r*(u-l+1)) + l); /* [l, u] */ break; } default: return luaL_error(L, "wrong number of arguments"); } return 1; } static int math_randomseed (lua_State *L) { srand(luaL_checkunsigned(L, 1)); (void)rand(); /* discard first value to avoid undesirable correlations */ return 0; } static const luaL_Reg mathlib[] = { {"abs", math_abs}, {"acos", math_acos}, {"asin", math_asin}, {"atan2", math_atan2}, {"atan", math_atan}, {"ceil", math_ceil}, {"cosh", math_cosh}, {"cos", math_cos}, {"deg", math_deg}, {"exp", math_exp}, {"floor", math_floor}, {"fmod", math_fmod}, {"frexp", math_frexp}, {"ldexp", math_ldexp}, #if defined(LUA_COMPAT_LOG10) {"log10", math_log10}, #endif {"log", math_log}, {"max", math_max}, {"min", math_min}, {"modf", math_modf}, {"pow", math_pow}, {"rad", math_rad}, {"random", math_random}, {"randomseed", math_randomseed}, {"sinh", math_sinh}, {"sin", math_sin}, {"sqrt", math_sqrt}, {"tanh", math_tanh}, {"tan", math_tan}, {NULL, NULL} }; /* ** Open math library */ LUAMOD_API int luaopen_math (lua_State *L) { luaL_newlib(L, mathlib); lua_pushnumber(L, PI); lua_setfield(L, -2, "pi"); lua_pushnumber(L, HUGE_VAL); lua_setfield(L, -2, "huge"); return 1; }
{ "pile_set_name": "Github" }
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.06.11 at 10:33:54 AM PDT // package com.sun.identity.liberty.ws.common.jaxb.ac; /** * This element indicates that the Key Activation Limit is the session. * * Java content class for ActivationLimitSession element declaration. * <p>The following schema fragment specifies the expected content contained within this java content object. (defined at file:/Users/allan/A-SVN/trunk/opensso/products/federation/library/xsd/liberty/lib-arch-authentication-context.xsd line 678) * <p> * <pre> * &lt;element name="ActivationLimitSession" type="{urn:liberty:ac:2003-08}ActivationLimitSessionType"/> * </pre> * */ public interface ActivationLimitSessionElement extends javax.xml.bind.Element, com.sun.identity.liberty.ws.common.jaxb.ac.ActivationLimitSessionType { }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2020 pig4cloud Authors. 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. */ package com.pig4cloud.pig.common.core.constant; /** * @author lengleng * @date 2019/2/1 */ public interface CommonConstants { /** * 删除 */ String STATUS_DEL = "1"; /** * 正常 */ String STATUS_NORMAL = "0"; /** * 锁定 */ String STATUS_LOCK = "9"; /** * 菜单树根节点 */ Integer MENU_TREE_ROOT_ID = -1; /** * 菜单 */ String MENU = "0"; /** * 编码 */ String UTF8 = "UTF-8"; /** * JSON 资源 */ String CONTENT_TYPE = "application/json; charset=utf-8"; /** * 前端工程名 */ String FRONT_END_PROJECT = "pig-ui"; /** * 后端工程名 */ String BACK_END_PROJECT = "pig"; /** * 成功标记 */ Integer SUCCESS = 0; /** * 失败标记 */ Integer FAIL = 1; /** * 验证码前缀 */ String DEFAULT_CODE_KEY = "DEFAULT_CODE_KEY_"; /** * 当前页 */ String CURRENT = "current"; /** * size */ String SIZE = "size"; }
{ "pile_set_name": "Github" }
// Copyright 2001-2019 Crytek GmbH / Crytek Group. All rights reserved. #include "StdAfx.h" #include "PerforceConflictsResolver.h" #include "PerforceVCSAdapter.h" #include "IPerforceExecutor.h" #include "IPerforceOutputParser.h" #include "VersionControl/VersionControlFileStatusUpdate.h" #include <unordered_map> void CPerforceConflictsResolver::ResolveMMOurs(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { m_executor->Reconcile(filePaths); m_executor->Sync(filePaths); std::vector<bool> perFileResults; m_parser->ParseResolve(m_executor->ResolveOurs(filePaths), perFileResults); for (const auto& filePath : filePaths) { statusesMap[filePath]->ClearRemoteState(); } } void CPerforceConflictsResolver::ResolveMMTheir(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { m_executor->Reconcile(filePaths); m_executor->Sync(filePaths); std::vector<bool> perFileResults; m_parser->ParseResolve(m_executor->ResolveTheir(filePaths), perFileResults); // TODO: revert so that it's not checked out anymore for (const auto& filePath : filePaths) { statusesMap[filePath]->ClearLocalState(); } } void CPerforceConflictsResolver::ResolveMDOurs(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { m_executor->Reconcile(filePaths); m_executor->Sync(filePaths); std::vector<CVersionControlFileStatusUpdate> addResults; m_parser->ParseAdd(m_executor->Add(filePaths, true), addResults); for (const auto& filePath : filePaths) { statusesMap[filePath]->SetState(CVersionControlFileStatus::eState_AddedLocally); } } void CPerforceConflictsResolver::ResolveMDTheir(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { m_executor->Reconcile(filePaths); m_executor->Sync(filePaths); m_executor->Revert(filePaths); for (const auto& filePath : filePaths) { statusesMap.erase(filePath); } } void CPerforceConflictsResolver::ResolveDMOurs(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { m_executor->Sync(filePaths); for (const auto& filePath : filePaths) { statusesMap[filePath]->ClearRemoteState(); } } void CPerforceConflictsResolver::ResolveDMTheir(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { m_executor->Reconcile(filePaths); m_executor->Sync(filePaths); m_executor->Revert(filePaths); for (const auto& filePath : filePaths) { statusesMap.erase(filePath); } } void CPerforceConflictsResolver::ResolveAAOurs(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { /*using namespace Private_PerforceConflictsResolver; string changelist; std::vector<string> changelists; m_parser->ParseStatus(m_executor->Status(filePaths), changelists); m_executor->Reconcile(filePaths); m_parser->ParseCreateChangelist(m_executor->CreateChangelist("tmp"), changelist); // TODO: check if it would be possible to use the second param of CreateChangelist with prefix //depot/stream/ m_executor->Reopen(changelist, filePaths); if (!m_parser->ParseShelve(m_executor->Shelve(filePaths, changelist))) CRY_ASSERT(false); m_executor->Revert(filePaths); m_executor->Sync(filePaths); if (!m_parser->ParseUnshelve(m_executor->Unshelve(changelist, changelist))) CRY_ASSERT(false); m_executor->Sync(filePaths); std::vector<bool> addResults; if (!m_parser->ParseAdd(m_executor->Add(filePaths, true), addResults)) CRY_ASSERT(false); if (!m_parser->ParseDeleteShelve(m_executor->DeleteShelve(changelist))) CRY_ASSERT(false); m_executor->Reopen(changelists[0], filePaths); //m_executor->Reopen("default", filePaths); if (!m_parser->ParseDeleteChangelist(m_executor->DeleteChangelist(changelist))) CRY_ASSERT(false); for (const auto& filePath : filePaths) { statusesMap[filePath].SetLocalState(EState::Added); statusesMap[filePath]-->SetRemoteState(EState::Unmodified); statusesMap[filePath]->SetConflicting(false); } */ } void CPerforceConflictsResolver::ResolveAATheir(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { m_executor->Reconcile(filePaths); m_executor->Revert(filePaths); m_executor->Sync(filePaths, true); for (const auto& filePath : filePaths) { statusesMap.erase(filePath); } } void CPerforceConflictsResolver::ResolveDD(const std::vector<string>& filePaths, FileStatusesMap& statusesMap) { ResolveAATheir(filePaths, statusesMap); }
{ "pile_set_name": "Github" }
// Copyright 2016 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. // +build darwin dragonfly freebsd netbsd openbsd package route import ( "syscall" "unsafe" ) var zero uintptr func sysctl(mib []int32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { var p unsafe.Pointer if len(mib) > 0 { p = unsafe.Pointer(&mib[0]) } else { p = unsafe.Pointer(&zero) } _, _, errno := syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(p), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) if errno != 0 { return error(errno) } return nil }
{ "pile_set_name": "Github" }
#include <stdio.h> extern int protected; extern int get_protected (void); extern int* get_protected_p (void); int main () { if (protected == get_protected () && &protected == get_protected_p ()) printf ("PASS\n"); return 0; }
{ "pile_set_name": "Github" }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Component Examples renders TextField.Masked.Example.tsx correctly 1`] = ` <div className= ms-Stack { box-sizing: border-box; display: flex; flex-direction: column; flex-wrap: nowrap; height: auto; max-width: 300px; width: auto; } & > * { text-overflow: ellipsis; } & > *:not(:first-child) { margin-top: 0px; } & > *:not(.ms-StackItem) { flex-shrink: 1; } > <p> The mask has been modified here to allow "_" </p> <div className= ms-TextField { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; box-shadow: none; box-sizing: border-box; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif; font-size: 14px; font-weight: 400; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; } > <div className="ms-TextField-wrapper" > <label className= ms-Label { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; box-shadow: none; box-sizing: border-box; color: #323130; display: block; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif; font-size: 14px; font-weight: 600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-wrap: break-word; padding-bottom: 5px; padding-left: 0; padding-right: 0; padding-top: 5px; word-wrap: break-word; } htmlFor="TextField0" id="TextFieldLabel2" > With input mask </label> <div className= ms-TextField-fieldGroup { align-items: stretch; background: #ffffff; border-radius: 2px; border: 1px solid #605e5c; box-shadow: none; box-sizing: border-box; cursor: text; display: flex; flex-direction: row; height: 32px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; } &:hover { border-color: #323130; } @media screen and (-ms-high-contrast: active){&:hover { border-color: Highlight; } @media screen and (forced-colors: active){&:hover { forced-color-adjust: none; } > <input aria-invalid={false} aria-labelledby="TextFieldLabel2" className= ms-TextField-field { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; background-color: transparent; background: none; border-radius: 0px; border: none; box-shadow: none; box-sizing: border-box; color: #323130; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif; font-size: 14px; font-weight: 400; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; outline: 0px; padding-bottom: 0; padding-left: 8px; padding-right: 8px; padding-top: 0; text-overflow: ellipsis; width: 100%; } &:active { outline: 0px; } &:focus { outline: 0px; } &:hover { outline: 0px; } &::-ms-clear { display: none; } @media screen and (-ms-high-contrast: active){& { background: Window; color: WindowText; } &::placeholder { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; color: #605e5c; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif; font-size: 14px; font-weight: 400; opacity: 1; } @media screen and (-ms-high-contrast: active){&::placeholder { color: GrayText; } &:-ms-input-placeholder { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; color: #605e5c; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif; font-size: 14px; font-weight: 400; opacity: 1; } @media screen and (-ms-high-contrast: active){&:-ms-input-placeholder { color: GrayText; } &::-ms-input-placeholder { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; color: #605e5c; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif; font-size: 14px; font-weight: 400; opacity: 1; } @media screen and (-ms-high-contrast: active){&::-ms-input-placeholder { color: GrayText; } id="TextField0" onBlur={[Function]} onChange={[Function]} onFocus={[Function]} onInput={[Function]} onKeyDown={[Function]} onMouseDown={[Function]} onMouseUp={[Function]} onPaste={[Function]} type="text" value="mask: ????" /> </div> </div> </div> </div> `;
{ "pile_set_name": "Github" }
namespace = "comment_"; (function() { function test(name, mode, run, before, after) { return testCM(name, function(cm) { run(cm); eq(cm.getValue(), after); }, {value: before, mode: mode}); } var simpleProg = "function foo() {\n return bar;\n}"; var inlineBlock = "foo(/* bar */ true);"; var inlineBlocks = "foo(/* bar */ true, /* baz */ false);"; var multiLineInlineBlock = ["above();", "foo(/* bar */ true);", "below();"]; test("block", "javascript", function(cm) { cm.blockComment(Pos(0, 3), Pos(3, 0), {blockCommentLead: " *"}); }, simpleProg + "\n", "/* function foo() {\n * return bar;\n * }\n */"); test("blockToggle", "javascript", function(cm) { cm.blockComment(Pos(0, 3), Pos(2, 0), {blockCommentLead: " *"}); cm.uncomment(Pos(0, 3), Pos(2, 0), {blockCommentLead: " *"}); }, simpleProg, simpleProg); test("blockToggle2", "javascript", function(cm) { cm.setCursor({line: 0, ch: 7 /* inside the block comment */}); cm.execCommand("toggleComment"); }, inlineBlock, "foo(bar true);"); // This test should work but currently fails. // test("blockToggle3", "javascript", function(cm) { // cm.setCursor({line: 0, ch: 7 /* inside the first block comment */}); // cm.execCommand("toggleComment"); // }, inlineBlocks, "foo(bar true, /* baz */ false);"); test("line", "javascript", function(cm) { cm.lineComment(Pos(1, 1), Pos(1, 1)); }, simpleProg, "function foo() {\n// return bar;\n}"); test("lineToggle", "javascript", function(cm) { cm.lineComment(Pos(0, 0), Pos(2, 1)); cm.uncomment(Pos(0, 0), Pos(2, 1)); }, simpleProg, simpleProg); test("fallbackToBlock", "css", function(cm) { cm.lineComment(Pos(0, 0), Pos(2, 1)); }, "html {\n border: none;\n}", "/* html {\n border: none;\n} */"); test("fallbackToLine", "ruby", function(cm) { cm.blockComment(Pos(0, 0), Pos(1)); }, "def blah()\n return hah\n", "# def blah()\n# return hah\n"); test("ignoreExternalBlockComments", "javascript", function(cm) { cm.execCommand("toggleComment"); }, inlineBlocks, "// " + inlineBlocks); test("ignoreExternalBlockComments2", "javascript", function(cm) { cm.setCursor({line: 0, ch: null /* eol */}); cm.execCommand("toggleComment"); }, inlineBlocks, "// " + inlineBlocks); test("ignoreExternalBlockCommentsMultiLineAbove", "javascript", function(cm) { cm.setSelection({line: 0, ch: 0}, {line: 1, ch: 1}); cm.execCommand("toggleComment"); }, multiLineInlineBlock.join("\n"), ["// " + multiLineInlineBlock[0], "// " + multiLineInlineBlock[1], multiLineInlineBlock[2]].join("\n")); test("ignoreExternalBlockCommentsMultiLineBelow", "javascript", function(cm) { cm.setSelection({line: 1, ch: 13 /* after end of block comment */}, {line: 2, ch: 1}); cm.execCommand("toggleComment"); }, multiLineInlineBlock.join("\n"), [multiLineInlineBlock[0], "// " + multiLineInlineBlock[1], "// " + multiLineInlineBlock[2]].join("\n")); test("commentRange", "javascript", function(cm) { cm.blockComment(Pos(1, 2), Pos(1, 13), {fullLines: false}); }, simpleProg, "function foo() {\n /*return bar;*/\n}"); test("indented", "javascript", function(cm) { cm.lineComment(Pos(1, 0), Pos(2), {indent: true}); }, simpleProg, "function foo() {\n // return bar;\n // }"); test("singleEmptyLine", "javascript", function(cm) { cm.setCursor(1); cm.execCommand("toggleComment"); }, "a;\n\nb;", "a;\n// \nb;"); test("dontMessWithStrings", "javascript", function(cm) { cm.execCommand("toggleComment"); }, "console.log(\"/*string*/\");", "// console.log(\"/*string*/\");"); test("dontMessWithStrings2", "javascript", function(cm) { cm.execCommand("toggleComment"); }, "console.log(\"// string\");", "// console.log(\"// string\");"); test("dontMessWithStrings3", "javascript", function(cm) { cm.execCommand("toggleComment"); }, "// console.log(\"// string\");", "console.log(\"// string\");"); })();
{ "pile_set_name": "Github" }
.highlight .hll { background-color: #49483e } .highlight .c { color: #75715e } /* Comment */ .highlight .err { color: #960050; background-color: #1e0010 } /* Error */ .highlight .k { color: #66d9ef } /* Keyword */ .highlight .l { color: #ae81ff } /* Literal */ .highlight .n { color: #f8f8f2 } /* Name */ .highlight .o { color: #f92672 } /* Operator */ .highlight .p { color: #f8f8f2 } /* Punctuation */ .highlight .cm { color: #75715e } /* Comment.Multiline */ .highlight .cp { color: #75715e } /* Comment.Preproc */ .highlight .c1 { color: #75715e } /* Comment.Single */ .highlight .cs { color: #75715e } /* Comment.Special */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .kc { color: #66d9ef } /* Keyword.Constant */ .highlight .kd { color: #66d9ef } /* Keyword.Declaration */ .highlight .kn { color: #f92672 } /* Keyword.Namespace */ .highlight .kp { color: #66d9ef } /* Keyword.Pseudo */ .highlight .kr { color: #66d9ef } /* Keyword.Reserved */ .highlight .kt { color: #66d9ef } /* Keyword.Type */ .highlight .ld { color: #e6db74 } /* Literal.Date */ .highlight .m { color: #ae81ff } /* Literal.Number */ .highlight .s { color: #e6db74 } /* Literal.String */ .highlight .na { color: #a6e22e } /* Name.Attribute */ .highlight .nb { color: #f8f8f2 } /* Name.Builtin */ .highlight .nc { color: #a6e22e } /* Name.Class */ .highlight .no { color: #66d9ef } /* Name.Constant */ .highlight .nd { color: #a6e22e } /* Name.Decorator */ .highlight .ni { color: #f8f8f2 } /* Name.Entity */ .highlight .ne { color: #a6e22e } /* Name.Exception */ .highlight .nf { color: #a6e22e } /* Name.Function */ .highlight .nl { color: #f8f8f2 } /* Name.Label */ .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ .highlight .nx { color: #a6e22e } /* Name.Other */ .highlight .py { color: #f8f8f2 } /* Name.Property */ .highlight .nt { color: #f92672 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ .highlight .gh { } /* Generic Heading & Diff Header */ .highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */ .highlight .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */ .highlight .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */
{ "pile_set_name": "Github" }
no humans were harmed , tested or tasted in the making of this film . all recipes are fictions . twentieth century fox does not condone cannibalism . a psychological thriller that will scare you to the depth of your soul ! director/writer antonia bird shows us that the most terrifying horror is not provided by giant beasts , but instead by monsters lurking in ourselves . . " . . they were a party of settlers in covered wagon times and they had to resent to cannibalism in order to stay alive . . " this true story , briefly mentioned in " the shining " , has no turned into a 143 minutes long motion picture . in 1847 , the united states was a land of pioneers , of gold-starved americans making their way west . it was a period of manifest destiny , the inevitability of the country extending its boundaries , stretching out its arms and consuming all the land it could . capt . john boyd ( guy pearce ) has become both a " hero " and a victim during this period of relentless consumption . . . in ways he could never have imagined . boyd's journey to hell begins when he is awarded for an act of cowardice during a horrific mexican-american war battle earns him banishment to a desolate military outpost , a waystation for western travelers in the barren and icy sierra nevada mountains in california . upon his arrival he is greeted by a small , motley group of soldiers , including his commanding officer , hart ( jeffrey jones ) , a previously intelligent and sophisticated man who has lost his aristocratic origin in the heat of battle and has pretty much given up on life ; toffler ( jeremy davies ) , the fort's personal emissary to the lord ; knox ( stephen spinella ) , the veterinarian that plays doctor , who never met a bottle of whiskey he didn't like ; reich ( neal mcdonough ) , the no-nonsense soldier of the group ; and the seriously " over-medicated " cleaves ( david arquette ) , a cook whose meals are inspired more by peyote than culinary ambitions . into this cold , bleak and bizarre world staggers a stranger , colqhoun ( robert carlyle ) , a half-starved scot who had been traveling with a group of settlers until they became snowbound . seeking refuge in a cave , they soon ran out of food - and were forced to consume one another . colqhoun barely escaped becoming an hors d'oeuvre himself . our heroes then decide to journey through the mountains to find the survivors , and colqhoun tags along to help out . soon it becomes clear that colqhoun's tale has ramifications beyond cannibalism and the will to survive . it involves an old indian myth called weendigo , which states that a man who eats the flesh of another steals that person's strength , spirit and very essence . his hunger becomes an insatiable craving : the more he eats , the more he wants , and the stronger he becomes . there can never be enough , and death is the only escape . . it's all fairly sickening and you have to have a healthy stomach to see the whole movie through . as professionally made as the movie is , you have to wonder who they thought would come piling into the theater to see this . teen-age horror fans won't care because none of the soldiers look remotely like neve campell . older folks might show up when they hear that the movie is actually a satire about the pioneer spirit , but they'll be disappointed once all the raw meat starts getting waved in their faces . but jokes aside , this is a film that is well worth watching . it has wonderful and mature characters , that few horror film s can boast of and a strangely effective story that continues to electrify you till the end . the two main characters are also the most interesting . boyd is a simple , honest man tiered of war , killing and fear . his sacred wish is to live a normal , quite life away from gunpowder and blood . colqhoun is different . he proves that a man , on the brink of death , would do anything to stay alive , including sacrificing his own soul . he believes so much in this indian myth that he starts to change physically . it is the power of the human mind and conviction that make miracles happen . the atmosphere in " ravenous " is macabre and bizarre , scary and surreal . completely isolated from the rest of the world , stands fort spencer . here time stands still , and nothing changes . the inhabitants are soldiers driven by war and pillage . they are all somehow losers of society that have been banished -- men that are used to killing and have not done anything else in their entire life . men that are nothing , and has nothing to loose . the result is some sort of cabin fever . cannibalism is more like a sick game for them . since they find no pleasure in living , they find some excitement in killing and dying . it's like " who's going to die first ? " the unchangeable icy landscape , where birds do not sing and even wind doesn't move the leaves on the trees , resembles kubrick's " the shining " . it's hard to not get mad here ! one of the scary aspects of the film is a strange connection that the viewer establishes with the characters , and starts to understand them , although they have turned into half crazed killers . music is another factor that strengthens the atmosphere . a strange musical score , composed by michael nyman ( the piano ) and damon albarn , that often seems out of place , and in complete contrast to the image , somehow reflects the characters' twisted reactions on the world and their situation . the director herself stated that it was " ok to laugh " during the picture . and i must admit that it is often very funny , in a strange way ( such as the wonderful quote : " . . it's lonely being a cannibal . you don't get that many friends . . . " or when colqhoun is quoting ben franklin , saying " eat to live . don't live to eat . " ) . but mostly it is frightening and shocking as it goes deeper into the minds of these strange men and we witness their psychological change . every actor does a great job . especially robert carlyle as the sinister and intelligent cannibal , and guy pearce as the moral and honest soldier , nagged by his undeserved honor . this strange couple resemble lestat and lois in neil jordan's 'interview with the vampire' . actually there are many amusing parallels and connections to vampire movies , since the topics are so alike . " ravenous " starts wonderfully and continues to shock and scare until it gets to the finale , where it looses focus and gets too primitive and rather boring . however these little failures don't diminish the impression . this is a bizarre dark comedy about the human mind and its change in different situations . it is a scary fable about the monster that lurks in everyone's soul , a dark side which we're all trying to hide -- but it's there -- always . it is one of the most frightening and successful horror films since " the shining " . " . . i said no food . i didn't say there was nothing to eat . . . " - colqhoun , ravenous
{ "pile_set_name": "Github" }
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. add_library( mvfst_d6d_probe_raiser INTERFACE ) target_include_directories( mvfst_d6d_probe_raiser INTERFACE $<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}> $<INSTALL_INTERFACE:include/> ) add_library( mvfst_d6d_state_functions STATIC QuicD6DStateFunctions.cpp ) target_include_directories( mvfst_d6d_state_functions PUBLIC $<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}> $<INSTALL_INTERFACE:include/> ) target_compile_options( mvfst_d6d_state_functions PRIVATE ${_QUIC_COMMON_COMPILE_OPTIONS} ) add_dependencies( mvfst_d6d_state_functions mvfst_state_machine ) target_link_libraries( mvfst_d6d_state_functions PUBLIC Folly::folly mvfst_state_machine ) file( GLOB_RECURSE QUIC_API_HEADERS_TOINSTALL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h ) list(FILTER QUIC_API_HEADERS_TOINSTALL EXCLUDE REGEX test/) foreach(header ${QUIC_API_HEADERS_TOINSTALL}) get_filename_component(header_dir ${header} DIRECTORY) install(FILES ${header} DESTINATION include/quic/d6d/${header_dir}) endforeach() install( TARGETS mvfst_d6d_probe_raiser EXPORT mvfst-exports ) install( TARGETS mvfst_d6d_state_functions EXPORT mvfst-exports DESTINATION lib ) add_subdirectory(test)
{ "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 * * 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.apache.calcite.util; import org.apache.calcite.linq4j.function.Experimental; import com.google.common.collect.ImmutableSortedMap; import java.util.Collections; import java.util.Map; import java.util.NavigableMap; import java.util.TreeMap; import static org.apache.calcite.util.CaseInsensitiveComparator.COMPARATOR; /** Map whose keys are names and can be accessed with and without case * sensitivity. * * @param <V> Value type */ public class NameMap<V> { private final NavigableMap<String, V> map; /** Creates a NameSet based on an existing set. */ private NameMap(NavigableMap<String, V> map) { this.map = map; assert this.map.comparator() == COMPARATOR; } /** Creates a NameMap, initially empty. */ public NameMap() { this(new TreeMap<String, V>(COMPARATOR)); } @Override public String toString() { return map.toString(); } @Override public int hashCode() { return map.hashCode(); } @Override public boolean equals(Object obj) { return this == obj || obj instanceof NameMap && map.equals(((NameMap) obj).map); } /** Creates a NameMap that is an immutable copy of a given map. */ public static <V> NameMap immutableCopyOf(Map<String, V> names) { return new NameMap<>(ImmutableSortedMap.copyOf(names, COMPARATOR)); } public void put(String name, V v) { map.put(name, v); } /** Returns a map containing all the entries in the map that match the given * name. If case-sensitive, that map will have 0 or 1 elements; if * case-insensitive, it may have 0 or more. */ public NavigableMap<String, V> range(String name, boolean caseSensitive) { Object floorKey; Object ceilingKey; if (caseSensitive) { floorKey = name; ceilingKey = name; } else { floorKey = COMPARATOR.floorKey(name); ceilingKey = COMPARATOR.ceilingKey(name); } NavigableMap subMap = ((NavigableMap) map).subMap(floorKey, true, ceilingKey, true); return Collections.unmodifiableNavigableMap((NavigableMap<String, V>) subMap); } /** Returns whether this map contains a given key, with a given * case-sensitivity. */ public boolean containsKey(String name, boolean caseSensitive) { return !range(name, caseSensitive).isEmpty(); } /** Returns the underlying map. */ public NavigableMap<String, V> map() { return map; } @Experimental public V remove(String key) { return map.remove(key); } }
{ "pile_set_name": "Github" }
# Copyright 2016 Intel # # 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. import os import tarfile import testtools from syntribos.utils.config_fixture import ConfFixture from syntribos.utils import remotes @remotes.cache def fake_method_taking_long_time(name): """Fake method to check caching.""" return 3 class TestRemotes(testtools.TestCase): """Basic unit test for testing remote methods.""" def test_cache(self): self.useFixture(ConfFixture()) self.assertEqual(3, fake_method_taking_long_time("fake")) def test_extract_tar(self): t_file = tarfile.open("temp.tar.gz", mode="w:gz") t_file.close() path = remotes.extract_tar(os.path.abspath("temp.tar.gz")) self.assertTrue(path)
{ "pile_set_name": "Github" }
.class public Ltypes/TestConstInline; .super Ljava/lang/Object; .method private static test(Z)Ljava/lang/String; .registers 4 .param p0, "b" # Z if-eqz p0, :cond_d invoke-static {}, Ltypes/TestConstInline;->list()Ljava/util/List; move-result-object v0 const-string v1, "1" goto :goto_return :cond_d const/4 v2, 0x0 # chained move instead zero const loading move v0, v2 move v1, v0 goto :goto_return :goto_return invoke-static {v0, v1}, Ltypes/TestConstInline;->use(Ljava/util/List;Ljava/lang/String;)Ljava/lang/String; move-result-object v2 return-object v2 .end method .method private static use(Ljava/util/List;Ljava/lang/String;)Ljava/lang/String; .registers 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List", "<", "Ljava/lang/String;", ">;", "Ljava/lang/String;", ")", "Ljava/lang/String;" } .end annotation new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 return-object v0 .end method .method private static list()Ljava/util/List; .registers 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List", "<", "Ljava/lang/String;", ">;" } .end annotation invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List; move-result-object v0 return-object v0 .end method
{ "pile_set_name": "Github" }
/* Copyright 2017 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. */ // Note: the example only works with the code within the same release/branch. package main import ( "bufio" "flag" "fmt" "os" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" apiv1 "k8s.io/client-go/pkg/api/v1" appsv1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" "k8s.io/client-go/tools/clientcmd" // Uncomment the following line to load the gcp plugin (only required to authenticate against GKE clusters). // _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ) func main() { kubeconfig := flag.String("kubeconfig", "", "absolute path to the kubeconfig file") flag.Parse() if *kubeconfig == "" { panic("-kubeconfig not specified") } config, err := clientcmd.BuildConfigFromFlags("", *kubeconfig) if err != nil { panic(err) } clientset, err := kubernetes.NewForConfig(config) if err != nil { panic(err) } deploymentsClient := clientset.AppsV1beta1().Deployments(apiv1.NamespaceDefault) deployment := &appsv1beta1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: "demo-deployment", }, Spec: appsv1beta1.DeploymentSpec{ Replicas: int32Ptr(2), Template: apiv1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "app": "demo", }, }, Spec: apiv1.PodSpec{ Containers: []apiv1.Container{ { Name: "web", Image: "nginx:1.13", Ports: []apiv1.ContainerPort{ { Name: "http", Protocol: apiv1.ProtocolTCP, ContainerPort: 80, }, }, }, }, }, }, }, } // Create Deployment fmt.Println("Creating deployment...") result, err := deploymentsClient.Create(deployment) if err != nil { panic(err) } fmt.Printf("Created deployment %q.\n", result.GetObjectMeta().GetName()) // Update Deployment prompt() fmt.Println("Updating deployment...") // You have two options to Update() this Deployment: // // 1. Modify the "deployment" variable and call: Update(deployment). // This works like the "kubectl replace" command and it overwrites/loses changes // made by other clients between you Create() and Update() the object. // 2. Modify the "result" returned by Create()/Get() and retry Update(result) until // you no longer get a conflict error. This way, you can preserve changes made // by other clients between Create() and Update(). This is implemented below: for { result.Spec.Replicas = int32Ptr(1) // reduce replica count result.Spec.Template.Annotations = map[string]string{ // add annotations "foo": "bar", } if _, err := deploymentsClient.Update(result); errors.IsConflict(err) { // Deployment is modified in the meanwhile, query the latest version // and modify the retrieved object. fmt.Println("encountered conflict, retrying") result, err = deploymentsClient.Get("demo-deployment", metav1.GetOptions{}) if err != nil { panic(fmt.Errorf("Get failed: %+v", err)) } } else if err != nil { panic(err) } else { break } // TODO: You should sleep here with an exponential backoff to avoid // exhausting the apiserver, and add a limit/timeout on the retries to // avoid getting stuck in this loop indefintiely. } fmt.Println("Updated deployment...") // List Deployments prompt() fmt.Printf("Listing deployments in namespace %q:\n", apiv1.NamespaceDefault) list, err := deploymentsClient.List(metav1.ListOptions{}) if err != nil { panic(err) } for _, d := range list.Items { fmt.Printf(" * %s (%d replicas)\n", d.Name, *d.Spec.Replicas) } // Delete Deployment prompt() fmt.Println("Deleting deployment...") deletePolicy := metav1.DeletePropagationForeground if err := deploymentsClient.Delete("demo-deployment", &metav1.DeleteOptions{ PropagationPolicy: &deletePolicy, }); err != nil { panic(err) } fmt.Println("Deleted deployment.") } func prompt() { fmt.Printf("-> Press Return key to continue.") scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { break } if err := scanner.Err(); err != nil { panic(err) } fmt.Println() } func int32Ptr(i int32) *int32 { return &i }
{ "pile_set_name": "Github" }
/* * interface to the SCLP-read/write driver * * S390 version * Copyright IBM Corp. 1999 * Author(s): Martin Peschke <[email protected]> * Martin Schwidefsky <[email protected]> */ #ifndef __SCLP_TTY_H__ #define __SCLP_TTY_H__ #include <linux/tty_driver.h> extern struct tty_driver *sclp_tty_driver; #endif /* __SCLP_TTY_H__ */
{ "pile_set_name": "Github" }
.a color: red .b width: 100px .c @extend .a, .b height: 200px .d @extend .b,.c .d[data-prop*='\,'] color: blue .d-1 width: 100% $cf &:before &:after content: ' ' clear: both display: table font: 0/0 a visibility: hidden $ib display: inline-block .foo @extend .d[data-prop*=','], $cf, $ib $i = 1 .e @extend .d-{$i}, $cf, $ib
{ "pile_set_name": "Github" }
// Copyright 2012 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 ipv4 import "syscall" func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error { // TODO(mikio): implement this return syscall.EWINDOWS } func newControlMessage(opt *rawOpt) []byte { // TODO(mikio): implement this return nil } func parseControlMessage(b []byte) (*ControlMessage, error) { // TODO(mikio): implement this return nil, syscall.EWINDOWS } func marshalControlMessage(cm *ControlMessage) []byte { // TODO(mikio): implement this return nil }
{ "pile_set_name": "Github" }
<?php /* * Copyright 2005-2016 OCSInventory-NG/OCSInventory-ocsreports contributors. * See the Contributors file for more details about them. * * This file is part of OCSInventory-NG/OCSInventory-ocsreports. * * OCSInventory-NG/OCSInventory-ocsreports 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. * * OCSInventory-NG/OCSInventory-ocsreports 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 OCSInventory-NG/OCSInventory-ocsreports. if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ require_once 'require/function_users.php'; function validate_profile_create_form($data) { global $l; $errors = array(); $profiles = get_profile_labels(); // TODO check for field sizes // Check mandatory data $mandatory_fields = array('name', 'label', 'duplicate_profile'); foreach ($mandatory_fields as $field) { if (!$data[$field]) { $errors[$field] [] = $l->g(1391); } } // Check dropdown lists if ($data['duplicate_profile'] && !isset($profiles[$data['duplicate_profile']])) { $errors['duplicate_profile'] [] = $l->g(1392); } // Check profile name regex if ($data['name'] && !preg_match('/^[0-9A-Za-z]+$/', $data['name'])) { $errors['name'] [] = $l->g(1394); } // Check profile name doesn't exist if ($data['name'] && isset($profiles[$data['name']])) { $errors['name'] [] = $l->g(1395); } return $errors; } function validate_profile_edit_form($data) { global $l; $errors = array(); $yes_no = array('YES', 'NO'); $urls = $_SESSION['OCS']['url_service']; foreach ($data['config'] as $key => $val) { if (!in_array($val, $yes_no)) { $errors['config_' . $key . '_'] [] = $l->g(1392); } } foreach ($data['blacklist'] as $key => $val) { if (!in_array($val, $yes_no)) { $errors['blacklist_' . $key . '_'] [] = $l->g(1392); } } foreach ($data['pages'] as $key => $val) { if (!$urls->getUrl($key)) { $errors['blacklist_' . $key . '_'] [] = $l->g(1392); } } return $errors; } function create_profile($data) { $profiles = get_profiles(); $newProfile = clone $profiles[$data['duplicate_profile']]; $newProfile->setName($data['name']); $newProfile->setLabel($data['label']); $serializer = new XMLProfileSerializer(); $xml = $serializer->serialize($newProfile); if (file_put_contents(PROFILES_DIR . $newProfile->getName() . '.xml', $xml)) { return $newProfile->getName(); } else { return false; } } function remove_profile($profile_id) { global $l; if (!is_writable(PROFILES_DIR)) { msg_error($l->g(2116)); } else { unlink(PROFILES_DIR . $profile_id . '.xml'); } } function update_profile($profile_id, $data) { $urls = $_SESSION['OCS']['url_service']; $profiles = get_profiles(); $profile = $profiles[$profile_id]; $updatedProfile = new Profile($profile_id, $data['new_label'] ?: $profile->getLabel()); foreach ($data['restrictions'] as $key => $val) { $updatedProfile->setRestriction($key, $val); } foreach ($data['config'] as $key => $val) { $updatedProfile->setConfig($key, $val); } foreach ($data['blacklist'] as $key => $val) { if ($val == 'YES') { $updatedProfile->addToBlacklist($key); } } foreach ($data['pages'] as $key => $val) { if ($urls->getUrl($key) && $val == 'on') { $updatedProfile->addPage($key); } } $serializer = new XMLProfileSerializer(); $xml = $serializer->serialize($updatedProfile); if (file_put_contents(PROFILES_DIR . $profile->getName() . '.xml', $xml)) { return $profile->getName(); } else { return false; } } ?>
{ "pile_set_name": "Github" }
// Copyright 2013 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. //go:generate go run makexml.go -output xml.go // Package cldr provides a parser for LDML and related XML formats. // This package is intended to be used by the table generation tools // for the various internationalization-related packages. // As the XML types are generated from the CLDR DTD, and as the CLDR standard // is periodically amended, this package may change considerably over time. // This mostly means that data may appear and disappear between versions. // That is, old code should keep compiling for newer versions, but data // may have moved or changed. // CLDR version 22 is the first version supported by this package. // Older versions may not work. package cldr // import "golang.org/x/text/unicode/cldr" import ( "fmt" "sort" ) // CLDR provides access to parsed data of the Unicode Common Locale Data Repository. type CLDR struct { parent map[string][]string locale map[string]*LDML resolved map[string]*LDML bcp47 *LDMLBCP47 supp *SupplementalData } func makeCLDR() *CLDR { return &CLDR{ parent: make(map[string][]string), locale: make(map[string]*LDML), resolved: make(map[string]*LDML), bcp47: &LDMLBCP47{}, supp: &SupplementalData{}, } } // BCP47 returns the parsed BCP47 LDML data. If no such data was parsed, nil is returned. func (cldr *CLDR) BCP47() *LDMLBCP47 { return nil } // Draft indicates the draft level of an element. type Draft int const ( Approved Draft = iota Contributed Provisional Unconfirmed ) var drafts = []string{"unconfirmed", "provisional", "contributed", "approved", ""} // ParseDraft returns the Draft value corresponding to the given string. The // empty string corresponds to Approved. func ParseDraft(level string) (Draft, error) { if level == "" { return Approved, nil } for i, s := range drafts { if level == s { return Unconfirmed - Draft(i), nil } } return Approved, fmt.Errorf("cldr: unknown draft level %q", level) } func (d Draft) String() string { return drafts[len(drafts)-1-int(d)] } // SetDraftLevel sets which draft levels to include in the evaluated LDML. // Any draft element for which the draft level is higher than lev will be excluded. // If multiple draft levels are available for a single element, the one with the // lowest draft level will be selected, unless preferDraft is true, in which case // the highest draft will be chosen. // It is assumed that the underlying LDML is canonicalized. func (cldr *CLDR) SetDraftLevel(lev Draft, preferDraft bool) { // TODO: implement cldr.resolved = make(map[string]*LDML) } // RawLDML returns the LDML XML for id in unresolved form. // id must be one of the strings returned by Locales. func (cldr *CLDR) RawLDML(loc string) *LDML { return cldr.locale[loc] } // LDML returns the fully resolved LDML XML for loc, which must be one of // the strings returned by Locales. func (cldr *CLDR) LDML(loc string) (*LDML, error) { return cldr.resolve(loc) } // Supplemental returns the parsed supplemental data. If no such data was parsed, // nil is returned. func (cldr *CLDR) Supplemental() *SupplementalData { return cldr.supp } // Locales returns the locales for which there exist files. // Valid sublocales for which there is no file are not included. // The root locale is always sorted first. func (cldr *CLDR) Locales() []string { loc := []string{"root"} hasRoot := false for l, _ := range cldr.locale { if l == "root" { hasRoot = true continue } loc = append(loc, l) } sort.Strings(loc[1:]) if !hasRoot { return loc[1:] } return loc } // Get fills in the fields of x based on the XPath path. func Get(e Elem, path string) (res Elem, err error) { return walkXPath(e, path) }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2008, Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Institute 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 INSTITUTE 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 INSTITUTE 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. * * This file is part of the Contiki operating system. * */ /** * \file * Ring buffer library implementation * \author * Adam Dunkels <[email protected]> */ #include "lib/ringbuf.h" #include <sys/cc.h> /*---------------------------------------------------------------------------*/ void ringbuf_init(struct ringbuf *r, uint8_t *dataptr, uint8_t size) { r->data = dataptr; r->mask = size - 1; r->put_ptr = 0; r->get_ptr = 0; } /*---------------------------------------------------------------------------*/ int ringbuf_put(struct ringbuf *r, uint8_t c) { /* Check if buffer is full. If it is full, return 0 to indicate that the element was not inserted into the buffer. XXX: there is a potential risk for a race condition here, because the ->get_ptr field may be written concurrently by the ringbuf_get() function. To avoid this, access to ->get_ptr must be atomic. We use an uint8_t type, which makes access atomic on most platforms, but C does not guarantee this. */ if(((r->put_ptr - r->get_ptr) & r->mask) == r->mask) { return 0; } /* * CC_ACCESS_NOW is used because the compiler is allowed to reorder * the access to non-volatile variables. * In this case a reader might read from the moved index/ptr before * its value (c) is written. Reordering makes little sense, but * better safe than sorry. */ CC_ACCESS_NOW(uint8_t, r->data[r->put_ptr]) = c; CC_ACCESS_NOW(uint8_t, r->put_ptr) = (r->put_ptr + 1) & r->mask; return 1; } /*---------------------------------------------------------------------------*/ int ringbuf_get(struct ringbuf *r) { uint8_t c; /* Check if there are bytes in the buffer. If so, we return the first one and increase the pointer. If there are no bytes left, we return -1. XXX: there is a potential risk for a race condition here, because the ->put_ptr field may be written concurrently by the ringbuf_put() function. To avoid this, access to ->get_ptr must be atomic. We use an uint8_t type, which makes access atomic on most platforms, but C does not guarantee this. */ if(((r->put_ptr - r->get_ptr) & r->mask) > 0) { /* * CC_ACCESS_NOW is used because the compiler is allowed to reorder * the access to non-volatile variables. * In this case the memory might be freed and overwritten by * increasing get_ptr before the value was copied to c. * Opposed to the put-operation this would even make sense, * because the register used for mask can be reused to save c * (on some architectures). */ c = CC_ACCESS_NOW(uint8_t, r->data[r->get_ptr]); CC_ACCESS_NOW(uint8_t, r->get_ptr) = (r->get_ptr + 1) & r->mask; return c; } else { return -1; } } /*---------------------------------------------------------------------------*/ int ringbuf_size(struct ringbuf *r) { return r->mask + 1; } /*---------------------------------------------------------------------------*/ int ringbuf_elements(struct ringbuf *r) { return (r->put_ptr - r->get_ptr) & r->mask; } /*---------------------------------------------------------------------------*/
{ "pile_set_name": "Github" }
var convert = require('./convert'), func = convert('before', require('../before')); func.placeholder = require('./placeholder'); module.exports = func;
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using NLog; using NzbDrone.Common.Disk; using NzbDrone.Common.Extensions; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Extras.Files; using NzbDrone.Core.Extras.Metadata.Files; using NzbDrone.Core.Extras.Others; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Tv; namespace NzbDrone.Core.Extras.Metadata { public class MetadataService : ExtraFileManager<MetadataFile> { private readonly IMetadataFactory _metadataFactory; private readonly ICleanMetadataService _cleanMetadataService; private readonly IRecycleBinProvider _recycleBinProvider; private readonly IOtherExtraFileRenamer _otherExtraFileRenamer; private readonly IDiskTransferService _diskTransferService; private readonly IDiskProvider _diskProvider; private readonly IHttpClient _httpClient; private readonly IMediaFileAttributeService _mediaFileAttributeService; private readonly IMetadataFileService _metadataFileService; private readonly Logger _logger; public MetadataService(IConfigService configService, IDiskProvider diskProvider, IDiskTransferService diskTransferService, IRecycleBinProvider recycleBinProvider, IOtherExtraFileRenamer otherExtraFileRenamer, IMetadataFactory metadataFactory, ICleanMetadataService cleanMetadataService, IHttpClient httpClient, IMediaFileAttributeService mediaFileAttributeService, IMetadataFileService metadataFileService, Logger logger) : base(configService, diskProvider, diskTransferService, logger) { _metadataFactory = metadataFactory; _cleanMetadataService = cleanMetadataService; _otherExtraFileRenamer = otherExtraFileRenamer; _recycleBinProvider = recycleBinProvider; _diskTransferService = diskTransferService; _diskProvider = diskProvider; _httpClient = httpClient; _mediaFileAttributeService = mediaFileAttributeService; _metadataFileService = metadataFileService; _logger = logger; } public override int Order => 0; public override IEnumerable<ExtraFile> CreateAfterMediaCoverUpdate(Series series) { var metadataFiles = _metadataFileService.GetFilesBySeries(series.Id); _cleanMetadataService.Clean(series); if (!_diskProvider.FolderExists(series.Path)) { _logger.Info("Series folder does not exist, skipping metadata image creation"); return Enumerable.Empty<MetadataFile>(); } var files = new List<MetadataFile>(); foreach (var consumer in _metadataFactory.Enabled()) { var consumerFiles = GetMetadataFilesForConsumer(consumer, metadataFiles); files.AddRange(ProcessSeriesImages(consumer, series, consumerFiles)); } _metadataFileService.Upsert(files); return files; } public override IEnumerable<ExtraFile> CreateAfterSeriesScan(Series series, List<EpisodeFile> episodeFiles) { var metadataFiles = _metadataFileService.GetFilesBySeries(series.Id); _cleanMetadataService.Clean(series); if (!_diskProvider.FolderExists(series.Path)) { _logger.Info("Series folder does not exist, skipping metadata creation"); return Enumerable.Empty<MetadataFile>(); } var files = new List<MetadataFile>(); foreach (var consumer in _metadataFactory.Enabled()) { var consumerFiles = GetMetadataFilesForConsumer(consumer, metadataFiles); files.AddIfNotNull(ProcessSeriesMetadata(consumer, series, consumerFiles)); files.AddRange(ProcessSeriesImages(consumer, series, consumerFiles)); files.AddRange(ProcessSeasonImages(consumer, series, consumerFiles)); foreach (var episodeFile in episodeFiles) { files.AddIfNotNull(ProcessEpisodeMetadata(consumer, series, episodeFile, consumerFiles)); files.AddRange(ProcessEpisodeImages(consumer, series, episodeFile, consumerFiles)); } } _metadataFileService.Upsert(files); return files; } public override IEnumerable<ExtraFile> CreateAfterEpisodeImport(Series series, EpisodeFile episodeFile) { var files = new List<MetadataFile>(); foreach (var consumer in _metadataFactory.Enabled()) { files.AddIfNotNull(ProcessEpisodeMetadata(consumer, series, episodeFile, new List<MetadataFile>())); files.AddRange(ProcessEpisodeImages(consumer, series, episodeFile, new List<MetadataFile>())); } _metadataFileService.Upsert(files); return files; } public override IEnumerable<ExtraFile> CreateAfterEpisodeFolder(Series series, string seriesFolder, string seasonFolder) { var metadataFiles = _metadataFileService.GetFilesBySeries(series.Id); if (seriesFolder.IsNullOrWhiteSpace() && seasonFolder.IsNullOrWhiteSpace()) { return new List<MetadataFile>(); } var files = new List<MetadataFile>(); foreach (var consumer in _metadataFactory.Enabled()) { var consumerFiles = GetMetadataFilesForConsumer(consumer, metadataFiles); if (seriesFolder.IsNotNullOrWhiteSpace()) { files.AddIfNotNull(ProcessSeriesMetadata(consumer, series, consumerFiles)); files.AddRange(ProcessSeriesImages(consumer, series, consumerFiles)); } if (seasonFolder.IsNotNullOrWhiteSpace()) { files.AddRange(ProcessSeasonImages(consumer, series, consumerFiles)); } } _metadataFileService.Upsert(files); return files; } public override IEnumerable<ExtraFile> MoveFilesAfterRename(Series series, List<EpisodeFile> episodeFiles) { var metadataFiles = _metadataFileService.GetFilesBySeries(series.Id); var movedFiles = new List<MetadataFile>(); // TODO: Move EpisodeImage and EpisodeMetadata metadata files, instead of relying on consumers to do it // (Xbmc's EpisodeImage is more than just the extension) foreach (var consumer in _metadataFactory.GetAvailableProviders()) { foreach (var episodeFile in episodeFiles) { var metadataFilesForConsumer = GetMetadataFilesForConsumer(consumer, metadataFiles).Where(m => m.EpisodeFileId == episodeFile.Id).ToList(); foreach (var metadataFile in metadataFilesForConsumer) { var newFileName = consumer.GetFilenameAfterMove(series, episodeFile, metadataFile); var existingFileName = Path.Combine(series.Path, metadataFile.RelativePath); if (newFileName.PathNotEquals(existingFileName)) { try { _diskProvider.MoveFile(existingFileName, newFileName); metadataFile.RelativePath = series.Path.GetRelativePath(newFileName); movedFiles.Add(metadataFile); } catch (Exception ex) { _logger.Warn(ex, "Unable to move metadata file after rename: {0}", existingFileName); } } } } } _metadataFileService.Upsert(movedFiles); return movedFiles; } public override ExtraFile Import(Series series, EpisodeFile episodeFile, string path, string extension, bool readOnly) { return null; } private List<MetadataFile> GetMetadataFilesForConsumer(IMetadata consumer, List<MetadataFile> seriesMetadata) { return seriesMetadata.Where(c => c.Consumer == consumer.GetType().Name).ToList(); } private MetadataFile ProcessSeriesMetadata(IMetadata consumer, Series series, List<MetadataFile> existingMetadataFiles) { var seriesMetadata = consumer.SeriesMetadata(series); if (seriesMetadata == null) { return null; } var hash = seriesMetadata.Contents.SHA256Hash(); var metadata = GetMetadataFile(series, existingMetadataFiles, e => e.Type == MetadataType.SeriesMetadata) ?? new MetadataFile { SeriesId = series.Id, Consumer = consumer.GetType().Name, Type = MetadataType.SeriesMetadata }; if (hash == metadata.Hash) { if (seriesMetadata.RelativePath != metadata.RelativePath) { metadata.RelativePath = seriesMetadata.RelativePath; return metadata; } return null; } var fullPath = Path.Combine(series.Path, seriesMetadata.RelativePath); _logger.Debug("Writing Series Metadata to: {0}", fullPath); SaveMetadataFile(fullPath, seriesMetadata.Contents); metadata.Hash = hash; metadata.RelativePath = seriesMetadata.RelativePath; metadata.Extension = Path.GetExtension(fullPath); return metadata; } private MetadataFile ProcessEpisodeMetadata(IMetadata consumer, Series series, EpisodeFile episodeFile, List<MetadataFile> existingMetadataFiles) { var episodeMetadata = consumer.EpisodeMetadata(series, episodeFile); if (episodeMetadata == null) { return null; } var fullPath = Path.Combine(series.Path, episodeMetadata.RelativePath); _otherExtraFileRenamer.RenameOtherExtraFile(series, fullPath); var existingMetadata = GetMetadataFile(series, existingMetadataFiles, c => c.Type == MetadataType.EpisodeMetadata && c.EpisodeFileId == episodeFile.Id); if (existingMetadata != null) { var existingFullPath = Path.Combine(series.Path, existingMetadata.RelativePath); if (fullPath.PathNotEquals(existingFullPath)) { _diskTransferService.TransferFile(existingFullPath, fullPath, TransferMode.Move); existingMetadata.RelativePath = episodeMetadata.RelativePath; } } var hash = episodeMetadata.Contents.SHA256Hash(); var metadata = existingMetadata ?? new MetadataFile { SeriesId = series.Id, SeasonNumber = episodeFile.SeasonNumber, EpisodeFileId = episodeFile.Id, Consumer = consumer.GetType().Name, Type = MetadataType.EpisodeMetadata, RelativePath = episodeMetadata.RelativePath, Extension = Path.GetExtension(fullPath) }; if (hash == metadata.Hash) { return null; } _logger.Debug("Writing Episode Metadata to: {0}", fullPath); SaveMetadataFile(fullPath, episodeMetadata.Contents); metadata.Hash = hash; return metadata; } private List<MetadataFile> ProcessSeriesImages(IMetadata consumer, Series series, List<MetadataFile> existingMetadataFiles) { var result = new List<MetadataFile>(); foreach (var image in consumer.SeriesImages(series)) { var fullPath = Path.Combine(series.Path, image.RelativePath); if (_diskProvider.FileExists(fullPath)) { _logger.Debug("Series image already exists: {0}", fullPath); continue; } _otherExtraFileRenamer.RenameOtherExtraFile(series, fullPath); var metadata = GetMetadataFile(series, existingMetadataFiles, c => c.Type == MetadataType.SeriesImage && c.RelativePath == image.RelativePath) ?? new MetadataFile { SeriesId = series.Id, Consumer = consumer.GetType().Name, Type = MetadataType.SeriesImage, RelativePath = image.RelativePath, Extension = Path.GetExtension(fullPath) }; DownloadImage(series, image); result.Add(metadata); } return result; } private List<MetadataFile> ProcessSeasonImages(IMetadata consumer, Series series, List<MetadataFile> existingMetadataFiles) { var result = new List<MetadataFile>(); foreach (var season in series.Seasons) { foreach (var image in consumer.SeasonImages(series, season)) { var fullPath = Path.Combine(series.Path, image.RelativePath); if (_diskProvider.FileExists(fullPath)) { _logger.Debug("Season image already exists: {0}", fullPath); continue; } _otherExtraFileRenamer.RenameOtherExtraFile(series, fullPath); var metadata = GetMetadataFile(series, existingMetadataFiles, c => c.Type == MetadataType.SeasonImage && c.SeasonNumber == season.SeasonNumber && c.RelativePath == image.RelativePath) ?? new MetadataFile { SeriesId = series.Id, SeasonNumber = season.SeasonNumber, Consumer = consumer.GetType().Name, Type = MetadataType.SeasonImage, RelativePath = image.RelativePath, Extension = Path.GetExtension(fullPath) }; DownloadImage(series, image); result.Add(metadata); } } return result; } private List<MetadataFile> ProcessEpisodeImages(IMetadata consumer, Series series, EpisodeFile episodeFile, List<MetadataFile> existingMetadataFiles) { var result = new List<MetadataFile>(); foreach (var image in consumer.EpisodeImages(series, episodeFile)) { var fullPath = Path.Combine(series.Path, image.RelativePath); if (_diskProvider.FileExists(fullPath)) { _logger.Debug("Episode image already exists: {0}", fullPath); continue; } _otherExtraFileRenamer.RenameOtherExtraFile(series, fullPath); var existingMetadata = GetMetadataFile(series, existingMetadataFiles, c => c.Type == MetadataType.EpisodeImage && c.EpisodeFileId == episodeFile.Id); if (existingMetadata != null) { var existingFullPath = Path.Combine(series.Path, existingMetadata.RelativePath); if (fullPath.PathNotEquals(existingFullPath)) { _diskTransferService.TransferFile(existingFullPath, fullPath, TransferMode.Move); existingMetadata.RelativePath = image.RelativePath; return new List<MetadataFile>{ existingMetadata }; } } var metadata = existingMetadata ?? new MetadataFile { SeriesId = series.Id, SeasonNumber = episodeFile.SeasonNumber, EpisodeFileId = episodeFile.Id, Consumer = consumer.GetType().Name, Type = MetadataType.EpisodeImage, RelativePath = image.RelativePath, Extension = Path.GetExtension(fullPath) }; DownloadImage(series, image); result.Add(metadata); } return result; } private void DownloadImage(Series series, ImageFileResult image) { var fullPath = Path.Combine(series.Path, image.RelativePath); try { if (image.Url.StartsWith("http")) { _httpClient.DownloadFile(image.Url, fullPath); } else { _diskProvider.CopyFile(image.Url, fullPath); } _mediaFileAttributeService.SetFilePermissions(fullPath); } catch (HttpException ex) { _logger.Warn(ex, "Couldn't download image {0} for {1}. {2}", image.Url, series, ex.Message); } catch (WebException ex) { _logger.Warn(ex, "Couldn't download image {0} for {1}. {2}", image.Url, series, ex.Message); } catch (Exception ex) { _logger.Error(ex, "Couldn't download image {0} for {1}. {2}", image.Url, series, ex.Message); } } private void SaveMetadataFile(string path, string contents) { _diskProvider.WriteAllText(path, contents); _mediaFileAttributeService.SetFilePermissions(path); } private MetadataFile GetMetadataFile(Series series, List<MetadataFile> existingMetadataFiles, Func<MetadataFile, bool> predicate) { var matchingMetadataFiles = existingMetadataFiles.Where(predicate).ToList(); if (matchingMetadataFiles.Empty()) { return null; } //Remove duplicate metadata files from DB and disk foreach (var file in matchingMetadataFiles.Skip(1)) { var path = Path.Combine(series.Path, file.RelativePath); _logger.Debug("Removing duplicate Metadata file: {0}", path); var subfolder = _diskProvider.GetParentFolder(series.Path).GetRelativePath(_diskProvider.GetParentFolder(path)); _recycleBinProvider.DeleteFile(path, subfolder); _metadataFileService.Delete(file.Id); } return matchingMetadataFiles.First(); } } }
{ "pile_set_name": "Github" }
defmodule ConduitWeb.ConnCase do @moduledoc """ This module defines the test case to be used by tests that require setting up a connection. Such tests rely on `Phoenix.ConnTest` and also import other functionality to make it easier to build common datastructures and query the data layer. """ use ExUnit.CaseTemplate using do quote do # Import conveniences for testing with connections import Plug.Conn import Phoenix.ConnTest import ConduitWeb.ConnHelpers import ConduitWeb.Router.Helpers import Conduit.Factory import Conduit.Fixture # The default endpoint for testing @endpoint ConduitWeb.Endpoint end end setup _tags do Conduit.Storage.reset!() {:ok, conn: Phoenix.ConnTest.build_conn()} end end
{ "pile_set_name": "Github" }
// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. // +build arm,freebsd package unix const ( sizeofPtr = 0x4 sizeofShort = 0x2 sizeofInt = 0x4 sizeofLong = 0x4 sizeofLongLong = 0x8 ) type ( _C_short int16 _C_int int32 _C_long int32 _C_long_long int64 ) type Timespec struct { Sec int64 Nsec int32 Pad_cgo_0 [4]byte } type Timeval struct { Sec int64 Usec int32 Pad_cgo_0 [4]byte } type Rusage struct { Utime Timeval Stime Timeval Maxrss int32 Ixrss int32 Idrss int32 Isrss int32 Minflt int32 Majflt int32 Nswap int32 Inblock int32 Oublock int32 Msgsnd int32 Msgrcv int32 Nsignals int32 Nvcsw int32 Nivcsw int32 } type Rlimit struct { Cur int64 Max int64 } type _Gid_t uint32 type Stat_t struct { Dev uint32 Ino uint32 Mode uint16 Nlink uint16 Uid uint32 Gid uint32 Rdev uint32 Atimespec Timespec Mtimespec Timespec Ctimespec Timespec Size int64 Blocks int64 Blksize int32 Flags uint32 Gen uint32 Lspare int32 Birthtimespec Timespec } type Statfs_t struct { Version uint32 Type uint32 Flags uint64 Bsize uint64 Iosize uint64 Blocks uint64 Bfree uint64 Bavail int64 Files uint64 Ffree int64 Syncwrites uint64 Asyncwrites uint64 Syncreads uint64 Asyncreads uint64 Spare [10]uint64 Namemax uint32 Owner uint32 Fsid Fsid Charspare [80]int8 Fstypename [16]int8 Mntfromname [88]int8 Mntonname [88]int8 } type Flock_t struct { Start int64 Len int64 Pid int32 Type int16 Whence int16 Sysid int32 Pad_cgo_0 [4]byte } type Dirent struct { Fileno uint32 Reclen uint16 Type uint8 Namlen uint8 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 FADV_SEQUENTIAL = 0x2 FADV_WILLNEED = 0x3 FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrInet4 struct { Len uint8 Family uint8 Port uint16 Addr [4]byte /* in_addr */ Zero [8]int8 } type RawSockaddrInet6 struct { Len uint8 Family uint8 Port uint16 Flowinfo uint32 Addr [16]byte /* in6_addr */ Scope_id uint32 } type RawSockaddrUnix struct { Len uint8 Family uint8 Path [104]int8 } type RawSockaddrDatalink struct { Len uint8 Family uint8 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [46]int8 } type RawSockaddr struct { Len uint8 Family uint8 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [92]int8 } type _Socklen uint32 type Linger struct { Onoff int32 Linger int32 } type Iovec struct { Base *byte Len uint32 } type IPMreq struct { Multiaddr [4]byte /* in_addr */ Interface [4]byte /* in_addr */ } type IPMreqn struct { Multiaddr [4]byte /* in_addr */ Address [4]byte /* in_addr */ Ifindex int32 } type IPv6Mreq struct { Multiaddr [16]byte /* in6_addr */ Interface uint32 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen int32 Control *byte Controllen uint32 Flags int32 } type Cmsghdr struct { Len uint32 Level int32 Type int32 } type Inet6Pktinfo struct { Addr [16]byte /* in6_addr */ Ifindex uint32 } type IPv6MTUInfo struct { Addr RawSockaddrInet6 Mtu uint32 } type ICMPv6Filter struct { Filt [8]uint32 } const ( SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet6 = 0x1c SizeofSockaddrAny = 0x6c SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x36 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc SizeofInet6Pktinfo = 0x14 SizeofIPv6MTUInfo = 0x20 SizeofICMPv6Filter = 0x20 ) const ( PTRACE_TRACEME = 0x0 PTRACE_CONT = 0x7 PTRACE_KILL = 0x8 ) type Kevent_t struct { Ident uint32 Filter int16 Flags uint16 Fflags uint32 Data int32 Udata *byte } type FdSet struct { X__fds_bits [32]uint32 } const ( sizeofIfMsghdr = 0xa8 SizeofIfMsghdr = 0x70 sizeofIfData = 0x98 SizeofIfData = 0x60 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 SizeofIfAnnounceMsghdr = 0x18 SizeofRtMsghdr = 0x5c SizeofRtMetrics = 0x38 ) type ifMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Pad_cgo_0 [2]byte Data ifData } type IfMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Pad_cgo_0 [2]byte Data IfData } type ifData struct { Type uint8 Physical uint8 Addrlen uint8 Hdrlen uint8 Link_state uint8 Vhid uint8 Datalen uint16 Mtu uint32 Metric uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Hwassist uint64 X__ifi_epoch [8]byte X__ifi_lastchange [16]byte } type IfData struct { Type uint8 Physical uint8 Addrlen uint8 Hdrlen uint8 Link_state uint8 Spare_char1 uint8 Spare_char2 uint8 Datalen uint8 Mtu uint32 Metric uint32 Baudrate uint32 Ipackets uint32 Ierrors uint32 Opackets uint32 Oerrors uint32 Collisions uint32 Ibytes uint32 Obytes uint32 Imcasts uint32 Omcasts uint32 Iqdrops uint32 Noproto uint32 Hwassist uint32 Pad_cgo_0 [4]byte Epoch int64 Lastchange Timeval } type IfaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Pad_cgo_0 [2]byte Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Pad_cgo_0 [2]byte } type IfAnnounceMsghdr struct { Msglen uint16 Version uint8 Type uint8 Index uint16 Name [16]int8 What uint16 } type RtMsghdr struct { Msglen uint16 Version uint8 Type uint8 Index uint16 Pad_cgo_0 [2]byte Flags int32 Addrs int32 Pid int32 Seq int32 Errno int32 Fmask int32 Inits uint32 Rmx RtMetrics } type RtMetrics struct { Locks uint32 Mtu uint32 Hopcount uint32 Expire uint32 Recvpipe uint32 Sendpipe uint32 Ssthresh uint32 Rtt uint32 Rttvar uint32 Pksent uint32 Weight uint32 Filler [3]uint32 } const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfZbuf = 0xc SizeofBpfProgram = 0x8 SizeofBpfInsn = 0x8 SizeofBpfHdr = 0x20 SizeofBpfZbufHeader = 0x20 ) type BpfVersion struct { Major uint16 Minor uint16 } type BpfStat struct { Recv uint32 Drop uint32 } type BpfZbuf struct { Bufa *byte Bufb *byte Buflen uint32 } type BpfProgram struct { Len uint32 Insns *BpfInsn } type BpfInsn struct { Code uint16 Jt uint8 Jf uint8 K uint32 } type BpfHdr struct { Tstamp Timeval Caplen uint32 Datalen uint32 Hdrlen uint16 Pad_cgo_0 [6]byte } type BpfZbufHeader struct { Kernel_gen uint32 Kernel_len uint32 User_gen uint32 X_bzh_pad [5]uint32 } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [20]uint8 Ispeed uint32 Ospeed uint32 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_REMOVEDIR = 0x800 AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x200 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLINIGNEOF = 0x2000 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type CapRights struct { Rights [2]uint64 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte }
{ "pile_set_name": "Github" }
from .base import * @dfpipe def summarize(df, **kwargs): return pd.DataFrame({k: [v] for k, v in kwargs.items()}) @dfpipe def summarize_each(df, functions, *args): columns, values = [], [] for arg in args: if isinstance(arg, pd.Series): varname = arg.name col = arg elif isinstance(arg, str): varname = arg col = df[varname] elif isinstance(arg, int): varname = df.columns[arg] col = df.iloc[:, arg] for f in functions: fname = f.__name__ columns.append('_'.join([varname, fname])) values.append(f(col)) return pd.DataFrame([values], columns=columns)
{ "pile_set_name": "Github" }
/* Copyright 2019-2020 Canaan 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. */ #include <hlir/ops/constant.h> #include <hlir/transforms/neutral/fold_constant.h> #include <hlir/visitor.h> #include <llir/evaluator.h> #include <scheduler/scheduler.h> #include <targets/target.h> #include <unordered_set> using namespace nncase; using namespace nncase::hlir; using namespace nncase::hlir::transforms; using namespace nncase::scheduler; namespace { std::unordered_set<node_opcode> dontfold_ops { }; } bool fold_constant_transform::on_try_match(node &node, transform_context &context) { if (dontfold_ops.find(node.runtime_opcode()) == dontfold_ops.end() && node.inputs().size() && std::all_of(node.inputs().begin(), node.inputs().end(), [](input_connector &conn) { return conn.connection()->owner().runtime_opcode() == op_constant; })) { for (auto &in : node.inputs()) context.inputs.emplace_back(&in); for (auto &out : node.outputs()) context.outputs.emplace_back(&out); context.matched_nodes.emplace_back(&node); for (auto &in : node.inputs()) context.matched_nodes.emplace_back(&in.connection()->owner()); return true; } return false; } void fold_constant_transform::process(transform_context &context) { auto &output = *context.inputs[0]->connection(); auto inputs = context.outputs[0]->connections(); auto &old_op = *context.matched_nodes[0]; // 1. Construct new eval graph graph new_graph; std::vector<output_node *> op_outputs; std::vector<constant *> output_values; for (auto &out : old_op.outputs()) { auto node = op_outputs.emplace_back(new_graph.emplace<output_node>(out.type(), out.shape())); if (old_op.outputs().size() > 1) node->name(out.owner().name() + "/" + out.name()); else node->name(out.owner().name()); node->input().connect(out); } // 2. Eval { std::vector<std::unique_ptr<memory_allocator>> allocator_holder; std::unordered_map<memory_type_t, memory_allocator *> allocators; context.target.fill_allocators(allocators, allocator_holder); allocation_context alloc_ctx(allocators); std::vector<llir::node *> compute_sequence; hlir_compile_context hl_ctx; new_graph.compile(hl_ctx); schedule(hl_ctx.graph.outputs(), alloc_ctx, compute_sequence, 0); llir::evaluate_context eval_ctx(allocators, alloc_ctx.allocations()); llir::evaluator eval(eval_ctx, compute_sequence); eval.evaluate(); for (size_t i = 0; i < op_outputs.size(); i++) { auto &op_output = *op_outputs[i]; auto mem = eval.output_at<uint8_t>(i); auto out_val = context.graph.emplace<constant>(op_output.input().type(), op_output.input().shape(), mem.begin(), mem.end()); out_val->name(op_output.name()); output_values.emplace_back(out_val); } } // 3. Clear eval graph connections to main graph for (auto &out : op_outputs) out->input().clear_connection(); for (size_t i = 0; i < old_op.outputs().size(); i++) { auto &out = old_op.outputs()[i]; for (auto &in : dup(out.connections())) in->connect(output_values[i]->output()); } }
{ "pile_set_name": "Github" }
{namespace} class {class_name} extends \SOAPClient { public function __construct($wsdl, array $options) { parent::__construct('{wsdl}', $options); } {methods}}
{ "pile_set_name": "Github" }
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the 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.keycloak.example.ws.types; import javax.xml.bind.annotation.XmlRegistry; /** * This object contains factory methods for each * Java content interface and Java element interface * generated in the org.apache.servicemix.samples.wsdl_first.types package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory methods for each of these are * provided in this class. * */ @XmlRegistry public class ObjectFactory { /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.servicemix.samples.wsdl_first.types * */ public ObjectFactory() { } /** * Create an instance of {@link GetProductResponse } * */ public GetProductResponse createGetProductResponse() { return new GetProductResponse(); } /** * Create an instance of {@link GetProduct } * */ public GetProduct createGetProduct() { return new GetProduct(); } /** * Create an instance of {@link UnknownProductFault } * */ public UnknownProductFault createUnknownProductFault() { return new UnknownProductFault(); } }
{ "pile_set_name": "Github" }
/* contrib/pgcrypto/pgcrypto--unpackaged--1.0.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION pgcrypto" to load this file. \quit ALTER EXTENSION pgcrypto ADD function digest(text,text); ALTER EXTENSION pgcrypto ADD function digest(bytea,text); ALTER EXTENSION pgcrypto ADD function hmac(text,text,text); ALTER EXTENSION pgcrypto ADD function hmac(bytea,bytea,text); ALTER EXTENSION pgcrypto ADD function crypt(text,text); ALTER EXTENSION pgcrypto ADD function gen_salt(text); ALTER EXTENSION pgcrypto ADD function gen_salt(text,integer); ALTER EXTENSION pgcrypto ADD function encrypt(bytea,bytea,text); ALTER EXTENSION pgcrypto ADD function decrypt(bytea,bytea,text); ALTER EXTENSION pgcrypto ADD function encrypt_iv(bytea,bytea,bytea,text); ALTER EXTENSION pgcrypto ADD function decrypt_iv(bytea,bytea,bytea,text); ALTER EXTENSION pgcrypto ADD function gen_random_bytes(integer); ALTER EXTENSION pgcrypto ADD function pgp_sym_encrypt(text,text); ALTER EXTENSION pgcrypto ADD function pgp_sym_encrypt_bytea(bytea,text); ALTER EXTENSION pgcrypto ADD function pgp_sym_encrypt(text,text,text); ALTER EXTENSION pgcrypto ADD function pgp_sym_encrypt_bytea(bytea,text,text); ALTER EXTENSION pgcrypto ADD function pgp_sym_decrypt(bytea,text); ALTER EXTENSION pgcrypto ADD function pgp_sym_decrypt_bytea(bytea,text); ALTER EXTENSION pgcrypto ADD function pgp_sym_decrypt(bytea,text,text); ALTER EXTENSION pgcrypto ADD function pgp_sym_decrypt_bytea(bytea,text,text); ALTER EXTENSION pgcrypto ADD function pgp_pub_encrypt(text,bytea); ALTER EXTENSION pgcrypto ADD function pgp_pub_encrypt_bytea(bytea,bytea); ALTER EXTENSION pgcrypto ADD function pgp_pub_encrypt(text,bytea,text); ALTER EXTENSION pgcrypto ADD function pgp_pub_encrypt_bytea(bytea,bytea,text); ALTER EXTENSION pgcrypto ADD function pgp_pub_decrypt(bytea,bytea); ALTER EXTENSION pgcrypto ADD function pgp_pub_decrypt_bytea(bytea,bytea); ALTER EXTENSION pgcrypto ADD function pgp_pub_decrypt(bytea,bytea,text); ALTER EXTENSION pgcrypto ADD function pgp_pub_decrypt_bytea(bytea,bytea,text); ALTER EXTENSION pgcrypto ADD function pgp_pub_decrypt(bytea,bytea,text,text); ALTER EXTENSION pgcrypto ADD function pgp_pub_decrypt_bytea(bytea,bytea,text,text); ALTER EXTENSION pgcrypto ADD function pgp_key_id(bytea); ALTER EXTENSION pgcrypto ADD function armor(bytea); ALTER EXTENSION pgcrypto ADD function dearmor(text);
{ "pile_set_name": "Github" }
//===-- Logging.h -----------------------------------------------*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// #ifndef LLDB_UTILITY_LOGGING_H #define LLDB_UTILITY_LOGGING_H #include <cstdint> // Log Bits specific to logging in lldb #define LIBLLDB_LOG_PROCESS (1u << 1) #define LIBLLDB_LOG_THREAD (1u << 2) #define LIBLLDB_LOG_DYNAMIC_LOADER (1u << 3) #define LIBLLDB_LOG_EVENTS (1u << 4) #define LIBLLDB_LOG_BREAKPOINTS (1u << 5) #define LIBLLDB_LOG_WATCHPOINTS (1u << 6) #define LIBLLDB_LOG_STEP (1u << 7) #define LIBLLDB_LOG_EXPRESSIONS (1u << 8) #define LIBLLDB_LOG_TEMPORARY (1u << 9) #define LIBLLDB_LOG_STATE (1u << 10) #define LIBLLDB_LOG_OBJECT (1u << 11) #define LIBLLDB_LOG_COMMUNICATION (1u << 12) #define LIBLLDB_LOG_CONNECTION (1u << 13) #define LIBLLDB_LOG_HOST (1u << 14) #define LIBLLDB_LOG_UNWIND (1u << 15) #define LIBLLDB_LOG_API (1u << 16) #define LIBLLDB_LOG_SCRIPT (1u << 17) #define LIBLLDB_LOG_COMMANDS (1U << 18) #define LIBLLDB_LOG_TYPES (1u << 19) #define LIBLLDB_LOG_SYMBOLS (1u << 20) #define LIBLLDB_LOG_MODULES (1u << 21) #define LIBLLDB_LOG_TARGET (1u << 22) #define LIBLLDB_LOG_MMAP (1u << 23) #define LIBLLDB_LOG_OS (1u << 24) #define LIBLLDB_LOG_PLATFORM (1u << 25) #define LIBLLDB_LOG_SYSTEM_RUNTIME (1u << 26) #define LIBLLDB_LOG_JIT_LOADER (1u << 27) #define LIBLLDB_LOG_LANGUAGE (1u << 28) #define LIBLLDB_LOG_DATAFORMATTERS (1u << 29) #define LIBLLDB_LOG_DEMANGLE (1u << 30) #define LIBLLDB_LOG_AST (1u << 31) #define LIBLLDB_LOG_ALL (UINT32_MAX) #define LIBLLDB_LOG_DEFAULT \ (LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD | LIBLLDB_LOG_DYNAMIC_LOADER | \ LIBLLDB_LOG_BREAKPOINTS | LIBLLDB_LOG_WATCHPOINTS | LIBLLDB_LOG_STEP | \ LIBLLDB_LOG_STATE | LIBLLDB_LOG_SYMBOLS | LIBLLDB_LOG_TARGET | \ LIBLLDB_LOG_COMMANDS) namespace lldb_private { class Log; Log *GetLogIfAllCategoriesSet(uint32_t mask); Log *GetLogIfAnyCategoriesSet(uint32_t mask); void InitializeLldbChannel(); } // namespace lldb_private #endif // LLDB_UTILITY_LOGGING_H
{ "pile_set_name": "Github" }
module.exports = async function (owner, repo, old, target, octokit) { // Via https://github.com/gr2m/octokit-plugin-rename-branch/blob/5d3c37439515db9f49f049e28510dc596982cb02/src/rename-branch.ts#L56-L90 const query = `query($owner: String!, $repo: String!) { repository(owner:$owner,name:$repo) { branchProtectionRules(first:100) { nodes { id pattern } } } }`; const { repository: { branchProtectionRules: { nodes: branchProtectionRules }, }, } = await octokit.graphql(query, { owner, repo }); // there can only be one protection per pattern const rule = branchProtectionRules.find((rule) => rule.pattern === old); // No matching patterns if (!rule) { return; } await octokit.graphql( `mutation($branchProtectionRuleId:ID!,$pattern:String!) { updateBranchProtectionRule (input:{branchProtectionRuleId:$branchProtectionRuleId,pattern:$pattern}) { branchProtectionRule { id, pattern } } }`, { branchProtectionRuleId: rule.id, pattern: target, } ); };
{ "pile_set_name": "Github" }
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ // // 1. Set default font family to sans-serif. // 2. Prevent iOS and IE text size adjust after device orientation change, // without disabling user zoom. // html { font-family: sans-serif; // 1 -ms-text-size-adjust: 100%; // 2 -webkit-text-size-adjust: 100%; // 2 } // // Remove default margin. // body { margin: 0; } // HTML5 display definitions // ========================================================================== // // Correct `block` display not defined for any HTML5 element in IE 8/9. // Correct `block` display not defined for `details` or `summary` in IE 10/11 // and Firefox. // Correct `block` display not defined for `main` in IE 11. // article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } // // 1. Correct `inline-block` display not defined in IE 8/9. // 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. // audio, canvas, progress, video { display: inline-block; // 1 vertical-align: baseline; // 2 } // // Prevent modern browsers from displaying `audio` without controls. // Remove excess height in iOS 5 devices. // audio:not([controls]) { display: none; height: 0; } // // Address `[hidden]` styling not present in IE 8/9/10. // Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. // [hidden], template { display: none; } // Links // ========================================================================== // // Remove the gray background color from active links in IE 10. // a { background-color: transparent; } // // Improve readability of focused elements when they are also in an // active/hover state. // a:active, a:hover { outline: 0; } // Text-level semantics // ========================================================================== // // Address styling not present in IE 8/9/10/11, Safari, and Chrome. // abbr[title] { border-bottom: 1px dotted; } // // Address style set to `bolder` in Firefox 4+, Safari, and Chrome. // b, strong { font-weight: bold; } // // Address styling not present in Safari and Chrome. // dfn { font-style: italic; } // // Address variable `h1` font-size and margin within `section` and `article` // contexts in Firefox 4+, Safari, and Chrome. // h1 { font-size: 2em; margin: 0.67em 0; } // // Address styling not present in IE 8/9. // mark { background: #ff0; color: #000; } // // Address inconsistent and variable font size in all browsers. // small { font-size: 80%; } // // Prevent `sub` and `sup` affecting `line-height` in all browsers. // sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } // Embedded content // ========================================================================== // // Remove border when inside `a` element in IE 8/9/10. // img { border: 0; } // // Correct overflow not hidden in IE 9/10/11. // svg:not(:root) { overflow: hidden; } // Grouping content // ========================================================================== // // Address margin not present in IE 8/9 and Safari. // figure { margin: 1em 40px; } // // Address differences between Firefox and other browsers. // hr { box-sizing: content-box; height: 0; } // // Contain overflow in all browsers. // pre { overflow: auto; } // // Address odd `em`-unit font size rendering in all browsers. // code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } // Forms // ========================================================================== // // Known limitation: by default, Chrome and Safari on OS X allow very limited // styling of `select`, unless a `border` property is set. // // // 1. Correct color not being inherited. // Known issue: affects color of disabled elements. // 2. Correct font properties not being inherited. // 3. Address margins set differently in Firefox 4+, Safari, and Chrome. // button, input, optgroup, select, textarea { color: inherit; // 1 font: inherit; // 2 margin: 0; // 3 } // // Address `overflow` set to `hidden` in IE 8/9/10/11. // button { overflow: visible; } // // Address inconsistent `text-transform` inheritance for `button` and `select`. // All other form control elements do not inherit `text-transform` values. // Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. // Correct `select` style inheritance in Firefox. // button, select { text-transform: none; } // // 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` // and `video` controls. // 2. Correct inability to style clickable `input` types in iOS. // 3. Improve usability and consistency of cursor style between image-type // `input` and others. // button, html input[type="button"], // 1 input[type="reset"], input[type="submit"] { -webkit-appearance: button; // 2 cursor: pointer; // 3 } // // Re-set default cursor for disabled elements. // button[disabled], html input[disabled] { cursor: default; } // // Remove inner padding and border in Firefox 4+. // button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } // // Address Firefox 4+ setting `line-height` on `input` using `!important` in // the UA stylesheet. // input { line-height: normal; } // // It's recommended that you don't attempt to style these elements. // Firefox's implementation doesn't respect box-sizing, padding, or width. // // 1. Address box sizing set to `content-box` in IE 8/9/10. // 2. Remove excess padding in IE 8/9/10. // input[type="checkbox"], input[type="radio"] { box-sizing: border-box; // 1 padding: 0; // 2 } // // Fix the cursor style for Chrome's increment/decrement buttons. For certain // `font-size` values of the `input`, it causes the cursor style of the // decrement button to change from `default` to `text`. // input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } // // 1. Address `appearance` set to `searchfield` in Safari and Chrome. // 2. Address `box-sizing` set to `border-box` in Safari and Chrome. // input[type="search"] { -webkit-appearance: textfield; // 1 box-sizing: content-box; //2 } // // Remove inner padding and search cancel button in Safari and Chrome on OS X. // Safari (but not Chrome) clips the cancel button when the search input has // padding (and `textfield` appearance). // input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } // // Define consistent border, margin, and padding. // fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } // // 1. Correct `color` not being inherited in IE 8/9/10/11. // 2. Remove padding so people aren't caught out if they zero out fieldsets. // legend { border: 0; // 1 padding: 0; // 2 } // // Remove default vertical scrollbar in IE 8/9/10/11. // textarea { overflow: auto; } // // Don't inherit the `font-weight` (applied by a rule above). // NOTE: the default cannot safely be changed in Chrome and Safari on OS X. // optgroup { font-weight: bold; } // Tables // ========================================================================== // // Remove most spacing between table cells. // table { border-collapse: collapse; border-spacing: 0; } td, th { padding: 0; }
{ "pile_set_name": "Github" }
<?hh function f(string $a): string { <partial>$b</partial> = /* HH_FIXME[4110] */ <partial>$a</partial> + <partial>1</partial>; return <checked>$b</checked>; } function g(string $a): string { /* HH_FIXME[4110] */ <partial>$b</partial> = <partial>$a</partial> + <partial>1</partial>; return <checked>$b</checked>; }
{ "pile_set_name": "Github" }
#include <WinAPI.au3> #include <WindowsConstants.au3> #include <FontConstants.au3> Global $tRECT, $hFont, $hOldFont, $hDC HotKeySet("{ESC}", "_Exit") $tRECT = DllStructCreate($tagRect) DllStructSetData($tRECT, "Left", 5) DllStructSetData($tRECT, "Top", 5) DllStructSetData($tRECT, "Right", 250) DllStructSetData($tRECT, "Bottom", 50) $hDC = _WinAPI_GetDC(0) $hFont = _WinAPI_CreateFont(50, 0, 0, 0, 400, False, False, False, $DEFAULT_CHARSET, _ $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Arial') $hOldFont = _WinAPI_SelectObject($hDC, $hFont) _WinAPI_SetTextColor($hDC, 0x0000FF) _WinAPI_SetBkColor($hDC, 0x000000) ; comment next line to get black background instead of transparent one _WinAPI_SetBkMode($hDC, $TRANSPARENT) While 1 _WinAPI_DrawText($hDC, "Hello world!", $tRECT, $DT_CENTER) Sleep(100) WEnd Func _Exit() _WinAPI_SelectObject($hDC, $hOldFont) _WinAPI_DeleteObject($hFont) _WinAPI_ReleaseDC(0, $hDC) _WinAPI_InvalidateRect(0, 0) $tRECT = 0 Exit EndFunc ;==>_Exit
{ "pile_set_name": "Github" }
/*! lightgallery - v1.2.21 - 2016-06-28 * http://sachinchoolur.github.io/lightGallery/ * Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */ (function($, window, document, undefined) { 'use strict'; var defaults = { scale: 1, zoom: true, actualSize: true, enableZoomAfter: 300 }; var Zoom = function(element) { this.core = $(element).data('lightGallery'); this.core.s = $.extend({}, defaults, this.core.s); if (this.core.s.zoom && this.core.doCss()) { this.init(); // Store the zoomable timeout value just to clear it while closing this.zoomabletimeout = false; // Set the initial value center this.pageX = $(window).width() / 2; this.pageY = ($(window).height() / 2) + $(window).scrollTop(); } return this; }; Zoom.prototype.init = function() { var _this = this; var zoomIcons = '<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>'; if (_this.core.s.actualSize) { zoomIcons += '<span id="lg-actual-size" class="lg-icon"></span>'; } this.core.$outer.find('.lg-toolbar').append(zoomIcons); // Add zoomable class _this.core.$el.on('onSlideItemLoad.lg.tm.zoom', function(event, index, delay) { // delay will be 0 except first time var _speed = _this.core.s.enableZoomAfter + delay; // set _speed value 0 if gallery opened from direct url and if it is first slide if ($('body').hasClass('lg-from-hash') && delay) { // will execute only once _speed = 0; } else { // Remove lg-from-hash to enable starting animation. $('body').removeClass('lg-from-hash'); } _this.zoomabletimeout = setTimeout(function() { _this.core.$slide.eq(index).addClass('lg-zoomable'); }, _speed + 30); }); var scale = 1; /** * @desc Image zoom * Translate the wrap and scale the image to get better user experience * * @param {String} scaleVal - Zoom decrement/increment value */ var zoom = function(scaleVal) { var $image = _this.core.$outer.find('.lg-current .lg-image'); var _x; var _y; // Find offset manually to avoid issue after zoom var offsetX = ($(window).width() - $image.width()) / 2; var offsetY = (($(window).height() - $image.height()) / 2) + $(window).scrollTop(); _x = _this.pageX - offsetX; _y = _this.pageY - offsetY; var x = (scaleVal - 1) * (_x); var y = (scaleVal - 1) * (_y); $image.css('transform', 'scale3d(' + scaleVal + ', ' + scaleVal + ', 1)').attr('data-scale', scaleVal); $image.parent().css({ left: -x + 'px', top: -y + 'px' }).attr('data-x', x).attr('data-y', y); }; var callScale = function() { if (scale > 1) { _this.core.$outer.addClass('lg-zoomed'); } else { _this.resetZoom(); } if (scale < 1) { scale = 1; } zoom(scale); }; var actualSize = function(event, $image, index, fromIcon) { var w = $image.width(); var nw; if (_this.core.s.dynamic) { nw = _this.core.s.dynamicEl[index].width || $image[0].naturalWidth || w; } else { nw = _this.core.$items.eq(index).attr('data-width') || $image[0].naturalWidth || w; } var _scale; if (_this.core.$outer.hasClass('lg-zoomed')) { scale = 1; } else { if (nw > w) { _scale = nw / w; scale = _scale || 2; } } if (fromIcon) { _this.pageX = $(window).width() / 2; _this.pageY = ($(window).height() / 2) + $(window).scrollTop(); } else { _this.pageX = event.pageX || event.originalEvent.targetTouches[0].pageX; _this.pageY = event.pageY || event.originalEvent.targetTouches[0].pageY; } callScale(); setTimeout(function() { _this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab'); }, 10); }; var tapped = false; // event triggered after appending slide content _this.core.$el.on('onAferAppendSlide.lg.tm.zoom', function(event, index) { // Get the current element var $image = _this.core.$slide.eq(index).find('.lg-image'); $image.on('dblclick', function(event) { actualSize(event, $image, index); }); $image.on('touchstart', function(event) { if (!tapped) { tapped = setTimeout(function() { tapped = null; }, 300); } else { clearTimeout(tapped); tapped = null; actualSize(event, $image, index); } event.preventDefault(); }); }); // Update zoom on resize and orientationchange $(window).on('resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom', function() { _this.pageX = $(window).width() / 2; _this.pageY = ($(window).height() / 2) + $(window).scrollTop(); zoom(scale); }); $('#lg-zoom-out').on('click.lg', function() { if (_this.core.$outer.find('.lg-current .lg-image').length) { scale -= _this.core.s.scale; callScale(); } }); $('#lg-zoom-in').on('click.lg', function() { if (_this.core.$outer.find('.lg-current .lg-image').length) { scale += _this.core.s.scale; callScale(); } }); $('#lg-actual-size').on('click.lg', function(event) { actualSize(event, _this.core.$slide.eq(_this.core.index).find('.lg-image'), _this.core.index, true); }); // Reset zoom on slide change _this.core.$el.on('onBeforeSlide.lg.tm', function() { scale = 1; _this.resetZoom(); }); // Drag option after zoom if (!_this.core.isTouch) { _this.zoomDrag(); } if (_this.core.isTouch) { _this.zoomSwipe(); } }; // Reset zoom effect Zoom.prototype.resetZoom = function() { this.core.$outer.removeClass('lg-zoomed'); this.core.$slide.find('.lg-img-wrap').removeAttr('style data-x data-y'); this.core.$slide.find('.lg-image').removeAttr('style data-scale'); // Reset pagx pagy values to center this.pageX = $(window).width() / 2; this.pageY = ($(window).height() / 2) + $(window).scrollTop(); }; Zoom.prototype.zoomSwipe = function() { var _this = this; var startCoords = {}; var endCoords = {}; var isMoved = false; // Allow x direction drag var allowX = false; // Allow Y direction drag var allowY = false; _this.core.$slide.on('touchstart.lg', function(e) { if (_this.core.$outer.hasClass('lg-zoomed')) { var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object'); allowY = $image.outerHeight() * $image.attr('data-scale') > _this.core.$outer.find('.lg').height(); allowX = $image.outerWidth() * $image.attr('data-scale') > _this.core.$outer.find('.lg').width(); if ((allowX || allowY)) { e.preventDefault(); startCoords = { x: e.originalEvent.targetTouches[0].pageX, y: e.originalEvent.targetTouches[0].pageY }; } } }); _this.core.$slide.on('touchmove.lg', function(e) { if (_this.core.$outer.hasClass('lg-zoomed')) { var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap'); var distanceX; var distanceY; e.preventDefault(); isMoved = true; endCoords = { x: e.originalEvent.targetTouches[0].pageX, y: e.originalEvent.targetTouches[0].pageY }; // reset opacity and transition duration _this.core.$outer.addClass('lg-zoom-dragging'); if (allowY) { distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y); } else { distanceY = -Math.abs(_$el.attr('data-y')); } if (allowX) { distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x); } else { distanceX = -Math.abs(_$el.attr('data-x')); } if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) { _$el.css({ left: distanceX + 'px', top: distanceY + 'px' }); } } }); _this.core.$slide.on('touchend.lg', function() { if (_this.core.$outer.hasClass('lg-zoomed')) { if (isMoved) { isMoved = false; _this.core.$outer.removeClass('lg-zoom-dragging'); _this.touchendZoom(startCoords, endCoords, allowX, allowY); } } }); }; Zoom.prototype.zoomDrag = function() { var _this = this; var startCoords = {}; var endCoords = {}; var isDraging = false; var isMoved = false; // Allow x direction drag var allowX = false; // Allow Y direction drag var allowY = false; _this.core.$slide.on('mousedown.lg.zoom', function(e) { // execute only on .lg-object var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object'); allowY = $image.outerHeight() * $image.attr('data-scale') > _this.core.$outer.find('.lg').height(); allowX = $image.outerWidth() * $image.attr('data-scale') > _this.core.$outer.find('.lg').width(); if (_this.core.$outer.hasClass('lg-zoomed')) { if ($(e.target).hasClass('lg-object') && (allowX || allowY)) { e.preventDefault(); startCoords = { x: e.pageX, y: e.pageY }; isDraging = true; // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 _this.core.$outer.scrollLeft += 1; _this.core.$outer.scrollLeft -= 1; _this.core.$outer.removeClass('lg-grab').addClass('lg-grabbing'); } } }); $(window).on('mousemove.lg.zoom', function(e) { if (isDraging) { var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap'); var distanceX; var distanceY; isMoved = true; endCoords = { x: e.pageX, y: e.pageY }; // reset opacity and transition duration _this.core.$outer.addClass('lg-zoom-dragging'); if (allowY) { distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y); } else { distanceY = -Math.abs(_$el.attr('data-y')); } if (allowX) { distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x); } else { distanceX = -Math.abs(_$el.attr('data-x')); } _$el.css({ left: distanceX + 'px', top: distanceY + 'px' }); } }); $(window).on('mouseup.lg.zoom', function(e) { if (isDraging) { isDraging = false; _this.core.$outer.removeClass('lg-zoom-dragging'); // Fix for chrome mouse move on click if (isMoved && ((startCoords.x !== endCoords.x) || (startCoords.y !== endCoords.y))) { endCoords = { x: e.pageX, y: e.pageY }; _this.touchendZoom(startCoords, endCoords, allowX, allowY); } isMoved = false; } _this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab'); }); }; Zoom.prototype.touchendZoom = function(startCoords, endCoords, allowX, allowY) { var _this = this; var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap'); var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object'); var distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x); var distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y); var minY = (_this.core.$outer.find('.lg').height() - $image.outerHeight()) / 2; var maxY = Math.abs(($image.outerHeight() * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').height() + minY); var minX = (_this.core.$outer.find('.lg').width() - $image.outerWidth()) / 2; var maxX = Math.abs(($image.outerWidth() * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').width() + minX); if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) { if (allowY) { if (distanceY <= -maxY) { distanceY = -maxY; } else if (distanceY >= -minY) { distanceY = -minY; } } if (allowX) { if (distanceX <= -maxX) { distanceX = -maxX; } else if (distanceX >= -minX) { distanceX = -minX; } } if (allowY) { _$el.attr('data-y', Math.abs(distanceY)); } else { distanceY = -Math.abs(_$el.attr('data-y')); } if (allowX) { _$el.attr('data-x', Math.abs(distanceX)); } else { distanceX = -Math.abs(_$el.attr('data-x')); } _$el.css({ left: distanceX + 'px', top: distanceY + 'px' }); } }; Zoom.prototype.destroy = function() { var _this = this; // Unbind all events added by lightGallery zoom plugin _this.core.$el.off('.lg.zoom'); $(window).off('.lg.zoom'); _this.core.$slide.off('.lg.zoom'); _this.core.$el.off('.lg.tm.zoom'); _this.resetZoom(); clearTimeout(_this.zoomabletimeout); _this.zoomabletimeout = false; }; $.fn.lightGallery.modules.zoom = Zoom; })(jQuery, window, document);
{ "pile_set_name": "Github" }
# (C) Copyright 2001-2004, Martin Roesch, Brian Caswell, et al. # All rights reserved. # $Id: attack-responses.rules 91 2004-07-15 08:13:57Z rwinslow $ # ---------------- # ATTACK RESPONSES # ---------------- # These signatures are those when they happen, its usually because a machine # has been compromised. These should not false that often and almost always # mean a compromise. alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES directory listing"; flow:from_server,established; content:"Volume Serial Number"; classtype:bad-unknown; sid:1292; rev:8;) alert tcp $HTTP_SERVERS $HTTP_PORTS -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES command completed"; flow:from_server,established; content:"Command completed"; nocase; classtype:bad-unknown; sid:494; rev:7;) alert tcp $HTTP_SERVERS $HTTP_PORTS -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES command error"; flow:from_server,established; content:"Bad command or filename"; nocase; classtype:bad-unknown; sid:495; rev:7;) alert tcp $HTTP_SERVERS $HTTP_PORTS -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES file copied ok"; flow:from_server,established; content:"1 file|28|s|29| copied"; nocase; classtype:bad-unknown; sid:497; rev:8;) alert tcp $HTTP_SERVERS $HTTP_PORTS -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES Invalid URL"; flow:from_server,established; content:"Invalid URL"; nocase; reference:url,www.microsoft.com/technet/security/bulletin/MS00-063.mspx; classtype:attempted-recon; sid:1200; rev:10;) alert tcp $HTTP_SERVERS $HTTP_PORTS -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES index of /cgi-bin/ response"; flow:from_server,established; content:"Index of /cgi-bin/"; nocase; reference:nessus,10039; classtype:bad-unknown; sid:1666; rev:5;) alert tcp $HTTP_SERVERS $HTTP_PORTS -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES 403 Forbidden"; flow:from_server,established; content:"HTTP/1.1 403"; depth:12; classtype:attempted-recon; sid:1201; rev:7;) alert ip any any -> any any (msg:"ATTACK-RESPONSES id check returned root"; content:"uid=0|28|root|29|"; classtype:bad-unknown; sid:498; rev:6;) alert ip $HOME_NET any -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES id check returned userid"; content:"uid="; byte_test:5,<,65537,0,relative,string; content:" gid="; within:15; byte_test:5,<,65537,0,relative,string; classtype:bad-unknown; sid:1882; rev:10;) alert tcp $HOME_NET 8002 -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES oracle one hour install"; flow:from_server,established; content:"Oracle Applications One-Hour Install"; classtype:bad-unknown; sid:1464; rev:3;) alert tcp $HOME_NET 749 -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES successful kadmind buffer overflow attempt"; flow:established,from_server; content:"*GOBBLE*"; depth:8; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:successful-admin; sid:1900; rev:10;) alert tcp $HOME_NET 751 -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES successful kadmind buffer overflow attempt"; flow:established,from_server; content:"*GOBBLE*"; depth:8; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:successful-admin; sid:1901; rev:10;) alert tcp $HOME_NET 22 -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES successful gobbles ssh exploit GOBBLE"; flow:from_server,established; content:"*GOBBLE*"; reference:bugtraq,5093; reference:cve,2002-0390; reference:cve,2002-0639; classtype:successful-admin; sid:1810; rev:9;) alert tcp $HOME_NET 22 -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES successful gobbles ssh exploit uname"; flow:from_server,established; content:"uname"; reference:bugtraq,5093; reference:cve,2002-0390; reference:cve,2002-0639; classtype:misc-attack; sid:1811; rev:8;) alert tcp $HOME_NET 512 -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES rexec username too long response"; flow:from_server,established; content:"username too long"; depth:17; classtype:unsuccessful-user; sid:2104; rev:3;) alert tcp $HOME_NET !21:23 -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES Microsoft cmd.exe banner"; flow:from_server,established; content:"Microsoft Windows"; content:"|28|C|29| Copyright 1985-"; distance:0; content:"Microsoft Corp."; distance:0; reference:nessus,11633; classtype:successful-admin; sid:2123; rev:2;) alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ATTACK-RESPONSES successful cross site scripting forced download attempt"; flow:to_server,established; content:"|0A|Referer|3A| res|3A|/C|3A|"; classtype:successful-user; sid:2412; rev:3;)
{ "pile_set_name": "Github" }
###### Raising the stakes # Swiss stocks are collateral damage in a worsening trade row ![image](images/20190706_FNP503.jpg) > print-edition iconPrint edition | Finance and economics | Jul 6th 2019 IT IS A country famed for avoiding conflict. Yet on July 1st, in a serious escalation of a trade spat with the European Union, Switzerland barred the trading of Swiss-listed companies’ shares on EU platforms. Last December the trade bloc had given Switzerland an ultimatum: sign up to a revamped deal replacing the patchwork of 120 bilateral agreements that governs trade relations between the two by June 30th, or lose stockmarket “equivalence”—a status bestowed by the EU that allows seamless trading of shares across borders. Rather than fold, Switzerland retaliated. Before the ban traders based in the EU accounted for 60-80% of trading in Swiss shares by volume, some of that on Swiss exchanges and some on multilateral trading platforms in EU countries. Now those platforms have suspended trading in Swiss shares, as have the London Stock Exchange and Deutsche Börse. Swiss shares are available only on Swiss exchanges—and on far-distant ones, such as American and Asian trading hubs. This does not mean that Swiss giants such as Nestlé, Novartis and Roche have suddenly become untradeable from within the EU. Though the bloc usually requires its traders to trade on its own venues, or those it recognises as equivalent, it makes an exception when too few of a company’s shares would be available. So EU traders keen to buy Swiss shares can use Swiss exchanges. But the Swiss retaliation has nonetheless caused uncertainty: there is no formal definition of how few is too few. “It is up to individual trading venues to assess how to adjust their operations,” said a spokesman for the European Commission. Straight after the ban it was business as usual for SIX, Switzerland’s biggest stock exchange, and big Swiss firms saw no unusual trading activity. But unless the row is quickly resolved, Swiss shares will become less liquid. The harm to the Swiss stockmarket could be significant, says Charlotte de Montpellier, an economist with ING, a big Dutch bank. Trading costs are likely to rise and, in the long term, some Swiss companies may choose to go public outside Switzerland on exchanges with greater competition and more liquidity. The row could ripple out into the wider economy. Switzerland is integrated with the EU not only in its trade and capital markets, but also in other areas such as research funding and electricity markets. The Swiss federal government wants to close the deal, says André Simonazzi of the Swiss Federal Council. But it has asked the EU for clarification on provisions that have aroused domestic opposition, including on state subsidies and protections for wages and working conditions. Without tweaks the deal would probably be rejected by Swiss citizens in a referendum. Federal elections due in October make a speedy resolution less likely: no party wants to be seen as giving in to the EU. A no-deal Brexit might break the logjam. Many EU traders and trading platforms are based in London, which could arrange equivalence with Switzerland itself after leaving. But Brexit is also a cause of the impasse. The EU is using Switzerland to signal to Britain’s next prime minister that it is no longer willing to tolerate a pick-and-mix relationship like that it has long had with the Swiss—and that it is prepared to follow through on threats. The result, says Ms de Montpellier, is that both Switzerland and the EU are losers. “The EU can survive without Switzerland economically, but it is damaging a relationship with a reliable and stable trading partner.” ◼ <<<<<<< HEAD -- 单词注释: 1.collateral[kә'lætәrәl]:a. 并行的, 附随的, 旁系的 n. 旁系亲属, 担保品 2.worsen['wә:sn]:vt. 使更坏, 使恶化 vi. 变得更坏, 恶化 3.Jul[]:七月 4.famed[feimd]:a. 著名的, 闻名的 5.escalation[.eskә'leiʃәn]:n. 扩大, 增加 [经] 调查, 价格调整 6.EU[]:[化] 富集铀; 浓缩铀 [医] 铕(63号元素) 7.bloc[blɒk]:n. 集团 8.revamp[ri:'væmp]:vt. 换新鞋面, 修理, 修补, 修改 [经] 整修, 补, 修改 9.patchwork['pætʃwә:k]:n. 拼缝物, 拼凑物 10.bilateral[bai'lætәrәl]:a. 有两边的, 双边的, 双方的 [医] 两侧的 11.stockmarket[s'tɒkmɑ:kɪt]: 证券市场; 证券交易所; 证券行情 12.statu[]:[网络] 状态查看;雕像;特级雪花白 13.bestow[bi'stәu]:vt. 授予, 使用, 贮藏, 留宿 14.seamless['si:mlis]:a. 无缝的, 无缝合线的 [医] 无缝的 15.retaliate[ri'tælieit]:vt. 报复, 回敬 vi. 报复, 以牙还牙 16.trader['treidә]:n. 商人, 商船 [经] 交易者, 商船 17.multilateral[.mʌlti'lætәrәl]:a. 多边的, 多国的 [经] 多边的, 涉及多方的 18.deutsche[]:n. 德意志联邦共和国马克 19.hub[hʌb]:n. 毂, 木片, 中心 [计] 插座; 插孔; 集线器, 集中器, 连接器, 中继站 20.novartis[]: 诺华公司总部所在地:瑞士主要业务:制药 21.roche[]:n. 瑞士罗氏(制药企业) 22.untradeable[]:[网络] 不可交换 23.venue['venju:]:n. 犯罪地点, 审判地, 发生地点 24.retaliation[ri.tæli'eiʃәn]:n. 报复 [法] 报仇, 报复, 回敬 25.nonetheless[,nʌnðә'les]:conj. 然而, 尽管, 不过 adv. 不过, 仍然, 尽管如此, 然而 26.spokesman['spәuksmәn]:n. 发言人, 代言者 27.quickly['kwikli]:adv. 很快地 28.les[lei]:abbr. 发射脱离系统(Launch Escape System) 29.charlotte['ʃɑ:lәt]:n. 水果奶油布丁 30.de[di:]:[化] 非对映体过量 [医] 铥(69号元素铥的别名,1916年Eder离得的假想元素) 31.Montpellier[mjŋpe'ljei]:蒙彼利埃[法国南部城市] 32.economist[i:'kɒnәmist]:n. 经济学者, 经济家 [经] 经济学家 33.ing[]:abbr. 惯性导航与制导(Inertial Navigation and Guidance);强中子发生器(Intense Neutron Generator) 34.Dutch[dʌtʃ]:n. 荷兰人, 荷兰语 a. 荷兰的 35.liquidity[li'kwiditi]:n. 流动性, 流畅 [经] 流动性 36.ripple['ripl]:n. 涟波, 涟漪, 波纹, 粗钢梳 vt. 使起涟漪 vi. 起微波, 起潺潺声 37.clarification[.klærifi'keiʃәn]:n. 澄清, 净化 [计] 澄清报告; 澄清 38.opposition[.ɒpә'ziʃәn]:n. 反对, 敌对, 相反, 在野党 [医] 对生, 对向, 反抗, 反对症 39.tweak[twi:k]:n. 拧, 扭, 焦急 vt. 扭, 开足马力 40.referendum[.refә'rendәm]:n. (就重大政治或社会问题进行的)全民公决,全民投票 41.speedy['spi:di]:a. 快的, 迅速的 [经] 快的, 迅速的 42.Brexit[]:[网络] 英国退出欧盟 43.logjam['lɒgdʒæm]:n. 拥挤, 行不通, 为许多圆木材所阻 44.equivalence[i'kwivәlәns]:n. 同等, 等价, 等值 [计] 等价 45.impasse['impɑ:s]:n. 难局, 僵局, 死路, 死胡同 46.loser['lu:zә]:n. 失败者, 遗失者 [法] 失败者, 失物者, 遗失者 47.economically[i:kә'nɔmikәli]:adv. 节约地, 不浪费地, 节省地, 节俭地, 在经济上, 在经济学上 ======= >>>>>>> 50f1fbac684ef65c788c2c3b1cb359dd2a904378
{ "pile_set_name": "Github" }
var baseLt = require('./_baseLt'), createRelationalOperation = require('./_createRelationalOperation'); /** * Checks if `value` is less than `other`. * * @static * @memberOf _ * @since 3.9.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than `other`, * else `false`. * @see _.gt * @example * * _.lt(1, 3); * // => true * * _.lt(3, 3); * // => false * * _.lt(3, 1); * // => false */ var lt = createRelationalOperation(baseLt); module.exports = lt;
{ "pile_set_name": "Github" }
/*! { "name": "Flex Line Wrapping", "property": "flexwrap", "tags": ["css", "flexbox"], "notes": [{ "name": "W3C Flexible Box Layout spec", "href": "http://dev.w3.org/csswg/css3-flexbox" }], "warnings": [ "Does not imply a modern implementation – see documentation." ] } !*/ /* DOC Detects support for the `flex-wrap` CSS property, part of Flexbox, which isn’t present in all Flexbox implementations (notably Firefox). This featured in both the 'tweener' syntax (implemented by IE10) and the 'modern' syntax (implemented by others). This detect will return `true` for either of these implementations, as long as the `flex-wrap` property is supported. So to ensure the modern syntax is supported, use together with `Modernizr.flexbox`: ```javascript if (Modernizr.flexbox && Modernizr.flexwrap) { // Modern Flexbox with `flex-wrap` supported } else { // Either old Flexbox syntax, or `flex-wrap` not supported } ``` */ define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) { Modernizr.addTest('flexwrap', testAllProps('flexWrap', 'wrap', true)); });
{ "pile_set_name": "Github" }
package com.baeldung.creational.factory; public class PolygonFactory { public Polygon getPolygon(int numberOfSides) { if(numberOfSides == 3) { return new Triangle(); } if(numberOfSides == 4) { return new Square(); } if(numberOfSides == 5) { return new Pentagon(); } if(numberOfSides == 7) { return new Heptagon(); } else if(numberOfSides == 8) { return new Octagon(); } return null; } }
{ "pile_set_name": "Github" }
/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2005-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.filter.function.math; // this code is autogenerated - you shouldnt be modifying it! import static org.geotools.filter.capability.FunctionNameImpl.parameter; import org.geotools.filter.FunctionExpressionImpl; import org.geotools.filter.capability.FunctionNameImpl; import org.geotools.util.Converters; import org.geotools.util.factory.Hints; import org.opengis.filter.capability.FunctionName; public class FilterFunction_exp extends FunctionExpressionImpl { // public static FunctionName NAME = new FunctionNameImpl("exp","number"); public static FunctionName NAME = new FunctionNameImpl( "exp", parameter("exponent", Double.class), parameter("number", Number.class)); public FilterFunction_exp() { super("exp"); functionName = NAME; } public Object evaluate(Object feature) { Object arg0 = getExpression(0).evaluate(feature); if (arg0 == null) { return null; } arg0 = Converters.convert(arg0, Double.class, new Hints()); if (arg0 == null) { throw new IllegalArgumentException( "Filter Function problem for function exp argument #0 - expected type double"); } return Math.exp((Double) arg0); } }
{ "pile_set_name": "Github" }
package handlers import ( "encoding/json" "net/http" "github.com/docker/distribution" "github.com/docker/distribution/registry/api/errcode" "github.com/docker/distribution/registry/api/v2" "github.com/gorilla/handlers" ) // tagsDispatcher constructs the tags handler api endpoint. func tagsDispatcher(ctx *Context, r *http.Request) http.Handler { tagsHandler := &tagsHandler{ Context: ctx, } return handlers.MethodHandler{ "GET": http.HandlerFunc(tagsHandler.GetTags), } } // tagsHandler handles requests for lists of tags under a repository name. type tagsHandler struct { *Context } type tagsAPIResponse struct { Name string `json:"name"` Tags []string `json:"tags"` } // GetTags returns a json list of tags for a specific image name. func (th *tagsHandler) GetTags(w http.ResponseWriter, r *http.Request) { defer r.Body.Close() tagService := th.Repository.Tags(th) tags, err := tagService.All(th) if err != nil { switch err := err.(type) { case distribution.ErrRepositoryUnknown: th.Errors = append(th.Errors, v2.ErrorCodeNameUnknown.WithDetail(map[string]string{"name": th.Repository.Named().Name()})) case errcode.Error: th.Errors = append(th.Errors, err) default: th.Errors = append(th.Errors, errcode.ErrorCodeUnknown.WithDetail(err)) } return } w.Header().Set("Content-Type", "application/json; charset=utf-8") enc := json.NewEncoder(w) if err := enc.Encode(tagsAPIResponse{ Name: th.Repository.Named().Name(), Tags: tags, }); err != nil { th.Errors = append(th.Errors, errcode.ErrorCodeUnknown.WithDetail(err)) return } }
{ "pile_set_name": "Github" }
/* Copyright (c) 2015, 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 as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef I_DUMP_TASK_INCLUDED #define I_DUMP_TASK_INCLUDED #include "i_data_object.h" namespace Mysql{ namespace Tools{ namespace Dump{ /** Interface for all individual dump process tasks. */ class I_dump_task { public: virtual ~I_dump_task(); virtual I_data_object* get_related_db_object() const= 0; /** Returns true if task was fully completed by all elements of chain. */ virtual bool is_completed() const= 0; /** Sets task completed flag. Need to be called once main chain element receives completion report. */ virtual void set_completed()= 0; /** Returns true if task can start processing, for example when all dependencies are met. */ virtual bool can_be_executed() const= 0; }; } } } #endif
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>CMSIS-DSP: arm_cmplx_mag_squared_q15.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="cmsis.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="stylsheetf" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 46px;"> <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">CMSIS-DSP &#160;<span id="projectnumber">Verison 1.4.1</span> </div> <div id="projectbrief">CMSIS DSP Software Library</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <div id="CMSISnav" class="tabs1"> <ul class="tablist"> <li><a href="../../General/html/index.html"><span>CMSIS</span></a></li> <li><a href="../../Core/html/index.html"><span>CORE</span></a></li> <li class="current"><a href="../../DSP/html/index.html"><span>DSP</span></a></li> <li><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li> <li><a href="../../SVD/html/index.html"><span>SVD</span></a></li> </ul> </div> <!-- Generated by Doxygen 1.8.3.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li> <li><a href="modules.html"><span>Reference</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('arm__cmplx__mag__squared__q15_8c.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">arm_cmplx_mag_squared_q15.c File Reference</div> </div> </div><!--header--> <div class="contents"> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ga45537f576102d960d467eb722b8431f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cmplx__mag__squared.html#ga45537f576102d960d467eb722b8431f2">arm_cmplx_mag_squared_q15</a> (<a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pSrc, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pDst, uint32_t numSamples)</td></tr> <tr class="memdesc:ga45537f576102d960d467eb722b8431f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q15 complex magnitude squared. <a href="group__cmplx__mag__squared.html#ga45537f576102d960d467eb722b8431f2">More...</a><br/></td></tr> <tr class="separator:ga45537f576102d960d467eb722b8431f2"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_be2d3df67661aefe0e3f0071a1d6f8f1.html">DSP_Lib</a></li><li class="navelem"><a class="el" href="dir_7e8aa87db1ad6b3d9b1f25792e7c5208.html">Source</a></li><li class="navelem"><a class="el" href="dir_640aa2eed9b78c9534642de10c55cd76.html">ComplexMathFunctions</a></li><li class="navelem"><a class="el" href="arm__cmplx__mag__squared__q15_8c.html">arm_cmplx_mag_squared_q15.c</a></li> <li class="footer">Generated on Mon Mar 18 2013 13:37:54 for CMSIS-DSP by ARM Ltd. All rights reserved. <!-- <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 --> </li> </ul> </div> </body> </html>
{ "pile_set_name": "Github" }
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang <[email protected]> * Copyright (C) 2008-2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) #error "Only <ibus.h> can be included directly" #endif /** * SECTION: ibusxml * @short_description: XML handling functions for IBus. * @stability: Stable * * IBusXML lists data structure and handling function for XML in IBus. */ #ifndef __IBUS_XML_H__ #define __IBUS_XML_H__ #include <glib.h> /** * XMLNode: * @name: Name of XML tag. * @text: Text enclosed by XML start tag and end tag. i.e. <tag>text</tag>. * @attributes: Attributes of the XML node. * @sub_nodes: Children node of this XML node. * * A data type representing an XML nod. */ typedef struct { gchar *name; gchar *text; gchar **attributes; GList *sub_nodes; } XMLNode; /** * ibus_xml_parse_file: * @name: File name to be parsed. * @returns: Root node of parsed XML tree. * * Parse an XML file and return a corresponding XML tree. */ XMLNode *ibus_xml_parse_file (const gchar *name); /** * ibus_xml_parse_buffer: * @buffer: Buffer to be parsed. * @returns: Root node of parsed XML tree. * * Parse a string buffer which contains an XML-formatted string, * and return a corresponding XML tree. */ XMLNode *ibus_xml_parse_buffer (const gchar *buffer); /** * ibus_xml_free: * @node: Root node of an XML tree. * * Free an XML tree. */ void ibus_xml_free (XMLNode *node); /** * ibus_xml_output: * @node: Root node of an XML tree. * @output: GString which stores the output. * * Output an XML tree to a GString. */ void ibus_xml_output (const XMLNode *node, GString *output); #endif
{ "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 * * 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.apache.tinkerpop.gremlin.spark.structure.io; import org.apache.commons.configuration2.BaseConfiguration; import org.apache.commons.configuration2.Configuration; import org.apache.tinkerpop.gremlin.TestHelper; import org.apache.tinkerpop.gremlin.hadoop.Constants; import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph; import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat; import org.apache.tinkerpop.gremlin.process.computer.Computer; import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram; import org.apache.tinkerpop.gremlin.spark.AbstractSparkTest; import org.apache.tinkerpop.gremlin.spark.process.computer.SparkGraphComputer; import org.apache.tinkerpop.gremlin.spark.process.computer.SparkHadoopGraphProvider; import org.apache.tinkerpop.gremlin.spark.structure.io.gryo.GryoSerializer; import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.util.GraphFactory; import org.junit.Test; /** * @author Marko A. Rodriguez (http://markorodriguez.com) */ public class OutputRDDTest extends AbstractSparkTest { @Test public void shouldWriteToArbitraryRDD() throws Exception { final Configuration configuration = new BaseConfiguration(); configuration.setProperty("spark.master", "local[4]"); configuration.setProperty("spark.serializer", GryoSerializer.class.getCanonicalName()); configuration.setProperty(Graph.GRAPH, HadoopGraph.class.getName()); configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo")); configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName()); configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, ExampleOutputRDD.class.getCanonicalName()); configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, TestHelper.makeTestDataDirectory(this.getClass(), "shouldWriteToArbitraryRDD")); configuration.setProperty(Constants.GREMLIN_HADOOP_JARS_IN_DISTRIBUTED_CACHE, false); //////// Graph graph = GraphFactory.open(configuration); graph.compute(SparkGraphComputer.class) .result(GraphComputer.ResultGraph.NEW) .persist(GraphComputer.Persist.EDGES) .program(TraversalVertexProgram.build() .traversal(graph.traversal().withComputer(Computer.compute(SparkGraphComputer.class)), "gremlin-groovy", "g.V()").create(graph)).submit().get(); } }
{ "pile_set_name": "Github" }
<?php declare(strict_types = 1); namespace BrowscapPHPTest\Command; use BrowscapPHP\Command\FetchCommand; /** * @covers \BrowscapPHP\Command\FetchCommand */ final class FetchCommandTest extends \PHPUnit\Framework\TestCase { public function testConfigure() : void { $object = $this->getMockBuilder(FetchCommand::class) ->disableOriginalConstructor() ->setMethods(['setName', 'setDescription', 'addArgument', 'addOption']) ->getMock(); $object ->expects(self::once()) ->method('setName') ->willReturnSelf(); $object ->expects(self::once()) ->method('setDescription') ->willReturnSelf(); $object ->expects(self::once()) ->method('addArgument') ->willReturnSelf(); $object ->expects(self::exactly(2)) ->method('addOption') ->willReturnSelf(); $class = new \ReflectionClass(FetchCommand::class); $method = $class->getMethod('configure'); $method->setAccessible(true); self::assertNull($method->invoke($object)); } }
{ "pile_set_name": "Github" }
#!/usr/bin/env python # ============================================================================== # \file show-var-of-model.py # \author chenghuige # \date 2017-09-06 07:52:34.258312 # \Description # ============================================================================== from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys, os import melt from tensorflow.python import pywrap_tensorflow model_dir = sys.argv[1] var_name = sys.argv[2] checkpoint_path = melt.get_model_path(model_dir) reader = pywrap_tensorflow.NewCheckpointReader(checkpoint_path) var_to_shape_map = reader.get_variable_to_shape_map() for key in var_to_shape_map: if var_name in key: print("tensor_name: ", key) print(reader.get_tensor(key))
{ "pile_set_name": "Github" }
/* crypto/ts/ts_req_print.c */ /* Written by Zoltan Glozik ([email protected]) for the OpenSSL * project 2002. */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * [email protected]. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED 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 OpenSSL PROJECT OR * ITS 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. * ==================================================================== * * This product includes cryptographic software written by Eric Young * ([email protected]). This product includes software written by Tim * Hudson ([email protected]). * */ #include <stdio.h> #include "cryptlib.h" #include <openssl/objects.h> #include <openssl/bn.h> #include <openssl/x509v3.h> #include <openssl/ts.h> /* Function definitions. */ int TS_REQ_print_bio(BIO *bio, TS_REQ *a) { int v; ASN1_OBJECT *policy_id; const ASN1_INTEGER *nonce; if (a == NULL) return 0; v = TS_REQ_get_version(a); BIO_printf(bio, "Version: %d\n", v); TS_MSG_IMPRINT_print_bio(bio, TS_REQ_get_msg_imprint(a)); BIO_printf(bio, "Policy OID: "); policy_id = TS_REQ_get_policy_id(a); if (policy_id == NULL) BIO_printf(bio, "unspecified\n"); else TS_OBJ_print_bio(bio, policy_id); BIO_printf(bio, "Nonce: "); nonce = TS_REQ_get_nonce(a); if (nonce == NULL) BIO_printf(bio, "unspecified"); else TS_ASN1_INTEGER_print_bio(bio, nonce); BIO_write(bio, "\n", 1); BIO_printf(bio, "Certificate required: %s\n", TS_REQ_get_cert_req(a) ? "yes" : "no"); TS_ext_print_bio(bio, TS_REQ_get_exts(a)); return 1; }
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <MMCommon/MMObject.h> @class NSString; @interface WeChatEmotionSectionInfo : MMObject { unsigned long long _sectionType; long long _numOfItems; long long _scene; NSString *_title; } @property(retain, nonatomic) NSString *title; // @synthesize title=_title; @property(nonatomic) long long scene; // @synthesize scene=_scene; @property(nonatomic) long long numOfItems; // @synthesize numOfItems=_numOfItems; @property(nonatomic) unsigned long long sectionType; // @synthesize sectionType=_sectionType; - (void).cxx_destruct; @end
{ "pile_set_name": "Github" }
# Try to find Libintl functionality # Once done this will define # # LIBINTL_FOUND - system has Libintl # LIBINTL_INCLUDE_DIR - Libintl include directory # LIBINTL_LIBRARIES - Libraries needed to use Libintl # # TODO: This will enable translations only if Gettext functionality is # present in libc. Must have more robust system for release, where Gettext # functionality can also reside in standalone Gettext library, or the one # embedded within kdelibs (cf. gettext.m4 from Gettext source). # Copyright (c) 2006, Chusslove Illich, <[email protected]> # Copyright (c) 2007, Alexander Neundorf, <[email protected]> # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) set(Libintl_FIND_QUIETLY TRUE) endif(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) find_path(LIBINTL_INCLUDE_DIR libintl.h) set(LIBINTL_LIB_FOUND FALSE) if(LIBINTL_INCLUDE_DIR) include(CheckFunctionExists) check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT) check_function_exists(pgettext LIBINTL_HAS_PGETTEXT) if (LIBINTL_LIBC_HAS_DGETTEXT) set(LIBINTL_LIBRARIES) set(LIBINTL_LIB_FOUND TRUE) else (LIBINTL_LIBC_HAS_DGETTEXT) find_library(LIBINTL_LIBRARIES NAMES intl libintl ) if(LIBINTL_LIBRARIES) set(LIBINTL_LIB_FOUND TRUE) endif(LIBINTL_LIBRARIES) endif (LIBINTL_LIBC_HAS_DGETTEXT) endif(LIBINTL_INCLUDE_DIR) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Libintl DEFAULT_MSG LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND) mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT LIBINTL_HAS_PGETTEXT LIBINTL_LIB_FOUND)
{ "pile_set_name": "Github" }
package network // Copyright (c) Microsoft and contributors. 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. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/tracing" "net/http" ) // VirtualWANsClient is the network Client type VirtualWANsClient struct { BaseClient } // NewVirtualWANsClient creates an instance of the VirtualWANsClient client. func NewVirtualWANsClient(subscriptionID string) VirtualWANsClient { return NewVirtualWANsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewVirtualWANsClientWithBaseURI creates an instance of the VirtualWANsClient client using a custom endpoint. Use // this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualWANsClientWithBaseURI(baseURI string, subscriptionID string) VirtualWANsClient { return VirtualWANsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. // Parameters: // resourceGroupName - the resource group name of the VirtualWan. // virtualWANName - the name of the VirtualWAN being created or updated. // wANParameters - parameters supplied to create or update VirtualWAN. func (client VirtualWANsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (result VirtualWANsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWANsClient.CreateOrUpdate") defer func() { sc := -1 if result.Response() != nil { sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWANName, wANParameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "CreateOrUpdate", nil, "Failure preparing request") return } result, err = client.CreateOrUpdateSender(req) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } return } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. func (client VirtualWANsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "VirtualWANName": autorest.Encode("path", virtualWANName), } const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } wANParameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", pathParameters), autorest.WithJSON(wANParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualWANsClient) CreateOrUpdateSender(req *http.Request) (future VirtualWANsCreateOrUpdateFuture, err error) { var resp *http.Response resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } future.Future, err = azure.NewFutureFromResponse(resp) return } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. func (client VirtualWANsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualWAN, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } // Delete deletes a VirtualWAN. // Parameters: // resourceGroupName - the resource group name of the VirtualWan. // virtualWANName - the name of the VirtualWAN being deleted. func (client VirtualWANsClient) Delete(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWANsDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWANsClient.Delete") defer func() { sc := -1 if result.Response() != nil { sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() } req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWANName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Delete", nil, "Failure preparing request") return } result, err = client.DeleteSender(req) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Delete", result.Response(), "Failure sending request") return } return } // DeletePreparer prepares the Delete request. func (client VirtualWANsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "VirtualWANName": autorest.Encode("path", virtualWANName), } const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualWANsClient) DeleteSender(req *http.Request) (future VirtualWANsDeleteFuture, err error) { var resp *http.Response resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } future.Future, err = azure.NewFutureFromResponse(resp) return } // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. func (client VirtualWANsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } // Get retrieves the details of a VirtualWAN. // Parameters: // resourceGroupName - the resource group name of the VirtualWan. // virtualWANName - the name of the VirtualWAN being retrieved. func (client VirtualWANsClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWAN, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWANsClient.Get") defer func() { sc := -1 if result.Response.Response != nil { sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } req, err := client.GetPreparer(ctx, resourceGroupName, virtualWANName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. func (client VirtualWANsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "VirtualWANName": autorest.Encode("path", virtualWANName), } const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualWANsClient) GetSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. func (client VirtualWANsClient) GetResponder(resp *http.Response) (result VirtualWAN, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } // List lists all the VirtualWANs in a subscription. func (client VirtualWANsClient) List(ctx context.Context) (result ListVirtualWANsResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWANsClient.List") defer func() { sc := -1 if result.lvwnr.Response.Response != nil { sc = result.lvwnr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } result.fn = client.listNextResults req, err := client.ListPreparer(ctx) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.lvwnr.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "List", resp, "Failure sending request") return } result.lvwnr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "List", resp, "Failure responding to request") } if result.lvwnr.hasNextLink() && result.lvwnr.IsEmpty() { err = result.NextWithContext(ctx) } return } // ListPreparer prepares the List request. func (client VirtualWANsClient) ListPreparer(ctx context.Context) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualWANsClient) ListSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. func (client VirtualWANsClient) ListResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } // listNextResults retrieves the next set of results, if any. func (client VirtualWANsClient) listNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) { req, err := lastResults.listVirtualWANsResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return } resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} return result, autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client VirtualWANsClient) ListComplete(ctx context.Context) (result ListVirtualWANsResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWANsClient.List") defer func() { sc := -1 if result.Response().Response.Response != nil { sc = result.page.Response().Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } result.page, err = client.List(ctx) return } // ListByResourceGroup lists all the VirtualWANs in a resource group. // Parameters: // resourceGroupName - the resource group name of the VirtualWan. func (client VirtualWANsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWANsClient.ListByResourceGroup") defer func() { sc := -1 if result.lvwnr.Response.Response != nil { sc = result.lvwnr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } result.fn = client.listByResourceGroupNextResults req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "ListByResourceGroup", nil, "Failure preparing request") return } resp, err := client.ListByResourceGroupSender(req) if err != nil { result.lvwnr.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "ListByResourceGroup", resp, "Failure sending request") return } result.lvwnr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "ListByResourceGroup", resp, "Failure responding to request") } if result.lvwnr.hasNextLink() && result.lvwnr.IsEmpty() { err = result.NextWithContext(ctx) } return } // ListByResourceGroupPreparer prepares the ListByResourceGroup request. func (client VirtualWANsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client VirtualWANsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. func (client VirtualWANsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } // listByResourceGroupNextResults retrieves the next set of results, if any. func (client VirtualWANsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) { req, err := lastResults.listVirtualWANsResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return } resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} return result, autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") } result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") } return } // ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. func (client VirtualWANsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWANsClient.ListByResourceGroup") defer func() { sc := -1 if result.Response().Response.Response != nil { sc = result.page.Response().Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) return } // UpdateTags updates a VirtualWAN tags. // Parameters: // resourceGroupName - the resource group name of the VirtualWan. // virtualWANName - the name of the VirtualWAN being updated. // wANParameters - parameters supplied to Update VirtualWAN tags. func (client VirtualWANsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (result VirtualWANsUpdateTagsFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWANsClient.UpdateTags") defer func() { sc := -1 if result.Response() != nil { sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() } req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualWANName, wANParameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "UpdateTags", nil, "Failure preparing request") return } result, err = client.UpdateTagsSender(req) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "UpdateTags", result.Response(), "Failure sending request") return } return } // UpdateTagsPreparer prepares the UpdateTags request. func (client VirtualWANsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "VirtualWANName": autorest.Encode("path", virtualWANName), } const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", pathParameters), autorest.WithJSON(wANParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VirtualWANsClient) UpdateTagsSender(req *http.Request) (future VirtualWANsUpdateTagsFuture, err error) { var resp *http.Response resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } future.Future, err = azure.NewFutureFromResponse(resp) return } // UpdateTagsResponder handles the response to the UpdateTags request. The method always // closes the http.Response Body. func (client VirtualWANsClient) UpdateTagsResponder(resp *http.Response) (result VirtualWAN, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return }
{ "pile_set_name": "Github" }
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RAnalysispageserver(RPackage): """A framework for sharing interactive data and plots from R through the web. AnalysisPageServer is a modular system that enables sharing of customizable R analyses via the web.""" homepage = "https://bioconductor.org/packages/AnalysisPageServer" git = "https://git.bioconductor.org/packages/AnalysisPageServer.git" version('1.18.1', commit='08bd85e872d3f2b0c1fa148cf30bcd2d1a29b630') version('1.16.0', commit='67b063523f80e2af1d26262367ff50f34e195174') version('1.14.0', commit='620c0ea1e129ddd1a0866e2c9d7c3fcf06a8baf4') version('1.12.0', commit='146501974ef1938ee1ec4eb293ea7eeca331a0dc') version('1.10.0', commit='876c87073be116fa15a1afdd407e21152eb80d50') depends_on('r-log4r', type=('build', 'run')) depends_on('r-rjson', type=('build', 'run')) depends_on('r-biobase', type=('build', 'run')) depends_on('r-graph', type=('build', 'run'))
{ "pile_set_name": "Github" }
<div class="dream"> <% if (theme.dream.showTitle) { %> <div class="title center-align"> <i class="far fa-lightbulb"></i>&nbsp;&nbsp;<%= theme.dream.title %> </div> <% } %> <div class="row"> <div class="col l8 offset-l2 m10 offset-m1 s10 offset-s1 center-align text"> <%= theme.dream.text %> </div> </div> </div>
{ "pile_set_name": "Github" }
// // AVPlayerItem+EZPlayer.swift // EZPlayer // // Created by yangjun zhu on 2016/12/28. // Copyright © 2016年 yangjun zhu. All rights reserved. // import AVFoundation extension AVPlayerItem { public var bufferDuration: TimeInterval? { if let first = self.loadedTimeRanges.first { //获取缓冲进度 let timeRange = first.timeRangeValue // 获取缓冲区域 let startSeconds = CMTimeGetSeconds(timeRange.start)//开始的时间 let durationSecound = CMTimeGetSeconds(timeRange.duration)//表示已经缓冲的时间 let result = startSeconds + durationSecound // 计算缓冲总时间 return result } return nil } /// 获取/设置当前subtitle/cc public var selectedMediaCharacteristicLegibleOption:AVMediaSelectionOption?{ get{ if let legibleGroup = self.asset.mediaSelectionGroup(forMediaCharacteristic: AVMediaCharacteristic.legible){ return self.selectedMediaOption(in: legibleGroup) } return nil } set{ if let legibleGroup = self.asset.mediaSelectionGroup(forMediaCharacteristic: AVMediaCharacteristic.legible){ self.select(newValue, in: legibleGroup) } } } /// 获取/设置当前cc public var selectedClosedCaptionOption:AVMediaSelectionOption?{ get{ if let option = self.selectedMediaCharacteristicLegibleOption{ if option.mediaType.rawValue == "clcp" { return option } } return nil } set{ if let legibleGroup = self.asset.mediaSelectionGroup(forMediaCharacteristic: AVMediaCharacteristic.legible){ if newValue == nil{ self.select(newValue, in: legibleGroup) }else if newValue!.mediaType.rawValue == "clcp"{ self.select(newValue, in: legibleGroup) } } } } /// 获取/设置当前subtitle public var selectedSubtitleOption:AVMediaSelectionOption?{ get{ if let option = self.selectedMediaCharacteristicLegibleOption{ if !option.hasMediaCharacteristic(AVMediaCharacteristic.containsOnlyForcedSubtitles) { return option } } return nil } set{ if let legibleGroup = self.asset.mediaSelectionGroup(forMediaCharacteristic: AVMediaCharacteristic.legible){ if newValue == nil{ self.select(newValue, in: legibleGroup) }else if !newValue!.hasMediaCharacteristic(AVMediaCharacteristic.containsOnlyForcedSubtitles) { self.select(newValue, in: legibleGroup) } } } } /// 获取/设置当前audio public var selectedMediaCharacteristicAudibleOption:AVMediaSelectionOption?{ get{ if let group = self.asset.mediaSelectionGroup(forMediaCharacteristic: AVMediaCharacteristic.audible){ return self.selectedMediaOption(in: group) } return nil } set{ if let group = self.asset.mediaSelectionGroup(forMediaCharacteristic: AVMediaCharacteristic.audible){ self.select(newValue, in: group) } } } }
{ "pile_set_name": "Github" }
issuerepo: golang/go
{ "pile_set_name": "Github" }
@import "../../../assets/sass/variables"; :host { display: block; &.borderless .form-section { border: none; padding: 0 !important; } .form-section { position: relative; display: block; margin-bottom: 20px; .borderless & { border: none; padding: 0; } /deep/ .editor-list-title { display: flex; } .gui-section-body { height: 0; &.show { height: auto; } } .hide-button { position: absolute; } /deep/ .add-btn-link { padding: 0; } } /deep/ hr { //element selector because that's how bootstrap styles it margin-left: - $grid-gutter-width-base/2; margin-right: - $grid-gutter-width-base/2; } }
{ "pile_set_name": "Github" }
/*------------------------------------------------------------------------- * * timeline.c * Functions for reading and writing timeline history files. * * A timeline history file lists the timeline changes of the timeline, in * a simple text format. They are archived along with the WAL segments. * * The files are named like "<tli>.history". For example, if the database * starts up and switches to timeline 5, the timeline history file would be * called "00000005.history". * * Each line in the file represents a timeline switch: * * <parentTLI> <switchpoint> <reason> * * parentTLI ID of the parent timeline * switchpoint XLogRecPtr of the WAL location where the switch happened * reason human-readable explanation of why the timeline was changed * * The fields are separated by tabs. Lines beginning with # are comments, and * are ignored. Empty lines are also ignored. * * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/backend/access/transam/timeline.c * *------------------------------------------------------------------------- */ #include "postgres.h" #include <sys/stat.h> #include <unistd.h> #include "access/timeline.h" #include "access/xlog.h" #include "access/xlog_internal.h" #include "access/xlogdefs.h" #include "pgstat.h" #include "storage/fd.h" /* * Copies all timeline history files with id's between 'begin' and 'end' * from archive to pg_wal. */ void restoreTimeLineHistoryFiles(TimeLineID begin, TimeLineID end) { char path[MAXPGPATH]; char histfname[MAXFNAMELEN]; TimeLineID tli; for (tli = begin; tli < end; tli++) { if (tli == 1) continue; TLHistoryFileName(histfname, tli); if (RestoreArchivedFile(path, histfname, "RECOVERYHISTORY", 0, false)) KeepFileRestoredFromArchive(path, histfname); } } /* * Try to read a timeline's history file. * * If successful, return the list of component TLIs (the given TLI followed by * its ancestor TLIs). If we can't find the history file, assume that the * timeline has no parents, and return a list of just the specified timeline * ID. */ List * readTimeLineHistory(TimeLineID targetTLI) { List *result; char path[MAXPGPATH]; char histfname[MAXFNAMELEN]; char fline[MAXPGPATH]; FILE *fd; TimeLineHistoryEntry *entry; TimeLineID lasttli = 0; XLogRecPtr prevend; bool fromArchive = false; /* Timeline 1 does not have a history file, so no need to check */ if (targetTLI == 1) { entry = (TimeLineHistoryEntry *) palloc(sizeof(TimeLineHistoryEntry)); entry->tli = targetTLI; entry->begin = entry->end = InvalidXLogRecPtr; return list_make1(entry); } if (ArchiveRecoveryRequested) { TLHistoryFileName(histfname, targetTLI); fromArchive = RestoreArchivedFile(path, histfname, "RECOVERYHISTORY", 0, false); } else TLHistoryFilePath(path, targetTLI); fd = AllocateFile(path, "r"); if (fd == NULL) { if (errno != ENOENT) ereport(FATAL, (errcode_for_file_access(), errmsg("could not open file \"%s\": %m", path))); /* Not there, so assume no parents */ entry = (TimeLineHistoryEntry *) palloc(sizeof(TimeLineHistoryEntry)); entry->tli = targetTLI; entry->begin = entry->end = InvalidXLogRecPtr; return list_make1(entry); } result = NIL; /* * Parse the file... */ prevend = InvalidXLogRecPtr; while (fgets(fline, sizeof(fline), fd) != NULL) { /* skip leading whitespace and check for # comment */ char *ptr; TimeLineID tli; uint32 switchpoint_hi; uint32 switchpoint_lo; int nfields; for (ptr = fline; *ptr; ptr++) { if (!isspace((unsigned char) *ptr)) break; } if (*ptr == '\0' || *ptr == '#') continue; nfields = sscanf(fline, "%u\t%X/%X", &tli, &switchpoint_hi, &switchpoint_lo); if (nfields < 1) { /* expect a numeric timeline ID as first field of line */ ereport(FATAL, (errmsg("syntax error in history file: %s", fline), errhint("Expected a numeric timeline ID."))); } if (nfields != 3) ereport(FATAL, (errmsg("syntax error in history file: %s", fline), errhint("Expected a write-ahead log switchpoint location."))); if (result && tli <= lasttli) ereport(FATAL, (errmsg("invalid data in history file: %s", fline), errhint("Timeline IDs must be in increasing sequence."))); lasttli = tli; entry = (TimeLineHistoryEntry *) palloc(sizeof(TimeLineHistoryEntry)); entry->tli = tli; entry->begin = prevend; entry->end = ((uint64) (switchpoint_hi)) << 32 | (uint64) switchpoint_lo; prevend = entry->end; /* Build list with newest item first */ result = lcons(entry, result); /* we ignore the remainder of each line */ } FreeFile(fd); if (result && targetTLI <= lasttli) ereport(FATAL, (errmsg("invalid data in history file \"%s\"", path), errhint("Timeline IDs must be less than child timeline's ID."))); /* * Create one more entry for the "tip" of the timeline, which has no entry * in the history file. */ entry = (TimeLineHistoryEntry *) palloc(sizeof(TimeLineHistoryEntry)); entry->tli = targetTLI; entry->begin = prevend; entry->end = InvalidXLogRecPtr; result = lcons(entry, result); /* * If the history file was fetched from archive, save it in pg_wal for * future reference. */ if (fromArchive) KeepFileRestoredFromArchive(path, histfname); return result; } /* * Probe whether a timeline history file exists for the given timeline ID */ bool existsTimeLineHistory(TimeLineID probeTLI) { char path[MAXPGPATH]; char histfname[MAXFNAMELEN]; FILE *fd; /* Timeline 1 does not have a history file, so no need to check */ if (probeTLI == 1) return false; if (ArchiveRecoveryRequested) { TLHistoryFileName(histfname, probeTLI); RestoreArchivedFile(path, histfname, "RECOVERYHISTORY", 0, false); } else TLHistoryFilePath(path, probeTLI); fd = AllocateFile(path, "r"); if (fd != NULL) { FreeFile(fd); return true; } else { if (errno != ENOENT) ereport(FATAL, (errcode_for_file_access(), errmsg("could not open file \"%s\": %m", path))); return false; } } /* * Find the newest existing timeline, assuming that startTLI exists. * * Note: while this is somewhat heuristic, it does positively guarantee * that (result + 1) is not a known timeline, and therefore it should * be safe to assign that ID to a new timeline. */ TimeLineID findNewestTimeLine(TimeLineID startTLI) { TimeLineID newestTLI; TimeLineID probeTLI; /* * The algorithm is just to probe for the existence of timeline history * files. XXX is it useful to allow gaps in the sequence? */ newestTLI = startTLI; for (probeTLI = startTLI + 1;; probeTLI++) { if (existsTimeLineHistory(probeTLI)) { newestTLI = probeTLI; /* probeTLI exists */ } else { /* doesn't exist, assume we're done */ break; } } return newestTLI; } /* * Create a new timeline history file. * * newTLI: ID of the new timeline * parentTLI: ID of its immediate parent * switchpoint: WAL location where the system switched to the new timeline * reason: human-readable explanation of why the timeline was switched * * Currently this is only used at the end recovery, and so there are no locking * considerations. But we should be just as tense as XLogFileInit to avoid * emplacing a bogus file. */ void writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI, XLogRecPtr switchpoint, char *reason) { char path[MAXPGPATH]; char tmppath[MAXPGPATH]; char histfname[MAXFNAMELEN]; char buffer[BLCKSZ]; int srcfd; int fd; int nbytes; Assert(newTLI > parentTLI); /* else bad selection of newTLI */ /* * Write into a temp file name. */ snprintf(tmppath, MAXPGPATH, XLOGDIR "/xlogtemp.%d", (int) getpid()); unlink(tmppath); /* do not use get_sync_bit() here --- want to fsync only at end of fill */ fd = OpenTransientFile(tmppath, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); if (fd < 0) ereport(ERROR, (errcode_for_file_access(), errmsg("could not create file \"%s\": %m", tmppath))); /* * If a history file exists for the parent, copy it verbatim */ if (ArchiveRecoveryRequested) { TLHistoryFileName(histfname, parentTLI); RestoreArchivedFile(path, histfname, "RECOVERYHISTORY", 0, false); } else TLHistoryFilePath(path, parentTLI); srcfd = OpenTransientFile(path, O_RDONLY, 0); if (srcfd < 0) { if (errno != ENOENT) ereport(ERROR, (errcode_for_file_access(), errmsg("could not open file \"%s\": %m", path))); /* Not there, so assume parent has no parents */ } else { for (;;) { errno = 0; pgstat_report_wait_start(WAIT_EVENT_TIMELINE_HISTORY_READ); nbytes = (int) read(srcfd, buffer, sizeof(buffer)); pgstat_report_wait_end(); if (nbytes < 0 || errno != 0) ereport(ERROR, (errcode_for_file_access(), errmsg("could not read file \"%s\": %m", path))); if (nbytes == 0) break; errno = 0; pgstat_report_wait_start(WAIT_EVENT_TIMELINE_HISTORY_WRITE); if ((int) write(fd, buffer, nbytes) != nbytes) { int save_errno = errno; /* * If we fail to make the file, delete it to release disk * space */ unlink(tmppath); /* * if write didn't set errno, assume problem is no disk space */ errno = save_errno ? save_errno : ENOSPC; ereport(ERROR, (errcode_for_file_access(), errmsg("could not write to file \"%s\": %m", tmppath))); } pgstat_report_wait_end(); } CloseTransientFile(srcfd); } /* * Append one line with the details of this timeline split. * * If we did have a parent file, insert an extra newline just in case the * parent file failed to end with one. */ snprintf(buffer, sizeof(buffer), "%s%u\t%X/%X\t%s\n", (srcfd < 0) ? "" : "\n", parentTLI, (uint32) (switchpoint >> 32), (uint32) (switchpoint), reason); nbytes = strlen(buffer); errno = 0; if ((int) write(fd, buffer, nbytes) != nbytes) { int save_errno = errno; /* * If we fail to make the file, delete it to release disk space */ unlink(tmppath); /* if write didn't set errno, assume problem is no disk space */ errno = save_errno ? save_errno : ENOSPC; ereport(ERROR, (errcode_for_file_access(), errmsg("could not write to file \"%s\": %m", tmppath))); } pgstat_report_wait_start(WAIT_EVENT_TIMELINE_HISTORY_SYNC); if (pg_fsync(fd) != 0) ereport(ERROR, (errcode_for_file_access(), errmsg("could not fsync file \"%s\": %m", tmppath))); pgstat_report_wait_end(); if (CloseTransientFile(fd)) ereport(ERROR, (errcode_for_file_access(), errmsg("could not close file \"%s\": %m", tmppath))); /* * Now move the completed history file into place with its final name. */ TLHistoryFilePath(path, newTLI); /* * Perform the rename using link if available, paranoidly trying to avoid * overwriting an existing file (there shouldn't be one). */ durable_link_or_rename(tmppath, path, ERROR); /* The history file can be archived immediately. */ if (XLogArchivingActive()) { TLHistoryFileName(histfname, newTLI); XLogArchiveNotify(histfname); } } /* * Writes a history file for given timeline and contents. * * Currently this is only used in the walreceiver process, and so there are * no locking considerations. But we should be just as tense as XLogFileInit * to avoid emplacing a bogus file. */ void writeTimeLineHistoryFile(TimeLineID tli, char *content, int size) { char path[MAXPGPATH]; char tmppath[MAXPGPATH]; int fd; /* * Write into a temp file name. */ snprintf(tmppath, MAXPGPATH, XLOGDIR "/xlogtemp.%d", (int) getpid()); unlink(tmppath); /* do not use get_sync_bit() here --- want to fsync only at end of fill */ fd = OpenTransientFile(tmppath, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); if (fd < 0) ereport(ERROR, (errcode_for_file_access(), errmsg("could not create file \"%s\": %m", tmppath))); errno = 0; pgstat_report_wait_start(WAIT_EVENT_TIMELINE_HISTORY_FILE_WRITE); if ((int) write(fd, content, size) != size) { int save_errno = errno; /* * If we fail to make the file, delete it to release disk space */ unlink(tmppath); /* if write didn't set errno, assume problem is no disk space */ errno = save_errno ? save_errno : ENOSPC; ereport(ERROR, (errcode_for_file_access(), errmsg("could not write to file \"%s\": %m", tmppath))); } pgstat_report_wait_end(); pgstat_report_wait_start(WAIT_EVENT_TIMELINE_HISTORY_FILE_SYNC); if (pg_fsync(fd) != 0) ereport(ERROR, (errcode_for_file_access(), errmsg("could not fsync file \"%s\": %m", tmppath))); pgstat_report_wait_end(); if (CloseTransientFile(fd)) ereport(ERROR, (errcode_for_file_access(), errmsg("could not close file \"%s\": %m", tmppath))); /* * Now move the completed history file into place with its final name. */ TLHistoryFilePath(path, tli); /* * Perform the rename using link if available, paranoidly trying to avoid * overwriting an existing file (there shouldn't be one). */ durable_link_or_rename(tmppath, path, ERROR); } /* * Returns true if 'expectedTLEs' contains a timeline with id 'tli' */ bool tliInHistory(TimeLineID tli, List *expectedTLEs) { ListCell *cell; foreach(cell, expectedTLEs) { if (((TimeLineHistoryEntry *) lfirst(cell))->tli == tli) return true; } return false; } /* * Returns the ID of the timeline in use at a particular point in time, in * the given timeline history. */ TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history) { ListCell *cell; foreach(cell, history) { TimeLineHistoryEntry *tle = (TimeLineHistoryEntry *) lfirst(cell); if ((XLogRecPtrIsInvalid(tle->begin) || tle->begin <= ptr) && (XLogRecPtrIsInvalid(tle->end) || ptr < tle->end)) { /* found it */ return tle->tli; } } /* shouldn't happen. */ elog(ERROR, "timeline history was not contiguous"); return 0; /* keep compiler quiet */ } /* * Returns the point in history where we branched off the given timeline, * and the timeline we branched to (*nextTLI). Returns InvalidXLogRecPtr if * the timeline is current, ie. we have not branched off from it, and throws * an error if the timeline is not part of this server's history. */ XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history, TimeLineID *nextTLI) { ListCell *cell; if (nextTLI) *nextTLI = 0; foreach(cell, history) { TimeLineHistoryEntry *tle = (TimeLineHistoryEntry *) lfirst(cell); if (tle->tli == tli) return tle->end; if (nextTLI) *nextTLI = tle->tli; } ereport(ERROR, (errmsg("requested timeline %u is not in this server's history", tli))); return InvalidXLogRecPtr; /* keep compiler quiet */ }
{ "pile_set_name": "Github" }
#ifndef cpia_h #define cpia_h /* * CPiA Parallel Port Video4Linux driver * * Supports CPiA based parallel port Video Camera's. * * (C) Copyright 1999 Bas Huisman, * Peter Pregler, * Scott J. Bertin, * VLSI Vision Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define CPIA_MAJ_VER 1 #define CPIA_MIN_VER 2 #define CPIA_PATCH_VER 3 #define CPIA_PP_MAJ_VER CPIA_MAJ_VER #define CPIA_PP_MIN_VER CPIA_MIN_VER #define CPIA_PP_PATCH_VER CPIA_PATCH_VER #define CPIA_USB_MAJ_VER CPIA_MAJ_VER #define CPIA_USB_MIN_VER CPIA_MIN_VER #define CPIA_USB_PATCH_VER CPIA_PATCH_VER #define CPIA_MAX_FRAME_SIZE_UNALIGNED (352 * 288 * 4) /* CIF at RGB32 */ #define CPIA_MAX_FRAME_SIZE ((CPIA_MAX_FRAME_SIZE_UNALIGNED + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)) /* align above to PAGE_SIZE */ #ifdef __KERNEL__ #include <asm/uaccess.h> #include <linux/videodev.h> #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> #include <linux/list.h> #include <linux/mutex.h> struct cpia_camera_ops { /* open sets privdata to point to structure for this camera. * Returns negative value on error, otherwise 0. */ int (*open)(void *privdata); /* Registers callback function cb to be called with cbdata * when an image is ready. If cb is NULL, only single image grabs * should be used. cb should immediately call streamRead to read * the data or data may be lost. Returns negative value on error, * otherwise 0. */ int (*registerCallback)(void *privdata, void (*cb)(void *cbdata), void *cbdata); /* transferCmd sends commands to the camera. command MUST point to * an 8 byte buffer in kernel space. data can be NULL if no extra * data is needed. The size of the data is given by the last 2 * bytes of command. data must also point to memory in kernel space. * Returns negative value on error, otherwise 0. */ int (*transferCmd)(void *privdata, u8 *command, u8 *data); /* streamStart initiates stream capture mode. * Returns negative value on error, otherwise 0. */ int (*streamStart)(void *privdata); /* streamStop terminates stream capture mode. * Returns negative value on error, otherwise 0. */ int (*streamStop)(void *privdata); /* streamRead reads a frame from the camera. buffer points to a * buffer large enough to hold a complete frame in kernel space. * noblock indicates if this should be a non blocking read. * Returns the number of bytes read, or negative value on error. */ int (*streamRead)(void *privdata, u8 *buffer, int noblock); /* close disables the device until open() is called again. * Returns negative value on error, otherwise 0. */ int (*close)(void *privdata); /* If wait_for_stream_ready is non-zero, wait until the streamState * is STREAM_READY before calling streamRead. */ int wait_for_stream_ready; /* * Used to maintain lowlevel module usage counts */ struct module *owner; }; struct cpia_frame { u8 *data; int count; int width; int height; volatile int state; }; struct cam_params { struct { u8 firmwareVersion; u8 firmwareRevision; u8 vcVersion; u8 vcRevision; } version; struct { u16 vendor; u16 product; u16 deviceRevision; } pnpID; struct { u8 vpVersion; u8 vpRevision; u16 cameraHeadID; } vpVersion; struct { u8 systemState; u8 grabState; u8 streamState; u8 fatalError; u8 cmdError; u8 debugFlags; u8 vpStatus; u8 errorCode; } status; struct { u8 brightness; u8 contrast; u8 saturation; } colourParams; struct { u8 gainMode; u8 expMode; u8 compMode; u8 centreWeight; u8 gain; u8 fineExp; u8 coarseExpLo; u8 coarseExpHi; u8 redComp; u8 green1Comp; u8 green2Comp; u8 blueComp; } exposure; struct { u8 balanceMode; u8 redGain; u8 greenGain; u8 blueGain; } colourBalance; struct { u8 divisor; u8 baserate; } sensorFps; struct { u8 gain1; u8 gain2; u8 gain4; u8 gain8; } apcor; struct { u8 disabled; u8 flickerMode; u8 coarseJump; int allowableOverExposure; } flickerControl; struct { u8 gain1; u8 gain2; u8 gain4; u8 gain8; } vlOffset; struct { u8 mode; u8 decimation; } compression; struct { u8 frTargeting; u8 targetFR; u8 targetQ; } compressionTarget; struct { u8 yThreshold; u8 uvThreshold; } yuvThreshold; struct { u8 hysteresis; u8 threshMax; u8 smallStep; u8 largeStep; u8 decimationHysteresis; u8 frDiffStepThresh; u8 qDiffStepThresh; u8 decimationThreshMod; } compressionParams; struct { u8 videoSize; /* CIF/QCIF */ u8 subSample; u8 yuvOrder; } format; struct { /* Intel QX3 specific data */ u8 qx3_detected; /* a QX3 is present */ u8 toplight; /* top light lit , R/W */ u8 bottomlight; /* bottom light lit, R/W */ u8 button; /* snapshot button pressed (R/O) */ u8 cradled; /* microscope is in cradle (R/O) */ } qx3; struct { u8 colStart; /* skip first 8*colStart pixels */ u8 colEnd; /* finish at 8*colEnd pixels */ u8 rowStart; /* skip first 4*rowStart lines */ u8 rowEnd; /* finish at 4*rowEnd lines */ } roi; u8 ecpTiming; u8 streamStartLine; }; enum v4l_camstates { CPIA_V4L_IDLE = 0, CPIA_V4L_ERROR, CPIA_V4L_COMMAND, CPIA_V4L_GRABBING, CPIA_V4L_STREAMING, CPIA_V4L_STREAMING_PAUSED, }; #define FRAME_NUM 2 /* double buffering for now */ struct cam_data { struct list_head cam_data_list; struct mutex busy_lock; /* guard against SMP multithreading */ struct cpia_camera_ops *ops; /* lowlevel driver operations */ void *lowlevel_data; /* private data for lowlevel driver */ u8 *raw_image; /* buffer for raw image data */ struct cpia_frame decompressed_frame; /* buffer to hold decompressed frame */ int image_size; /* sizeof last decompressed image */ int open_count; /* # of process that have camera open */ /* camera status */ int fps; /* actual fps reported by the camera */ int transfer_rate; /* transfer rate from camera in kB/s */ u8 mainsFreq; /* for flicker control */ /* proc interface */ struct mutex param_lock; /* params lock for this camera */ struct cam_params params; /* camera settings */ struct proc_dir_entry *proc_entry; /* /proc/cpia/videoX */ /* v4l */ int video_size; /* VIDEO_SIZE_ */ volatile enum v4l_camstates camstate; /* v4l layer status */ struct video_device vdev; /* v4l videodev */ struct video_picture vp; /* v4l camera settings */ struct video_window vw; /* v4l capture area */ struct video_capture vc; /* v4l subcapture area */ /* mmap interface */ int curframe; /* the current frame to grab into */ u8 *frame_buf; /* frame buffer data */ struct cpia_frame frame[FRAME_NUM]; /* FRAME_NUM-buffering, so we need a array */ int first_frame; int mmap_kludge; /* 'wrong' byte order for mmap */ volatile u32 cmd_queue; /* queued commands */ int exposure_status; /* EXPOSURE_* */ int exposure_count; /* number of frames at this status */ }; /* cpia_register_camera is called by low level driver for each camera. * A unique camera number is returned, or a negative value on error */ struct cam_data *cpia_register_camera(struct cpia_camera_ops *ops, void *lowlevel); /* cpia_unregister_camera is called by low level driver when a camera * is removed. This must not fail. */ void cpia_unregister_camera(struct cam_data *cam); /* raw CIF + 64 byte header + (2 bytes line_length + EOL) per line + 4*EOI + * one byte 16bit DMA alignment */ #define CPIA_MAX_IMAGE_SIZE ((352*288*2)+64+(288*3)+5) /* constant value's */ #define MAGIC_0 0x19 #define MAGIC_1 0x68 #define DATA_IN 0xC0 #define DATA_OUT 0x40 #define VIDEOSIZE_QCIF 0 /* 176x144 */ #define VIDEOSIZE_CIF 1 /* 352x288 */ #define VIDEOSIZE_SIF 2 /* 320x240 */ #define VIDEOSIZE_QSIF 3 /* 160x120 */ #define VIDEOSIZE_48_48 4 /* where no one has gone before, iconsize! */ #define VIDEOSIZE_64_48 5 #define VIDEOSIZE_128_96 6 #define VIDEOSIZE_160_120 VIDEOSIZE_QSIF #define VIDEOSIZE_176_144 VIDEOSIZE_QCIF #define VIDEOSIZE_192_144 7 #define VIDEOSIZE_224_168 8 #define VIDEOSIZE_256_192 9 #define VIDEOSIZE_288_216 10 #define VIDEOSIZE_320_240 VIDEOSIZE_SIF #define VIDEOSIZE_352_288 VIDEOSIZE_CIF #define VIDEOSIZE_88_72 11 /* quarter CIF */ #define SUBSAMPLE_420 0 #define SUBSAMPLE_422 1 #define YUVORDER_YUYV 0 #define YUVORDER_UYVY 1 #define NOT_COMPRESSED 0 #define COMPRESSED 1 #define NO_DECIMATION 0 #define DECIMATION_ENAB 1 #define EOI 0xff /* End Of Image */ #define EOL 0xfd /* End Of Line */ #define FRAME_HEADER_SIZE 64 /* Image grab modes */ #define CPIA_GRAB_SINGLE 0 #define CPIA_GRAB_CONTINUOUS 1 /* Compression parameters */ #define CPIA_COMPRESSION_NONE 0 #define CPIA_COMPRESSION_AUTO 1 #define CPIA_COMPRESSION_MANUAL 2 #define CPIA_COMPRESSION_TARGET_QUALITY 0 #define CPIA_COMPRESSION_TARGET_FRAMERATE 1 /* Return offsets for GetCameraState */ #define SYSTEMSTATE 0 #define GRABSTATE 1 #define STREAMSTATE 2 #define FATALERROR 3 #define CMDERROR 4 #define DEBUGFLAGS 5 #define VPSTATUS 6 #define ERRORCODE 7 /* SystemState */ #define UNINITIALISED_STATE 0 #define PASS_THROUGH_STATE 1 #define LO_POWER_STATE 2 #define HI_POWER_STATE 3 #define WARM_BOOT_STATE 4 /* GrabState */ #define GRAB_IDLE 0 #define GRAB_ACTIVE 1 #define GRAB_DONE 2 /* StreamState */ #define STREAM_NOT_READY 0 #define STREAM_READY 1 #define STREAM_OPEN 2 #define STREAM_PAUSED 3 #define STREAM_FINISHED 4 /* Fatal Error, CmdError, and DebugFlags */ #define CPIA_FLAG 1 #define SYSTEM_FLAG 2 #define INT_CTRL_FLAG 4 #define PROCESS_FLAG 8 #define COM_FLAG 16 #define VP_CTRL_FLAG 32 #define CAPTURE_FLAG 64 #define DEBUG_FLAG 128 /* VPStatus */ #define VP_STATE_OK 0x00 #define VP_STATE_FAILED_VIDEOINIT 0x01 #define VP_STATE_FAILED_AECACBINIT 0x02 #define VP_STATE_AEC_MAX 0x04 #define VP_STATE_ACB_BMAX 0x08 #define VP_STATE_ACB_RMIN 0x10 #define VP_STATE_ACB_GMIN 0x20 #define VP_STATE_ACB_RMAX 0x40 #define VP_STATE_ACB_GMAX 0x80 /* default (minimum) compensation values */ #define COMP_RED 220 #define COMP_GREEN1 214 #define COMP_GREEN2 COMP_GREEN1 #define COMP_BLUE 230 /* exposure status */ #define EXPOSURE_VERY_LIGHT 0 #define EXPOSURE_LIGHT 1 #define EXPOSURE_NORMAL 2 #define EXPOSURE_DARK 3 #define EXPOSURE_VERY_DARK 4 /* ErrorCode */ #define ERROR_FLICKER_BELOW_MIN_EXP 0x01 /*flicker exposure got below minimum exposure */ #define ALOG(fmt,args...) printk(fmt, ##args) #define LOG(fmt,args...) ALOG(KERN_INFO __FILE__ ":%s(%d):" fmt, __func__ , __LINE__ , ##args) #ifdef _CPIA_DEBUG_ #define ADBG(fmt,args...) printk(fmt, jiffies, ##args) #define DBG(fmt,args...) ADBG(KERN_DEBUG __FILE__" (%ld):%s(%d):" fmt, __func__, __LINE__ , ##args) #else #define DBG(fmn,args...) do {} while(0) #endif #define DEB_BYTE(p)\ DBG("%1d %1d %1d %1d %1d %1d %1d %1d \n",\ (p)&0x80?1:0, (p)&0x40?1:0, (p)&0x20?1:0, (p)&0x10?1:0,\ (p)&0x08?1:0, (p)&0x04?1:0, (p)&0x02?1:0, (p)&0x01?1:0); #endif /* __KERNEL__ */ #endif /* cpia_h */
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!--© The Office of the High Commisioner for Human Rights--> <udhr iso639-3="wuu" xml:lang="wuu" key="wuu" n="Chinese, Wu" dir='ltr' iso15924='Hans' xmlns="http://www.unhchr.ch/udhr"> <title>@</title> <preamble> <title>世界人权宣言</title> <para>序言</para> <para>鉴于人类社会个成员侪有个固有尊严脱仔平等个脱仔勿移个权利承认,是世界自由、正义脱仔和平个基础,</para> <para>鉴于人权个无视脱仔侮蔑已发展为野蛮暴行,掰眼暴行玷污了人类个良心,而一个人人侪有言论脱仔信仰自由并勿有恐惧脱匮乏个世界个来临,已被宣布为普通人民个着着高愿望,</para> <para>鉴于为使人类勿至于迫勿得已铤而走险暴政脱仔压迫进行反叛,有必要使人权受法治个保护,</para> <para>鉴于有必要促进各国间友好关系个发展,</para> <para>鉴于各联合国国家个人民已拉联合国宪章中重申伊拉对基本人权、人格尊严和价值以及男女平等权利个信念,并决心促成较大自由中个社会进步脱仔生活水平个改善,</para> <para>鉴于各会员国业已誓愿同联合国合作以促进对人权脱仔基本自由个普遍尊重脱仔遵行,</para> <para>鉴于对掰眼权利脱仔自由个普遍了解对于掰个誓愿个充分实现有蛮大个重要性,</para> <para>因此葛歇,</para> <para>大会,</para> <para>发布掰个世界人权宣言,作为所有人民脱仔所有国家努力实现个共同标准,以期每一个人脱仔社会机构经常思量掰个宣言,努力通过教诲脱仔教育促进对权利脱仔自由个尊重,并通过国家个脱仔国际个渐进措施,使掰眼权利脱仔自由拉各会员国本身人民脱仔拉伊拉管辖下领土个人民中得到普遍脱仔有效个承认脱仔遵行;</para> </preamble> <article number="1"> <title>第一条</title> <para>人人生而自由,拉尊严脱仔权利上一律平等。伊拉有理性脱仔良心,并应以兄弟关系个精神相对待。</para> </article> <article number="2"> <title>第二条</title> <para>人人有资格享有本宣言所载个一切权利脱仔自由,勿分种族、肤色、性别、语言、宗教、政治或其他见解、国籍或社会出身、财产、出生或其他身分等任何区别。</para> <para>并且勿要因一人所属个国家或领土个政治个、行政个或者国际个地位个不同而有所区别,无论掰个领土是独立领土、托管领土、非自治领土或者处于其他任何主权受限制个情况之下。</para> </article> <article number="3"> <title>第三条</title> <para>人人有权享有生命、自由脱仔人身安全。</para> </article> <article number="4"> <title>第四条</title> <para>任何人勿要使为奴隶或奴役;一切形式个奴隶制度脱仔奴隶买卖,均要予以禁止。</para> </article> <article number="5"> <title>第五条</title> <para>任何人勿要加以酷刑,或施以残忍个、弗人道个或侮辱性个待遇或刑罚。</para> </article> <article number="6"> <title>第六条</title> <para>人人拉啥场化侪有权被承认拉法律前个人格。</para> </article> <article number="7"> <title>第七条</title> <para>法律之前人人平等,并有权享受法律个平等保护,勿受任何歧视。人人有权享受平等保护,以免受违反掰个宣言个任何歧视行为脱仔煽动掰排里歧视个任何行为个害。</para> </article> <article number="8"> <title>第八条</title> <para>任何人拉宪法或法律所赋予伊个基本权利遭受侵害个辰光,有权由合格个国家法庭对掰排里侵害行为作有效个补救。</para> </article> <article number="9"> <title>第九条</title> <para>任何人勿要加以任意逮捕、拘禁或放逐。</para> </article> <article number="10"> <title>第十条</title> <para>人人完全平等地有权由一个独立而勿有偏倚个法庭进行公正个脱仔公开个审讯,以确定伊个权利脱仔义务并判定对伊提出个任何刑事指控。</para> </article> <article number="11"> <title>第十一条</title> <orderedlist> <listitem tag="㈠"> <para>凡受刑事控告者,拉未经获得辩护上所需个一切保证个公开审判而依法证实有罪以前,有权被视为无罪。</para> </listitem> <listitem tag="㈡"> <para>任何人个任何行为或弗行为,拉伊发生个辰光依国家法或国际法侪勿构成刑事罪者,勿要被判为犯有刑事罪。刑罚勿要重于犯罪时适用个法律规定。</para> </listitem> </orderedlist> </article> <article number="12"> <title>第十二条</title> <para>任何人个私生活、家庭、住宅脱仔通信勿要任意干涉,伊个荣誉脱仔名誉勿要加以攻击。人人有权享受法律保护,以勿受掰排里干涉或攻击。</para> </article> <article number="13"> <title>第十三条</title> <orderedlist> <listitem tag="㈠"> <para>人人拉各国境内侪有权自由迁徙脱仔居住。</para> </listitem> <listitem tag="㈡"> <para>人人有权离开任何国家,包括伊个国家在内,并有权返回伊个国家。</para> </listitem> </orderedlist> </article> <article number="14"> <title>第十四条</title> <orderedlist> <listitem tag="㈠"> <para>人人有权拉其他国家寻求脱仔享受庇护以避免迫害。</para> </listitem> <listitem tag="㈡"> <para>拉真正由于勿政治性个罪行或违背联合国个宗旨脱仔原则个行为而被起诉个情况下,勿要援用掰排里权利。</para> </listitem> </orderedlist> </article> <article number="15"> <title>第十五条</title> <orderedlist> <listitem tag="㈠"> <para>人人侪有权享有国籍。</para> </listitem> <listitem tag="㈡"> <para>任何人个国籍勿要任意剥夺,伊改变国籍个权利否认勿得。</para> </listitem> </orderedlist> </article> <article number="16"> <title>第十六条</title> <orderedlist> <listitem tag="㈠"> <para>成年男女,勿受种族、国籍或宗教个任何限制有权婚嫁脱仔成立家庭。伊拉拉婚姻方面,拉结婚期间脱仔拉解除婚约个辰光,要有平等个权利。</para> </listitem> <listitem tag="㈡"> <para>只有经男女双方个自由脱仔完全个同意,才能缔婚。.</para> </listitem> <listitem tag="㈢"> <para>家庭是天然个脱仔基本个社会单元,并应受社会脱仔国家个保护。</para> </listitem> </orderedlist> </article> <article number="17"> <title>第十七条</title> <orderedlist> <listitem tag="㈠"> <para>人人侪有单独个财产所有权脱仔同他人合有个所有权。</para> </listitem> <listitem tag="㈡"> <para>任何人个财产勿要任意剥夺。</para> </listitem> </orderedlist> </article> <article number="18"> <title>第十八条</title> <para>人人有思想、良心脱仔宗教自由个权利;此项权利包括改变伊个宗教或信仰个自由,脱仔单独或集体、公开或秘密地以教义、实践、礼拜和戒律表示伊个宗教或信仰个自由。</para> </article> <article number="19"> <title>第十九条</title> <para>人人有权享有主张脱仔发表意见个自由;此项权利包括持有主张而勿受干涉个自由,脱仔通过任何媒介脱仔不论国界寻求、接受脱仔传递消息脱仔思想个自由。</para> </article> <article number="20"> <title>第二十条</title> <orderedlist> <listitem tag="㈠"> <para>人人侪有权享有和平集会脱仔结社个自由。</para> </listitem> <listitem tag="㈡"> <para>任何人勿要迫使隶属于某一团体。</para> </listitem> </orderedlist> </article> <article number="21"> <title>第二十一条</title> <orderedlist> <listitem tag="㈠"> <para>人人侪有直接或通过自由选择个代表参与治理本国个权利。</para> </listitem> <listitem tag="㈡"> <para>人人侪有平等机会参加本国公务个权利。</para> </listitem> <listitem tag="㈢"> <para>人民个意志是政府权力个基础;这一意志应以定期个脱仔真正个选举予以表现,而选举应依据普遍脱仔平等个投票权,并以勿记名投票或相当个自由投票程序进行。</para> </listitem> </orderedlist> </article> <article number="22"> <title>第二十二条</title> <para>每个人,作为社会个一员,有权享受社会保障,并有权享受伊个个人尊严脱仔人格个自由发展所必需个经济、社会脱仔文化方面各种权利个实现,掰排里实现是通过国家努力脱仔国际合作并依照各国个组织脱仔资源情况。</para> </article> <article number="23"> <title>第二十三条</title> <orderedlist> <listitem tag="㈠"> <para>人人有权工作、自由选择职业、享受公正脱仔合适个工作条件并享受免于失业个保障。</para> </listitem> <listitem tag="㈡"> <para>人人有同工同酬个权利,勿受任何歧视。</para> </listitem> <listitem tag="㈢"> <para>每一个工作个人,有权享受公正脱仔合适个报酬,保证使伊本人脱仔家属有一个符合人个尊严个生活条件,必要时并辅以其他方式个社会保障。</para> </listitem> <listitem tag="㈣"> <para>人人有为维护伊个利益而组织脱仔参加工会个权利。</para> </listitem> </orderedlist> </article> <article number="24"> <title>第二十四条</title> <para>人人有享有休息脱仔闲暇个权利,包括工作时间有合理限制脱仔定期给薪休假个权利。</para> </article> <article number="25"> <title>第二十五条</title> <orderedlist> <listitem tag="㈠"> <para>人人有权享受为维持伊本人脱仔家属个健康脱仔福利所需个生活水准,包括食物、衣着、住房、医疗脱仔必要个社会服务;拉遭到失业、疾病、残废、守寡、衰老或拉其他勿能控制个情况下丧失谋生能力个辰光,有权享受保障。</para> </listitem> <listitem tag="㈡"> <para>妈妈脱仔小囡有权享受特别照顾脱仔协助。一切小囡,勿论婚生或非婚生,侪要享受同样个社会保护。</para> </listitem> </orderedlist> </article> <article number="26"> <title>第二十六条</title> <orderedlist> <listitem tag="㈠"> <para>人人侪有受教育个权利,教育应当勿要钱,至少拉初级脱仔基本阶段要掰个能。初级教育要属义务性质。技术脱仔职业教育要普遍设立。高等教育要根据成绩而对一切人平等开放。</para> </listitem> <listitem tag="㈡"> <para>教育个目的是充分发展人个个性并加强对人权脱仔基本自由个尊重。教育应促进各国、各种族或各宗教集团间个了解、容忍脱仔友谊,并应促进联合国维护脱仔平个各项活动。</para> </listitem> <listitem tag="㈢"> <para>爹爹妈妈对小囡要受个教育个种类,有优先选择个权利。</para> </listitem> </orderedlist> </article> <article number="27"> <title>第二十七条</title> <orderedlist> <listitem tag="㈠"> <para>人人有权自由参加社会个文化生活,享受艺术,并分享科学进步脱仔伊产生个福利。</para> </listitem> <listitem tag="㈡"> <para>人人对由于伊所创作个任何科学、文学或美术作品而产生个精神个脱仔物质个利益,有享受保护个权利。</para> </listitem> </orderedlist> </article> <article number="28"> <title>第二十八条</title> <para>人人有权要求一种社会个脱仔国际个秩序,拉掰排里秩序中,掰个宣言所载个权利脱仔自由能获得充分实现。</para> </article> <article number="29"> <title>第二十九条</title> <orderedlist> <listitem tag="㈠"> <para>人人对社会负有义务,因为只有拉社会中伊个个性才可能得到自由脱仔充分个发展。</para> </listitem> <listitem tag="㈡"> <para>人人拉行使伊个权利脱仔自由个辰光,只受法律所确定个限制,确定此种限制个唯一目的是保证对旁人个权利脱仔自由给予应有个承认脱仔尊重,并拉一个民主个社会中适应道德、公共秩序脱仔普遍福利个正当需要。</para> </listitem> <listitem tag="㈢"> <para>掰点权利脱仔自由个行使,勿论拉任何情形下侪勿要违背联合国个宗旨脱仔原则。</para> </listitem> </orderedlist> </article> <article number="30"> <title>第三十条</title> <para>掰个宣言个任何条文,勿要解释为默许任何国家、集团或个人有权进行任何旨在破坏掰个宣言所载个任何权利脱仔自由个活动或行为。</para> </article> </udhr>
{ "pile_set_name": "Github" }
@import "../css/test.css"; /* This is a CSS comment */ #identity { background: white; color: #222; border: solid 1px #999; border-radius: 2px; font-size: 0.9em; padding: 1px; display: inline; display: inline; } .className { background: papayawhip; error property: none; } .className * { border: 1px solid black; } .className > .right { text-a:right; text-align: right; }
{ "pile_set_name": "Github" }
<?php /* * $Id: CreoleSQLExecTask.php 266 2007-10-25 01:32:38Z hans $ * * 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. * * This software consists of voluntary contributions made by many individuals * and is licensed under the LGPL. For more information please see * <http://phing.info>. */ require_once 'phing/tasks/ext/creole/CreoleTask.php'; include_once 'phing/system/io/StringReader.php'; /** * Executes a series of SQL statements on a database using Creole. * * <p>Statements can * either be read in from a text file using the <i>src</i> attribute or from * between the enclosing SQL tags.</p> * * <p>Multiple statements can be provided, separated by semicolons (or the * defined <i>delimiter</i>). Individual lines within the statements can be * commented using either --, // or REM at the start of the line.</p> * * <p>The <i>autocommit</i> attribute specifies whether auto-commit should be * turned on or off whilst executing the statements. If auto-commit is turned * on each statement will be executed and committed. If it is turned off the * statements will all be executed as one transaction.</p> * * <p>The <i>onerror</i> attribute specifies how to proceed when an error occurs * during the execution of one of the statements. * The possible values are: <b>continue</b> execution, only show the error; * <b>stop</b> execution and commit transaction; * and <b>abort</b> execution and transaction and fail task.</p> * * @author Hans Lellelid <[email protected]> (Phing) * @author Jeff Martin <[email protected]> (Ant) * @author Michael McCallum <[email protected]> (Ant) * @author Tim Stephenson <[email protected]> (Ant) * @package phing.tasks.ext * @version $Revision: 1.21 $ */ class CreoleSQLExecTask extends CreoleTask { private $goodSql = 0; private $totalSql = 0; const DELIM_ROW = "row"; const DELIM_NORMAL = "normal"; /** * Database connection */ private $conn = null; /** * files to load */ private $filesets = array(); /** * all filterchains objects assigned to this task */ private $filterChains = array(); /** * SQL statement */ private $statement = null; /** * SQL input file */ private $srcFile = null; /** * SQL input command */ private $sqlCommand = ""; /** * SQL transactions to perform */ private $transactions = array(); /** * SQL Statement delimiter */ private $delimiter = ";"; /** * The delimiter type indicating whether the delimiter will * only be recognized on a line by itself */ private $delimiterType = "normal"; // can't use constant just defined /** * Print SQL results. */ private $print = false; /** * Print header columns. */ private $showheaders = true; /** * Results Output file. */ private $output = null; /** * Action to perform if an error is found **/ private $onError = "abort"; /** * Encoding to use when reading SQL statements from a file */ private $encoding = null; /** * Append to an existing file or overwrite it? */ private $append = false; /** * Set the name of the SQL file to be run. * Required unless statements are enclosed in the build file */ public function setSrc(PhingFile $srcFile) { $this->srcFile = $srcFile; } /** * Set an inline SQL command to execute. * NB: Properties are not expanded in this text. */ public function addText($sql) { $this->sqlCommand .= $sql; } /** * Adds a set of files (nested fileset attribute). */ public function addFileset(FileSet $set) { $this->filesets[] = $set; } /** * Creates a filterchain * * @access public * @return object The created filterchain object */ function createFilterChain() { $num = array_push($this->filterChains, new FilterChain($this->project)); return $this->filterChains[$num-1]; } /** * Add a SQL transaction to execute */ public function createTransaction() { $t = new SQLExecTransaction($this); $this->transactions[] = $t; return $t; } /** * Set the file encoding to use on the SQL files read in * * @param encoding the encoding to use on the files */ public function setEncoding($encoding) { $this->encoding = $encoding; } /** * Set the statement delimiter. * * <p>For example, set this to "go" and delimitertype to "ROW" for * Sybase ASE or MS SQL Server.</p> * * @param delimiter */ public function setDelimiter($delimiter) { $this->delimiter = $delimiter; } /** * Set the Delimiter type for this sql task. The delimiter type takes two * values - normal and row. Normal means that any occurence of the delimiter * terminate the SQL command whereas with row, only a line containing just * the delimiter is recognized as the end of the command. * * @param string $delimiterType */ public function setDelimiterType($delimiterType) { $this->delimiterType = $delimiterType; } /** * Set the print flag. * * @param boolean $print */ public function setPrint($print) { $this->print = (boolean) $print; } /** * Print headers for result sets from the * statements; optional, default true. * @param boolean $showheaders */ public function setShowheaders($showheaders) { $this->showheaders = (boolean) $showheaders; } /** * Set the output file; * optional, defaults to the console. * @param PhingFile $output */ public function setOutput(PhingFile $output) { $this->output = $output; } /** * whether output should be appended to or overwrite * an existing file. Defaults to false. * @param $append */ public function setAppend($append) { $this->append = (boolean) $append; } /** * Action to perform when statement fails: continue, stop, or abort * optional; default &quot;abort&quot; */ public function setOnerror($action) { $this->onError = $action; } /** * Load the sql file and then execute it * @throws BuildException */ public function main() { $savedTransaction = array(); for($i=0,$size=count($this->transactions); $i < $size; $i++) { $savedTransaction[] = clone $this->transactions[$i]; } $savedSqlCommand = $this->sqlCommand; $this->sqlCommand = trim($this->sqlCommand); try { if ($this->srcFile === null && $this->sqlCommand === "" && empty($this->filesets)) { if (count($this->transactions) === 0) { throw new BuildException("Source file or fileset, " . "transactions or sql statement " . "must be set!", $this->location); } } if ($this->srcFile !== null && !$this->srcFile->exists()) { throw new BuildException("Source file does not exist!", $this->location); } // deal with the filesets for ($i = 0,$size=count($this->filesets); $i < $size; $i++) { $fs = $this->filesets[$i]; $ds = $fs->getDirectoryScanner($this->project); $srcDir = $fs->getDir($this->project); $srcFiles = $ds->getIncludedFiles(); // Make a transaction for each file for ($j=0, $size=count($srcFiles); $j < $size; $j++) { $t = $this->createTransaction(); $t->setSrc(new PhingFile($srcDir, $srcFiles[$j])); } } // Make a transaction group for the outer command $t = $this->createTransaction(); if ($this->srcFile) $t->setSrc($this->srcFile); $t->addText($this->sqlCommand); $this->conn = $this->getConnection(); try { $this->statement = $this->conn->createStatement(); $out = null; try { if ($this->output !== null) { $this->log("Opening output file " . $this->output, Project::MSG_VERBOSE); $out = new BufferedWriter(new FileWriter($this->output->getAbsolutePath(), $this->append)); } // Process all transactions for ($i=0,$size=count($this->transactions); $i < $size; $i++) { $this->transactions[$i]->runTransaction($out); if (!$this->isAutocommit()) { $this->log("Commiting transaction", Project::MSG_VERBOSE); $this->conn->commit(); } } if ($out) $out->close(); } catch (Exception $e) { if ($out) $out->close(); throw $e; } } catch (IOException $e) { if (!$this->isAutocommit() && $this->conn !== null && $this->onError == "abort") { try { $this->conn->rollback(); } catch (SQLException $ex) {} } throw new BuildException($e->getMessage(), $this->location); } catch (SQLException $e){ if (!$this->isAutocommit() && $this->conn !== null && $this->onError == "abort") { try { $this->conn->rollback(); } catch (SQLException $ex) {} } throw new BuildException($e->getMessage(), $this->location); } $this->log($this->goodSql . " of " . $this->totalSql . " SQL statements executed successfully"); } catch (Exception $e) { $this->transactions = $savedTransaction; $this->sqlCommand = $savedSqlCommand; throw $e; } // finally { $this->transactions = $savedTransaction; $this->sqlCommand = $savedSqlCommand; } /** * read in lines and execute them * @throws SQLException, IOException */ public function runStatements(Reader $reader, $out = null) { $sql = ""; $line = ""; $buffer = ''; if ((is_array($this->filterChains)) && (!empty($this->filterChains))) { $in = FileUtils::getChainedReader(new BufferedReader($reader), $this->filterChains, $this->getProject()); while(-1 !== ($read = $in->read())) { // -1 indicates EOF $buffer .= $read; } $lines = explode("\n", $buffer); } else { $in = new BufferedReader($reader); while (($line = $in->readLine()) !== null) { $lines[] = $line; } } try { foreach ($lines as $line) { $line = trim($line); $line = ProjectConfigurator::replaceProperties($this->project, $line, $this->project->getProperties()); if (StringHelper::startsWith("//", $line) || StringHelper::startsWith("--", $line) || StringHelper::startsWith("#", $line)) { continue; } if (strlen($line) > 4 && strtoupper(substr($line,0, 4)) == "REM ") { continue; } $sql .= " " . $line; $sql = trim($sql); // SQL defines "--" as a comment to EOL // and in Oracle it may contain a hint // so we cannot just remove it, instead we must end it if (strpos($line, "--") !== false) { $sql .= "\n"; } if ($this->delimiterType == self::DELIM_NORMAL && StringHelper::endsWith($this->delimiter, $sql) || $this->delimiterType == self::DELIM_ROW && $line == $this->delimiter) { $this->log("SQL: " . $sql, Project::MSG_VERBOSE); $this->execSQL(StringHelper::substring($sql, 0, strlen($sql) - strlen($this->delimiter)), $out); $sql = ""; } } // Catch any statements not followed by ; if ($sql !== "") { $this->execSQL($sql, $out); } } catch (SQLException $e) { throw new BuildException("Error running statements", $e); } } /** * Exec the sql statement. * @throws SQLException */ protected function execSQL($sql, $out = null) { // Check and ignore empty statements if (trim($sql) == "") { return; } try { $this->totalSql++; if (!$this->statement->execute($sql)) { $this->log($this->statement->getUpdateCount() . " rows affected", Project::MSG_VERBOSE); } else { if ($this->print) { $this->printResults($out); } } $this->goodSql++; } catch (SQLException $e) { $this->log("Failed to execute: " . $sql, Project::MSG_ERR); if ($this->onError != "continue") { throw new BuildException("Failed to execute SQL", $e); } $this->log($e->getMessage(), Project::MSG_ERR); } } /** * print any results in the statement. * @throw SQLException */ protected function printResults($out = null) { $rs = null; do { $rs = $this->statement->getResultSet(); if ($rs !== null) { $this->log("Processing new result set.", Project::MSG_VERBOSE); $line = ""; $colsprinted = false; while ($rs->next()) { $fields = $rs->getRow(); if (!$colsprinted && $this->showheaders) { $first = true; foreach($fields as $fieldName => $ignore) { if ($first) $first = false; else $line .= ","; $line .= $fieldName; } if ($out !== null) { $out->write($line); $out->newLine(); } else { print($line.PHP_EOL); } $line = ""; $colsprinted = true; } // if show headers $first = true; foreach($fields as $columnValue) { if ($columnValue != null) { $columnValue = trim($columnValue); } if ($first) { $first = false; } else { $line .= ","; } $line .= $columnValue; } if ($out !== null) { $out->write($line); $out->newLine(); } else { print($line . PHP_EOL); } $line = ""; } // while rs->next() } } while ($this->statement->getMoreResults()); print(PHP_EOL); if ($out !== null) $out->newLine(); } } /** * "Inner" class that contains the definition of a new transaction element. * Transactions allow several files or blocks of statements * to be executed using the same JDBC connection and commit * operation in between. */ class SQLExecTransaction { private $tSrcFile = null; private $tSqlCommand = ""; private $parent; function __construct($parent) { // Parent is required so that we can log things ... $this->parent = $parent; } public function setSrc(PhingFile $src) { $this->tSrcFile = $src; } public function addText($sql) { $this->tSqlCommand .= $sql; } /** * @throws IOException, SQLException */ public function runTransaction($out = null) { if (!empty($this->tSqlCommand)) { $this->parent->log("Executing commands", Project::MSG_INFO); $this->parent->runStatements(new StringReader($this->tSqlCommand), $out); } if ($this->tSrcFile !== null) { $this->parent->log("Executing file: " . $this->tSrcFile->getAbsolutePath(), Project::MSG_INFO); $reader = new FileReader($this->tSrcFile); $this->parent->runStatements($reader, $out); $reader->close(); } } }
{ "pile_set_name": "Github" }
/* YUI 3.17.0 (build ce55cc9) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ .yui3-widget-hidden{display:none}.yui3-widget-content{overflow:hidden}.yui3-widget-content-expanded{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;height:100%}.yui3-widget-tmp-forcesize{overflow:hidden!important}#yui3-css-stamp.skin-night-widget-base{display:none}
{ "pile_set_name": "Github" }
{ "Entries": [ { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/providers/Microsoft.Resources?api-version=2016-09-01", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "b7aee4bb-c148-4828-b1a8-ce0c41d26956" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.1.16" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], "x-ms-request-id": [ "d2cdd53d-52d4-4763-9bff-c4098830f639" ], "x-ms-correlation-request-id": [ "d2cdd53d-52d4-4763-9bff-c4098830f639" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001932Z:d2cdd53d-52d4-4763-9bff-c4098830f639" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:31 GMT" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], "Content-Length": [ "7355" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tenants\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"notifyResourceJobs\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkPolicyCompliance\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkresourcename\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resources\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/resources\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia Southeast\",\r\n \"Australia East\",\r\n \"West India\",\r\n \"South India\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/resourceGroups\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia Southeast\",\r\n \"Australia East\",\r\n \"West India\",\r\n \"South India\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/resourcegroups/resources\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/tagnames\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/tagNames/tagValues\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deployments\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deployments/operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"links\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-09-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-05-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-05-10\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2016-09-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-02-01\",\r\n \"2015-11-01\",\r\n \"2015-01-01\",\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourcegroups/RG-ps1327?api-version=2016-09-01", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlZ3JvdXBzL1JHLXBzMTMyNz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "e05d5f4f-c722-4ac4-8bee-370e2e6d465c" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.1.16" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "29" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-request-id": [ "e2af202c-7b1a-433e-98fb-3f960f92b7ea" ], "x-ms-correlation-request-id": [ "e2af202c-7b1a-433e-98fb-3f960f92b7ea" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001933Z:e2af202c-7b1a-433e-98fb-3f960f92b7ea" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:32 GMT" ], "Content-Length": [ "171" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327\",\r\n \"name\": \"RG-ps1327\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/providers/Microsoft.Logic?api-version=2016-09-01", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Byb3ZpZGVycy9NaWNyb3NvZnQuTG9naWM/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "1f0eba75-5a6c-48df-9abb-a2b7dbfb7530" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.1.16" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], "x-ms-request-id": [ "2696a4a7-8836-4b6c-923e-49ccbe9aacc2" ], "x-ms-correlation-request-id": [ "2696a4a7-8836-4b6c-923e-49ccbe9aacc2" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001933Z:2696a4a7-8836-4b6c-923e-49ccbe9aacc2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:32 GMT" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], "Content-Length": [ "3655" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/providers/Microsoft.Logic\",\r\n \"namespace\": \"Microsoft.Logic\",\r\n \"authorization\": {\r\n \"applicationId\": \"7cd684f4-8a78-49b0-91ec-6a35d38739ba\",\r\n \"roleDefinitionId\": \"cb3ef1fb-6e31-49e2-9d87-ed821053fe58\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workflows\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Brazil South\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2017-07-01\",\r\n \"2016-10-01\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-02-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"locations/workflows\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Brazil South\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2017-07-01\",\r\n \"2016-10-01\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-02-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2017-07-01\",\r\n \"2016-10-01\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-02-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2017-07-01\",\r\n \"2016-10-01\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-02-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"integrationAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Brazil South\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-04-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"isolatedEnvironments\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"integrationServiceEnvironments\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\"\r\n ],\r\n \"capabilities\": \"None\"\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "1bf6131f-b651-4e4f-ba8d-e393ffaaa9bb" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-failure-cause": [ "gateway" ], "x-ms-request-id": [ "0b57c71c-367a-4229-899f-081aadbdf2b8" ], "x-ms-correlation-request-id": [ "0b57c71c-367a-4229-899f-081aadbdf2b8" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001933Z:0b57c71c-367a-4229-899f-081aadbdf2b8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:32 GMT" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], "Content-Length": [ "158" ] }, "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Logic/integrationAccounts/IA-ps6347' under resource group 'RG-ps1327' was not found.\"\r\n }\r\n}", "StatusCode": 404 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "8bcc8cc6-d6b3-443a-8a13-af14ae61ff23" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], "x-ms-request-id": [ "westus:c72c7565-78db-4494-8ce4-f0ff149d033e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], "x-ms-correlation-request-id": [ "e023ee82-510d-473d-b005-6bd8ceee917a" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001934Z:e023ee82-510d-473d-b005-6bd8ceee917a" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:33 GMT" ], "Content-Length": [ "285" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347\",\r\n \"name\": \"IA-ps6347\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts\",\r\n \"location\": \"West US\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "f97d8265-cd7c-4c8a-9594-45747fabdef8" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], "x-ms-request-id": [ "westus:fd79ea29-649a-438f-b6a9-fe8373d5ba44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], "x-ms-correlation-request-id": [ "3f856768-c414-48c8-8e02-3c1710fa25ed" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:3f856768-c414-48c8-8e02-3c1710fa25ed" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "285" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347\",\r\n \"name\": \"IA-ps6347\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts\",\r\n \"location\": \"West US\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "5aad30cc-7175-4c5f-82aa-a60c8ec79041" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], "x-ms-request-id": [ "westus:0261c802-8016-439c-8fca-5d077496e3f6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], "x-ms-correlation-request-id": [ "bc69f103-aea7-4a22-bd91-f57c964848e7" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:bc69f103-aea7-4a22-bd91-f57c964848e7" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "285" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347\",\r\n \"name\": \"IA-ps6347\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts\",\r\n \"location\": \"West US\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "fc551c54-af5e-48f7-9f06-f376ddd6a3ba" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], "x-ms-request-id": [ "westus:8937d94d-c9be-433e-9cd4-75a9b0ae4067" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], "x-ms-correlation-request-id": [ "3fa89479-adc8-4cba-97bc-88645294359f" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:3fa89479-adc8-4cba-97bc-88645294359f" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "285" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347\",\r\n \"name\": \"IA-ps6347\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts\",\r\n \"location\": \"West US\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "70cc5179-3764-4975-ae91-625d6182be5f" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], "x-ms-request-id": [ "westus:a1e0f71e-512e-4aff-8397-ca8fc1d54959" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], "x-ms-correlation-request-id": [ "e9cafe61-577f-4421-a7dd-242051c00abb" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:e9cafe61-577f-4421-a7dd-242051c00abb" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "285" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347\",\r\n \"name\": \"IA-ps6347\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts\",\r\n \"location\": \"West US\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "76371e12-175d-446b-b996-a823f65c8b19" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], "x-ms-request-id": [ "westus:83322d38-68c2-4799-8540-e4b9e57cdd8a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], "x-ms-correlation-request-id": [ "5b384d54-6168-4af1-ab97-21ebab4e475a" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:5b384d54-6168-4af1-ab97-21ebab4e475a" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "285" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347\",\r\n \"name\": \"IA-ps6347\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts\",\r\n \"location\": \"West US\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "d2808d13-ca23-4b54-881d-00bf4e3f8052" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], "x-ms-request-id": [ "westus:9f54c477-e472-4fc4-b7ab-bad627631a07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], "x-ms-correlation-request-id": [ "29105f2c-bae2-45cd-b795-68aea4bab2c2" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:29105f2c-bae2-45cd-b795-68aea4bab2c2" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "285" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347\",\r\n \"name\": \"IA-ps6347\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts\",\r\n \"location\": \"West US\"\r\n}", "StatusCode": 200 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {},\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "54493f47-22a3-40c9-b771-67af2e58365d" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "92" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:eb29fefd-7fe5-465a-8768-5311c767ce7b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-correlation-request-id": [ "cb787b34-e914-4efd-8650-6fd472b1e463" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001934Z:cb787b34-e914-4efd-8650-6fd472b1e463" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:33 GMT" ], "Content-Length": [ "285" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347\",\r\n \"name\": \"IA-ps6347\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts\",\r\n \"location\": \"West US\"\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps2562?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVC1wczI1NjI/YXBpLXZlcnNpb249MjAxOC0wNy0wMS1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "eb74020e-88f2-4932-9509-bc8efe269cb1" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:093ecf56-2b79-4c9e-81f0-b9dbbff3f812" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], "x-ms-correlation-request-id": [ "14ea86e6-5a34-4768-9bbb-529e6107c247" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001934Z:14ea86e6-5a34-4768-9bbb-529e6107c247" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:33 GMT" ], "Content-Length": [ "125" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"MapNotFound\",\r\n \"message\": \"The map 'XSLT-ps2562' could not be found in the integration account 'IA-ps6347'.\"\r\n }\r\n}", "StatusCode": 404 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps2562?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVC1wczI1NjI/YXBpLXZlcnNpb249MjAxOC0wNy0wMS1wcmV2aWV3", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt\",\r\n \"content\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-16\\\"?>\\r\\n<xsl:stylesheet xmlns:xsl=\\\"http://www.w3.org/1999/XSL/Transform\\\" xmlns:msxsl=\\\"urn:schemas-microsoft-com:xslt\\\" xmlns:var=\\\"http://schemas.microsoft.com/BizTalk/2003/var\\\" exclude-result-prefixes=\\\"msxsl var s0 userCSharp\\\" version=\\\"1.0\\\" xmlns:ns0=\\\"http://BizTalk_Server_Project4.StringFunctoidsDestinationSchema\\\" xmlns:s0=\\\"http://BizTalk_Server_Project4.StringFunctoidsSourceSchema\\\" xmlns:userCSharp=\\\"http://schemas.microsoft.com/BizTalk/2003/userCSharp\\\">\\r\\n <xsl:import href=\\\"http://btsfunctoids.blob.core.windows.net/functoids/functoids.xslt\\\" />\\r\\n <xsl:output omit-xml-declaration=\\\"yes\\\" method=\\\"xml\\\" version=\\\"1.0\\\" />\\r\\n <xsl:template match=\\\"/\\\">\\r\\n <xsl:apply-templates select=\\\"/s0:Root\\\" />\\r\\n </xsl:template>\\r\\n <xsl:template match=\\\"/s0:Root\\\">\\r\\n <xsl:variable name=\\\"var:v1\\\" select=\\\"userCSharp:StringFind(string(StringFindSource/text()) , &quot;SearchString&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v2\\\" select=\\\"userCSharp:StringLeft(string(StringLeftSource/text()) , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v3\\\" select=\\\"userCSharp:StringRight(string(StringRightSource/text()) , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v4\\\" select=\\\"userCSharp:StringUpperCase(string(UppercaseSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v5\\\" select=\\\"userCSharp:StringLowerCase(string(LowercaseSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v6\\\" select=\\\"userCSharp:StringSize(string(SizeSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v7\\\" select=\\\"userCSharp:StringSubstring(string(StringExtractSource/text()) , &quot;0&quot; , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v8\\\" select=\\\"userCSharp:StringConcat(string(StringConcatSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v9\\\" select=\\\"userCSharp:StringTrimLeft(string(StringLeftTrimSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v10\\\" select=\\\"userCSharp:StringTrimRight(string(StringRightTrimSource/text()))\\\" />\\r\\n <ns0:Root>\\r\\n <StringFindDestination>\\r\\n <xsl:value-of select=\\\"$var:v1\\\" />\\r\\n </StringFindDestination>\\r\\n <StringLeftDestination>\\r\\n <xsl:value-of select=\\\"$var:v2\\\" />\\r\\n </StringLeftDestination>\\r\\n <StringRightDestination>\\r\\n <xsl:value-of select=\\\"$var:v3\\\" />\\r\\n </StringRightDestination>\\r\\n <UppercaseDestination>\\r\\n <xsl:value-of select=\\\"$var:v4\\\" />\\r\\n </UppercaseDestination>\\r\\n <LowercaseDestination>\\r\\n <xsl:value-of select=\\\"$var:v5\\\" />\\r\\n </LowercaseDestination>\\r\\n <SizeDestination>\\r\\n <xsl:value-of select=\\\"$var:v6\\\" />\\r\\n </SizeDestination>\\r\\n <StringExtractDestination>\\r\\n <xsl:value-of select=\\\"$var:v7\\\" />\\r\\n </StringExtractDestination>\\r\\n <StringConcatDestination>\\r\\n <xsl:value-of select=\\\"$var:v8\\\" />\\r\\n </StringConcatDestination>\\r\\n <StringLeftTrimDestination>\\r\\n <xsl:value-of select=\\\"$var:v9\\\" />\\r\\n </StringLeftTrimDestination>\\r\\n <StringRightTrimDestination>\\r\\n <xsl:value-of select=\\\"$var:v10\\\" />\\r\\n </StringRightTrimDestination>\\r\\n </ns0:Root>\\r\\n </xsl:template>\\r\\n</xsl:stylesheet>\",\r\n \"contentType\": \"application/xml\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "2b3432e1-6440-4397-95e2-ab6d4c283976" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "3362" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:54bc49b0-ad17-411f-a272-275da3fbd892" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], "x-ms-correlation-request-id": [ "a8c24346-49bb-43a0-bdbb-6cd09d88e1b1" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:a8c24346-49bb-43a0-bdbb-6cd09d88e1b1" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "676" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt\",\r\n \"contentLink\": {\r\n \"uri\": \"https://prod-94.westus.logic.azure.com:443/integrationAccounts/b8e2dd3336b546438079c7994889b836/maps/XSLT-ps2562/contents/Value?api-version=2015-08-01-preview&se=2019-02-06T04%3A19%3A35.1298517Z&sp=%2Fmaps%2FXSLT-ps2562%2Fread&sv=1.0&sig=Ud8Dpn-l2Rvc55RdBNBH7074KffAUdaxfRTVehZ99y4\",\r\n \"contentSize\": 3056\r\n },\r\n \"createdTime\": \"2019-02-06T00:19:35.0382792Z\",\r\n \"changedTime\": \"2019-02-06T00:19:35.0384727Z\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps2562\",\r\n \"name\": \"XSLT-ps2562\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts/maps\"\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps1774?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVC1wczE3NzQ/YXBpLXZlcnNpb249MjAxOC0wNy0wMS1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "d745ed38-ba5a-4c26-8bfa-2e227ddbb8dd" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:d61388b3-f2c2-4656-a356-6c44bc01959d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], "x-ms-correlation-request-id": [ "fb1724d1-f71a-4e63-8b08-d949c830d306" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:fb1724d1-f71a-4e63-8b08-d949c830d306" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "125" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"MapNotFound\",\r\n \"message\": \"The map 'XSLT-ps1774' could not be found in the integration account 'IA-ps6347'.\"\r\n }\r\n}", "StatusCode": 404 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps1774?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVC1wczE3NzQ/YXBpLXZlcnNpb249MjAxOC0wNy0wMS1wcmV2aWV3", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt\",\r\n \"content\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-16\\\"?>\\r\\n<xsl:stylesheet xmlns:xsl=\\\"http://www.w3.org/1999/XSL/Transform\\\" xmlns:msxsl=\\\"urn:schemas-microsoft-com:xslt\\\" xmlns:var=\\\"http://schemas.microsoft.com/BizTalk/2003/var\\\" exclude-result-prefixes=\\\"msxsl var s0 userCSharp\\\" version=\\\"1.0\\\" xmlns:ns0=\\\"http://BizTalk_Server_Project4.StringFunctoidsDestinationSchema\\\" xmlns:s0=\\\"http://BizTalk_Server_Project4.StringFunctoidsSourceSchema\\\" xmlns:userCSharp=\\\"http://schemas.microsoft.com/BizTalk/2003/userCSharp\\\">\\r\\n <xsl:import href=\\\"http://btsfunctoids.blob.core.windows.net/functoids/functoids.xslt\\\" />\\r\\n <xsl:output omit-xml-declaration=\\\"yes\\\" method=\\\"xml\\\" version=\\\"1.0\\\" />\\r\\n <xsl:template match=\\\"/\\\">\\r\\n <xsl:apply-templates select=\\\"/s0:Root\\\" />\\r\\n </xsl:template>\\r\\n <xsl:template match=\\\"/s0:Root\\\">\\r\\n <xsl:variable name=\\\"var:v1\\\" select=\\\"userCSharp:StringFind(string(StringFindSource/text()) , &quot;SearchString&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v2\\\" select=\\\"userCSharp:StringLeft(string(StringLeftSource/text()) , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v3\\\" select=\\\"userCSharp:StringRight(string(StringRightSource/text()) , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v4\\\" select=\\\"userCSharp:StringUpperCase(string(UppercaseSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v5\\\" select=\\\"userCSharp:StringLowerCase(string(LowercaseSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v6\\\" select=\\\"userCSharp:StringSize(string(SizeSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v7\\\" select=\\\"userCSharp:StringSubstring(string(StringExtractSource/text()) , &quot;0&quot; , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v8\\\" select=\\\"userCSharp:StringConcat(string(StringConcatSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v9\\\" select=\\\"userCSharp:StringTrimLeft(string(StringLeftTrimSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v10\\\" select=\\\"userCSharp:StringTrimRight(string(StringRightTrimSource/text()))\\\" />\\r\\n <ns0:Root>\\r\\n <StringFindDestination>\\r\\n <xsl:value-of select=\\\"$var:v1\\\" />\\r\\n </StringFindDestination>\\r\\n <StringLeftDestination>\\r\\n <xsl:value-of select=\\\"$var:v2\\\" />\\r\\n </StringLeftDestination>\\r\\n <StringRightDestination>\\r\\n <xsl:value-of select=\\\"$var:v3\\\" />\\r\\n </StringRightDestination>\\r\\n <UppercaseDestination>\\r\\n <xsl:value-of select=\\\"$var:v4\\\" />\\r\\n </UppercaseDestination>\\r\\n <LowercaseDestination>\\r\\n <xsl:value-of select=\\\"$var:v5\\\" />\\r\\n </LowercaseDestination>\\r\\n <SizeDestination>\\r\\n <xsl:value-of select=\\\"$var:v6\\\" />\\r\\n </SizeDestination>\\r\\n <StringExtractDestination>\\r\\n <xsl:value-of select=\\\"$var:v7\\\" />\\r\\n </StringExtractDestination>\\r\\n <StringConcatDestination>\\r\\n <xsl:value-of select=\\\"$var:v8\\\" />\\r\\n </StringConcatDestination>\\r\\n <StringLeftTrimDestination>\\r\\n <xsl:value-of select=\\\"$var:v9\\\" />\\r\\n </StringLeftTrimDestination>\\r\\n <StringRightTrimDestination>\\r\\n <xsl:value-of select=\\\"$var:v10\\\" />\\r\\n </StringRightTrimDestination>\\r\\n </ns0:Root>\\r\\n </xsl:template>\\r\\n</xsl:stylesheet>\",\r\n \"contentType\": \"application/xml\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "9a412e06-d0a5-4d71-ab05-254a95237f2b" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "3362" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:d1a81abd-6111-4398-bc91-82731e1d5804" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], "x-ms-correlation-request-id": [ "f0235c1c-4cbc-4f57-a206-be80d26524a1" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:f0235c1c-4cbc-4f57-a206-be80d26524a1" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "676" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt\",\r\n \"contentLink\": {\r\n \"uri\": \"https://prod-94.westus.logic.azure.com:443/integrationAccounts/b8e2dd3336b546438079c7994889b836/maps/XSLT-ps1774/contents/Value?api-version=2015-08-01-preview&se=2019-02-06T04%3A19%3A35.4263629Z&sp=%2Fmaps%2FXSLT-ps1774%2Fread&sv=1.0&sig=p7dRjjdRg0umofsD_bWoEaP4tl_I8-jOvZtUwOALGGA\",\r\n \"contentSize\": 3056\r\n },\r\n \"createdTime\": \"2019-02-06T00:19:35.3876974Z\",\r\n \"changedTime\": \"2019-02-06T00:19:35.3878464Z\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps1774\",\r\n \"name\": \"XSLT-ps1774\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts/maps\"\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps5567?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVC1wczU1Njc/YXBpLXZlcnNpb249MjAxOC0wNy0wMS1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "cae8acc0-a368-4faf-ad65-5c22aa95dc13" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:3159056c-2a03-401d-b227-c8e5f921627b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], "x-ms-correlation-request-id": [ "a8bf85b0-bc41-4016-9c18-dff2ae09076b" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:a8bf85b0-bc41-4016-9c18-dff2ae09076b" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "125" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"MapNotFound\",\r\n \"message\": \"The map 'XSLT-ps5567' could not be found in the integration account 'IA-ps6347'.\"\r\n }\r\n}", "StatusCode": 404 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps5567?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVC1wczU1Njc/YXBpLXZlcnNpb249MjAxOC0wNy0wMS1wcmV2aWV3", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt\",\r\n \"content\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-16\\\"?>\\r\\n<xsl:stylesheet xmlns:xsl=\\\"http://www.w3.org/1999/XSL/Transform\\\" xmlns:msxsl=\\\"urn:schemas-microsoft-com:xslt\\\" xmlns:var=\\\"http://schemas.microsoft.com/BizTalk/2003/var\\\" exclude-result-prefixes=\\\"msxsl var s0 userCSharp\\\" version=\\\"1.0\\\" xmlns:ns0=\\\"http://BizTalk_Server_Project4.StringFunctoidsDestinationSchema\\\" xmlns:s0=\\\"http://BizTalk_Server_Project4.StringFunctoidsSourceSchema\\\" xmlns:userCSharp=\\\"http://schemas.microsoft.com/BizTalk/2003/userCSharp\\\">\\r\\n <xsl:import href=\\\"http://btsfunctoids.blob.core.windows.net/functoids/functoids.xslt\\\" />\\r\\n <xsl:output omit-xml-declaration=\\\"yes\\\" method=\\\"xml\\\" version=\\\"1.0\\\" />\\r\\n <xsl:template match=\\\"/\\\">\\r\\n <xsl:apply-templates select=\\\"/s0:Root\\\" />\\r\\n </xsl:template>\\r\\n <xsl:template match=\\\"/s0:Root\\\">\\r\\n <xsl:variable name=\\\"var:v1\\\" select=\\\"userCSharp:StringFind(string(StringFindSource/text()) , &quot;SearchString&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v2\\\" select=\\\"userCSharp:StringLeft(string(StringLeftSource/text()) , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v3\\\" select=\\\"userCSharp:StringRight(string(StringRightSource/text()) , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v4\\\" select=\\\"userCSharp:StringUpperCase(string(UppercaseSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v5\\\" select=\\\"userCSharp:StringLowerCase(string(LowercaseSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v6\\\" select=\\\"userCSharp:StringSize(string(SizeSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v7\\\" select=\\\"userCSharp:StringSubstring(string(StringExtractSource/text()) , &quot;0&quot; , &quot;2&quot;)\\\" />\\r\\n <xsl:variable name=\\\"var:v8\\\" select=\\\"userCSharp:StringConcat(string(StringConcatSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v9\\\" select=\\\"userCSharp:StringTrimLeft(string(StringLeftTrimSource/text()))\\\" />\\r\\n <xsl:variable name=\\\"var:v10\\\" select=\\\"userCSharp:StringTrimRight(string(StringRightTrimSource/text()))\\\" />\\r\\n <ns0:Root>\\r\\n <StringFindDestination>\\r\\n <xsl:value-of select=\\\"$var:v1\\\" />\\r\\n </StringFindDestination>\\r\\n <StringLeftDestination>\\r\\n <xsl:value-of select=\\\"$var:v2\\\" />\\r\\n </StringLeftDestination>\\r\\n <StringRightDestination>\\r\\n <xsl:value-of select=\\\"$var:v3\\\" />\\r\\n </StringRightDestination>\\r\\n <UppercaseDestination>\\r\\n <xsl:value-of select=\\\"$var:v4\\\" />\\r\\n </UppercaseDestination>\\r\\n <LowercaseDestination>\\r\\n <xsl:value-of select=\\\"$var:v5\\\" />\\r\\n </LowercaseDestination>\\r\\n <SizeDestination>\\r\\n <xsl:value-of select=\\\"$var:v6\\\" />\\r\\n </SizeDestination>\\r\\n <StringExtractDestination>\\r\\n <xsl:value-of select=\\\"$var:v7\\\" />\\r\\n </StringExtractDestination>\\r\\n <StringConcatDestination>\\r\\n <xsl:value-of select=\\\"$var:v8\\\" />\\r\\n </StringConcatDestination>\\r\\n <StringLeftTrimDestination>\\r\\n <xsl:value-of select=\\\"$var:v9\\\" />\\r\\n </StringLeftTrimDestination>\\r\\n <StringRightTrimDestination>\\r\\n <xsl:value-of select=\\\"$var:v10\\\" />\\r\\n </StringRightTrimDestination>\\r\\n </ns0:Root>\\r\\n </xsl:template>\\r\\n</xsl:stylesheet>\",\r\n \"contentType\": \"application/xml\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "441ce527-7282-4a04-92a6-91b3c7e1db38" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "3362" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:98d8c937-a994-4988-8311-b53a1b27fb17" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], "x-ms-correlation-request-id": [ "350ee571-5541-47ba-b04f-53e40bdc6696" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:350ee571-5541-47ba-b04f-53e40bdc6696" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "676" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt\",\r\n \"contentLink\": {\r\n \"uri\": \"https://prod-94.westus.logic.azure.com:443/integrationAccounts/b8e2dd3336b546438079c7994889b836/maps/XSLT-ps5567/contents/Value?api-version=2015-08-01-preview&se=2019-02-06T04%3A19%3A35.7857704Z&sp=%2Fmaps%2FXSLT-ps5567%2Fread&sv=1.0&sig=cMvXQZPUQrtfdyDSVDEa1x2RErju93uQgVebqHYmj4Q\",\r\n \"contentSize\": 3056\r\n },\r\n \"createdTime\": \"2019-02-06T00:19:35.6650603Z\",\r\n \"changedTime\": \"2019-02-06T00:19:35.6653856Z\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT-ps5567\",\r\n \"name\": \"XSLT-ps5567\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts/maps\"\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT2-ps8650?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVDItcHM4NjUwP2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "6f1ee9e7-f533-49f0-abd1-786bb2a93afa" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:644c36c6-3552-40b2-9c91-c450a30b7cd7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], "x-ms-correlation-request-id": [ "42992348-535e-4ed9-a496-760a761a013b" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001935Z:42992348-535e-4ed9-a496-760a761a013b" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:34 GMT" ], "Content-Length": [ "126" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"MapNotFound\",\r\n \"message\": \"The map 'XSLT2-ps8650' could not be found in the integration account 'IA-ps6347'.\"\r\n }\r\n}", "StatusCode": 404 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT2-ps8650?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVDItcHM4NjUwP2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt20\",\r\n \"content\": \"<xsl:stylesheet\\r\\n xmlns:xsl=\\\"http://www.w3.org/1999/XSL/Transform\\\"\\r\\n version=\\\"2.0\\\">\\r\\n <xsl:template match=\\\"@*|node()\\\">\\r\\n <xsl:copy>\\r\\n <xsl:apply-templates select=\\\"@*|node()\\\"/>\\r\\n </xsl:copy>\\r\\n </xsl:template>\\r\\n</xsl:stylesheet>\",\r\n \"contentType\": \"application/xml\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "20eff12f-ff2c-49e6-973e-d8b9c6915040" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "377" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:c109ad27-adfb-433b-8144-3bf6b1a86c22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], "x-ms-correlation-request-id": [ "e022f5e2-2d2e-4cb6-8af2-f9bae2144f2e" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:e022f5e2-2d2e-4cb6-8af2-f9bae2144f2e" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "681" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt20\",\r\n \"contentLink\": {\r\n \"uri\": \"https://prod-94.westus.logic.azure.com:443/integrationAccounts/b8e2dd3336b546438079c7994889b836/maps/XSLT2-ps8650/contents/Value?api-version=2015-08-01-preview&se=2019-02-06T04%3A19%3A36.0201522Z&sp=%2Fmaps%2FXSLT2-ps8650%2Fread&sv=1.0&sig=50yGmOBp9TbG98KsudCQ-KJcqSBYWyfRdjVqrKpwEKA\",\r\n \"contentSize\": 241\r\n },\r\n \"createdTime\": \"2019-02-06T00:19:35.9790313Z\",\r\n \"changedTime\": \"2019-02-06T00:19:35.9796197Z\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT2-ps8650\",\r\n \"name\": \"XSLT2-ps8650\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts/maps\"\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT3-ps5272?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVDMtcHM1MjcyP2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "5c35029b-002d-4acd-ab7c-4c0eb855d5d9" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:5c152840-5da4-4023-a08b-6585d218378e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], "x-ms-correlation-request-id": [ "75c101a4-6d5c-4ac8-8f1a-cfd12b629414" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:75c101a4-6d5c-4ac8-8f1a-cfd12b629414" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "126" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"MapNotFound\",\r\n \"message\": \"The map 'XSLT3-ps5272' could not be found in the integration account 'IA-ps6347'.\"\r\n }\r\n}", "StatusCode": 404 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT3-ps5272?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvWFNMVDMtcHM1MjcyP2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt30\",\r\n \"content\": \"<xsl:stylesheet version=\\\"3.0\\\" xmlns:xsl=\\\"http://www.w3.org/1999/XSL/Transform\\\"\\r\\n xmlns:xs=\\\"http://www.w3.org/2001/XMLSchema\\\">\\r\\n <xsl:output method=\\\"text\\\"/>\\r\\n <xsl:template match=\\\"/\\\">\\r\\n <xsl:value-of select=\\\"company/employee/name\\\"/>\\r\\n <xsl:variable name=\\\"test\\\">\\r\\n <xsl:text>company/employee/name</xsl:text>\\r\\n </xsl:variable>\\r\\n <xsl:evaluate xpath=\\\"$test\\\"/>\\r\\n </xsl:template>\\r\\n</xsl:stylesheet>\\r\\n\",\r\n \"contentType\": \"application/xml\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "5ab6bdeb-2cf5-41ef-a258-80913f4265c7" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "565" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:acb81478-5c59-4b6b-aaf0-5a95dbeeeb12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], "x-ms-correlation-request-id": [ "111b6b49-7605-459b-bb92-aafc1af92bb9" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:111b6b49-7605-459b-bb92-aafc1af92bb9" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "681" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Xslt30\",\r\n \"contentLink\": {\r\n \"uri\": \"https://prod-94.westus.logic.azure.com:443/integrationAccounts/b8e2dd3336b546438079c7994889b836/maps/XSLT3-ps5272/contents/Value?api-version=2015-08-01-preview&se=2019-02-06T04%3A19%3A36.2232606Z&sp=%2Fmaps%2FXSLT3-ps5272%2Fread&sv=1.0&sig=0oSQmtA_A3u42HL7hsRBt4KQ94sy_fLbfkNT3E9YCQ4\",\r\n \"contentSize\": 415\r\n },\r\n \"createdTime\": \"2019-02-06T00:19:36.2079635Z\",\r\n \"changedTime\": \"2019-02-06T00:19:36.2081066Z\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/XSLT3-ps5272\",\r\n \"name\": \"XSLT3-ps5272\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts/maps\"\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/Liquid-ps3163?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvTGlxdWlkLXBzMzE2Mz9hcGktdmVyc2lvbj0yMDE4LTA3LTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "358c58a8-b800-4848-8993-4fb35c0c48ec" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:d506bf7e-a1cb-4e0b-82d6-1ad20e5e4a14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], "x-ms-correlation-request-id": [ "e0d7592d-aa39-443e-9a07-562cfe8752c0" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:e0d7592d-aa39-443e-9a07-562cfe8752c0" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "127" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"MapNotFound\",\r\n \"message\": \"The map 'Liquid-ps3163' could not be found in the integration account 'IA-ps6347'.\"\r\n }\r\n}", "StatusCode": 404 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/Liquid-ps3163?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvTGlxdWlkLXBzMzE2Mz9hcGktdmVyc2lvbj0yMDE4LTA3LTAxLXByZXZpZXc=", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Liquid\",\r\n \"content\": \"{% if user %}\\r\\nHello, {{ user.firstname }}\\r\\n{% else %}\\r\\nHello World!\\r\\n{% endif %} \",\r\n \"contentType\": \"text/plain\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "896e193c-a25c-49db-8e0a-5d93fd8be9ac" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "197" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:367e66eb-4421-43f2-bb93-a6f5dab5a7ca" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], "x-ms-correlation-request-id": [ "c1d23de4-46c3-4139-a316-affcd8aec83a" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:c1d23de4-46c3-4139-a316-affcd8aec83a" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "684" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Liquid\",\r\n \"contentLink\": {\r\n \"uri\": \"https://prod-94.westus.logic.azure.com:443/integrationAccounts/b8e2dd3336b546438079c7994889b836/maps/Liquid-ps3163/contents/Value?api-version=2015-08-01-preview&se=2019-02-06T04%3A19%3A36.4576477Z&sp=%2Fmaps%2FLiquid-ps3163%2Fread&sv=1.0&sig=I0SMG6l71vz5B25msIInOw4Gv9b5f8SYYeLp8ksEWmU\",\r\n \"contentSize\": 82\r\n },\r\n \"createdTime\": \"2019-02-06T00:19:36.4517317Z\",\r\n \"changedTime\": \"2019-02-06T00:19:36.4518097Z\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/Liquid-ps3163\",\r\n \"name\": \"Liquid-ps3163\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts/maps\"\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/Liquid2-ps8358?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvTGlxdWlkMi1wczgzNTg/YXBpLXZlcnNpb249MjAxOC0wNy0wMS1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "a5082732-6209-45d5-a5f9-be2cf1b966ba" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:bb5480c5-743d-4db6-9298-e76f867b6d7a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], "x-ms-correlation-request-id": [ "c4ca5e4f-c278-4a3b-9b05-578be874d3f7" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:c4ca5e4f-c278-4a3b-9b05-578be874d3f7" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "128" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"MapNotFound\",\r\n \"message\": \"The map 'Liquid2-ps8358' could not be found in the integration account 'IA-ps6347'.\"\r\n }\r\n}", "StatusCode": 404 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/Liquid2-ps8358?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3L21hcHMvTGlxdWlkMi1wczgzNTg/YXBpLXZlcnNpb249MjAxOC0wNy0wMS1wcmV2aWV3", "RequestMethod": "PUT", "RequestBody": "{\r\n \"properties\": {\r\n \"mapType\": \"liquid\",\r\n \"content\": \"{% if user %}\\r\\nHello, {{ user.firstname }}\\r\\n{% else %}\\r\\nHello World!\\r\\n{% endif %} \",\r\n \"contentType\": \"text/plain\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "95727753-d882-4969-9fd6-a9b8417dd77e" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ "197" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:8bcda96a-3017-4eb5-862e-05d5f05fbf7f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], "x-ms-correlation-request-id": [ "39d3cac6-a43e-4d00-9d31-5a75b7b89b8d" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001936Z:39d3cac6-a43e-4d00-9d31-5a75b7b89b8d" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:35 GMT" ], "Content-Length": [ "688" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "ResponseBody": "{\r\n \"properties\": {\r\n \"mapType\": \"Liquid\",\r\n \"contentLink\": {\r\n \"uri\": \"https://prod-94.westus.logic.azure.com:443/integrationAccounts/b8e2dd3336b546438079c7994889b836/maps/Liquid2-ps8358/contents/Value?api-version=2015-08-01-preview&se=2019-02-06T04%3A19%3A36.6764043Z&sp=%2Fmaps%2FLiquid2-ps8358%2Fread&sv=1.0&sig=Rs5A9u493cxiyTqk-Ms9GvtrLN9SFrvuVfDfgJmYUDw\",\r\n \"contentSize\": 82\r\n },\r\n \"createdTime\": \"2019-02-06T00:19:36.6623196Z\",\r\n \"changedTime\": \"2019-02-06T00:19:36.6631168Z\"\r\n },\r\n \"id\": \"/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347/maps/Liquid2-ps8358\",\r\n \"name\": \"Liquid2-ps8358\",\r\n \"type\": \"Microsoft.Logic/integrationAccounts/maps\"\r\n}", "StatusCode": 201 }, { "RequestUri": "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/RG-ps1327/providers/Microsoft.Logic/integrationAccounts/IA-ps6347?api-version=2018-07-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjM0YjIyYTMtMjIwMi00ZmIxLWIwNDAtMTMzMmJkOTI4Yzg0L3Jlc291cmNlR3JvdXBzL1JHLXBzMTMyNy9wcm92aWRlcnMvTWljcm9zb2Z0LkxvZ2ljL2ludGVncmF0aW9uQWNjb3VudHMvSUEtcHM2MzQ3P2FwaS12ZXJzaW9uPTIwMTgtMDctMDEtcHJldmlldw==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ "45e8c1e2-8628-48d9-bde1-97073530e23b" ], "Accept-Language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.27207.03", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Logic.LogicManagementClient/4.0.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-request-id": [ "westus:09cf13a5-0403-48bc-b9a0-9c126ff16c65" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "x-ms-correlation-request-id": [ "89f09a6e-7343-40cd-b807-1e4bfa608ded" ], "x-ms-routing-request-id": [ "WESTUS2:20190206T001937Z:89f09a6e-7343-40cd-b807-1e4bfa608ded" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ "Wed, 06 Feb 2019 00:19:36 GMT" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, "ResponseBody": "", "StatusCode": 200 } ], "Names": { "Test-CreateIntegrationAccountMap": [ "ps1327", "ps6347", "ps2562", "ps1774", "ps5567", "ps8650", "ps5272", "ps3163", "ps8358" ] }, "Variables": { "SubscriptionId": "f34b22a3-2202-4fb1-b040-1332bd928c84" } }
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: f240c18ff8d4eb44390f8d949e2f6fbd folderAsset: yes DefaultImporter: userData:
{ "pile_set_name": "Github" }
<?php declare(strict_types=1); /** * @copyright Copyright (c) 2020, Georg Ehrke * * @author Georg Ehrke <[email protected]> * * @license AGPL-3.0 * * This code 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, version 3, * along with this program. If not, see <http://www.gnu.org/licenses/> * */ namespace OCA\UserStatus\Exception; class InvalidStatusTypeException extends \Exception { }
{ "pile_set_name": "Github" }
2008 2008
{ "pile_set_name": "Github" }
/* Copyright 2015 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. */ package v1beta1 import ( "k8s.io/client-go/pkg/runtime" ) func addConversionFuncs(scheme *runtime.Scheme) error { // Add non-generated conversion functions return scheme.AddConversionFuncs() }
{ "pile_set_name": "Github" }
cmake_minimum_required(VERSION 3.13.0) project(kaldi_binaries) include(ExternalProject) include(ProcessorCount) ProcessorCount(NCPU) if(NOT NCPU EQUAL 0) set(MAKE_FLAGS -j${NCPU}) endif() set(DST ${PROJECT_SOURCE_DIR}/kaldi_active_grammar/exec) if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin") set(DST ${DST}/macos/) elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") set(DST ${DST}/linux/) else() set(DST ${DST}/windows/) endif() set(BINARIES tools/openfst/bin/fstarcsort${CMAKE_EXECUTABLE_SUFFIX} tools/openfst/bin/fstcompile${CMAKE_EXECUTABLE_SUFFIX} tools/openfst/bin/fstinfo${CMAKE_EXECUTABLE_SUFFIX} src/fstbin/fstaddselfloops${CMAKE_EXECUTABLE_SUFFIX} src/dragonflybin/compile-graph-agf${CMAKE_EXECUTABLE_SUFFIX} ) set(LIBRARIES src/lib/libkaldi-dragonfly${CMAKE_SHARED_LIBRARY_SUFFIX} ) # For MacOS, we handle all the "indirect" shared libraries manually. if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin") list(APPEND LIBRARIES tools/openfst/lib/libfst${CMAKE_SHARED_LIBRARY_SUFFIX} tools/openfst/lib/libfstscript${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-base${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-chain${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-cudamatrix${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-decoder${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-feat${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-fstext${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-gmm${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-hmm${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-ivector${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-lat${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-lm${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-matrix${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-nnet2${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-nnet3${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-online2${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-rnnlm${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-transform${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-tree${CMAKE_SHARED_LIBRARY_SUFFIX} src/lib/libkaldi-util${CMAKE_SHARED_LIBRARY_SUFFIX} ) endif() if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") message(FATAL_ERROR "CMake build not supported on Windows") # FIXME: copy files? # https://cmake.org/cmake/help/latest/command/foreach.html # https://stackoverflow.com/questions/34799916/copy-file-from-source-directory-to-binary-directory-using-cmake endif() if(DEFINED ENV{INTEL_MKL_DIR}) set(INTEL_MKL_DIR $ENV{INTEL_MKL_DIR}) else() set(INTEL_MKL_DIR "/opt/intel/mkl/") endif() if(EXISTS "${INTEL_MKL_DIR}") set(KALDI_CONFIG_FLAGS --shared --static-math --use-cuda=no --mkl-root=${INTEL_MKL_DIR}) else() message(WARNING "cannot find INTEL_MKL_DIR: ${INTEL_MKL_DIR}") set(KALDI_CONFIG_FLAGS --shared --static-math --use-cuda=no) endif() # set(KALDI_CXXFLAGS -O2 -g0) find_program(MAKE_EXE NAMES make gmake nmake) if(DEFINED ENV{KALDI_BRANCH}) set(KALDI_BRANCH $ENV{KALDI_BRANCH}) else() message(FATAL_ERROR "KALDI_BRANCH not set! Use 'origin/master'?") # set(KALDI_BRANCH "origin/master") endif() message(" MAKE_EXE = ${MAKE_EXE}") message(" PYTHON_EXECUTABLE = ${PYTHON_EXECUTABLE}") message(" PYTHON_INCLUDE_DIR = ${PYTHON_INCLUDE_DIR}") message(" PYTHON_LIBRARY = ${PYTHON_LIBRARY}") message(" PYTHON_VERSION_STRING = ${PYTHON_VERSION_STRING}") message(" SKBUILD = ${SKBUILD}") message(" KALDI_BRANCH = ${KALDI_BRANCH}") if(NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") set(STRIP_LIBS_COMMAND find src/lib tools/openfst/lib -name *${CMAKE_SHARED_LIBRARY_SUFFIX} | xargs strip) set(STRIP_DST_COMMAND find ${DST} | xargs strip) if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin") list(APPEND STRIP_LIBS_COMMAND -x) list(APPEND STRIP_DST_COMMAND -x) endif() ExternalProject_Add(kaldi GIT_CONFIG advice.detachedHead=false GIT_REPOSITORY https://github.com/daanzu/kaldi-fork-active-grammar.git GIT_TAG ${KALDI_BRANCH} GIT_SHALLOW TRUE CONFIGURE_COMMAND sed -i.bak -e "s/status=0/exit 0/g" tools/extras/check_dependencies.sh && cp ${PROJECT_SOURCE_DIR}/building/kaldi-configure-wrapper.sh src/ BUILD_IN_SOURCE TRUE BUILD_COMMAND cd tools && ${MAKE_EXE} ${MAKE_FLAGS} && cd openfst && autoreconf && cd ../../src && bash ./kaldi-configure-wrapper.sh ./configure ${KALDI_CONFIG_FLAGS} && ${MAKE_EXE} ${MAKE_FLAGS} depend && ${MAKE_EXE} ${MAKE_FLAGS} dragonfly dragonflybin bin fstbin lmbin LIST_SEPARATOR " " INSTALL_COMMAND ${STRIP_LIBS_COMMAND} && mkdir -p ${DST} && cp ${BINARIES} ${LIBRARIES} ${DST} ) endif() # Fix dynamic libraries loading paths on macOS. The libraries and # executables are built with RPATH settings embedded in them, pointing # to the locations in temporary directories used to build the # binaries. After package installation is done, these directories are # deleted and the dynamic libraries cannot be loaded. The following # commands generate a shell script that fixes the paths to the dynamic # libraries in the built executables and the libraries themselves. # Also the commands add a custom target to invoke the generated script # after the external project (kaldi) has been built. An alternative # would be to change the kaldi engine build system to accept a path to # where the binaries would be placed and point RPATH to that location. if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin") string (REPLACE ";" " " BINARIES_STR "${BINARIES}") string (REPLACE ";" " " LIBRARIES_STR "${LIBRARIES}") file(GENERATE OUTPUT name_fixer CONTENT "for a in ${BINARIES_STR} ; do a_bare=$\{a##*/\} install_name_tool -change ${PROJECT_BINARY_DIR}/kaldi-prefix/src/kaldi/tools/openfst-1.6.7/lib/libfst.10.dylib \"@loader_path/libfst.dylib\" ${DST}$a_bare install_name_tool -change ${PROJECT_BINARY_DIR}/kaldi-prefix/src/kaldi/tools/openfst-1.6.7/lib/libfstscript.10.dylib \"@loader_path/libfstscript.dylib\" ${DST}$a_bare for b in ${LIBRARIES_STR} ; do b_bare=$\{b##*/\} install_name_tool -change \"@rpath/$b_bare\" \"@loader_path/$b_bare\" ${DST}$a_bare done done for a in ${LIBRARIES_STR} ; do a_bare=$\{a##*/\} install_name_tool -id \"@loader_path/$a_bare\" ${DST}$a_bare install_name_tool -change ${PROJECT_BINARY_DIR}/kaldi-prefix/src/kaldi/tools/openfst-1.6.7/lib/libfst.10.dylib \"@loader_path/libfst.dylib\" ${DST}$a_bare install_name_tool -change ${PROJECT_BINARY_DIR}/kaldi-prefix/src/kaldi/tools/openfst-1.6.7/lib/libfstscript.10.dylib \"@loader_path/libfstscript.dylib\" ${DST}$a_bare for b in ${LIBRARIES_STR} ; do b_bare=$\{b##*/\} install_name_tool -change \"@rpath/$b_bare\" \"@loader_path/$b_bare\" ${DST}$a_bare done done") add_custom_target(fixer ALL COMMAND /bin/sh name_fixer) add_dependencies(fixer kaldi) endif() install(CODE "MESSAGE(\"Installed kaldi engine binaries.\")")
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="com.renesas.cdt.launch.dsf.gdbremote.launchConfigurationType"> <stringAttribute key="com.renesas.cdt.core.additionalServerArgs" value=""/> <intAttribute key="com.renesas.cdt.core.admPortNumber" value="61236"/> <stringAttribute key="com.renesas.cdt.core.initCommands" value=""/> <stringAttribute key="com.renesas.cdt.core.ipAddress" value="localhost"/> <stringAttribute key="com.renesas.cdt.core.jtagDevice" value="E1"/> <stringAttribute key="com.renesas.cdt.core.jtagDeviceId" value="com.renesas.hardwaredebug.rx.e1"/> <listAttribute key="com.renesas.cdt.core.listGDBExe"> <listEntry value="rx-elf-gdb --rx-force-64bit-double -rx-force-v2"/> </listAttribute> <listAttribute key="com.renesas.cdt.core.listGDBLaunchName"> <listEntry value="main"/> </listAttribute> <listAttribute key="com.renesas.cdt.core.listGDBPort"> <listEntry value="61234"/> </listAttribute> <booleanAttribute key="com.renesas.cdt.core.loadImage" value="true"/> <stringAttribute key="com.renesas.cdt.core.optionInitCommands" value=""/> <intAttribute key="com.renesas.cdt.core.portNumber" value="61234"/> <stringAttribute key="com.renesas.cdt.core.runCommands" value=""/> <booleanAttribute key="com.renesas.cdt.core.secondGDBSupport" value="false"/> <stringAttribute key="com.renesas.cdt.core.serverParam" value="-g E1 -t R5F564ML -uClockSrcHoco= 0 -uInputClock= 12.0000 -uAllowClockSourceInternal= 1 -uUseFine= 0 -uJTagClockFreq= 16.5 -w 1 -z 0 -uRegisterSetting= 0 -uModePin= 0 -uChangeStartupBank= 0 -uStartupBank= 0 -uDebugMode= 0 -uExecuteProgram= 0 -uIdCode= FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -uresetOnReload= 1 -n 0 -uWorkRamAddress= 1000 -uProgReWriteIRom= 0 -uProgReWriteDFlash= 0 -uhookWorkRamAddr= 0x7fdd0 -uhookWorkRamSize= 0x230"/> <booleanAttribute key="com.renesas.cdt.core.setResume" value="true"/> <booleanAttribute key="com.renesas.cdt.core.setStopAt" value="true"/> <booleanAttribute key="com.renesas.cdt.core.startServer" value="true"/> <stringAttribute key="com.renesas.cdt.core.stopAt" value="main"/> <stringAttribute key="com.renesas.cdt.core.targetDevice" value="R5F564ML"/> <booleanAttribute key="com.renesas.cdt.core.useRemoteTarget" value="true"/> <booleanAttribute key="com.renesas.cdt.core.verboseMode" value="false"/> <stringAttribute key="com.renesas.cdt.debug.ioview.dsf.registerSelection" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;selectedRegisterList ioFilePath=&quot;C:\DevTools\Renesas\e2_studio\internal\IoFiles\RX\RX64M.sfrx&quot;/&gt;&#13;&#10;"/> <stringAttribute key="com.renesas.cdt.debug.realtimemanager.memory.mruRanges" value=""/> <stringAttribute key="com.renesas.cdt.launch.dsf.IO_MAP" value="${support_area_loc}"/> <booleanAttribute key="com.renesas.cdt.launch.dsf.USE_DEFAULT_IO_MAP" value="true"/> <listAttribute key="com.renesas.cdt.launch.dsf.downloadImages"> <listEntry value="|true|true|true||true|No core"/> </listAttribute> <booleanAttribute key="com.renesas.cdt.launch.dsf.downloadImagesUpgradedV30" value="true"/> <stringAttribute key="com.renesas.cdt.launch.dsf.launchSeqType" value="com.renesas.cdt.launch.dsf.launchSequence.e2GdbServer"/> <stringAttribute key="com.renesas.cdt.launch.dsf.serverPath" value="${renesas.support.targetLoc:rx-debug}\e2-server-gdb"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.allow.change.startup_bank" value="false"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.allow.clock.source.internal" value="true"/> <intAttribute key="com.renesas.hardwaredebug.e1.clock_source" value="0"/> <stringAttribute key="com.renesas.hardwaredebug.e1.connection.mode" value="0"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.e1_pwr" value="true"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.enable.hot.plug" value="false"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.enable_external_flash" value="false"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.execute.program" value="false"/> <listAttribute key="com.renesas.hardwaredebug.e1.ext_flash_definitions"/> <stringAttribute key="com.renesas.hardwaredebug.e1.ext_flash_registers" value="2.1,0,"/> <stringAttribute key="com.renesas.hardwaredebug.e1.external_memory" value=""/> <stringAttribute key="com.renesas.hardwaredebug.e1.fine.baud.rate" value="2.00"/> <stringAttribute key="com.renesas.hardwaredebug.e1.flash_overwrite_blocks" value=""/> <stringAttribute key="com.renesas.hardwaredebug.e1.hook_Stop_func" value="0x0"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.hook_enable_Stop" value="false"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.hook_enable_start" value="false"/> <stringAttribute key="com.renesas.hardwaredebug.e1.hook_start_func" value="0x0"/> <intAttribute key="com.renesas.hardwaredebug.e1.hook_work_ram_Addr" value="523728"/> <intAttribute key="com.renesas.hardwaredebug.e1.hook_work_ram_Size" value="560"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.hw_break" value="true"/> <stringAttribute key="com.renesas.hardwaredebug.e1.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/> <stringAttribute key="com.renesas.hardwaredebug.e1.inputclock" value="12.0000"/> <stringAttribute key="com.renesas.hardwaredebug.e1.jtag.clock.freq" value="16.5"/> <stringAttribute key="com.renesas.hardwaredebug.e1.jtag.or.fine" value="0"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.le" value="true"/> <stringAttribute key="com.renesas.hardwaredebug.e1.mode" value="0"/> <stringAttribute key="com.renesas.hardwaredebug.e1.mode_pin" value="0"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.prog_rewrite_dflash" value="false"/> <booleanAttribute key="com.renesas.hardwaredebug.e1.prog_rewrite_irom" value="false"/> <stringAttribute key="com.renesas.hardwaredebug.e1.serial_number" value=""/> <stringAttribute key="com.renesas.hardwaredebug.e1.startup_bank" value="0"/> <stringAttribute key="com.renesas.hardwaredebug.e1.supply.voltage" value="3.3V"/> <intAttribute key="com.renesas.hardwaredebug.e1.timer_clock" value="0"/> <intAttribute key="com.renesas.hardwaredebug.e1.work_ram_start" value="4096"/> <booleanAttribute key="com.renesas.hardwaredebug.e20.le" value="true"/> <booleanAttribute key="com.renesas.hardwaredebug.rx.e1.E1DebugToolSettingsTree.resetAfterReload" value="true"/> <booleanAttribute key="com.renesas.hardwaredebug.timemeasurement" value="true"/> <intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="true"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\RX600_RX64M_RSK_GCC_e2studio\HardwareDebug\RTOSDemo.x"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\RX600_RX64M_RSK_GCC_e2studio\HardwareDebug\RTOSDemo.x"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/> <stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="rx-elf-gdb --rx-force-64bit-double -rx-force-v2"/> <booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="true"/> <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/> <booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/> <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/> <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="HardwareDebug\RTOSDemo.x"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RTOSDemo"/> <booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.renesas.cdt.managedbuild.gcc.rx.configuration.debug.209218855"/> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listEntry value="/RTOSDemo"/> </listAttribute> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> <listEntry value="4"/> </listAttribute> <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> <stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#13;&#10;"/> <stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/> </launchConfiguration>
{ "pile_set_name": "Github" }